From 089760358a28a54e7687abeb2d482902d8c8d003 Mon Sep 17 00:00:00 2001 From: neurolabusc Date: Sat, 1 Apr 2023 12:32:41 -0400 Subject: [PATCH] Compile new release --- package.json | 6 +- release/current/daikon-min.js | 43 +- release/current/daikon.js | 12136 +++++++++++--------------------- 3 files changed, 3966 insertions(+), 8219 deletions(-) diff --git a/package.json b/package.json index 9bd89b7..f2e1283 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ }, "dependencies": { "@wearemothership/dicom-character-set": "^1.0.4-opt.1", - "jpeg-lossless-decoder-js": "git+https://github.com/rii-mango/JPEGLosslessDecoderJS.git#v2.0.4", - "fflate": "*" + "fflate": "*", + "jpeg-lossless-decoder-js": "git+https://github.com/rii-mango/JPEGLosslessDecoderJS.git#v2.0.4" }, "devDependencies": { - "browserify": "^16.5.0", + "browserify": "^16.5.2", "full-icu": "^1.3.0", "icu4c-data": "^0.60.2", "jsdoc-to-markdown": "^4.0.1", diff --git a/release/current/daikon-min.js b/release/current/daikon-min.js index ba6e6e6..0a47aea 100644 --- a/release/current/daikon-min.js +++ b/release/current/daikon-min.js @@ -1,42 +1 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.daikon=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available (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}}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_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=function(title){document.title=title}}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=function(){}}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}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,prepVararg:function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr},getAlignSize:function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)},dynCall:function(sig,ptr,args){if(args&&args.length){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=TOTAL_MEMORY){var success=enlargeMemory();if(!success){DYNAMICTOP=ret;return 0}}return ret},alignMemory:function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret},makeBigInt:function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var __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 JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret},stringToC:function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){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,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>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>2]=0}stop=ret+size;while(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>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;function UTF8ArrayToString(u8Array,idx){var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;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,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}Module["stringToUTF16"]=stringToUTF16;function lengthBytesUTF16(str){return str.length*2}Module["lengthBytesUTF16"]=lengthBytesUTF16;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,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}Module["stringToUTF32"]=stringToUTF32;function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}Module["lengthBytesUTF32"]=lengthBytesUTF32;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"}else{ret=name}paramLoop:while(i0){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 parsed=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()"}parsed=parse()}catch(e){parsed+="?"}if(parsed.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 parsed}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){if(x%4096>0){x+=4096-x%4096}return x}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(){var OLD_TOTAL_MEMORY=TOTAL_MEMORY;var LIMIT=Math.pow(2,31);if(DYNAMICTOP>=LIMIT)return false;while(TOTAL_MEMORY<=DYNAMICTOP){if(TOTAL_MEMORY=LIMIT)return false;try{if(ArrayBuffer.transfer){buffer=ArrayBuffer.transfer(buffer,TOTAL_MEMORY)}else{var oldHEAP8=HEAP8;buffer=new ArrayBuffer(TOTAL_MEMORY)}}catch(e){return false}var success=_emscripten_replace_memory(buffer);if(!success)return false;Module["buffer"]=buffer;Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer);if(!ArrayBuffer.transfer){HEAP8.set(oldHEAP8)}return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=function(buffer){return buffer.byteLength}}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var totalMemory=64*1024;while(totalMemory0){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"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){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>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<=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"];if(!Math["clz32"])Math["clz32"]=function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32};Math.clz32=Math["clz32"];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 Math_clz32=Math.clz32;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+59744;__ATINIT__.push({func:function(){__GLOBAL__I_000101()}},{func:function(){__GLOBAL__sub_I_jpegls_cpp()}},{func:function(){__GLOBAL__sub_I_iostream_cpp()}}) -;allocate([0,0,0,0,0,0,0,0,84,144,0,0,31,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,237,191,0,0,48,0,0,0,0,0,0,0,44,144,0,0,41,192,0,0,84,144,0,0,55,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,115,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,192,0,0,152,3,0,0,0,0,0,0,84,144,0,0,241,192,0,0,216,3,0,0,0,0,0,0,84,144,0,0,55,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,95,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,135,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,216,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,241,193,0,0,48,0,0,0,0,0,0,0,44,144,0,0,13,194,0,0,84,144,0,0,80,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,44,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,139,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,179,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,219,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,3,195,0,0,48,0,0,0,0,0,0,0,84,144,0,0,103,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,157,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,211,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,8,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,71,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,138,196,0,0,160,1,0,0,0,0,0,0,44,144,0,0,120,196,0,0,84,144,0,0,187,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,246,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,49,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,103,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,157,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,210,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,17,198,0,0,160,1,0,0,0,0,0,0,84,144,0,0,86,198,0,0,72,3,0,0,0,0,0,0,84,144,0,0,162,198,0,0,56,2,0,0,0,0,0,0,44,144,0,0,182,198,0,0,84,144,0,0,196,198,0,0,56,2,0,0,0,0,0,0,84,144,0,0,112,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,125,199,0,0,84,144,0,0,138,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,156,199,0,0,84,144,0,0,169,199,0,0,96,2,0,0,0,0,0,0,84,144,0,0,181,199,0,0,120,2,0,0,0,0,0,0,84,144,0,0,214,199,0,0,144,2,0,0,0,0,0,0,84,144,0,0,28,200,0,0,144,2,0,0,0,0,0,0,84,144,0,0,248,199,0,0,176,2,0,0,0,0,0,0,84,144,0,0,62,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,99,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,182,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,245,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,13,222,0,0,152,3,0,0,0,0,0,0,84,144,0,0,38,222,0,0,152,3,0,0,0,0,0,0,44,144,0,0,62,222,0,0,84,144,0,0,87,222,0,0,104,2,0,0,0,0,0,0,44,144,0,0,110,222,0,0,84,144,0,0,135,222,0,0,72,3,0,0,0,0,0,0,84,144,0,0,161,222,0,0,56,3,0,0,0,0,0,0,44,144,0,0,187,222,0,0,84,144,0,0,205,222,0,0,112,3,0,0,0,0,0,0,84,144,0,0,247,222,0,0,112,3,0,0,0,0,0,0,44,144,0,0,33,223,0,0,44,144,0,0,82,223,0,0,124,144,0,0,131,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,178,223,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,124,144,0,0,225,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,16,224,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,84,144,0,0,63,224,0,0,80,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,144,0,0,187,224,0,0,48,3,0,0,0,0,0,0,124,144,0,0,209,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,124,144,0,0,227,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,5,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,40,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,75,225,0,0,144,4,0,0,0,0,0,0,84,144,0,0,109,225,0,0,144,4,0,0,0,0,0,0,124,144,0,0,144,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,178,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,200,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,220,225,0,0,32,4,0,0,0,0,0,0,124,144,0,0,240,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,84,144,0,0,2,226,0,0,32,4,0,0,0,0,0,0,84,144,0,0,23,226,0,0,32,4,0,0,0,0,0,0,124,144,0,0,44,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,80,10,0,0,0,0,0,0,124,144,0,0,112,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,104,10,0,0,0,0,0,0,124,144,0,0,180,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,128,10,0,0,0,0,0,0,124,144,0,0,248,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,152,10,0,0,0,0,0,0,124,144,0,0,60,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,184,10,0,0,0,8,0,0,124,144,0,0,129,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,192,10,0,0,0,8,0,0,124,144,0,0,198,227,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,11,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,80,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,108,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,136,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,164,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,192,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,216,10,0,0,0,0,0,0,124,144,0,0,6,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,224,10,0,0,0,0,0,0,124,144,0,0,76,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,232,10,0,0,0,0,0,0,124,144,0,0,146,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,240,10,0,0,0,0,0,0,124,144,0,0,216,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,124,144,0,0,237,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,144,0,0,73,233,0,0,44,144,0,0,50,233,0,0,124,144,0,0,28,233,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,237,232,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,215,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,124,144,0,0,168,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,44,144,0,0,149,232,0,0,44,144,0,0,115,232,0,0,44,144,0,0,81,232,0,0,44,144,0,0,60,232,0,0,44,144,0,0,39,232,0,0,44,144,0,0,14,232,0,0,44,144,0,0,245,231,0,0,44,144,0,0,220,231,0,0,44,144,0,0,195,231,0,0,44,144,0,0,171,231,0,0,44,144,0,0,190,232,0,0,44,144,0,0,3,233],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([156,143,0,0,0,0,0,0,8,2,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,248,1,0,0,3,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,232,1,0,0,5,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,7,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,200,1,0,0,9,0,0,0,10,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,184,1,0,0,11,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,168,1,0,0,13,0,0,0,14,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,144,1,0,0,15,0,0,0,16,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,128,1,0,0,17,0,0,0,18,0,0,0,9,0,0,0,1,0,0,0,9,0,0,0,0,0,0,0,112,1,0,0,19,0,0,0,20,0,0,0,10,0,0,0,2,0,0,0,10,0,0,0,0,0,0,0,96,1,0,0,21,0,0,0,22,0,0,0,11,0,0,0,3,0,0,0,11,0,0,0,0,0,0,0,80,1,0,0,23,0,0,0,24,0,0,0,12,0,0,0,4,0,0,0,12,0,0,0,0,0,0,0,64,1,0,0,25,0,0,0,26,0,0,0,13,0,0,0,5,0,0,0,13,0,0,0,0,0,0,0,240,0,0,0,27,0,0,0,28,0,0,0,14,0,0,0,6,0,0,0,14,0,0,0,0,0,0,0,224,0,0,0,29,0,0,0,30,0,0,0,15,0,0,0,7,0,0,0,15,0,0,0,0,0,0,0,16,0,0,0,31,0,0,0,32,0,0,0,16,0,0,0,8,0,0,0,16,0,0,0,0,0,0,0,200,0,0,0,33,0,0,0,34,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,184,0,0,0,33,0,0,0,35,0,0,0,3,0,0,0,4,0,0,0,56,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,200,255,255,255,200,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,56,0,0,0,0,0,0,0,104,0,0,0,40,0,0,0,41,0,0,0,200,255,255,255,200,255,255,255,104,0,0,0,42,0,0,0,43,0,0,0,0,0,0,0,88,0,0,0,44,0,0,0,45,0,0,0,17,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,17,0,0,0,3,0,0,0,18,0,0,0,104,141,0,0,64,141,0,0,84,141,0,0,124,141,0,0,0,0,0,0,32,0,0,0,46,0,0,0,47,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,56,0,0,0,48,0,0,0,49,0,0,0,8,0,0,0,9,0,0,0,0,0,0,0,72,0,0,0,50,0,0,0,51,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,120,0,0,0,52,0,0,0,53,0,0,0,12,0,0,0,13,0,0,0,0,0,0,0,136,0,0,0,54,0,0,0,55,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,152,0,0,0,56,0,0,0,57,0,0,0,16,0,0,0,17,0,0,0,0,0,0,0,168,0,0,0,58,0,0,0,59,0,0,0,18,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,216,0,0,0,60,0,0,0,61,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,62,0,0,0,63,0,0,0,20,0,0,0,21,0,0,0,0,0,0,0,16,1,0,0,64,0,0,0,65,0,0,0,22,0,0,0,23,0,0,0,0,0,0,0,32,1,0,0,66,0,0,0,67,0,0,0,24,0,0,0,25,0,0,0,0,0,0,0,48,1,0,0,68,0,0,0,69,0,0,0,26,0,0,0,27,0,0,0,0,0,0,0,160,1,0,0,70,0,0,0,71,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,24,2,0,0,72,0,0,0,73,0,0,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,40,2,0,0,74,0,0,0,75,0,0,0,18,0,0,0,0,0,0,0,64,2,0,0,76,0,0,0,77,0,0,0,19,0,0,0,2,0,0,0,0,0,0,0,80,2,0,0,78,0,0,0,79,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,80,0,0,0,81,0,0,0,7,0,0,0,0,0,0,0,128,2,0,0,82,0,0,0,83,0,0,0,8,0,0,0,0,0,0,0,160,2,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,2,0,0,0,9,0,0,0,28,0,0,0,0,0,0,0,208,2,0,0,84,0,0,0,88,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,3,0,0,0,10,0,0,0,29,0,0,0,0,0,0,0,224,2,0,0,84,0,0,0,89,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,4,0,0,0,11,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,1,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,88,146,0,0,200,146,0,0,56,147,0,0,56,147,0,0,120,187,0,0,168,155,0,0,168,149,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0,0,0,159,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,9,0,0,0,151,215,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,9,0,0,0,143,211,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+35640);allocate([1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+39844) -;allocate([240,2,0,0,90,0,0,0,91,0,0,0,20,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,14,0,0,0,20,0,0,0,0,0,0,0,0,3,0,0,90,0,0,0,92,0,0,0,21,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,16,0,0,0,21,0,0,0,15,0,0,0,22,0,0,0,0,0,0,0,16,3,0,0,93,0,0,0,94,0,0,0,22,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,17,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,16,0,0,0,24,0,0,0,0,0,0,0,32,3,0,0,93,0,0,0,95,0,0,0,23,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,19,0,0,0,20,0,0,0,25,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,56,3,0,0,96,0,0,0,97,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,3,0,0,93,0,0,0,98,0,0,0,17,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,160,3,0,0,90,0,0,0,99,0,0,0,24,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,15,0,0,0,22,0,0,0,8,0,0,0,0,0,0,0,168,3,0,0,100,0,0,0,101,0,0,0,248,255,255,255,248,255,255,255,168,3,0,0,102,0,0,0,103,0,0,0,8,0,0,0,0,0,0,0,192,3,0,0,104,0,0,0,105,0,0,0,248,255,255,255,248,255,255,255,192,3,0,0,106,0,0,0,107,0,0,0,4,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,252,255,255,255,252,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,4,0,0,0,0,0,0,0,240,3,0,0,108,0,0,0,109,0,0,0,252,255,255,255,252,255,255,255,240,3,0,0,110,0,0,0,111,0,0,0,0,0,0,0,96,3,0,0,112,0,0,0,113,0,0,0,7,0,0,0,0,0,0,0,112,3,0,0,114,0,0,0,115,0,0,0,0,0,0,0,8,4,0,0,72,0,0,0,116,0,0,0,21,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,117,0,0,0,118,0,0,0,119,0,0,0,1,0,0,0,33,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,5,0,0,120,0,0,0,121,0,0,0,119,0,0,0,2,0,0,0,34,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,5,0,0,122,0,0,0,123,0,0,0,119,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,5,0,0,124,0,0,0,125,0,0,0,119,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,5,0,0,126,0,0,0,127,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,23,0,0,0,5,0,0,0,24,0,0,0,1,0,0,0,2,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,5,0,0,128,0,0,0,129,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,25,0,0,0,9,0,0,0,26,0,0,0,3,0,0,0,4,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,5,0,0,130,0,0,0,131,0,0,0,119,0,0,0,22,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,1,0,0,0,248,255,255,255,224,5,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,132,0,0,0,133,0,0,0,119,0,0,0,30,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,2,0,0,0,248,255,255,255,8,6,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,6,0,0,134,0,0,0,135,0,0,0,119,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,6,0,0,136,0,0,0,137,0,0,0,119,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,6,0,0,138,0,0,0,139,0,0,0,119,0,0,0,38,0,0,0,39,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,40,0,0,0,29,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,6,0,0,140,0,0,0,141,0,0,0,119,0,0,0,41,0,0,0,42,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,43,0,0,0,35,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,6,0,0,142,0,0,0,143,0,0,0,119,0,0,0,44,0,0,0,45,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,46,0,0,0,41,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,6,0,0,144,0,0,0,145,0,0,0,119,0,0,0,47,0,0,0,48,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,49,0,0,0,47,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,6,0,0,146,0,0,0,147,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,7,0,0,148,0,0,0,149,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,7,0,0,150,0,0,0,151,0,0,0,119,0,0,0,1,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,7,0,0,152,0,0,0,153,0,0,0,119,0,0,0,2,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,7,0,0,154,0,0,0,155,0,0,0,119,0,0,0,19,0,0,0,7,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,156,0,0,0,157,0,0,0,119,0,0,0,20,0,0,0,8,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,4,0,0,158,0,0,0,159,0,0,0,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,5,0,0,160,0,0,0,161,0,0,0,119,0,0,0,27,0,0,0,21,0,0,0,28,0,0,0,22,0,0,0,29,0,0,0,9,0,0,0,23,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,4,0,0,162,0,0,0,163,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,12,0,0,0,50,0,0,0,51,0,0,0,13,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,5,0,0,164,0,0,0,165,0,0,0,119,0,0,0,53,0,0,0,54,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,0,0,0,0,80,5,0,0,166,0,0,0,167,0,0,0,119,0,0,0,55,0,0,0,56,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,0,0,0,0,32,4,0,0,168,0,0,0,169,0,0,0,119,0,0,0,0,0,0,0,48,4,0,0,168,0,0,0,170,0,0,0,119,0,0,0,24,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,30,0,0,0,25,0,0,0,31,0,0,0,26,0,0,0,32,0,0,0,13,0,0,0,27,0,0,0,14,0,0,0,0,0,0,0,80,4,0,0,168,0,0,0,171,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,15,0,0,0,57,0,0,0,58,0,0,0,16,0,0,0,59,0,0,0,0,0,0,0,112,4,0,0,168,0,0,0,172,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,17,0,0,0,60,0,0,0,61,0,0,0,18,0,0,0,62,0,0,0,0,0,0,0,144,4,0,0,168,0,0,0,173,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,176,4,0,0,168,0,0,0,174,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,192,4,0,0,168,0,0,0,175,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,37,0,0,0,89,0,0,0,45,0,0,0,37,0,0,0,109,0,0,0,45,0,0,0,37,0,0,0,100,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,114,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,102,0,0,0,97,0,0,0,108,0,0,0,115,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,110,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,114,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,117,0,0,0,114,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,114,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,99,0,0,0,104,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,105,0,0,0,108,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,101,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,121,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,117,0,0,0,115,0,0,0,116,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,116,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,111,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,77,0,0,0,0,0,0,0,80,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,97,0,0,0,32,0,0,0,37,0,0,0,98,0,0,0,32,0,0,0,37,0,0,0,100,0,0,0,32,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,32,2,32,2,32,2,32,2,32,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,96,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,213,8,213,8,213,8,213,8,213,8,213,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,4,192,4,192,4,192,4,192,4,192,4,192,8,214,8,214,8,214,8,214,8,214,8,214,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,4,192,4,192,4,192,4,192,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,119,83,116,114,101,97,109,32,111,114,32,114,97,119,68,97,116,97,32,110,101,101,100,115,32,116,111,32,114,101,102,101,114,101,110,99,101,32,116,111,32,115,111,109,101,116,104,105,110,103,0,119,105,100,116,104,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,104,101,105,103,104,116,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,98,105,116,115,112,101,114,115,97,109,112,108,101,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,50,44,32,49,54,93,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,110,101,101,100,115,32,116,111,32,98,101,32,115,101,116,32,116,111,32,97,32,118,97,108,117,101,32,111,102,32,123,78,111,110,101,44,32,83,97,109,112,108,101,44,32,76,105,110,101,125,0,99,111,109,112,111,110,101,110,116,115,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,50,53,53,93,0,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,119,105,116,104,32,116,104,101,32,111,116,104,101,114,32,112,97,114,97,109,101,116,101,114,115,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,110,111,116,32,98,101,32,115,101,116,32,116,111,32,83,97,109,112,108,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,52,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,32,111,110,108,121,32,98,101,32,115,101,116,32,116,111,32,78,111,110,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,49,0,67,111,108,111,114,32,116,114,97,110,115,102,111,114,109,97,116,105,111,110,32,0,78,111,32,109,111,114,101,32,98,121,116,101,115,32,97,118,97,105,108,97,98,108,101,32,105,110,32,105,110,112,117,116,32,98,117,102,102,101,114,44,32,115,116,105,108,108,32,110,101,101,100,101,100,105,110,103,32,0,65,110,32,111,100,100,32,110,117,109,98,101,114,32,111,102,32,98,121,116,101,115,32,40,0,41,32,99,97,110,110,111,116,32,98,101,32,115,119,97,112,112,101,100,46,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,69,0,49,49,80,114,111,99,101,115,115,76,105,110,101,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,105,110,103,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,57,98,97,115,105,99,95,111,115,116,114,105,110,103,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,116,69,69,0,50,50,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,83,116,114,101,97,109,0,50,53,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,67,111,109,112,111,110,101,110,116,0,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,104,69,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,67,104,97,114,76,83,32,101,114,114,111,114,0,99,104,97,114,108,115,0,49,53,99,104,97,114,108,115,95,99,97,116,101,103,111,114,121,0,112,97,114,97,109,115,46,88,116,104,117,109,98,110,97,105,108,32,105,115,32,62,32,48,32,98,117,116,32,112,97,114,97,109,115,46,116,104,117,109,98,110,97,105,108,32,61,61,32,110,117,108,108,95,112,116,114,0,49,55,74,112,101,103,77,97,114,107,101,114,83,101,103,109,101,110,116,0,49,49,74,112,101,103,83,101,103,109,101,110,116,0,50,48,74,112,101,103,73,109,97,103,101,68,97,116,97,83,101,103,109,101,110,116,0,69,120,112,101,99,116,101,100,32,74,80,69,71,32,77,97,114,107,101,114,32,115,116,97,114,116,32,98,121,116,101,32,48,120,70,70,32,98,117,116,32,116,104,101,32,98,121,116,101,32,118,97,108,117,101,32,119,97,115,32,48,120,0,74,80,69,71,32,101,110,99,111,100,105,110,103,32,119,105,116,104,32,109,97,114,107,101,114,32,0,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,46,0,85,110,107,110,111,119,110,32,74,80,69,71,32,109,97,114,107,101,114,32,0,32,101,110,99,111,117,110,116,101,114,101,100,46,0,109,114,102,120,0,83,116,57,98,97,100,95,97,108,108,111,99,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,49,51,114,117,110,116,105,109,101,95,101,114,114,111,114,0,83,116,57,116,121,112,101,95,105,110,102,111,0,83,116,56,98,97,100,95,99,97,115,116,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,49,95,95,118,109,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,33,34,98,97,115,105,99,95,115,116,114,105,110,103,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,115,116,114,105,110,103,0,95,95,116,104,114,111,119,95,108,101,110,103,116,104,95,101,114,114,111,114,0,33,34,118,101,99,116,111,114,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,118,101,99,116,111,114,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,116,104,114,101,119,32,97,110,32,101,120,99,101,112,116,105,111,110,0,115,116,100,58,58,98,97,100,95,99,97,115,116,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+42396) -;allocate([32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,80,79,83,73,88],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+52636);allocate([17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,119,69,69,0,117,110,115,117,112,112,111,114,116,101,100,32,108,111,99,97,108,101,32,102,111,114,32,115,116,97,110,100,97,114,100,32,105,110,112,117,116,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,52,95,95,115,104,97,114,101,100,95,99,111,117,110,116,69,0,78,83,116,51,95,95,49,49,50,115,121,115,116,101,109,95,101,114,114,111,114,69,0,78,83,116,51,95,95,49,49,52,101,114,114,111,114,95,99,97,116,101,103,111,114,121,69,0,78,83,116,51,95,95,49,49,50,95,95,100,111,95,109,101,115,115,97,103,101,69,0,58,32,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,55,102,97,105,108,117,114,101,69,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,57,95,95,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,69,0,105,111,115,95,98,97,115,101,58,58,99,108,101,97,114,0,105,111,115,116,114,101,97,109,0,117,110,115,112,101,99,105,102,105,101,100,32,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,65,66,67,68,69,70,120,88,43,45,112,80,105,73,110,78,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,102,97,99,101,116,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,119,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,99,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,115,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,105,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,49,54,95,95,110,97,114,114,111,119,95,116,111,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,49,55,95,95,119,105,100,101,110,95,102,114,111,109,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,119,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,95,95,105,109,112,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,99,69,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,119,69,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,119,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,49,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,49,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,99,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,119,69,69,0,37,112,0,67,0,37,0,0,0,0,0,108,0,108,108,0,0,76,0,37,112,0,0,0,0,37,72,58,37,77,58,37,83,37,109,47,37,100,47,37,121,37,89,45,37,109,45,37,100,37,73,58,37,77,58,37,83,32,37,112,37,72,58,37,77,37,72,58,37,77,58,37,83,108,111,99,97,108,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,48,49,50,51,52,53,54,55,56,57,0,37,76,102,0,109,111,110,101,121,95,103,101,116,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,0,37,46,48,76,102,0,116,114,117,101,0,102,97,108,115,101,0,83,117,110,100,97,121,0,77,111,110,100,97,121,0,84,117,101,115,100,97,121,0,87,101,100,110,101,115,100,97,121,0,84,104,117,114,115,100,97,121,0,70,114,105,100,97,121,0,83,97,116,117,114,100,97,121,0,83,117,110,0,77,111,110,0,84,117,101,0,87,101,100,0,84,104,117,0,70,114,105,0,83,97,116,0,74,97,110,117,97,114,121,0,70,101,98,114,117,97,114,121,0,77,97,114,99,104,0,65,112,114,105,108,0,77,97,121,0,74,117,110,101,0,74,117,108,121,0,65,117,103,117,115,116,0,83,101,112,116,101,109,98,101,114,0,79,99,116,111,98,101,114,0,78,111,118,101,109,98,101,114,0,68,101,99,101,109,98,101,114,0,74,97,110,0,70,101,98,0,77,97,114,0,65,112,114,0,74,117,110,0,74,117,108,0,65,117,103,0,83,101,112,0,79,99,116,0,78,111,118,0,68,101,99,0,65,77,0,80,77,0,37,109,47,37,100,47,37,121,0,37,72,58,37,77,58,37,83,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,37,73,58,37,77,58,37,83,32,37,112,0,78,83,116,51,95,95,49,49,51,109,101,115,115,97,103,101,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,95,95,116,105,109,101,95,112,117,116,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,119,69,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,99,69,69,0,78,83,116,51,95,95,49,57,116,105,109,101,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,112,117,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,103,101,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,50,99,111,100,101,99,118,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,99,116,121,112,101,95,98,97,115,101,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+56215);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]}function _atexit(func,arg){__ATEXIT__.unshift({func:func,arg:arg})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}Module["_i64Subtract"]=_i64Subtract;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 __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted},addRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++},decRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0){if(info.destructor){Runtime.dynCall("vi",info.destructor,[ptr])}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}},clearRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0}};function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}EXCEPTIONS.clearRef(EXCEPTIONS.deAdjust(ptr));throw ptr}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(asm["setTempRet0"](0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(asm["setTempRet0"](0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(asm["setTempRet0"](typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(asm["setTempRet0"](throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr}Module["_memset"]=_memset;var _BDtoILow=true;var _emscripten_resume=true;function ___gxx_personality_v0(){}var _emscripten_landingpad=true;function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]);return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?Pointer_stringify(tm_zone):""};var pattern=Pointer_stringify(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){return leadingNulls(date.tm_hour<13?date.tm_hour:date.tm_hour-12,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>0&&date.tm_hour<13){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){var day=new Date(date.tm_year+1900,date.tm_mon+1,date.tm_mday,0,0,0,0);return day.getDay()||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}function _abort(){Module["abort"]()}function _free(){}Module["_free"]=_free;function ___cxa_free_exception(ptr){try{return _free(ptr)}catch(e){}}function ___cxa_end_catch(){if(___cxa_end_catch.rethrown){___cxa_end_catch.rethrown=false;return}asm["setThrew"](0);var ptr=EXCEPTIONS.caught.pop();if(ptr){EXCEPTIONS.decRef(EXCEPTIONS.deAdjust(ptr));EXCEPTIONS.last=0}}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Runtime.dynCall("v",func);_pthread_once.seen[ptr]=1}function ___lock(){}function ___unlock(){}var PTHREAD_SPECIFIC={};function _pthread_getspecific(key){return PTHREAD_SPECIFIC[key]||0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}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};function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 85:return totalMemory/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 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 79:return 0;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}var _fabs=Math_abs;var PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(key,destructor){if(key==0){return ERRNO_CODES.EINVAL}HEAP32[key>>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}var PATH=undefined;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(){setTimeout(Browser.mainLoop.runner,value)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(!window["setImmediate"]){var setImmediates=[];var emscriptenMainLoopMessageId="__emcc" -;function Browser_setImmediate_messageHandler(event){if(event.source===window&&event.data===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}}window.addEventListener("message",Browser_setImmediate_messageHandler,true);window["setImmediate"]=function Browser_emulated_setImmediate(func){setImmediates.push(func);window.postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){window["setImmediate"](Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){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(thisMainLoopId1&&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(thisMainLoopId0)_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,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},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=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,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;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);if(vrDevice){canvasContainer.requestFullScreen({vrDisplay:vrDevice})}else{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)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){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"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},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>2];return ret},getStr:function(){var ret=Pointer_stringify(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}Module["_i64Add"]=_i64Add;Module["_bitshift64Lshr"]=_bitshift64Lshr;function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}var _BDtoIHigh=true;function _pthread_cleanup_push(routine,arg){__ATEXIT__.push(function(){Runtime.dynCall("vi",routine,[arg])});_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cond_broadcast(){return 0}function ___cxa_guard_acquire(variable){if(!HEAP8[variable>>0]){HEAP8[variable>>0]=1;return 1}return 0}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!");__ATEXIT__.pop();_pthread_cleanup_push.level=__ATEXIT__.length}function ___cxa_guard_release(){}function ___cxa_begin_catch(ptr){__ZSt18uncaught_exceptionv.uncaught_exception--;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function _llvm_eh_typeid_for(type){return type}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _pthread_mutex_lock(){}var _emscripten_postinvoke=true;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){var success=self.alloc(bytes);if(!success)return-1>>>0}return ret}Module["_bitshift64Shl"]=_bitshift64Shl;function ___cxa_guard_abort(){}Module["_memmove"]=_memmove;var _emscripten_preinvoke=true;var _BItoD=true;function _pthread_cond_wait(){return 0}function ___cxa_rethrow(){___cxa_end_catch.rethrown=true;var ptr=EXCEPTIONS.caught.pop();EXCEPTIONS.last=ptr;throw ptr}function _pthread_mutex_unlock(){}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}function _pthread_self(){return 0}function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;assert(offset_high===0);FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffer)___syscall146.buffer=[];var buffer=___syscall146.buffer;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j2147483648)return false;i=new a(newBuffer);j=new b(newBuffer);k=new c(newBuffer);l=new d(newBuffer);m=new e(newBuffer);n=new f(newBuffer);o=new g(newBuffer);p=new h(newBuffer);buffer=newBuffer;return true}function dc(a){a=a|0;var b=0;b=r;r=r+a|0;r=r+15&-16;return b|0}function ec(){return r|0}function fc(a){a=a|0;r=a}function gc(a,b){a=a|0;b=b|0;r=a;s=b}function hc(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function ic(a){a=a|0;i[t>>0]=i[a>>0];i[t+1>>0]=i[a+1>>0];i[t+2>>0]=i[a+2>>0];i[t+3>>0]=i[a+3>>0]}function jc(a){a=a|0;i[t>>0]=i[a>>0];i[t+1>>0]=i[a+1>>0];i[t+2>>0]=i[a+2>>0];i[t+3>>0]=i[a+3>>0];i[t+4>>0]=i[a+4>>0];i[t+5>>0]=i[a+5>>0];i[t+6>>0]=i[a+6>>0];i[t+7>>0]=i[a+7>>0]}function kc(a){a=a|0;M=a}function lc(){return M|0}function mc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;v=r;r=r+128|0;n=v+44|0;q=v+8|0;j=v+4|0;m=v;o=c+4|0;p=c+8|0;x=0;Ja(35,k[c>>2]|0,k[o>>2]|0,k[p>>2]|0,d|0);l=x;x=0;if(!(l&1)){g=n;f=g+84|0;do{k[g>>2]=k[d>>2];g=g+4|0;d=d+4|0}while((g|0)<(f|0));d=n+12|0;if((k[d>>2]|0)==0?(h=ia(((k[n+8>>2]|0)+7|0)/8|0,k[n>>2]|0)|0,k[d>>2]=h,(k[n+24>>2]|0)!=0):0){l=ia(k[n+16>>2]|0,h)|0;k[d>>2]=l}x=0;qa(176,q|0);l=x;x=0;if(!(l&1)){d=n+56|0;do{if(k[d>>2]|0){x=0;d=ta(66,d|0)|0;l=x;x=0;if(!(l&1)){k[j>>2]=d;f=q+28|0;g=k[f>>2]|0;if(g>>>0<(k[q+32>>2]|0)>>>0){k[g>>2]=d;k[f>>2]=g+4;k[j>>2]=0;s=19;break}x=0;ra(57,q+24|0,j|0);l=x;x=0;if(l&1){f=Wa(824,0)|0;d=M;g=k[j>>2]|0;k[j>>2]=0;if(!g)break;Lb[k[(k[g>>2]|0)+4>>2]&255](g);break}else{d=k[j>>2]|0;k[j>>2]=0;if(!d){s=19;break}Lb[k[(k[d>>2]|0)+4>>2]&255](d);s=19;break}}else s=15}else s=19}while(0);a:do{if((s|0)==19){g=n+4|0;h=n+8|0;j=n+16|0;x=0;d=Ea(14,k[n>>2]|0,k[g>>2]|0,k[h>>2]|0,k[j>>2]|0)|0;l=x;x=0;if(!(l&1)){k[m>>2]=d;l=q+28|0;f=k[l>>2]|0;do{if(f>>>0>=(k[q+32>>2]|0)>>>0){x=0;ra(57,q+24|0,m|0);f=x;x=0;if(f&1){f=Wa(824,0)|0;d=M;g=k[m>>2]|0;k[m>>2]=0;if(!g)break a;Lb[k[(k[g>>2]|0)+4>>2]&255](g);break a}else{d=k[m>>2]|0;k[m>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}}else{k[f>>2]=d;k[l>>2]=f+4;k[m>>2]=0}}while(0);d=k[n+28>>2]|0;if((d|0)!=0?(x=0,ra(58,q|0,d|0),s=x,x=0,s&1):0){s=15;break}b:do{if(!(k[n+24>>2]|0)){d=ia(k[g>>2]|0,k[n>>2]|0)|0;d=ia(d,((k[h>>2]|0)+7|0)/8|0)|0;if((k[j>>2]|0)>0){g=0;while(1){x=0;Fa(4,q|0,c|0,n|0);s=x;x=0;if(s&1)break;f=k[o>>2]|0;if(f){k[o>>2]=f+d;k[p>>2]=(k[p>>2]|0)-d}g=g+1|0;if((g|0)>=(k[j>>2]|0))break b}f=Wa(824,0)|0;d=M;s=16;break a}}else{x=0;Fa(4,q|0,c|0,n|0);s=x;x=0;if(s&1){s=15;break a}}}while(0);x=0;Aa(33,q|0,a|0)|0;s=x;x=0;if(!(s&1)){k[b>>2]=k[q+16>>2];if(e)i[e>>0]=0;g=q+24|0;d=k[g>>2]|0;if(d){f=k[l>>2]|0;if((f|0)!=(d|0)){do{e=f+-4|0;k[l>>2]=e;f=k[e>>2]|0;k[e>>2]=0;if(f)Lb[k[(k[f>>2]|0)+4>>2]&255](f);f=k[l>>2]|0}while((f|0)!=(d|0));d=k[g>>2]|0}mj(d)}e=0;r=v;return e|0}else s=15}else s=15}}while(0);if((s|0)==15){f=Wa(824,0)|0;d=M;s=16}l=q+24|0;g=k[l>>2]|0;if(g){j=q+28|0;h=k[j>>2]|0;if((h|0)!=(g|0)){do{q=h+-4|0;k[j>>2]=q;h=k[q>>2]|0;k[q>>2]=0;if(h)Lb[k[(k[h>>2]|0)+4>>2]&255](h);h=k[j>>2]|0}while((h|0)!=(g|0));g=k[l>>2]|0}mj(g)}}else s=5}else s=5;if((s|0)==5){f=Wa(824,0)|0;d=M}q=(d|0)==(ab(824)|0);h=cb(f|0)|0;d=(e|0)==0;if(!q){if(!d)i[e>>0]=0;eb();e=14;r=v;return e|0}g=h+12|0;do{if(!d){d=k[g>>2]|0;x=0;f=Da(1)|0;q=x;x=0;if(!(q&1))if((d|0)==(f|0)){wl(e,Ob[k[(k[h>>2]|0)+8>>2]&127](h)|0)|0;s=60;break}else{i[e>>0]=0;s=60;break}}else s=60}while(0);if((s|0)==60?(t=k[g>>2]|0,x=0,u=Da(1)|0,e=x,x=0,!(e&1)):0){e=(t|0)==(u|0)?k[h+8>>2]|0:13;eb();r=v;return e|0}d=Wa()|0;x=0;Ga(3);v=x;x=0;if(v&1){v=Wa(0)|0;oc(v)}else fb(d|0);return 0}function nc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;j=r;r=r+112|0;f=j+96|0;i=j+84|0;l=j+72|0;m=j+60|0;n=j+48|0;o=j+36|0;p=j+24|0;q=j+12|0;s=j;h=(b|0)==0;if((a|0)==0&h){e=Va(16)|0;x=0;Fa(5,f|0,48504,52);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,f|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(f);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}g=k[d>>2]|0;if((g+-1|0)>>>0>65534){e=Va(16)|0;x=0;Fa(5,i|0,48557,41);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,i|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(i);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}f=k[d+4>>2]|0;if((f+-1|0)>>>0>65534){e=Va(16)|0;x=0;Fa(5,l|0,48599,42);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,l|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(l);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}e=k[d+8>>2]|0;if((e+-2|0)>>>0>14){e=Va(16)|0;x=0;Fa(5,m|0,48642,46);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,m|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(m);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}a=k[d+24>>2]|0;if(a>>>0>=3){e=Va(16)|0;x=0;Fa(5,n|0,48689,65);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,n|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(n);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}b=k[d+16>>2]|0;if((b+-1|0)>>>0>254){e=Va(16)|0;x=0;Fa(5,o|0,48755,44);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,o|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(o);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}if(!h?(o=ia(f,g)|0,(ia(ia(o,(e|0)>8?2:1)|0,b)|0)>>>0>c>>>0):0){e=Va(16)|0;x=0;Fa(5,p|0,48800,58);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,p|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(p);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}switch(b|0){case 4:{if((a|0)!=2){r=j;return}e=Va(16)|0;x=0;Fa(5,q|0,48859,73);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,q|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(q);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}case 3:{r=j;return}default:{if(!a){r=j;return}e=Va(16)|0;x=0;Fa(5,s|0,48933,73);q=x;x=0;if(!(q&1)){x=0;b=Da(1)|0;q=x;x=0;if(!(q&1)?(x=0,Ja(36,e|0,1,b|0,s|0),q=x,x=0,!(q&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(s);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}}}function oc(a){a=a|0;cb(a|0)|0;tj()}function pc(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,j=0,l=0,m=0;m=r;r=r+128|0;f=m+116|0;g=m;x=0;k[f>>2]=k[b>>2];k[f+4>>2]=k[b+4>>2];k[f+8>>2]=k[b+8>>2];ra(59,g|0,f|0);e=x;x=0;if(!(e&1)){if(c){e=g+16|0;b=e+84|0;do{k[e>>2]=k[c>>2];e=e+4|0;c=c+4|0}while((e|0)<(b|0))}x=0;k[f>>2]=k[a>>2];k[f+4>>2]=k[a+4>>2];k[f+8>>2]=k[a+8>>2];ra(60,g|0,f|0);g=x;x=0;if(!(g&1)){if(d)i[d>>0]=0;l=0;r=m;return l|0}}a=Wa(824,0)|0;g=M;g=(g|0)==(ab(824)|0);a=cb(a|0)|0;b=(d|0)==0;if(!g){if(!b)i[d>>0]=0;eb();l=14;r=m;return l|0}e=a+12|0;do{if(!b){b=k[e>>2]|0;x=0;c=Da(1)|0;g=x;x=0;if(!(g&1))if((b|0)==(c|0)){wl(d,Ob[k[(k[a>>2]|0)+8>>2]&127](a)|0)|0;l=10;break}else{i[d>>0]=0;l=10;break}}else l=10}while(0);if((l|0)==10?(h=k[e>>2]|0,x=0,j=Da(1)|0,l=x,x=0,!(l&1)):0){l=(h|0)==(j|0)?k[a+8>>2]|0:13;eb();r=m;return l|0}b=Wa()|0;x=0;Ga(3);m=x;x=0;if(m&1){m=Wa(0)|0;oc(m)}else fb(b|0);return 0}function qc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=r;r=r+128|0;e=j+116|0;d=j;x=0;k[e>>2]=k[a>>2];k[e+4>>2]=k[a+4>>2];k[e+8>>2]=k[a+8>>2];ra(59,d|0,e|0);e=x;x=0;if((!(e&1)?(x=0,qa(177,d|0),e=x,x=0,!(e&1)):0)?(x=0,ra(61,d|0,1),e=x,x=0,!(e&1)):0){a=d+16|0;d=b+84|0;do{k[b>>2]=k[a>>2];b=b+4|0;a=a+4|0}while((b|0)<(d|0));if(c)i[c>>0]=0;c=0;r=j;return c|0}e=Wa(824,0)|0;b=M;b=(b|0)==(ab(824)|0);e=cb(e|0)|0;a=(c|0)==0;if(!b){if(!a)i[c>>0]=0;eb();c=14;r=j;return c|0}b=e+12|0;do{if(!a){a=k[b>>2]|0;x=0;d=Da(1)|0;l=x;x=0;if(!(l&1))if((a|0)==(d|0)){wl(c,Ob[k[(k[e>>2]|0)+8>>2]&127](e)|0)|0;h=13;break}else{i[c>>0]=0;h=13;break}}else h=13}while(0);if((h|0)==13?(f=k[b>>2]|0,x=0,g=Da(1)|0,l=x,x=0,!(l&1)):0){l=(f|0)==(g|0)?k[e+8>>2]|0:13;eb();r=j;return l|0}a=Wa()|0;x=0;Ga(3);l=x;x=0;if(l&1){l=Wa(0)|0;oc(l)}else fb(a|0);return 0}function rc(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,l=0,m=0;m=r;r=r+48|0;i=m+36|0;h=m+24|0;j=m+12|0;l=m;if(!((a|0)!=0&(c|0)!=0&(d|0)!=0&(f|0)!=0)){e=1;r=m;return e|0}k[j>>2]=0;k[j+4>>2]=a;k[j+8>>2]=b;k[l>>2]=0;k[l+4>>2]=d;k[l+8>>2]=e;k[h>>2]=k[j>>2];k[h+4>>2]=k[j+4>>2];k[h+8>>2]=k[j+8>>2];k[i>>2]=k[l>>2];k[i+4>>2]=k[l+4>>2];k[i+8>>2]=k[l+8>>2];e=mc(h,c,i,f,g)|0;r=m;return e|0}function sc(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;e=r;r=r+32|0;f=e+12|0;g=e;h=g;k[h>>2]=0;k[h+4>>2]=0;k[g+4>>2]=a;k[g+8>>2]=b;k[f>>2]=k[g>>2];k[f+4>>2]=k[g+4>>2];k[f+8>>2]=k[g+8>>2];c=qc(f,c,d)|0;r=e;return c|0}function tc(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+48|0;h=g+36|0;i=g+24|0;l=g+12|0;j=g;k[l>>2]=0;k[l+4>>2]=a;k[l+8>>2]=b;k[j>>2]=0;k[j+4>>2]=c;k[j+8>>2]=d;k[i>>2]=k[l>>2];k[i+4>>2]=k[l+4>>2];k[i+8>>2]=k[l+8>>2];k[h>>2]=k[j>>2];k[h+4>>2]=k[j+4>>2];k[h+8>>2]=k[j+8>>2];d=pc(i,h,e,f)|0;r=g;return d|0}function uc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0;j=a+4|0;c=k[a>>2]|0;e=((k[j>>2]|0)-c>>2)+1|0;if(e>>>0>1073741823){jj(a);c=k[a>>2]|0}l=a+8|0;d=(k[l>>2]|0)-c|0;if(d>>2>>>0<536870911){d=d>>1;d=d>>>0>>0?e:d;c=(k[j>>2]|0)-c>>2;if(!d){f=0;g=0}else h=6}else{d=1073741823;c=(k[j>>2]|0)-c>>2;h=6}if((h|0)==6){f=d;g=lj(d<<2)|0}e=g+(c<<2)|0;d=e;i=g+(f<<2)|0;h=k[b>>2]|0;k[b>>2]=0;k[e>>2]=h;h=g+(c+1<<2)|0;g=k[a>>2]|0;c=k[j>>2]|0;if((c|0)==(g|0)){e=a;f=j}else{do{c=c+-4|0;b=k[c>>2]|0;k[c>>2]=0;k[e+-4>>2]=b;e=d+-4|0;d=e}while((c|0)!=(g|0));c=d;e=a;f=j;d=c;g=k[a>>2]|0;c=k[j>>2]|0}k[e>>2]=d;k[f>>2]=h;k[l>>2]=i;e=g;if((c|0)!=(e|0))do{c=c+-4|0;d=k[c>>2]|0;k[c>>2]=0;if(d)Lb[k[(k[d>>2]|0)+4>>2]&255](d)}while((c|0)!=(e|0));if(!g)return;mj(g);return}function vc(){if(i[8]|0)return 35648;if(!(Qa(8)|0))return 35648;tb(72,35648,w|0)|0;Ya(8);return 35648}function wc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+32|0;j=m;Oi(j,(1<>2]|0;l=f+1|0;c=l<<1;k[a>>2]=0;g=a+4|0;k[g>>2]=0;k[a+8>>2]=0;a:do{if(l){if(!((f|0)<-1?(x=0,qa(178,a|0),h=x,x=0,h&1):0))d=4;if((d|0)==4?(x=0,e=ta(67,c|0)|0,h=x,x=0,!(h&1)):0){k[g>>2]=e;k[a>>2]=e;k[a+8>>2]=e+c;b=e;while(1){i[b>>0]=0;b=(k[g>>2]|0)+1|0;k[g>>2]=b;c=c+-1|0;if(!c)break a}}c=Wa()|0;b=k[a>>2]|0;if(!b)fb(c|0);if((k[g>>2]|0)!=(b|0))k[g>>2]=b;mj(b);fb(c|0)}}while(0);b=~f;if((f|0)<(b|0)){r=m;return}g=j+12|0;h=j+8|0;f=j+4|0;e=b;do{b=k[g>>2]|0;if((e|0)>(0-b|0)){c=k[h>>2]|0;if((e|0)>(0-c|0)){d=k[f>>2]|0;if((e|0)>(0-d|0))if((e|0)>=0)if((e|0)>0)if((d|0)<=(e|0))if((c|0)>(e|0))b=2;else b=(b|0)>(e|0)?3:4;else b=1;else b=0;else b=-1;else b=-2}else b=-3}else b=-4;i[(k[a>>2]|0)+(e+l)>>0]=b;e=e+1|0}while((e|0)<(l|0));r=m;return}function xc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;p=k[c+16>>2]|0;switch(p|0){case 64:case 0:{x=0;a=Aa(34,a|0,b|0)|0;b=x;x=0;if(b&1)q=16;else d=a;break}default:{e=(1<>2])+-1|0;o=k[b+20>>2]|0;n=o<<1;n=((n+e|0)/(n|1|0)|0)+1|0;a=0;while(1)if((1<>2]|0;x=0;d=ta(67,4624)|0;m=x;x=0;if(m&1)q=16;else{f=((g|0)<8?8:g)+g<<1;h=d+4|0;l=b;m=h+84|0;do{k[h>>2]=k[l>>2];h=h+4|0;l=l+4|0}while((h|0)<(m|0));h=d+88|0;m=h+40|0;do{k[h>>2]=0;h=h+4|0}while((h|0)<(m|0));k[d>>2]=35660;k[d+128>>2]=e;k[d+132>>2]=n;k[d+136>>2]=o;k[d+140>>2]=a;k[d+144>>2]=g;k[d+148>>2]=f;k[d+152>>2]=p;a=d+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+172>>2]=k[b>>2];k[d+176>>2]=0;k[d+180>>2]=0;k[d+184>>2]=0;a=d+4568|0;e=d+188|0;do{k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;j[e+10>>1]=1;e=e+12|0}while((e|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1}}}if((q|0)==16){q=Wa()|0;fb(q|0)}if(!d)return d|0;x=0;ra(k[(k[d>>2]|0)+12>>2]|0,d|0,c|0);q=x;x=0;if(!(q&1))return d|0;a=Wa()|0;if(!d){q=a;fb(q|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);q=a;fb(q|0);return 0}function yc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0;c=(k[b+24>>2]|0)==2;if(c?(k[b+16>>2]|0)!=3:0){b=0;return b|0}n=k[b+20>>2]|0;a=k[b+8>>2]|0;a:do{if(!n){if(c){if((a|0)!=8)break;d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35688;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}switch(a|0){case 8:{d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35716;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}case 12:{d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35744;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}case 16:{d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35772;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}default:break a}}}while(0);m=(1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35800;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35660;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}}if((a|0)>=17){b=0;return b|0}f=n<<1;f=((f+m|0)/(f|1|0)|0)+1|0;if(c){a=0;while(1)if((1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35828;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35856;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}return 0}function zc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;p=k[c+16>>2]|0;switch(p|0){case 64:case 0:{x=0;a=Aa(35,a|0,b|0)|0;b=x;x=0;if(b&1)q=16;else d=a;break}default:{e=(1<>2])+-1|0;o=k[b+20>>2]|0;n=o<<1;n=((n+e|0)/(n|1|0)|0)+1|0;a=0;while(1)if((1<>2]|0;x=0;d=ta(67,4632)|0;m=x;x=0;if(m&1)q=16;else{f=((g|0)<8?8:g)+g<<1;k[d+4>>2]=0;h=d+8|0;l=b;m=h+84|0;do{k[h>>2]=k[l>>2];h=h+4|0;l=l+4|0}while((h|0)<(m|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;m=d+116|0;k[m>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;k[m+12>>2]=0;k[m+16>>2]=0;k[d>>2]=35884;k[d+136>>2]=e;k[d+140>>2]=n;k[d+144>>2]=o;k[d+148>>2]=a;k[d+152>>2]=g;k[d+156>>2]=f;k[d+160>>2]=p;a=d+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+180>>2]=k[b>>2];k[d+184>>2]=0;k[d+188>>2]=0;k[d+192>>2]=0;a=d+4576|0;e=d+196|0;do{k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;j[e+10>>1]=1;e=e+12|0}while((e|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1}}}if((q|0)==16){q=Wa()|0;fb(q|0)}if(!d)return d|0;x=0;ra(k[(k[d>>2]|0)+8>>2]|0,d|0,c|0);q=x;x=0;if(!(q&1))return d|0;a=Wa()|0;if(!d){q=a;fb(q|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);q=a;fb(q|0);return 0}function Ac(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0;c=(k[b+24>>2]|0)==2;if(c?(k[b+16>>2]|0)!=3:0){b=0;return b|0}n=k[b+20>>2]|0;a=k[b+8>>2]|0;a:do{if(!n){if(c){if((a|0)!=8)break;d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35912;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}switch(a|0){case 8:{d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35940;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}case 12:{d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35968;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}case 16:{d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35996;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}default:break a}}}while(0);m=(1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=36024;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=35884;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}}if((a|0)>=17){b=0;return b|0}f=n<<1;f=((f+m|0)/(f|1|0)|0)+1|0;if(c){a=0;while(1)if((1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=36052;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=36080;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}return 0}function Bc(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0;a=2832;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=4880);sw(2832,0,2048)|0;a=0;do{g=2832+(a+128<<3)|0;k[g>>2]=0;k[g+4>>2]=1;a=a+1|0}while((a|0)!=128);a=3088;k[a>>2]=1;k[a+4>>2]=3;a=3096;k[a>>2]=1;k[a+4>>2]=3;a=3104;k[a>>2]=1;k[a+4>>2]=3;a=3112;k[a>>2]=1;k[a+4>>2]=3;a=3120;k[a>>2]=1;k[a+4>>2]=3;a=3128;k[a>>2]=1;k[a+4>>2]=3;a=3136;k[a>>2]=1;k[a+4>>2]=3;a=3144;k[a>>2]=1;k[a+4>>2]=3;a=3152;k[a>>2]=1;k[a+4>>2]=3;a=3160;k[a>>2]=1;k[a+4>>2]=3;a=3168;k[a>>2]=1;k[a+4>>2]=3;a=3176;k[a>>2]=1;k[a+4>>2]=3;a=3184;k[a>>2]=1;k[a+4>>2]=3;a=3192;k[a>>2]=1;k[a+4>>2]=3;a=3200;k[a>>2]=1;k[a+4>>2]=3;a=3208;k[a>>2]=1;k[a+4>>2]=3;a=3216;k[a>>2]=1;k[a+4>>2]=3;a=3224;k[a>>2]=1;k[a+4>>2]=3;a=3232;k[a>>2]=1;k[a+4>>2]=3;a=3240;k[a>>2]=1;k[a+4>>2]=3;a=3248;k[a>>2]=1;k[a+4>>2]=3;a=3256;k[a>>2]=1;k[a+4>>2]=3;a=3264;k[a>>2]=1;k[a+4>>2]=3;a=3272;k[a>>2]=1;k[a+4>>2]=3;a=3280;k[a>>2]=1;k[a+4>>2]=3;a=3288;k[a>>2]=1;k[a+4>>2]=3;a=3296;k[a>>2]=1;k[a+4>>2]=3;a=3304;k[a>>2]=1;k[a+4>>2]=3;a=3312;k[a>>2]=1;k[a+4>>2]=3;a=3320;k[a>>2]=1;k[a+4>>2]=3;a=3328;k[a>>2]=1;k[a+4>>2]=3;a=3336 -;k[a>>2]=1;k[a+4>>2]=3;a=2896;k[a>>2]=2;k[a+4>>2]=5;a=2904;k[a>>2]=2;k[a+4>>2]=5;a=2912;k[a>>2]=2;k[a+4>>2]=5;a=2920;k[a>>2]=2;k[a+4>>2]=5;a=2928;k[a>>2]=2;k[a+4>>2]=5;a=2936;k[a>>2]=2;k[a+4>>2]=5;a=2944;k[a>>2]=2;k[a+4>>2]=5;a=2952;k[a>>2]=2;k[a+4>>2]=5;a=2848;k[a>>2]=3;k[a+4>>2]=7;a=2856;k[a>>2]=3;k[a+4>>2]=7;a=0;do{g=2832+(a+64<<3)|0;k[g>>2]=-1;k[g+4>>2]=2;a=a+1|0}while((a|0)!=64);a=2960;k[a>>2]=-2;k[a+4>>2]=4;a=2968;k[a>>2]=-2;k[a+4>>2]=4;a=2976;k[a>>2]=-2;k[a+4>>2]=4;a=2984;k[a>>2]=-2;k[a+4>>2]=4;a=2992;k[a>>2]=-2;k[a+4>>2]=4;a=3e3;k[a>>2]=-2;k[a+4>>2]=4;a=3008;k[a>>2]=-2;k[a+4>>2]=4;a=3016;k[a>>2]=-2;k[a+4>>2]=4;a=3024;k[a>>2]=-2;k[a+4>>2]=4;a=3032;k[a>>2]=-2;k[a+4>>2]=4;a=3040;k[a>>2]=-2;k[a+4>>2]=4;a=3048;k[a>>2]=-2;k[a+4>>2]=4;a=3056;k[a>>2]=-2;k[a+4>>2]=4;a=3064;k[a>>2]=-2;k[a+4>>2]=4;a=3072;k[a>>2]=-2;k[a+4>>2]=4;a=3080;k[a>>2]=-2;k[a+4>>2]=4;a=2864;k[a>>2]=-3;k[a+4>>2]=6;a=2872;k[a>>2]=-3;k[a+4>>2]=6;a=2880;k[a>>2]=-3;k[a+4>>2]=6;a=2888;k[a>>2]=-3;k[a+4>>2]=6;a=2840;k[a>>2]=-4;k[a+4>>2]=8;a=4880;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=6928);sw(4880,0,2048)|0;c=2;a=0;e=0;f=0;while(1){c=c<<16>>16;b=8-c|0;d=1<>2]=e;k[g+4>>2]=c;b=b+1|0}while((b|0)<(d|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==7){b=2;e=1;f=-1;g=-1;break}else{c=(a>>1)+2|0;e=b>>16}}while(1){c=b<<16>>16;a=8-c|0;d=1<>2]=f;k[e+4>>2]=c;b=b+1|0}while((b|0)<(d|0))}a=(g<<16)+-65536|0;e=a>>31^a>>15;b=(e>>1)+2|0;if((b|0)>8){a=6928;break}else{f=a>>16;g=g+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=8976);sw(6928,0,2048)|0;e=3;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==12){e=3;b=1;d=-1;f=-1;break}else{e=(a>>2)+3|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>2)+3|0;if((e|0)>8){a=8976;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=11024);sw(8976,0,2048)|0;e=4;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==20){e=4;b=1;d=-1;f=-1;break}else{e=(a>>3)+4|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>3)+4|0;if((e|0)>8){a=11024;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=13072);sw(11024,0,2048)|0;e=5;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==32){e=5;b=1;d=-1;f=-1;break}else{e=(a>>4)+5|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>4)+5|0;if((e|0)>8){a=13072;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=15120);sw(13072,0,2048)|0;e=6;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==48){e=6;b=1;d=-1;f=-1;break}else{e=(a>>5)+6|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>5)+6|0;if((e|0)>8){a=15120;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=17168);sw(15120,0,2048)|0;e=7;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==64){e=7;b=1;d=-1;f=-1;break}else{e=(a>>6)+7|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>6)+7|0;if((e|0)>8){a=17168;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=19216);sw(17168,0,2048)|0;e=8;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==64){f=8;d=1;e=-1;g=-1;break}else{e=(a>>7)+8|0;d=b>>16}}while(1){a=8-f|0;c=1<>2]=e;k[d+4>>2]=f;b=b+1|0}while((b|0)<(c|0))}b=(g<<16)+-65536|0;d=b>>31^b>>15;a=d>>7;if((a|0)>0){a=19216;break}else{f=a+8|0;e=b>>16;g=g+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=21264);sw(19216,0,2048)|0;a=21264;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=23312);sw(21264,0,2048)|0;a=23312;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=25360);sw(23312,0,2048)|0;a=25360;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=27408);sw(25360,0,2048)|0;a=27408;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=29456);sw(27408,0,2048)|0;a=29456;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=31504);sw(29456,0,2048)|0;a=31504;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=33552);sw(31504,0,2048)|0;a=33552;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=35600);sw(33552,0,2048)|0;wc(35600,8);tb(179,35600,w|0)|0;wc(35612,10);tb(179,35612,w|0)|0;wc(35624,12);tb(179,35624,w|0)|0;wc(35636,16);tb(179,35636,w|0)|0;return}function Cc(a){a=a|0;var b=0;b=k[a>>2]|0;if(!b)return;a=a+4|0;if((k[a>>2]|0)!=(b|0))k[a>>2]=b;mj(b);return}function Dc(a){a=a|0;var b=0,c=0;k[a>>2]=36080;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Ec(a){a=a|0;var b=0,c=0;k[a>>2]=36080;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Fc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;re(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function Gc(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35856;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];ge(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;ge(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Hc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ic(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36460;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Jc(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36436;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Kc(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36412;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Lc(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36388;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Mc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;g=a+32|0;Tm(g,b)|0;f=a+44|0;k[f>>2]=0;h=a+48|0;e=k[h>>2]|0;if(e&8){b=i[g>>0]|0;if(!(b&1)){b=((b&255)>>>1)+(g+1)|0;k[f>>2]=b;c=g+1|0;d=g+1|0}else{b=(k[a+40>>2]|0)+(k[a+36>>2]|0)|0;k[f>>2]=b;d=k[a+40>>2]|0;c=d}k[a+8>>2]=c;k[a+12>>2]=d;k[a+16>>2]=b}if(!(e&16))return;b=i[g>>0]|0;if(!(b&1)){e=(b&255)>>>1;k[f>>2]=g+1+e;b=10;f=e}else{e=k[a+36>>2]|0;k[f>>2]=(k[a+40>>2]|0)+e;b=(k[g>>2]&-2)+-1|0;f=e}Wm(g,b,0);b=i[g>>0]|0;if(!(b&1)){e=g+1|0;d=(b&255)>>>1;c=g+1|0}else{c=k[a+40>>2]|0;e=c;d=k[a+36>>2]|0}b=a+24|0;k[b>>2]=c;k[a+20>>2]=c;k[a+28>>2]=e+d;if(!(k[h>>2]&3))return;k[b>>2]=c+f;return}function Nc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+32|0;g=o+16|0;n=o+8|0;h=o;x=0;ra(65,n|0,a|0);l=x;x=0;a:do{if(l&1){c=Wa(0)|0;d=a;e=a}else{do{if(i[n>>0]|0){d=k[(k[a>>2]|0)+-12>>2]|0;k[h>>2]=k[a+(d+24)>>2];j=a+d|0;l=k[a+(d+4)>>2]|0;e=b+c|0;d=a+(d+76)|0;c=k[d>>2]|0;do{if((c|0)==-1){x=0;c=ta(68,j|0)|0;p=x;x=0;if(p&1)m=13;else{k[g>>2]=c;x=0;c=Aa(37,g|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,f=Aa(k[(k[c>>2]|0)+28>>2]|0,c|0,32)|0,p=x,x=0,!(p&1)):0){Qs(g);c=f<<24>>24;k[d>>2]=c;m=9;break}c=Wa(0)|0;Qs(g)}}else m=9}while(0);if((m|0)==9){x=0;k[g>>2]=k[h>>2];c=sa(39,g|0,b|0,((l&176|0)==32?e:b)|0,e|0,j|0,c&255|0)|0;p=x;x=0;if(!(p&1)){if(c)break;p=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+p|0,k[a+(p+16)>>2]|5|0);p=x;x=0;if(!(p&1))break;else m=13}else m=13}if((m|0)==13)c=Wa(0)|0;ro(n);d=a;e=a;break a}}while(0);ro(n);r=o;return a|0}}while(0);cb(c|0)|0;x=0;qa(181,d+(k[(k[e>>2]|0)+-12>>2]|0)|0);p=x;x=0;if(!(p&1)){eb();r=o;return a|0}c=Wa()|0;x=0;Ga(3);p=x;x=0;if(p&1){p=Wa(0)|0;oc(p)}else fb(c|0);return 0}function Oc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=k[b+48>>2]|0;if(c&16){c=b+44|0;d=k[c>>2]|0;e=k[b+24>>2]|0;if(d>>>0>>0)k[c>>2]=e;else e=d;d=k[b+20>>2]|0;f=e-d|0;if(f>>>0>4294967279)ij(a);if(f>>>0<11){i[a>>0]=f<<1;c=a+1|0}else{b=f+16&-16;c=lj(b)|0;k[a+8>>2]=c;k[a>>2]=b|1;k[a+4>>2]=f}if((d|0)!=(e|0)){b=c;while(1){i[b>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(e|0))break;else b=b+1|0}c=c+f|0}i[c>>0]=0;return}if(!(c&8)){k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}d=k[b+8>>2]|0;b=k[b+16>>2]|0;f=b-d|0;if(f>>>0>4294967279)ij(a);if(f>>>0<11){i[a>>0]=f<<1;c=a+1|0}else{e=f+16&-16;c=lj(e)|0;k[a+8>>2]=c;k[a>>2]=e|1;k[a+4>>2]=f}if((d|0)!=(b|0)){e=c;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(b|0))break;else e=e+1|0}c=c+f|0}i[c>>0]=0;return}function Pc(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,j=0,l=0,m=0,n=0,o=0,p=0;k[a>>2]=36364;k[a+4>>2]=c;o=a+8|0;g=k[c>>2]|0;m=c+16|0;f=k[m>>2]|0;l=ia(f,g)|0;k[o>>2]=0;p=a+12|0;k[p>>2]=0;k[a+16>>2]=0;do{if(l){if(!((l|0)<0?(x=0,qa(178,o|0),g=x,x=0,g&1):0))n=4;if((n|0)==4?(h=l<<1,x=0,j=ta(67,h|0)|0,g=x,x=0,!(g&1)):0){k[o>>2]=j;g=j+(l<<1)|0;k[a+16>>2]=g;sw(j|0,0,h|0)|0;k[p>>2]=g;g=k[c>>2]|0;f=k[m>>2]|0;break}h=Wa()|0;e=k[o>>2]|0;f=e;if(e){g=k[p>>2]|0;if((g|0)!=(e|0))k[p>>2]=g+(~((g+-2-f|0)>>>1)<<1);mj(e)}p=h;fb(p|0)}}while(0);h=a+20|0;f=ia(g<<1,f)|0;k[h>>2]=0;j=a+24|0;k[j>>2]=0;k[a+28>>2]=0;if(!f){p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}if(!((f|0)<0?(x=0,qa(178,h|0),m=x,x=0,m&1):0))n=13;if((n|0)==13?(x=0,e=ta(67,f|0)|0,n=x,x=0,!(n&1)):0){k[j>>2]=e;k[h>>2]=e;k[a+28>>2]=e+f;do{i[e>>0]=0;e=(k[j>>2]|0)+1|0;k[j>>2]=e;f=f+-1|0}while((f|0)!=0);p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}g=Wa()|0;e=k[h>>2]|0;if(e){if((k[j>>2]|0)!=(e|0))k[j>>2]=e;mj(e)}e=k[o>>2]|0;if(!e){p=g;fb(p|0)}f=k[p>>2]|0;if((f|0)!=(e|0))k[p>>2]=f+(~((f+-2-e|0)>>>1)<<1);mj(e);p=g;fb(p|0)}function Qc(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,j=0,l=0,m=0,n=0,o=0,p=0;k[a>>2]=36340;k[a+4>>2]=c;o=a+8|0;g=k[c>>2]|0;m=c+16|0;f=k[m>>2]|0;l=ia(f,g)|0;k[o>>2]=0;p=a+12|0;k[p>>2]=0;k[a+16>>2]=0;do{if(l){if(!((l|0)<0?(x=0,qa(178,o|0),g=x,x=0,g&1):0))n=4;if((n|0)==4?(h=l<<1,x=0,j=ta(67,h|0)|0,g=x,x=0,!(g&1)):0){k[o>>2]=j;g=j+(l<<1)|0;k[a+16>>2]=g;sw(j|0,0,h|0)|0;k[p>>2]=g;g=k[c>>2]|0;f=k[m>>2]|0;break}h=Wa()|0;e=k[o>>2]|0;f=e;if(e){g=k[p>>2]|0;if((g|0)!=(e|0))k[p>>2]=g+(~((g+-2-f|0)>>>1)<<1);mj(e)}p=h;fb(p|0)}}while(0);h=a+20|0;f=ia(g<<1,f)|0;k[h>>2]=0;j=a+24|0;k[j>>2]=0;k[a+28>>2]=0;if(!f){p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}if(!((f|0)<0?(x=0,qa(178,h|0),m=x,x=0,m&1):0))n=13;if((n|0)==13?(x=0,e=ta(67,f|0)|0,n=x,x=0,!(n&1)):0){k[j>>2]=e;k[h>>2]=e;k[a+28>>2]=e+f;do{i[e>>0]=0;e=(k[j>>2]|0)+1|0;k[j>>2]=e;f=f+-1|0}while((f|0)!=0);p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}g=Wa()|0;e=k[h>>2]|0;if(e){if((k[j>>2]|0)!=(e|0))k[j>>2]=e;mj(e)}e=k[o>>2]|0;if(!e){p=g;fb(p|0)}f=k[p>>2]|0;if((f|0)!=(e|0))k[p>>2]=f+(~((f+-2-e|0)>>>1)<<1);mj(e);p=g;fb(p|0)}function Rc(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,j=0,l=0,m=0,n=0,o=0,p=0;k[a>>2]=36316;k[a+4>>2]=c;o=a+8|0;g=k[c>>2]|0;m=c+16|0;f=k[m>>2]|0;l=ia(f,g)|0;k[o>>2]=0;p=a+12|0;k[p>>2]=0;k[a+16>>2]=0;do{if(l){if(!((l|0)<0?(x=0,qa(178,o|0),g=x,x=0,g&1):0))n=4;if((n|0)==4?(h=l<<1,x=0,j=ta(67,h|0)|0,g=x,x=0,!(g&1)):0){k[o>>2]=j;g=j+(l<<1)|0;k[a+16>>2]=g;sw(j|0,0,h|0)|0;k[p>>2]=g;g=k[c>>2]|0;f=k[m>>2]|0;break}h=Wa()|0;e=k[o>>2]|0;f=e;if(e){g=k[p>>2]|0;if((g|0)!=(e|0))k[p>>2]=g+(~((g+-2-f|0)>>>1)<<1);mj(e)}p=h;fb(p|0)}}while(0);h=a+20|0;f=ia(g<<1,f)|0;k[h>>2]=0;j=a+24|0;k[j>>2]=0;k[a+28>>2]=0;if(!f){p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}if(!((f|0)<0?(x=0,qa(178,h|0),m=x,x=0,m&1):0))n=13;if((n|0)==13?(x=0,e=ta(67,f|0)|0,n=x,x=0,!(n&1)):0){k[j>>2]=e;k[h>>2]=e;k[a+28>>2]=e+f;do{i[e>>0]=0;e=(k[j>>2]|0)+1|0;k[j>>2]=e;f=f+-1|0}while((f|0)!=0);p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}g=Wa()|0;e=k[h>>2]|0;if(e){if((k[j>>2]|0)!=(e|0))k[j>>2]=e;mj(e)}e=k[o>>2]|0;if(!e){p=g;fb(p|0)}f=k[p>>2]|0;if((f|0)!=(e|0))k[p>>2]=f+(~((f+-2-e|0)>>>1)<<1);mj(e);p=g;fb(p|0)}function Sc(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36316;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Tc(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36316;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Uc(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,j=0;e=a+48|0;if(!(k[e>>2]|0)){h=a+52|0;Zc(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Zc(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Vc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+48>>2]|0;if(!e){e=a+52|0;Wc(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Xc(a,e,b,c,d);return}}function Wc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0;l=a+4|0;f=k[l>>2]|0;do{if(!(i[f+32>>0]|0))n=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*6|0)|0;f=k[l>>2]|0;h=k[f+16>>2]|0;if((d|0)<=0){n=k[g>>2]|0;break}b=k[g>>2]|0;f=b;g=0;while(1){n=f+4|0;o=j[f>>1]|0;j[f>>1]=j[n>>1]|0;j[n>>1]=o;g=g+1|0;if((g|0)==(d|0))break;else f=f+(h<<1)|0}n=b;f=k[l>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:if((k[f+24>>2]|0)==2){if((d|0)<=0)return;f=a+32|0;b=0;do{o=k[f>>2]|0;l=m[n+(b*6|0)+2>>1]<>1]<>1]<>1]=(l+49152+((a+e|0)>>>2)&65535)>>>o;j[c+(b*6|0)+2>>1]=a>>>o;j[c+(b*6|0)+4>>1]=e>>>o;b=b+1|0}while((b|0)!=(d|0));return}else{g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;f=k[a+32>>2]|0;b=0;do{d=m[n+(b*6|0)+2>>1]<>1]<>1]<>1]=(d+49152+((a+o|0)>>>2)&65535)>>>f;j[c+(b+e<<1)>>1]=a>>>f;j[c+(b+h<<1)>>1]=o>>>f;b=b+1|0}while((b|0)!=(g|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;l=e*3|0;f=k[a+32>>2]|0;b=0;do{o=j[n+(b<<3)+6>>1]|0;p=m[n+(b<<3)+2>>1]<>1]<>1]<>1]=(p+49152+((d+a|0)>>>2)&65535)>>>f;j[c+(b+e<<1)>>1]=d>>>f;j[c+(b+h<<1)>>1]=a>>>f;j[c+(b+l<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}default:return}}function Xc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Wc(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Wc(a,q,c,d,e);r=n;return}function Yc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;e=r;r=r+176|0;c=e+152|0;j=e+16|0;g=e;if(!(b&1)){c=(b|0)/4|0;if((b|0)>3){d=0;do{j=a+(d<<2)|0;h=k[j>>2]|0;k[j>>2]=h>>>8&16711935|h<<8&-16711936;d=d+1|0}while((d|0)<(c|0))}if(!(b&3)){r=e;return}g=a+(b+-2)|0;j=a+(b+-1)|0;h=i[g>>0]|0;i[g>>0]=i[j>>0]|0;i[j>>0]=h;r=e;return}h=j+56|0;f=j+4|0;k[j>>2]=36160;k[h>>2]=36180;x=0;ra(62,j+56|0,f|0);e=x;x=0;if(e&1){j=Wa()|0;qn(h);fb(j|0)}k[j+128>>2]=0;k[j+132>>2]=-1;k[j>>2]=36200;k[j+56>>2]=36220;x=0;qa(180,f|0);e=x;x=0;do{if(e&1)c=Wa()|0;else{k[f>>2]=36236;e=j+36|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[j+52>>2]=16;k[c>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;x=0;ra(63,f|0,c|0);a=x;x=0;if(a&1){j=Wa()|0;Sm(c);Sm(e);xn(f);c=j;break}Sm(c);x=0;c=va(28,j|0,49087,24)|0;a=x;x=0;if((!(a&1)?(x=0,d=Aa(36,c|0,b|0)|0,b=x,x=0,!(b&1)):0)?(x=0,va(28,d|0,49112,20)|0,b=x,x=0,!(b&1)):0){a=Va(16)|0;x=0;ra(64,g|0,f|0);b=x;x=0;if(!(b&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,a|0,1,35648,g|0);b=x;x=0;if(b&1)d=1;else{x=0;Fa(6,a|0,824,96);x=0;d=0}c=Wa()|0;Sm(g);if(!d){g=c;k[j>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}else c=Wa()|0;Ua(a|0);g=c;k[j>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}g=Wa()|0;k[j>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}while(0);j=c;qn(h);fb(j|0)}function Zc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;n=a+4|0;f=k[n>>2]|0;a:do{switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)<=0)break a;f=a+40|0;a=0;do{e=k[f>>2]|0;h=m[b+(a*6|0)+2>>1]<>1]<>1]<>2)+16384|0;j[c+(a*6|0)>>1]=(g+32768+l&65535)>>>e;j[c+(a*6|0)+2>>1]=(l&65535)>>>e;j[c+(a*6|0)+4>>1]=(h+32768+l&65535)>>>e;a=a+1|0}while((a|0)!=(d|0))}else{g=(d|0)<(e|0)?d:e;if((g|0)<=0)break a;h=e<<1;f=a+40|0;a=0;do{l=k[f>>2]|0;p=m[b+(a+e<<1)>>1]<>1]<>1]<>2)+16384|0;j[c+(a*6|0)>>1]=(q+32768+o&65535)>>>l;j[c+(a*6|0)+2>>1]=(o&65535)>>>l;j[c+(a*6|0)+4>>1]=(p+32768+o&65535)>>>l;a=a+1|0}while((a|0)!=(g|0))}break}case 4:{if((k[f+24>>2]|0)==1?(l=(d|0)<(e|0)?d:e,(l|0)>0):0){h=e<<1;f=a+40|0;a=e*3|0;g=0;do{q=k[f>>2]|0;p=m[b+(g+e<<1)>>1]<>1]<>1]<>2)+16384|0;r=j[b+(g+a<<1)>>1]|0;t=ww((o&65535)>>>q&65535|0,0,16)|0;p=(p+32768+o&65535)>>>q|M;r=ww(r&65535|0,0,48)|0;r=t|(s+32768+o&65535)>>>q&65535|r;p=p&65535|M;q=c+(g<<3)|0;o=q;j[o>>1]=r;j[o+2>>1]=r>>>16;q=q+4|0;j[q>>1]=p;j[q+2>>1]=p>>>16;g=g+1|0}while((g|0)!=(l|0))}break}default:{}}}while(0);f=k[n>>2]|0;if(!(i[f+32>>0]|0))return;g=k[f+16>>2]|0;if((d|0)<=0)return;f=c;a=0;while(1){t=f+4|0;s=j[f>>1]|0;j[f>>1]=j[t>>1]|0;j[t>>1]=s;a=a+1|0;if((a|0)==(d|0))break;else f=f+(g<<1)|0}return}function _c(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36340;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function $c(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36340;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=a+48|0;if(!(k[e>>2]|0)){h=a+52|0;ed(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;ed(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function bd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+48>>2]|0;if(!e){e=a+52|0;cd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{dd(a,e,b,c,d);return}}function cd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0;l=a+4|0;f=k[l>>2]|0;do{if(!(i[f+32>>0]|0))n=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*6|0)|0;f=k[l>>2]|0;h=k[f+16>>2]|0;if((d|0)<=0){n=k[g>>2]|0;break}b=k[g>>2]|0;f=b;g=0;while(1){n=f+4|0;o=j[f>>1]|0 -;j[f>>1]=j[n>>1]|0;j[n>>1]=o;g=g+1|0;if((g|0)==(d|0))break;else f=f+(h<<1)|0}n=b;f=k[l>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:if((k[f+24>>2]|0)==2){if((d|0)<=0)return;f=a+32|0;b=0;do{e=k[f>>2]|0;l=m[n+(b*6|0)>>1]<>1]<>1]<>>1)&65535)>>>e&65535;j[c+(b*6|0)>>1]=(l+32768-a&65535)>>>e;j[c+(b*6|0)+2>>1]=(a&65535)>>>e;j[c+(b*6|0)+4>>1]=o;b=b+1|0}while((b|0)!=(d|0));return}else{g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;f=k[a+32>>2]|0;b=0;do{d=m[n+(b*6|0)>>1]<>1]<>1]<>>1)&65535)>>>f&65535;j[c+(b<<1)>>1]=(d+32768-a&65535)>>>f;j[c+(b+e<<1)>>1]=(a&65535)>>>f;j[c+(b+h<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;l=e*3|0;f=k[a+32>>2]|0;b=0;do{o=j[n+(b<<3)+6>>1]|0;p=m[n+(b<<3)>>1]<>1]<>1]<>>1)&65535)>>>f&65535;j[c+(b<<1)>>1]=(p+32768-d&65535)>>>f;j[c+(b+e<<1)>>1]=(d&65535)>>>f;j[c+(b+h<<1)>>1]=a;j[c+(b+l<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}default:return}}function dd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;cd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;cd(a,q,c,d,e);r=n;return}function ed(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;n=a+4|0;f=k[n>>2]|0;a:do{switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)<=0)break a;f=a+40|0;a=0;do{l=k[f>>2]|0;h=m[b+(a*6|0)+2>>1]<>1]<>1]<>>1)&65535)>>>l&65535;j[c+(a*6|0)>>1]=g>>>l;j[c+(a*6|0)+2>>1]=h>>>l;j[c+(a*6|0)+4>>1]=e;a=a+1|0}while((a|0)!=(d|0))}else{g=(d|0)<(e|0)?d:e;if((g|0)<=0)break a;h=e<<1;f=a+40|0;a=0;do{o=k[f>>2]|0;p=m[b+(a+e<<1)>>1]<>1]<>1]<>>1)&65535)>>>o&65535;j[c+(a*6|0)>>1]=q>>>o;j[c+(a*6|0)+2>>1]=p>>>o;j[c+(a*6|0)+4>>1]=l;a=a+1|0}while((a|0)!=(g|0))}break}case 4:{if((k[f+24>>2]|0)==1?(l=(d|0)<(e|0)?d:e,(l|0)>0):0){h=e<<1;f=a+40|0;a=e*3|0;g=0;do{o=k[f>>2]|0;q=m[b+(g+e<<1)>>1]<>1]<>1]<>>1)&65535)>>>o;r=j[b+(g+a<<1)>>1]|0;q=ww(q>>>o&65535|0,0,16)|0;p=M|p;r=ww(r&65535|0,0,48)|0;r=s>>>o&65535|q|r;p=p&65535|M;q=c+(g<<3)|0;o=q;j[o>>1]=r;j[o+2>>1]=r>>>16;q=q+4|0;j[q>>1]=p;j[q+2>>1]=p>>>16;g=g+1|0}while((g|0)!=(l|0))}break}default:{}}}while(0);f=k[n>>2]|0;if(!(i[f+32>>0]|0))return;g=k[f+16>>2]|0;if((d|0)<=0)return;f=c;a=0;while(1){s=f+4|0;r=j[f>>1]|0;j[f>>1]=j[s>>1]|0;j[s>>1]=r;a=a+1|0;if((a|0)==(d|0))break;else f=f+(g<<1)|0}return}function fd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36364;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function gd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36364;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function hd(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,j=0;e=a+48|0;if(!(k[e>>2]|0)){h=a+52|0;ld(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;ld(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+48>>2]|0;if(!e){e=a+52|0;jd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{kd(a,e,b,c,d);return}}function jd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0;l=a+4|0;f=k[l>>2]|0;do{if(!(i[f+32>>0]|0))n=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*6|0)|0;f=k[l>>2]|0;h=k[f+16>>2]|0;if((d|0)<=0){n=k[g>>2]|0;break}b=k[g>>2]|0;f=b;g=0;while(1){n=f+4|0;o=j[f>>1]|0;j[f>>1]=j[n>>1]|0;j[n>>1]=o;g=g+1|0;if((g|0)==(d|0))break;else f=f+(h<<1)|0}n=b;f=k[l>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:if((k[f+24>>2]|0)==2){if((d|0)<=0)return;f=a+32|0;b=0;do{e=k[f>>2]|0;a=m[n+(b*6|0)+2>>1]<>1]<>>e&65535;j[c+(b*6|0)>>1]=((m[n+(b*6|0)>>1]<>>e;j[c+(b*6|0)+2>>1]=(a&65535)>>>e;j[c+(b*6|0)+4>>1]=o;b=b+1|0}while((b|0)!=(d|0));return}else{g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;f=k[a+32>>2]|0;b=0;do{a=m[n+(b*6|0)+2>>1]<>1]<>>f&65535;j[c+(b<<1)>>1]=((m[n+(b*6|0)>>1]<>>f;j[c+(b+e<<1)>>1]=(a&65535)>>>f;j[c+(b+h<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;h=(e|0)<(d|0)?e:d;if((h|0)<=0)return;l=e<<1;g=e*3|0;f=k[a+32>>2]|0;b=0;do{o=j[n+(b<<3)+6>>1]|0;d=m[n+(b<<3)+2>>1]<>1]<>>f&65535;j[c+(b<<1)>>1]=((m[n+(b<<3)>>1]<>>f;j[c+(b+e<<1)>>1]=(d&65535)>>>f;j[c+(b+l<<1)>>1]=a;j[c+(b+g<<1)>>1]=o;b=b+1|0}while((b|0)!=(h|0));return}default:return}}function kd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;jd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;jd(a,q,c,d,e);r=n;return}function ld(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;n=a+4|0;f=k[n>>2]|0;a:do{switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)<=0)break a;f=a+40|0;a=0;do{l=k[f>>2]|0;h=m[b+(a*6|0)+2>>1]<>1]<>>l&65535;j[c+(a*6|0)>>1]=((m[b+(a*6|0)>>1]<>>l;j[c+(a*6|0)+2>>1]=(h&65535)>>>l;j[c+(a*6|0)+4>>1]=e;a=a+1|0}while((a|0)!=(d|0))}else{g=(d|0)<(e|0)?d:e;if((g|0)<=0)break a;h=e<<1;f=a+40|0;a=0;do{o=k[f>>2]|0;p=m[b+(a+e<<1)>>1]<>1]<>>o&65535;j[c+(a*6|0)>>1]=((m[b+(a<<1)>>1]<>>o;j[c+(a*6|0)+2>>1]=(p&65535)>>>o;j[c+(a*6|0)+4>>1]=l;a=a+1|0}while((a|0)!=(g|0))}break}case 4:{if((k[f+24>>2]|0)==1?(l=(d|0)<(e|0)?d:e,(l|0)>0):0){h=e<<1;f=a+40|0;a=e*3|0;g=0;do{q=k[f>>2]|0;s=m[b+(g+e<<1)>>1]<>1]<>>q;o=(s+32768+(m[b+(g+h<<1)>>1]<>>q;r=j[b+(g+a<<1)>>1]|0;q=ww((s&65535)>>>q&65535|0,0,16)|0;o=o|M;r=ww(r&65535|0,0,48)|0;r=q|p&65535|r;o=o&65535|M;p=c+(g<<3)|0;q=p;j[q>>1]=r;j[q+2>>1]=r>>>16;p=p+4|0;j[p>>1]=o;j[p+2>>1]=o>>>16;g=g+1|0}while((g|0)!=(l|0))}break}default:{}}}while(0);f=k[n>>2]|0;if(!(i[f+32>>0]|0))return;g=k[f+16>>2]|0;if((d|0)<=0)return;f=c;a=0;while(1){s=f+4|0;r=j[f>>1]|0;j[f>>1]=j[s>>1]|0;j[s>>1]=r;a=a+1|0;if((a|0)==(d|0))break;else f=f+(g<<1)|0}return}function md(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0;n=r;r=r+16|0;l=n;m=k[a>>2]|0;if(!m){a=0;r=n;return a|0}o=b;h=d-o|0;j=e+12|0;g=k[j>>2]|0;h=(g|0)>(h|0)?g-h|0:0;g=c;e=g-o|0;if((e|0)>0?(Qb[k[(k[m>>2]|0)+48>>2]&63](m,b,e)|0)!=(e|0):0){k[a>>2]=0;o=0;r=n;return o|0}do{if((h|0)>0){Rm(l,h,f);x=0;e=va(k[(k[m>>2]|0)+48>>2]|0,m|0,((i[l>>0]&1)==0?l+1|0:k[l+8>>2]|0)|0,h|0)|0;o=x;x=0;if(o&1){o=Wa()|0;Sm(l);fb(o|0)}if((e|0)==(h|0)){Sm(l);break}k[a>>2]=0;Sm(l);o=0;r=n;return o|0}}while(0);d=d-g|0;if((d|0)>0?(Qb[k[(k[m>>2]|0)+48>>2]&63](m,c,d)|0)!=(d|0):0){k[a>>2]=0;o=0;r=n;return o|0}k[j>>2]=0;o=m;r=n;return o|0}function nd(a){a=a|0;k[a>>2]=36236;Sm(a+32|0);xn(a);return}function od(a){a=a|0;k[a>>2]=36236;Sm(a+32|0);xn(a);mj(a);return}function pd(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0;g=b+44|0;h=k[g>>2]|0;l=b+24|0;m=k[l>>2]|0;if(h>>>0>>0){k[g>>2]=m;h=m}j=h;g=f&24;if(!g){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}if((e|0)==1&(g|0)==24){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}a:do{switch(e|0){case 0:{g=0;e=0;break}case 1:if(!(f&8)){e=m-(k[b+20>>2]|0)|0;g=e;e=((e|0)<0)<<31>>31;break a}else{e=(k[b+12>>2]|0)-(k[b+8>>2]|0)|0;g=e;e=((e|0)<0)<<31>>31;break a}case 2:{g=b+32|0;if(!(i[g>>0]&1))g=g+1|0;else g=k[b+40>>2]|0;e=h-g|0;g=e;e=((e|0)<0)<<31>>31;break}default:{b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}}}while(0);e=tw(g|0,e|0,c|0,d|0)|0;c=M;if((c|0)>=0){g=b+32|0;if(!(i[g>>0]&1))g=g+1|0;else g=k[b+40>>2]|0;d=h-g|0;h=((d|0)<0)<<31>>31;if(!((h|0)<(c|0)|(h|0)==(c|0)&d>>>0>>0)){g=f&8;if(!((e|0)==0&(c|0)==0)){if((g|0)!=0?(k[b+12>>2]|0)==0:0){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}if((f&16|0)!=0&(m|0)==0){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}}if(g){k[b+12>>2]=(k[b+8>>2]|0)+e;k[b+16>>2]=j}if(f&16)k[l>>2]=(k[b+20>>2]|0)+e;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=e;k[b+4>>2]=c;return}}b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function qd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=c+8|0;Sb[k[(k[b>>2]|0)+16>>2]&15](a,b,k[c>>2]|0,k[c+4>>2]|0,0,d);return}function rd(a){a=a|0;var b=0,c=0,d=0,e=0;b=a+44|0;c=k[b>>2]|0;d=k[a+24>>2]|0;if(c>>>0>>0){k[b>>2]=d;c=d}if(!(k[a+48>>2]&8)){a=-1;return a|0}e=a+16|0;b=k[e>>2]|0;d=a+12|0;if(b>>>0>>0){d=k[d>>2]|0;k[e>>2]=c;b=c}else d=k[d>>2]|0;if(d>>>0>=b>>>0){a=-1;return a|0}a=l[d>>0]|0;return a|0}function sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;d=a+44|0;c=k[d>>2]|0;e=k[a+24>>2]|0;if(c>>>0>>0){k[d>>2]=e;c=e}h=a+8|0;d=k[h>>2]|0;j=a+12|0;f=k[j>>2]|0;g=d;if(d>>>0>=f>>>0){a=-1;return a|0}if((b|0)==-1){k[h>>2]=d;k[j>>2]=f+-1;k[a+16>>2]=c;a=0;return a|0}if(!(k[a+48>>2]&16)){e=b&255;d=f+-1|0;if(e<<24>>24!=(i[d>>0]|0)){a=-1;return a|0}}else{e=b&255;d=f+-1|0}k[h>>2]=g;k[j>>2]=d;k[a+16>>2]=c;i[d>>0]=e;a=b;return a|0}function td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;s=r;r=r+16|0;m=s;if((b|0)==-1){a=0;r=s;return a|0}n=a+12|0;o=a+8|0;p=(k[n>>2]|0)-(k[o>>2]|0)|0;q=a+24|0;c=k[q>>2]|0;l=a+28|0;d=k[l>>2]|0;do{if((c|0)==(d|0)){h=a+48|0;if(!(k[h>>2]&16)){a=-1;r=s;return a|0}j=a+20|0;g=k[j>>2]|0;e=c-g|0;f=a+44|0;g=(k[f>>2]|0)-g|0;d=a+32|0;x=0;ra(67,d|0,0);c=x;x=0;if(!(c&1)){if(!(i[d>>0]&1))c=10;else c=(k[d>>2]&-2)+-1|0;x=0;Fa(8,d|0,c|0,0);c=x;x=0;if(!(c&1)){c=i[d>>0]|0;if(!(c&1)){d=d+1|0;c=(c&255)>>>1}else{d=k[a+40>>2]|0;c=k[a+36>>2]|0}t=d+c|0;k[j>>2]=d;k[l>>2]=t;j=d+e|0;k[q>>2]=j;c=d+g|0;k[f>>2]=c;d=t;break}}t=Wa(0)|0;cb(t|0)|0;eb();t=-1;r=s;return t|0}else{t=a+44|0;h=a+48|0;f=t;j=c;c=k[t>>2]|0}}while(0);g=j+1|0;k[m>>2]=g;e=k[(g>>>0>>0?f:m)>>2]|0;k[f>>2]=e;if(k[h>>2]&8){c=a+32|0;if(!(i[c>>0]&1))c=c+1|0;else c=k[a+40>>2]|0;k[o>>2]=c;k[n>>2]=c+p;k[a+16>>2]=e}if((j|0)==(d|0)){t=Vb[k[(k[a>>2]|0)+52>>2]&63](a,b&255)|0;r=s;return t|0}else{k[q>>2]=g;i[j>>0]=b;t=b&255;r=s;return t|0}return 0}function ud(a){a=a|0;var b=0,c=0;k[a>>2]=36200;b=a+56|0;k[b>>2]=36220;c=a+4|0;k[c>>2]=36236;Sm(a+36|0);xn(c);qn(b);return}function vd(a){a=a|0;var b=0,c=0;k[a>>2]=36200;b=a+56|0;k[b>>2]=36220;c=a+4|0;k[c>>2]=36236;Sm(a+36|0);xn(c);qn(b);mj(a);return}function wd(a){a=a|0;var b=0,c=0,d=0,e=0;e=k[(k[a>>2]|0)+-12>>2]|0;b=a+e|0;k[b>>2]=36200;c=a+(e+56)|0;k[c>>2]=36220;d=a+(e+4)|0;k[d>>2]=36236;Sm(a+(e+36)|0);xn(d);qn(c);mj(b);return}function xd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36388;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function yd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36388;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function zd(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,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Dd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Dd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Bd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Cd(a,e,b,c,d);return}}function Bd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;n=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=n;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{h=m[l+(f*6|0)+2>>1]|0;e=32768-h+(m[l+(f*6|0)+4>>1]|0)|0;n=(m[l+(f*6|0)>>1]|0)-h+32768|0;j[c+(f*6|0)>>1]=h+49152+(((e&65535)+(n&65535)|0)>>>2);j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=n;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{h=m[l+(b*6|0)+2>>1]|0;d=32768-h+(m[l+(b*6|0)+4>>1]|0)|0;n=(m[l+(b*6|0)>>1]|0)-h+32768|0;j[c+(b<<1)>>1]=h+49152+(((d&65535)+(n&65535)|0)>>>2);j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=n;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{n=j[l+(g<<3)+6>>1]|0;o=m[l+(g<<3)+2>>1]|0;h=32768-o+(m[l+(g<<3)+4>>1]|0)|0;d=(m[l+(g<<3)>>1]|0)-o+32768|0;j[c+(g<<1)>>1]=o+49152+(((h&65535)+(d&65535)|0)>>>2);j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=n;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Cd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Bd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Bd(a,q,c,d,e);r=n;return}function Dd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=m[b+(a*6|0)+2>>1]|0;g=m[b+(a*6|0)+4>>1]|0;e=(m[b+(a*6|0)>>1]|0)-((g+h|0)>>>2)+16384|0;j[c+(a*6|0)>>1]=g+32768+e;j[c+(a*6|0)+2>>1]=e;j[c+(a*6|0)+4>>1]=h+32768+e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=m[b+(g+e<<1)>>1]|0;o=m[b+(g+f<<1)>>1]|0;h=(m[b+(g<<1)>>1]|0)-((o+n|0)>>>2)+16384|0;j[c+(g*6|0)>>1]=o+32768+h;j[c+(g*6|0)+2>>1]=h;j[c+(g*6|0)+4>>1]=n+32768+h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=m[b+(g+e<<1)>>1]|0;p=m[b+(g+a<<1)>>1]|0;o=(m[b+(g<<1)>>1]|0)-((p+n|0)>>>2)+16384|0;q=j[b+(g+f<<1)>>1]|0;r=ww(o&65535|0,0,16)|0;n=n+32768+o|M;q=ww(q&65535|0,0,48)|0;q=r|p+32768+o&65535|q;n=n&65535|M;o=c+(g<<3)|0;p=o;j[p>>1]=q;j[p+2>>1]=q>>>16;o=o+4|0;j[o>>1]=n;j[o+2>>1]=n>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){r=a+4|0;q=j[a>>1]|0;j[a>>1]=j[r>>1]|0;j[r>>1]=q;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Ed(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36412;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Fd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36412;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Gd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Kd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Kd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Hd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Id(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Jd(a,e,b,c,d);return}}function Id(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;n=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=n;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{g=m[l+(f*6|0)>>1]|0;e=j[l+(f*6|0)+2>>1]|0;h=e&65535;n=(m[l+(f*6|0)+4>>1]|0)+32768-((h+g|0)>>>1)&65535;j[c+(f*6|0)>>1]=g+32768-h;j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=n;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=j[l+(b*6|0)+2>>1]|0;g=m[l+(b*6|0)>>1]|0;h=d&65535;n=(m[l+(b*6|0)+4>>1]|0)+32768-((h+g|0)>>>1)&65535;j[c+(b<<1)>>1]=g+32768-h;j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=n;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{h=j[l+(g<<3)+2>>1]|0;n=j[l+(g<<3)+6>>1]|0;p=m[l+(g<<3)>>1]|0;o=h&65535;d=(m[l+(g<<3)+4>>1]|0)+32768-((o+p|0)>>>1)&65535;j[c+(g<<1)>>1]=p+32768-o;j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=n;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Jd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Id(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Id(a,q,c,d,e);r=n;return}function Kd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=j[b+(a*6|0)+2>>1]|0;e=h&65535;g=(m[b+(a*6|0)>>1]|0)+32768+e|0;e=(m[b+(a*6|0)+4>>1]|0)+32768+(((g&65535)+e|0)>>>1)&65535;j[c+(a*6|0)>>1]=g;j[c+(a*6|0)+2>>1]=h;j[c+(a*6|0)+4>>1]=e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=j[b+(g+e<<1)>>1]|0;h=n&65535;o=(m[b+(g<<1)>>1]|0)+32768+h|0;h=(m[b+(g+f<<1)>>1]|0)+32768+(((o&65535)+h|0)>>>1)&65535;j[c+(g*6|0)>>1]=o;j[c+(g*6|0)+2>>1]=n;j[c+(g*6|0)+4>>1]=h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{o=j[b+(g+e<<1)>>1]|0;n=o&65535;p=(m[b+(g<<1)>>1]|0)+32768+n&65535;n=(m[b+(g+a<<1)>>1]|0)+32768+((p+n|0)>>>1)|0;q=j[b+(g+f<<1)>>1]|0;o=ww(o&65535|0,0,16)|0;n=M|n;q=ww(q&65535|0,0,48)|0;q=p|o|q;n=n&65535|M;o=c+(g<<3)|0;p=o;j[p>>1]=q;j[p+2>>1]=q>>>16;o=o+4|0;j[o>>1]=n;j[o+2>>1]=n>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){q=a+4|0;p=j[a>>1]|0;j[a>>1]=j[q>>1]|0;j[q>>1]=p;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Ld(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36436;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Md(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36436;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Nd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Rd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Rd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Od(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Pd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Qd(a,e,b,c,d);return}}function Pd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;n=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=n;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=j[l+(f*6|0)+2>>1]|0;h=e&65535;n=32768-h+(m[l+(f*6|0)+4>>1]|0)&65535;j[c+(f*6|0)>>1]=(m[l+(f*6|0)>>1]|0)+32768-h;j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=n;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=j[l+(b*6|0)+2>>1]|0;h=d&65535;n=32768-h+(m[l+(b*6|0)+4>>1]|0)&65535;j[c+(b<<1)>>1]=(m[l+(b*6|0)>>1]|0)+32768-h;j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=n;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{h=j[l+(g<<3)+2>>1]|0;n=j[l+(g<<3)+6>>1]|0;o=h&65535;d=32768-o+(m[l+(g<<3)+4>>1]|0)&65535;j[c+(g<<1)>>1]=(m[l+(g<<3)>>1]|0)+32768-o;j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=n;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Qd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Pd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Pd(a,q,c,d,e);r=n;return}function Rd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=j[b+(a*6|0)+2>>1]|0;g=h&65535;e=g+32768+(m[b+(a*6|0)+4>>1]|0)&65535;j[c+(a*6|0)>>1]=(m[b+(a*6|0)>>1]|0)+32768+g;j[c+(a*6|0)+2>>1]=h;j[c+(a*6|0)+4>>1]=e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=j[b+(g+e<<1)>>1]|0;o=n&65535;h=o+32768+(m[b+(g+f<<1)>>1]|0)&65535;j[c+(g*6|0)>>1]=(m[b+(g<<1)>>1]|0)+32768+o;j[c+(g*6|0)+2>>1]=n;j[c+(g*6|0)+4>>1]=h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{o=j[b+(g+e<<1)>>1]|0;n=o&65535;p=(m[b+(g<<1)>>1]|0)+32768+n|0;n=n+32768+(m[b+(g+a<<1)>>1]|0)|0;q=j[b+(g+f<<1)>>1]|0;o=ww(o&65535|0,0,16)|0;n=M|n;q=ww(q&65535|0,0,48)|0;q=p&65535|o|q;n=n&65535|M;o=c+(g<<3)|0;p=o;j[p>>1]=q;j[p+2>>1]=q>>>16;o=o+4|0;j[o>>1]=n;j[o+2>>1]=n>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){q=a+4|0;p=j[a>>1]|0;j[a>>1]=j[q>>1]|0;j[q>>1]=p;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Sd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36460;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Td(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36460;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Ud(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,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Yd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Yd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Vd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Wd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Xd(a,e,b,c,d);return}}function Wd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;m=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=m;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=j[l+(f*6|0)+2>>1]|0;m=j[l+(f*6|0)+4>>1]|0;j[c+(f*6|0)>>1]=j[l+(f*6|0)>>1]|0;j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=m;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=j[l+(b*6|0)+2>>1]|0;m=j[l+(b*6|0)+4>>1]|0;j[c+(b<<1)>>1]=j[l+(b*6|0)>>1]|0;j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{h=j[l+(g<<3)+2>>1]|0;d=j[l+(g<<3)+4>>1]|0;m=j[l+(g<<3)+6>>1]|0;j[c+(g<<1)>>1]=j[l+(g<<3)>>1]|0;j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Xd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break -}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Wd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Wd(a,q,c,d,e);r=n;return}function Yd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=j[b+(a*6|0)+2>>1]|0;e=j[b+(a*6|0)+4>>1]|0;j[c+(a*6|0)>>1]=j[b+(a*6|0)>>1]|0;j[c+(a*6|0)+2>>1]=h;j[c+(a*6|0)+4>>1]=e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=j[b+(g+e<<1)>>1]|0;h=j[b+(g+f<<1)>>1]|0;j[c+(g*6|0)>>1]=j[b+(g<<1)>>1]|0;j[c+(g*6|0)+2>>1]=n;j[c+(g*6|0)+4>>1]=h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=j[b+(g<<1)>>1]|0;q=j[b+(g+f<<1)>>1]|0;o=m[b+(g+a<<1)>>1]|0;p=ww(m[b+(g+e<<1)>>1]|0,0,16)|0;o=M|o;q=ww(q&65535|0,0,48)|0;q=p|n&65535|q;o=o&65535|M;n=c+(g<<3)|0;p=n;j[p>>1]=q;j[p+2>>1]=q>>>16;n=n+4|0;j[n>>1]=o;j[n+2>>1]=o>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){q=a+4|0;p=j[a>>1]|0;j[a>>1]=j[q>>1]|0;j[q>>1]=p;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Zd(a){a=a|0;return}function _d(a){a=a|0;mj(a);return}function $d(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=ia(k[a+8>>2]|0,c)|0;a=k[a+4>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,b,c)|0)==(c|0))return;d=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,d|0,3,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(d|0);fb(a|0)}else ub(d|0,824,96)}function ae(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,j=0,l=0,m=0;m=r;r=r+16|0;l=m;j=a+8|0;e=k[j>>2]|0;d=ia(e,c)|0;do{if(d){g=a+4|0;f=d;while(1){e=k[g>>2]|0;e=Qb[k[(k[e>>2]|0)+32>>2]&63](e,b,f)|0;if(!e)break;d=f-e|0;if((f|0)==(e|0)){h=11;break}else f=d}if((h|0)==11){e=k[j>>2]|0;f=d;break}d=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,d|0,3,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(d|0);fb(a|0)}else ub(d|0,824,96)}else f=0}while(0);if((e|0)==2){Yc(b,c<<1);e=k[j>>2]|0}d=k[a+12>>2]|0;if((d|0)<=(ia(e,c)|0)){r=m;return}a=k[a+4>>2]|0;Sb[k[(k[a>>2]|0)+16>>2]&15](l,a,d-f|0,0,1,24);r=m;return}function be(a){a=a|0;mj(a);return}function ce(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=a+4|0;vw(k[d>>2]|0,b|0,ia(k[a+8>>2]|0,c)|0)|0;k[d>>2]=(k[d>>2]|0)+(k[a+12>>2]|0);return}function de(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=a+4|0;vw(b|0,k[d>>2]|0,ia(k[a+8>>2]|0,c)|0)|0;k[d>>2]=(k[d>>2]|0)+(k[a+12>>2]|0);return}function ee(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;k[a+112>>2]=0;k[a+108>>2]=0;l=k[b>>2]|0;e=l;do{if(l){g=a+92|0;l=a+96|0;h=k[l>>2]|0;j=k[g>>2]|0;c=j;d=h-c|0;if(d>>>0>=4e4)if(d>>>0>4e4?(f=j+4e4|0,(h|0)!=(f|0)):0){k[l>>2]=f;f=c}else f=c;else{fe(g,4e4-d|0);f=k[g>>2]|0;e=k[b>>2]|0}c=a+116|0;k[c>>2]=f;h=a+124|0;k[h>>2]=f;j=a+104|0;k[j>>2]=e;d=e;if(e){if((k[d+12>>2]|0)==(k[d+16>>2]|0)){b=(Ob[k[(k[e>>2]|0)+36>>2]&127](d)|0)==-1;d=k[h>>2]|0;if(b)break;e=k[c>>2]|0}else{d=f;e=f}g=d-e|0;if(g>>>0<=64){f=a+92|0;if((d|0)==(e|0))d=e;else{d=e;e=0;do{i[(k[f>>2]|0)+e>>0]=i[d+e>>0]|0;e=e+1|0;d=k[c>>2]|0}while(e>>>0>>0);e=k[h>>2]|0}f=k[f>>2]|0;b=f;m=b-d|0;k[c>>2]=f;d=e+m|0;k[h>>2]=d;f=a+120|0;k[f>>2]=(k[f>>2]|0)+m;j=k[j>>2]|0;d=Qb[k[(k[j>>2]|0)+32>>2]&63](j,d,(k[l>>2]|0)-(b+g)|0)|0;d=(k[h>>2]|0)+d|0;k[h>>2]=d}}else d=f}else{k[a+104>>2]=0;d=k[b+4>>2]|0;c=a+116|0;k[c>>2]=d;d=d+(k[b+8>>2]|0)|0;k[a+124>>2]=d}}while(0);c=k[c>>2]|0;if(c>>>0>=d>>>0){l=c;m=a+120|0;k[m>>2]=l;qe(a);return}while(1){if((i[c>>0]|0)==-1){d=20;break}c=c+1|0;if(c>>>0>=d>>>0){d=20;break}}if((d|0)==20){m=a+120|0;k[m>>2]=c;qe(a);return}}function fe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=a+8|0;e=k[j>>2]|0;l=a+4|0;c=k[l>>2]|0;d=c;if((e-d|0)>>>0>=b>>>0){do{i[c>>0]=0;c=(k[l>>2]|0)+1|0;k[l>>2]=c;b=b+-1|0}while((b|0)!=0);return}c=k[a>>2]|0;f=d-c+b|0;if((f|0)<0){jj(a);e=k[j>>2]|0;c=k[a>>2]|0}d=e-c|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d;c=(k[l>>2]|0)-c|0;if(!d){e=0;g=0;f=c}else h=8}else{d=2147483647;c=(k[l>>2]|0)-c|0;h=8}if((h|0)==8){e=d;g=lj(d)|0;f=c}c=g+f|0;e=g+e|0;d=c;do{i[d>>0]=0;d=c+1|0;c=d;b=b+-1|0}while((b|0)!=0);b=k[a>>2]|0;d=(k[l>>2]|0)-b|0;h=g+(f-d)|0;vw(h|0,b|0,d|0)|0;k[a>>2]=h;k[l>>2]=c;k[j>>2]=e;if(!b)return;mj(b);return}function ge(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;u=r;r=r+32|0;w=u+12|0;t=u;p=a+180|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)s=k[a+24>>2]|0;else s=1;b=ia(s<<1,q)|0;k[w>>2]=0;y=w+4|0;k[y>>2]=0;k[w+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,w|0),v=x,x=0,v&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,v=x,x=0,!(v&1)):0){k[w>>2]=d;v=d+(b<<1)|0;k[w+8>>2]=v;sw(d|0,0,c|0)|0;k[y>>2]=v;break}d=Wa()|0;b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[t>>2]=0;v=t+4|0;k[v>>2]=0;k[t+8>>2]=0;do{if(!s)g=18;else{if(!(s>>>0>1073741823?(x=0,qa(178,t|0),o=x,x=0,o&1):0))g=16;if((g|0)==16?(e=s<<2,x=0,f=ta(67,e|0)|0,o=x,x=0,!(o&1)):0){k[t>>2]=f;g=f+(s<<2)|0;k[t+8>>2]=g;sw(f|0,0,e|0)|0;k[v>>2]=g;g=18;break}d=Wa()|0;b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+12|0;a:do{if((k[f>>2]|0)>0){g=a+4604|0;h=(ia(s,q)|0)+1|0;i=a+4608|0;l=a+92|0;m=(s|0)>0;n=a+4600|0;o=0;b:while(1){c=k[w>>2]|0;b=c+2|0;k[g>>2]=b;c=c+(h<<1)|0;k[i>>2]=c;if(!(o&1))b=c;else{k[g>>2]=c;k[i>>2]=b}e=k[l>>2]|0;x=0;Ja(k[(k[e>>2]|0)+12>>2]|0,e|0,b|0,k[p>>2]|0,q|0);e=x;x=0;if(e&1){g=28;break}if(m){b=k[g>>2]|0;c=k[i>>2]|0;d=k[t>>2]|0;e=0;do{k[n>>2]=k[d+(e<<2)>>2];d=k[p>>2]|0;j[b+(d<<1)>>1]=j[b+(d+-1<<1)>>1]|0;j[c+-2>>1]=j[b>>1]|0;x=0;ra(68,a|0,0);d=x;x=0;if(d&1){g=27;break b}d=k[t>>2]|0;k[d+(e<<2)>>2]=k[n>>2];b=(k[g>>2]|0)+(q<<1)|0;k[g>>2]=b;c=(k[i>>2]|0)+(q<<1)|0;k[i>>2]=c;e=e+1|0}while((e|0)<(s|0))}o=o+1|0;if((o|0)>=(k[f>>2]|0)){g=40;break a}}if((g|0)==27){d=Wa()|0;break}else if((g|0)==28){d=Wa()|0;break}}else g=40}while(0);do{if((g|0)==40){x=0;qa(182,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[t>>2]|0;c=b;if(b){d=k[v>>2]|0;if((d|0)!=(b|0))k[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[w>>2]|0;if(!b){r=u;return}c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=u;return}}while(0);b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function he(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4604|0;b=k[p>>2]|0;s=a+180|0;if((k[s>>2]|0)<=0)return;q=a+4608|0;r=a+4612|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(me(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=le(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function ie(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;e=a+104|0;if((k[e>>2]|0)>>>0<4)je(a);f=a+100|0;g=a+112|0;h=a+96|0;j=a+108|0;l=a+116|0;b=k[f>>2]|0;d=0;do{c=i[g>>0]|0;if((b|0)>31)break;b=k[h>>2]|0;if(!(c<<24>>24)){i[k[j>>2]>>0]=b>>>24;k[h>>2]=k[h>>2]<<8;b=(k[f>>2]|0)+8|0}else{i[k[j>>2]>>0]=b>>>25;k[h>>2]=k[h>>2]<<7;b=(k[f>>2]|0)+7|0}k[f>>2]=b;m=k[j>>2]|0;c=(i[m>>0]|0)==-1&1;i[g>>0]=c;k[j>>2]=m+1;k[e>>2]=(k[e>>2]|0)+-1;k[l>>2]=(k[l>>2]|0)+1;d=d+1|0}while((d|0)<4);if(!(c<<24>>24))ke(a,0,(b|0)%8|0);else ke(a,0,(b+-1|0)%8|0);if((k[e>>2]|0)>>>0<4)je(a);b=k[f>>2]|0;c=0;do{if((b|0)>31)break;b=k[h>>2]|0;if(!(i[g>>0]|0)){i[k[j>>2]>>0]=b>>>24;k[h>>2]=k[h>>2]<<8;b=(k[f>>2]|0)+8|0}else{i[k[j>>2]>>0]=b>>>25;k[h>>2]=k[h>>2]<<7;b=(k[f>>2]|0)+7|0}k[f>>2]=b;m=k[j>>2]|0;i[g>>0]=(i[m>>0]|0)==-1&1;k[j>>2]=m+1;k[e>>2]=(k[e>>2]|0)+-1;k[l>>2]=(k[l>>2]|0)+1;c=c+1|0}while((c|0)<4);if(!(k[a+132>>2]|0))return;je(a);return}function je(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=k[a+132>>2]|0;if(!b){b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,4,35648);a=x;x=0;if(!(a&1))ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}c=a+108|0;d=a+120|0;f=k[d>>2]|0;e=(k[c>>2]|0)-f|0;if((Qb[k[(k[b>>2]|0)+48>>2]&63](b,f,e)|0)==(e|0)){f=k[d>>2]|0;k[c>>2]=f;k[a+104>>2]=(k[a+124>>2]|0)-f;return}b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,4,35648);f=x;x=0;if(!(f&1))ub(b|0,824,96);f=Wa()|0;Ua(b|0);fb(f|0)}function ke(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;l=a+100|0;c=(k[l>>2]|0)-c|0;k[l>>2]=c;if((c|0)>-1){m=a+96|0;k[m>>2]=k[m>>2]|b<>2]=k[m>>2]|b>>0-c;j=a+104|0;if((k[j>>2]|0)>>>0<4){je(a);c=k[l>>2]|0}f=a+112|0;g=a+108|0;h=a+116|0;d=0;while(1){if((c|0)>31)break;c=k[m>>2]|0;if(!(i[f>>0]|0)){i[k[g>>2]>>0]=c>>>24;k[m>>2]=k[m>>2]<<8;c=(k[l>>2]|0)+8|0}else{i[k[g>>2]>>0]=c>>>25;k[m>>2]=k[m>>2]<<7;c=(k[l>>2]|0)+7|0}k[l>>2]=c;n=k[g>>2]|0;i[f>>0]=(i[n>>0]|0)==-1&1;k[g>>2]=n+1;k[j>>2]=(k[j>>2]|0)+-1;k[h>>2]=(k[h>>2]|0)+1;d=d+1|0;if((d|0)>=4){e=11;break}}a:do{if((e|0)==11)if((c|0)<0){k[m>>2]=k[m>>2]|b>>0-c;if((k[j>>2]|0)>>>0<4){je(a);c=k[l>>2]|0;d=0}else d=0;do{if((c|0)>31)break a;c=k[m>>2]|0;if(!(i[f>>0]|0)){i[k[g>>2]>>0]=c>>>24;k[m>>2]=k[m>>2]<<8;c=(k[l>>2]|0)+8|0}else{i[k[g>>2]>>0]=c>>>25;k[m>>2]=k[m>>2]<<7;c=(k[l>>2]|0)+7|0}k[l>>2]=c;n=k[g>>2]|0;i[f>>0]=(i[n>>0]|0)==-1&1;k[g>>2]=n+1;k[j>>2]=(k[j>>2]|0)+-1;k[h>>2]=(k[h>>2]|0)+1;d=d+1|0}while((d|0)<4)}}while(0);k[m>>2]=k[m>>2]|b<>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;pe(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&65535;return r|0}r=e&~(b>>31);r=r&65535;return r|0}function me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0;i=(k[a+180>>2]|0)-b|0;l=k[a+4608>>2]|0;n=k[a+4604>>2]|0;e=j[l+(b+-1<<1)>>1]|0;h=e&65535;c=k[a+144>>2]|0;f=0;while(1){d=l+(f+b<<1)|0;g=(m[d>>1]|0)-h|0;if((((g|0)>-1?g:0-g|0)|0)>(c|0))break;j[d>>1]=e;f=f+1|0;if((f|0)==(i|0)){f=i;break}}e=(f|0)==(i|0);g=a+4600|0;d=k[36476+(k[g>>2]<<2)>>2]|0;if((1<(f|0))c=f;else{c=f;do{ke(a,1,1);d=k[g>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[g>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]|0,h,m[n+(i<<1)>>1]|0)|0;j[b>>1]=a;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;a=f+1|0;return a|0}if(!c){a=i;return a|0}ke(a,1,1);a=i;return a|0}function ne(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;h=c-d|0;i=a+136|0;g=a+144|0;e=k[g>>2]|0;if((((h|0)>-1?h:0-h|0)|0)>(e|0)){f=d-c>>31|1;b=ia(f,b-d|0)|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;c=((b|0)<0?e:0)+b|0;e=c-((c|0)<((e+1|0)/2|0|0)?0:e)|0;oe(a,a+4576|0,e);e=ia(e,f)|0;f=k[g>>2]|0;g=f<<1|1;e=(ia(e,g)|0)+d|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&65535;return i|0}i=b&~(e>>31);i=i&65535;return i|0}else{b=b-c|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;f=((b|0)<0?e:0)+b|0;e=f-((f|0)<((e+1|0)/2|0|0)?0:e)|0;oe(a,a+4588|0,e);f=k[g>>2]|0;g=f<<1|1;e=(ia(g,e)|0)+c|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&65535;return i|0}i=b&~(e>>31);i=i&65535;return i|0}return 0}function oe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;pe(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function pe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>2]|0;j=a+120|0;if(b>>>0<((k[j>>2]|0)+-3|0)>>>0){j=a+112|0;g=k[j>>2]|0;a=a+108|0;k[a>>2]=(l[b+1>>0]<<16|l[b>>0]<<24|l[b+2>>0]<<8|l[b+3>>0])>>>g|k[a>>2];a=32-g>>3;k[h>>2]=b+a;k[j>>2]=(a<<3)+g;return}g=a+104|0;c=k[g>>2]|0;do{if(c){if((k[c+12>>2]|0)==(k[c+16>>2]|0)){if((Ob[k[(k[c>>2]|0)+36>>2]&127](c)|0)==-1)break;b=k[h>>2]|0}e=a+124|0;c=k[e>>2]|0;f=c-b|0;if(f>>>0<=64){d=a+92|0;if((c|0)==(b|0))c=b;else{c=0;do{i[(k[d>>2]|0)+c>>0]=i[b+c>>0]|0;c=c+1|0;b=k[h>>2]|0}while(c>>>0>>0);c=b;b=k[e>>2]|0}n=k[d>>2]|0;d=n;m=d-c|0;k[h>>2]=n;c=b+m|0;k[e>>2]=c;k[j>>2]=(k[j>>2]|0)+m;g=k[g>>2]|0;g=Qb[k[(k[g>>2]|0)+32>>2]&63](g,c,(k[a+96>>2]|0)-(d+f)|0)|0;k[e>>2]=(k[e>>2]|0)+g}}}while(0);g=a+112|0;f=a+108|0;a=k[a+124>>2]|0;e=a+-1|0;b=k[h>>2]|0;while(1){if(b>>>0>=a>>>0){c=14;break}d=i[b>>0]|0;c=d&255;d=d<<24>>24==-1;if(d){if((b|0)==(e|0)){c=25;break}b=b+1|0;if((i[b>>0]|0)<0){c=25;break}}else b=b+1|0;n=k[g>>2]|0;k[f>>2]=c<<24-n|k[f>>2];k[h>>2]=b;n=n+(d?7:8)|0;k[g>>2]=n;if((n|0)>=24){c=33;break}}if((c|0)==14){if((k[g>>2]|0)>=1)return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,5,35648);n=x;x=0;if(!(n&1))ub(b|0,824,96);n=Wa()|0;Ua(b|0);fb(n|0)}else if((c|0)==25){if((k[g>>2]|0)>=1)return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,5,35648);n=x;x=0;if(!(n&1))ub(b|0,824,96);n=Wa()|0;Ua(b|0);fb(n|0)}else if((c|0)==33){a:do{if(b>>>0>>0)do{if((i[b>>0]|0)==-1)break a;b=b+1|0}while(b>>>0>>0)}while(0);k[j>>2]=b;return}}function re(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+144|0;a:do{if(!(k[n>>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function se(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=a+8|0;e=k[j>>2]|0;l=a+4|0;c=k[l>>2]|0;d=c;if((e-d|0)>>>0>=b>>>0){do{i[c>>0]=0;c=(k[l>>2]|0)+1|0;k[l>>2]=c;b=b+-1|0}while((b|0)!=0);return}c=k[a>>2]|0;f=d-c+b|0;if((f|0)<0){jj(a);e=k[j>>2]|0;c=k[a>>2]|0}d=e-c|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d;c=(k[l>>2]|0)-c|0;if(!d){e=0;g=0;f=c}else h=8}else{d=2147483647;c=(k[l>>2]|0)-c|0;h=8}if((h|0)==8){e=d;g=lj(d)|0;f=c}c=g+f|0;e=g+e|0;d=c;do{i[d>>0]=0;d=c+1|0;c=d;b=b+-1|0}while((b|0)!=0);b=k[a>>2]|0;d=(k[l>>2]|0)-b|0;h=g+(f-d)|0;vw(h|0,b|0,d|0)|0;k[a>>2]=h;k[l>>2]=c;k[j>>2]=e;if(!b)return;mj(b);return}function te(a){a=a|0;var b=0,c=0;k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function ue(a){a=a|0;var b=0,c=0;k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function ve(a){a=a|0;var b=0,c=0;k[a>>2]=36052;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function we(a){a=a|0;var b=0,c=0;k[a>>2]=36052;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function xe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;He(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function ye(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35828;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];Ae(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;Ae(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function ze(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ae(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+180|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;do{if(b){if(!(b>>>0>715827882?(x=0,qa(178,v|0),u=x,x=0,u&1):0))g=6;if((g|0)==6?(x=0,c=ta(67,b*6|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;d=c+(b*6|0)|0;k[v+8>>2]=d;while(1){j[c>>1]=0;j[c+2>>1]=0;j[c+4>>1]=0;b=b+-1|0;if(!b)break;else c=c+6|0}k[w>>2]=d;break}d=Wa()|0;b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)g=20;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))g=18;if((g|0)==18?(e=q<<2,x=0,f=ta(67,e|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=f;g=f+(q<<2)|0;k[s+8>>2]=g;sw(f|0,0,e|0)|0;k[u>>2]=g;g=20;break}d=Wa()|0;b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==20){e=a+12|0;a:do{if((k[e>>2]|0)>0){f=a+4604|0;g=(ia(q,p)|0)+1|0;h=a+4608|0;i=a+92|0;l=(q|0)>0;m=a+4600|0;n=0;b:while(1){c=k[v>>2]|0;b=c+6|0;k[f>>2]=b;c=c+(g*6|0)|0;k[h>>2]=c;if(!(n&1))b=c;else{k[f>>2]=c;k[h>>2]=b}d=k[i>>2]|0;x=0;Ja(k[(k[d>>2]|0)+12>>2]|0,d|0,b|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){g=30;break}if(l){b=k[s>>2]|0;c=k[f>>2]|0;d=0;do{k[m>>2]=k[b+(d<<2)>>2];y=k[o>>2]|0;b=c+(y*6|0)|0;c=c+((y+-1|0)*6|0)|0;j[b>>1]=j[c>>1]|0;j[b+2>>1]=j[c+2>>1]|0;j[b+4>>1]=j[c+4>>1]|0;c=(k[h>>2]|0)+-6|0;b=k[f>>2]|0;j[c>>1]=j[b>>1]|0;j[c+2>>1]=j[b+2>>1]|0;j[c+4>>1]=j[b+4>>1]|0;x=0;ra(69,a|0,0);c=x;x=0;if(c&1){g=29;break b}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[m>>2];c=(k[f>>2]|0)+(p*6|0)|0;k[f>>2]=c;k[h>>2]=(k[h>>2]|0)+(p*6|0);d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(182,a|0);y=x;x=0;if(y&1){d=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);r=t;return}}while(0);b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}function Be(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=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;B=a+180|0;if((k[B>>2]|0)<=0)return;C=a+4608|0;D=a+4604|0;E=a+4612|0;A=0;while(1){x=A+-1|0;f=k[C>>2]|0;g=k[D>>2]|0;b=A+1|0;e=m[g+(A*6|0)>>1]|0;z=k[E>>2]|0;h=m[g+(x*6|0)>>1]|0;l=e-h|0;n=m[f+(x*6|0)>>1]|0;o=h-n|0;p=((((i[z+((m[g+(b*6|0)>>1]|0)-e)>>0]|0)*9|0)+(i[z+l>>0]|0)|0)*9|0)+(i[z+o>>0]|0)|0;d=m[g+(A*6|0)+2>>1]|0;q=m[g+(x*6|0)+2>>1]|0;r=d-q|0;s=m[f+(x*6|0)+2>>1]|0;t=q-s|0;u=((((i[z+((m[g+(b*6|0)+2>>1]|0)-d)>>0]|0)*9|0)+(i[z+r>>0]|0)|0)*9|0)+(i[z+t>>0]|0)|0;c=m[g+(A*6|0)+4>>1]|0;v=m[g+(x*6|0)+4>>1]|0;w=c-v|0;x=m[f+(x*6|0)+4>>1]|0;y=v-x|0;z=((((i[z+((m[g+(b*6|0)+4>>1]|0)-c)>>0]|0)*9|0)+(i[z+w>>0]|0)|0)*9|0)+(i[z+y>>0]|0)|0;if(!(u|p|z))b=(Ce(a,A,0)|0)+A|0;else{g=m[f+(A*6|0)>>1]|0;f=e-n>>31;if((f^o|0)>=0)if((f^l|0)<0)e=n;else e=n-h+e|0;g=De(a,p,g,e,0)|0;f=m[(k[C>>2]|0)+(A*6|0)+2>>1]|0;e=d-s>>31;if((e^t|0)>=0)if((e^r|0)<0)d=s;else d=s-q+d|0;e=De(a,u,f,d,0)|0;f=m[(k[C>>2]|0)+(A*6|0)+4>>1]|0;d=c-x>>31;if((d^y|0)>=0)if((d^w|0)<0)c=x;else c=x-v+c|0;y=De(a,z,f,c,0)|0;z=k[C>>2]|0;j[z+(A*6|0)>>1]=g;j[z+(A*6|0)+2>>1]=e;j[z+(A*6|0)+4>>1]=y}if((b|0)<(k[B>>2]|0))A=b;else break}return}function Ce(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;B=r;r=r+48|0;q=B+30|0;p=B+24|0;o=B+18|0;s=B+12|0;x=B+6|0;y=B;z=(k[a+180>>2]|0)-b|0;A=k[a+4608>>2]|0;t=k[a+4604>>2]|0;w=b+-1|0;u=j[A+(w*6|0)>>1]|0;v=j[A+(w*6|0)+2>>1]|0;w=j[A+(w*6|0)+4>>1]|0;c=u&65535;d=a+144|0;e=v&65535;f=w&65535;n=0;while(1){i=n+b|0;g=A+(i*6|0)|0;h=A+(i*6|0)+2|0;i=A+(i*6|0)+4|0;C=(m[g>>1]|0)-c|0;l=k[d>>2]|0;if((((C|0)>-1?C:0-C|0)|0)>(l|0))break;C=(m[h>>1]|0)-e|0;if((((C|0)>-1?C:0-C|0)|0)>(l|0))break;C=(m[i>>1]|0)-f|0;if((((C|0)>-1?C:0-C|0)|0)>(l|0))break;j[g>>1]=u;j[h>>1]=v;j[i>>1]=w;n=n+1|0;if((n|0)==(z|0)){n=z;break}}e=(n|0)==(z|0);f=a+4600|0;d=k[36476+(k[f>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[f>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[f>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]=j[C>>1]|0;j[x+2>>1]=j[C+2>>1]|0;j[x+4>>1]=j[C+4>>1]|0;j[y>>1]=u;j[y+2>>1]=v;j[y+4>>1]=w;b=t+(b*6|0)|0;j[o>>1]=j[x>>1]|0;j[o+2>>1]=j[x+2>>1]|0;j[o+4>>1]=j[x+4>>1]|0;j[p>>1]=j[y>>1]|0;j[p+2>>1]=j[y+2>>1]|0;j[p+4>>1]=j[y+4>>1]|0;j[q>>1]=j[b>>1]|0;j[q+2>>1]=j[b+2>>1]|0;j[q+4>>1]=j[b+4>>1]|0;Fe(s,a,o,p,q);j[C>>1]=j[s>>1]|0;j[C+2>>1]=j[s+2>>1]|0;j[C+4>>1]=j[s+4>>1]|0;C=k[f>>2]|0;k[f>>2]=(C|0)<1?0:C+-1|0;C=n+1|0;r=B;return C|0}if(!c){C=z;r=B;return C|0}ke(a,1,1);C=z;r=B;return C|0}function De(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;Ee(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&65535;return r|0}r=e&~(b>>31);r=r&65535;return r|0} -function Ee(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>1]|0;p=o-(m[d>>1]|0)>>31|1;f=ia(p,(m[c>>1]|0)-o|0)|0;l=b+144|0;g=k[l>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;w=b+140|0;i=k[w>>2]|0;h=((f|0)<0?i:0)+f|0;i=h-((h|0)<((i+1|0)/2|0|0)?0:i)|0;h=b+4576|0;Ge(b,h,i);t=m[e+2>>1]|0;u=t-(m[d+2>>1]|0)>>31|1;f=ia(u,(m[c+2>>1]|0)-t|0)|0;g=k[l>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;q=k[w>>2]|0;v=((f|0)<0?q:0)+f|0;q=v-((v|0)<((q+1|0)/2|0|0)?0:q)|0;Ge(b,h,q);v=m[e+4>>1]|0;s=v-(m[d+4>>1]|0)>>31|1;f=ia(s,(m[c+4>>1]|0)-v|0)|0;g=k[l>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;n=k[w>>2]|0;f=((f|0)<0?n:0)+f|0;n=f-((f|0)<((n+1|0)/2|0|0)?0:n)|0;Ge(b,h,n);h=k[l>>2]|0;l=h<<1|1;f=(ia(ia(l,i)|0,p)|0)+o|0;c=0-h|0;if((f|0)>=(c|0)){g=k[r>>2]|0;if((g+h|0)<(f|0)){f=f-(ia(k[w>>2]|0,l)|0)|0;d=g}else d=g}else{f=(ia(k[w>>2]|0,l)|0)+f|0;d=k[r>>2]|0}if((f&d|0)!=(f|0))f=d&~(f>>31);e=f&65535;f=(ia(ia(l,q)|0,u)|0)+t|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,l)|0)|0}else f=(ia(k[w>>2]|0,l)|0)+f|0;if((f&d|0)!=(f|0))f=d&~(f>>31);g=f&65535;f=(ia(ia(l,n)|0,s)|0)+v|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,l)|0)|0}else f=(ia(k[w>>2]|0,l)|0)+f|0;if((f&d|0)==(f|0)){w=f;w=w&65535;j[a>>1]=e;v=a+2|0;j[v>>1]=g;a=a+4|0;j[a>>1]=w;return}w=d&~(f>>31);w=w&65535;j[a>>1]=e;v=a+2|0;j[v>>1]=g;a=a+4|0;j[a>>1]=w;return}function Ge(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Ee(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function He(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+144|0;a:do{if(!(k[n>>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Ie(a){a=a|0;var b=0,c=0;k[a>>2]=36024;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Je(a){a=a|0;var b=0,c=0;k[a>>2]=36024;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Ke(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;zf(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function Le(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35800;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];sf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;sf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Me(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ne(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,j=0,l=0,m=0,n=0;k[a>>2]=36712;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Oe(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,j=0,l=0,m=0,n=0;k[a>>2]=36688;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Pe(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,j=0,l=0,m=0,n=0;k[a>>2]=36664;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Qe(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,j=0,l=0,m=0,n=0;k[a>>2]=36640;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Re(a){a=a|0;var b=0,c=0;k[a>>2]=36640;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function Se(a){a=a|0;var b=0,c=0;k[a>>2]=36640;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function Te(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;Xe(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;Xe(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function Ue(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Ve(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{We(a,e,b,c,d);return}}function Ve(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;m=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=m;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{g=l[h+(f*3|0)+1>>0]|0;e=128-g+(l[h+(f*3|0)+2>>0]|0)|0;j=(l[h+(f*3|0)>>0]|0)-g+128|0;m=c+(f*3|0)|0;i[m>>0]=g+192+(((e&255)+(j&255)|0)>>>2);i[m+1>>0]=e;i[m+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=l[h+(b*3|0)+1>>0]|0;j=128-d+(l[h+(b*3|0)+2>>0]|0)|0;m=(l[h+(b*3|0)>>0]|0)-d+128|0;i[c+b>>0]=d+192+(((j&255)+(m&255)|0)>>>2);i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{m=i[h+(g<<2)+3>>0]|0;n=l[h+(g<<2)+1>>0]|0;d=128-n+(l[h+(g<<2)+2>>0]|0)|0;j=(l[h+(g<<2)>>0]|0)-n+128|0;i[c+g>>0]=n+192+(((d&255)+(j&255)|0)>>>2);i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function We(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;Ve(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){Ve(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function Xe(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=l[b+(a*3|0)+1>>0]|0;f=l[b+(a*3|0)+2>>0]|0;h=(l[b+(a*3|0)>>0]|0)-((f+g|0)>>>2)+64|0;e=c+(a*3|0)|0;i[e>>0]=f+128+h;i[e+1>>0]=h;i[e+2>>0]=g+128+h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=l[b+(g+e)>>0]|0;o=l[b+(g+f)>>0]|0;m=(l[b+g>>0]|0)-((o+n|0)>>>2)+64|0;h=c+(g*3|0)|0;i[h>>0]=o+128+m;i[h+1>>0]=m;i[h+2>>0]=n+128+m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{m=l[b+(g+e)>>0]|0;p=l[b+(g+a)>>0]|0;n=(l[b+g>>0]|0)-((p+m|0)>>>2)+64|0;o=c+(g<<2)|0;n=n<<8&65280|l[b+(g+f)>>0]<<24|p+128+n&255|m+128+n<<16&16711680;i[o>>0]=n;i[o+1>>0]=n>>8;i[o+2>>0]=n>>16;i[o+3>>0]=n>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){p=a+2|0;o=i[a>>0]|0;i[a>>0]=i[p>>0]|0;i[p>>0]=o;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function Ye(a){a=a|0;var b=0,c=0;k[a>>2]=36664;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function Ze(a){a=a|0;var b=0,c=0;k[a>>2]=36664;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function _e(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;cf(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;cf(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function $e(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;af(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{bf(a,e,b,c,d);return}}function af(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;m=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=m;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{b=l[h+(f*3|0)>>0]|0;e=i[h+(f*3|0)+1>>0]|0;g=e&255;j=(l[h+(f*3|0)+2>>0]|0)+128-((g+b|0)>>>1)&255;m=c+(f*3|0)|0;i[m>>0]=b+128-g;i[m+1>>0]=e;i[m+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{j=i[h+(b*3|0)+1>>0]|0;g=l[h+(b*3|0)>>0]|0;d=j&255;m=(l[h+(b*3|0)+2>>0]|0)+128-((d+g|0)>>>1)&255;i[c+b>>0]=g+128-d;i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{d=i[h+(g<<2)+1>>0]|0;m=i[h+(g<<2)+3>>0]|0;o=l[h+(g<<2)>>0]|0;n=d&255;j=(l[h+(g<<2)+2>>0]|0)+128-((n+o|0)>>>1)&255;i[c+g>>0]=o+128-n;i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function bf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;af(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){af(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function cf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=i[b+(a*3|0)+1>>0]|0;h=g&255;f=(l[b+(a*3|0)>>0]|0)+128+h|0;h=(l[b+(a*3|0)+2>>0]|0)+128+(((f&255)+h|0)>>>1)&255;e=c+(a*3|0)|0;i[e>>0]=f;i[e+1>>0]=g;i[e+2>>0]=h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=i[b+(g+e)>>0]|0;m=n&255;o=(l[b+g>>0]|0)+128+m|0;m=(l[b+(g+f)>>0]|0)+128+(((o&255)+m|0)>>>1)&255;h=c+(g*3|0)|0;i[h>>0]=o;i[h+1>>0]=n;i[h+2>>0]=m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=l[b+(g+e)>>0]|0;m=(l[b+g>>0]|0)+128+n&255;o=c+(g<<2)|0;n=m|n<<8|l[b+(g+f)>>0]<<24|(l[b+(g+a)>>0]|0)+128+((m+n|0)>>>1)<<16&16711680;i[o>>0]=n;i[o+1>>0]=n>>8;i[o+2>>0]=n>>16;i[o+3>>0]=n>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){o=a+2|0;n=i[a>>0]|0;i[a>>0]=i[o>>0]|0;i[o>>0]=n;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function df(a){a=a|0;var b=0,c=0;k[a>>2]=36688;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function ef(a){a=a|0;var b=0,c=0;k[a>>2]=36688;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function ff(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;kf(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;kf(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function gf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;hf(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{jf(a,e,b,c,d);return}}function hf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;m=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=m;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=i[h+(f*3|0)+1>>0]|0;g=e&255;j=128-g+(l[h+(f*3|0)+2>>0]|0)&255;m=c+(f*3|0)|0;i[m>>0]=(l[h+(f*3|0)>>0]|0)+128-g;i[m+1>>0]=e;i[m+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{j=i[h+(b*3|0)+1>>0]|0;d=j&255;m=128-d+(l[h+(b*3|0)+2>>0]|0)&255;i[c+b>>0]=(l[h+(b*3|0)>>0]|0)+128-d;i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{d=i[h+(g<<2)+1>>0]|0;m=i[h+(g<<2)+3>>0]|0;n=d&255;j=128-n+(l[h+(g<<2)+2>>0]|0)&255;i[c+g>>0]=(l[h+(g<<2)>>0]|0)+128-n;i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function jf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;hf(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){hf(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function kf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=i[b+(a*3|0)+1>>0]|0;f=g&255;h=f+128+(l[b+(a*3|0)+2>>0]|0)&255;e=c+(a*3|0)|0;i[e>>0]=(l[b+(a*3|0)>>0]|0)+128+f;i[e+1>>0]=g;i[e+2>>0]=h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=i[b+(g+e)>>0]|0;o=n&255;m=o+128+(l[b+(g+f)>>0]|0)&255;h=c+(g*3|0)|0;i[h>>0]=(l[b+g>>0]|0)+128+o;i[h+1>>0]=n;i[h+2>>0]=m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=l[b+(g+e)>>0]|0;o=c+(g<<2)|0;n=(l[b+g>>0]|0)+128+n&255|n<<8|l[b+(g+f)>>0]<<24|n+128+(l[b+(g+a)>>0]|0)<<16&16711680;i[o>>0]=n;i[o+1>>0]=n>>8;i[o+2>>0]=n>>16;i[o+3>>0]=n>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){o=a+2|0;n=i[a>>0]|0;i[a>>0]=i[o>>0]|0;i[o>>0]=n;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function lf(a){a=a|0;var b=0,c=0;k[a>>2]=36712;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function mf(a){a=a|0;var b=0,c=0;k[a>>2]=36712;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function nf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;rf(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;rf(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function of(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;pf(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{qf(a,e,b,c,d);return}}function pf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;l=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=l;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=i[h+(f*3|0)+1>>0]|0;j=i[h+(f*3|0)+2>>0]|0;l=c+(f*3|0)|0;i[l>>0]=i[h+(f*3|0)>>0]|0;i[l+1>>0]=e;i[l+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{j=i[h+(b*3|0)+1>>0]|0;l=i[h+(b*3|0)+2>>0]|0;i[c+b>>0]=i[h+(b*3|0)>>0]|0;i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=l;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{d=i[h+(g<<2)+1>>0]|0;j=i[h+(g<<2)+2>>0]|0;l=i[h+(g<<2)+3>>0]|0;i[c+g>>0]=i[h+(g<<2)>>0]|0;i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=l;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function qf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;pf(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){pf(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0 -;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function rf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=i[b+(a*3|0)+1>>0]|0;h=i[b+(a*3|0)+2>>0]|0;e=c+(a*3|0)|0;i[e>>0]=i[b+(a*3|0)>>0]|0;i[e+1>>0]=g;i[e+2>>0]=h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=i[b+(g+e)>>0]|0;m=i[b+(g+f)>>0]|0;h=c+(g*3|0)|0;i[h>>0]=i[b+g>>0]|0;i[h+1>>0]=n;i[h+2>>0]=m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=c+(g<<2)|0;m=l[b+(g+e)>>0]<<8|l[b+g>>0]|l[b+(g+a)>>0]<<16|l[b+(g+f)>>0]<<24;i[n>>0]=m;i[n+1>>0]=m>>8;i[n+2>>0]=m>>16;i[n+3>>0]=m>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){n=a+2|0;m=i[a>>0]|0;i[a>>0]=i[n>>0]|0;i[n>>0]=m;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function sf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+180|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,v|0),u=x,x=0,u&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[w>>2]|0)+3|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)f=19;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))f=17;if((f|0)==17?(d=q<<2,x=0,e=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=e;f=e+(q<<2)|0;k[s+8>>2]=f;sw(e|0,0,d|0)|0;k[u>>2]=f;f=19;break}d=Wa()|0;b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){e=a+12|0;b:do{if((k[e>>2]|0)>0){f=a+4604|0;g=(ia(q,p)|0)+1|0;h=a+4608|0;j=a+92|0;l=(q|0)>0;m=a+4600|0;n=0;c:while(1){d=k[v>>2]|0;b=d+3|0;k[f>>2]=b;c=d+(g*3|0)|0;k[h>>2]=c;if(!(n&1))b=g;else{k[f>>2]=c;k[h>>2]=b;b=1}c=k[j>>2]|0;x=0;Ja(k[(k[c>>2]|0)+12>>2]|0,c|0,d+(b*3|0)|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){f=29;break}if(l){b=k[s>>2]|0;c=k[f>>2]|0;d=0;do{k[m>>2]=k[b+(d<<2)>>2];y=k[o>>2]|0;b=c+(y*3|0)|0;c=c+((y+-1|0)*3|0)|0;i[b>>0]=i[c>>0]|0;i[b+1>>0]=i[c+1>>0]|0;i[b+2>>0]=i[c+2>>0]|0;b=k[f>>2]|0;c=(k[h>>2]|0)+-3|0;i[c>>0]=i[b>>0]|0;i[c+1>>0]=i[b+1>>0]|0;i[c+2>>0]=i[b+2>>0]|0;x=0;ra(70,a|0,0);c=x;x=0;if(c&1){f=28;break c}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[m>>2];c=(k[f>>2]|0)+(p*3|0)|0;k[f>>2]=c;k[h>>2]=(k[h>>2]|0)+(p*3|0);d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){f=41;break b}}if((f|0)==28){d=Wa()|0;break}else if((f|0)==29){d=Wa()|0;break}}else f=41}while(0);do{if((f|0)==41){x=0;qa(182,a|0);y=x;x=0;if(y&1){d=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=t;return}}while(0);b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function tf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=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;A=a+180|0;if((k[A>>2]|0)<=0)return;B=a+4608|0;C=a+4604|0;D=a+4612|0;z=0;while(1){w=z+-1|0;f=k[B>>2]|0;g=k[C>>2]|0;b=z+1|0;e=l[g+(z*3|0)>>0]|0;y=k[D>>2]|0;h=l[g+(w*3|0)>>0]|0;j=e-h|0;m=l[f+(w*3|0)>>0]|0;n=h-m|0;o=((((i[y+((l[g+(b*3|0)>>0]|0)-e)>>0]|0)*9|0)+(i[y+j>>0]|0)|0)*9|0)+(i[y+n>>0]|0)|0;d=l[g+(z*3|0)+1>>0]|0;p=l[g+(w*3|0)+1>>0]|0;q=d-p|0;r=l[f+(w*3|0)+1>>0]|0;s=p-r|0;t=((((i[y+((l[g+(b*3|0)+1>>0]|0)-d)>>0]|0)*9|0)+(i[y+q>>0]|0)|0)*9|0)+(i[y+s>>0]|0)|0;c=l[g+(z*3|0)+2>>0]|0;u=l[g+(w*3|0)+2>>0]|0;v=c-u|0;w=l[f+(w*3|0)+2>>0]|0;x=u-w|0;y=((((i[y+((l[g+(b*3|0)+2>>0]|0)-c)>>0]|0)*9|0)+(i[y+v>>0]|0)|0)*9|0)+(i[y+x>>0]|0)|0;if(!(t|o|y))b=(uf(a,z,0)|0)+z|0;else{g=l[f+(z*3|0)>>0]|0;f=e-m>>31;if((f^n|0)>=0)if((f^j|0)<0)e=m;else e=m-h+e|0;g=vf(a,o,g,e,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+1>>0]|0;e=d-r>>31;if((e^s|0)>=0)if((e^q|0)<0)d=r;else d=r-p+d|0;e=vf(a,t,f,d,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+2>>0]|0;d=c-w>>31;if((d^x|0)>=0)if((d^v|0)<0)c=w;else c=w-u+c|0;y=vf(a,y,f,c,0)|0;z=(k[B>>2]|0)+(z*3|0)|0;i[z>>0]=g;i[z+1>>0]=e;i[z+2>>0]=y}if((b|0)<(k[A>>2]|0))z=b;else break}return}function uf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;B=r;r=r+32|0;A=B+15|0;p=B+12|0;o=B+9|0;q=B+6|0;w=B+3|0;x=B;y=(k[a+180>>2]|0)-b|0;z=k[a+4608>>2]|0;s=k[a+4604>>2]|0;v=z+((b+-1|0)*3|0)|0;t=i[v>>0]|0;u=i[v+1>>0]|0;v=i[v+2>>0]|0;c=t&255;d=a+144|0;e=u&255;f=v&255;n=0;while(1){g=z+((n+b|0)*3|0)|0;h=g+1|0;j=g+2|0;C=(l[g>>0]|0)-c|0;m=k[d>>2]|0;if((((C|0)>-1?C:0-C|0)|0)>(m|0))break;C=(l[h>>0]|0)-e|0;if((((C|0)>-1?C:0-C|0)|0)>(m|0))break;C=(l[j>>0]|0)-f|0;if((((C|0)>-1?C:0-C|0)|0)>(m|0))break;i[g>>0]=t;i[h>>0]=u;i[j>>0]=v;n=n+1|0;if((n|0)==(y|0)){n=y;break}}e=(n|0)==(y|0);f=a+4600|0;d=k[36476+(k[f>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[f>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[f>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]=i[C>>0]|0;i[w+1>>0]=i[C+1>>0]|0;i[w+2>>0]=i[C+2>>0]|0;i[x>>0]=t;i[x+1>>0]=u;i[x+2>>0]=v;b=s+(b*3|0)|0;i[o>>0]=i[w>>0]|0;i[o+1>>0]=i[w+1>>0]|0;i[o+2>>0]=i[w+2>>0]|0;i[p>>0]=i[x>>0]|0;i[p+1>>0]=i[x+1>>0]|0;i[p+2>>0]=i[x+2>>0]|0;i[A>>0]=i[b>>0]|0;i[A+1>>0]=i[b+1>>0]|0;i[A+2>>0]=i[b+2>>0]|0;xf(q,a,o,p,A);i[C>>0]=i[q>>0]|0;i[C+1>>0]=i[q+1>>0]|0;i[C+2>>0]=i[q+2>>0]|0;C=k[f>>2]|0;k[f>>2]=(C|0)<1?0:C+-1|0;C=n+1|0;r=B;return C|0}if(!c){C=y;r=B;return C|0}ke(a,1,1);C=y;r=B;return C|0}function vf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;wf(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&255;return r|0}r=e&~(b>>31);r=r&255;return r|0}function wf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>0]|0;p=o-(l[d>>0]|0)>>31|1;f=ia(p,(l[c>>0]|0)-o|0)|0;m=b+144|0;g=k[m>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;w=b+140|0;j=k[w>>2]|0;h=((f|0)<0?j:0)+f|0;j=h-((h|0)<((j+1|0)/2|0|0)?0:j)|0;h=b+4576|0;yf(b,h,j);t=l[e+1>>0]|0;u=t-(l[d+1>>0]|0)>>31|1;f=ia(u,(l[c+1>>0]|0)-t|0)|0;g=k[m>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;q=k[w>>2]|0;v=((f|0)<0?q:0)+f|0;q=v-((v|0)<((q+1|0)/2|0|0)?0:q)|0;yf(b,h,q);v=l[e+2>>0]|0;s=v-(l[d+2>>0]|0)>>31|1;f=ia(s,(l[c+2>>0]|0)-v|0)|0;g=k[m>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;n=k[w>>2]|0;f=((f|0)<0?n:0)+f|0;n=f-((f|0)<((n+1|0)/2|0|0)?0:n)|0;yf(b,h,n);h=k[m>>2]|0;m=h<<1|1;f=(ia(ia(m,j)|0,p)|0)+o|0;c=0-h|0;if((f|0)>=(c|0)){g=k[r>>2]|0;if((g+h|0)<(f|0)){f=f-(ia(k[w>>2]|0,m)|0)|0;d=g}else d=g}else{f=(ia(k[w>>2]|0,m)|0)+f|0;d=k[r>>2]|0}if((f&d|0)!=(f|0))f=d&~(f>>31);e=f&255;f=(ia(ia(m,q)|0,u)|0)+t|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,m)|0)|0}else f=(ia(k[w>>2]|0,m)|0)+f|0;if((f&d|0)!=(f|0))f=d&~(f>>31);g=f&255;f=(ia(ia(m,n)|0,s)|0)+v|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,m)|0)|0}else f=(ia(k[w>>2]|0,m)|0)+f|0;if((f&d|0)==(f|0)){w=f;w=w&255;i[a>>0]=e;v=a+1|0;i[v>>0]=g;a=a+2|0;i[a>>0]=w;return}w=d&~(f>>31);w=w&255;i[a>>0]=e;v=a+1|0;i[v>>0]=g;a=a+2|0;i[a>>0]=w;return}function yf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;wf(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function zf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+144|0;a:do{if(!(k[n>>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Af(a){a=a|0;var b=0,c=0;k[a>>2]=35996;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Bf(a){a=a|0;var b=0,c=0;k[a>>2]=35996;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Cf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,65535,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;Lf(a);d=0;do{k[a+172+(d*12|0)>>2]=1024;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=1024;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=1024;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function Df(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35772;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];Ff(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;Ff(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Ef(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ff(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;u=r;r=r+32|0;w=u+12|0;t=u;p=a+156|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)s=k[a+24>>2]|0;else s=1;b=ia(s<<1,q)|0;k[w>>2]=0;y=w+4|0;k[y>>2]=0;k[w+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,w|0),v=x,x=0,v&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,v=x,x=0,!(v&1)):0){k[w>>2]=d;v=d+(b<<1)|0;k[w+8>>2]=v;sw(d|0,0,c|0)|0;k[y>>2]=v;break}d=Wa()|0;b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[t>>2]=0;v=t+4|0;k[v>>2]=0;k[t+8>>2]=0;do{if(!s)g=18;else{if(!(s>>>0>1073741823?(x=0,qa(178,t|0),o=x,x=0,o&1):0))g=16;if((g|0)==16?(e=s<<2,x=0,f=ta(67,e|0)|0,o=x,x=0,!(o&1)):0){k[t>>2]=f;g=f+(s<<2)|0;k[t+8>>2]=g;sw(f|0,0,e|0)|0;k[v>>2]=g;g=18;break}d=Wa()|0;b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+12|0;a:do{if((k[f>>2]|0)>0){g=a+4580|0;h=(ia(s,q)|0)+1|0;i=a+4584|0;l=a+92|0;m=(s|0)>0;n=a+4576|0;o=0;b:while(1){c=k[w>>2]|0;b=c+2|0;k[g>>2]=b;c=c+(h<<1)|0;k[i>>2]=c;if(!(o&1))b=c;else{k[g>>2]=c;k[i>>2]=b}e=k[l>>2]|0;x=0;Ja(k[(k[e>>2]|0)+12>>2]|0,e|0,b|0,k[p>>2]|0,q|0);e=x;x=0;if(e&1){g=28;break}if(m){b=k[g>>2]|0;c=k[i>>2]|0;d=k[t>>2]|0;e=0;do{k[n>>2]=k[d+(e<<2)>>2];d=k[p>>2]|0;j[b+(d<<1)>>1]=j[b+(d+-1<<1)>>1]|0;j[c+-2>>1]=j[b>>1]|0;x=0;ra(71,a|0,0);d=x;x=0;if(d&1){g=27;break b}d=k[t>>2]|0;k[d+(e<<2)>>2]=k[n>>2];b=(k[g>>2]|0)+(q<<1)|0;k[g>>2]=b;c=(k[i>>2]|0)+(q<<1)|0;k[i>>2]=c;e=e+1|0}while((e|0)<(s|0))}o=o+1|0;if((o|0)>=(k[f>>2]|0)){g=40;break a}}if((g|0)==27){d=Wa()|0;break}else if((g|0)==28){d=Wa()|0;break}}else g=40}while(0);do{if((g|0)==40){x=0;qa(182,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[t>>2]|0;c=b;if(b){d=k[v>>2]|0;if((d|0)!=(b|0))k[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[w>>2]|0;if(!b){r=u;return}c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=u;return}}while(0);b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Gf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4580|0;b=k[p>>2]|0;s=a+156|0;if((k[s>>2]|0)<=0)return;q=a+4584|0;r=a+4588|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(If(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Hf(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Hf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&65535|0)==(e|0))m=e;else m=e>>31&65535^65535;h=(c-m^q)-q<<16;l=h>>16;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;d=e^l;d=d>>30^d<<1;e=d>>f;if((e|0)<47){if((e|0)>30){g=(e|0)/2|0;ke(a,0,g);e=e-g|0}ke(a,1,e+1|0);ke(a,d&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-65536?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&65535;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&65535;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&65535;return b|0}function If(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0;g=(k[a+156>>2]|0)-b|0;h=k[a+4584>>2]|0;l=k[a+4580>>2]|0;e=j[h+(b+-1<<1)>>1]|0;d=0;while(1){c=h+(d+b<<1)|0;if((j[c>>1]|0)!=e<<16>>16){n=d;break}j[c>>1]=e;d=d+1|0;if((d|0)==(g|0)){n=g;break}}f=e&65535;e=(n|0)==(g|0);i=a+4576|0;d=k[36476+(k[i>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[i>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[i>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]|0;c=m[l+(c<<1)>>1]|0;l=f-c|0;if((((l|0)>-1?l:0-l|0)|0)<1){c=d-f<<16>>16;Jf(a,a+4564|0,c);c=c+f|0}else{l=c-f>>31|1;b=(ia(d-c<<16,l)|0)>>16;Jf(a,a+4552|0,b);c=(ia(b,l)|0)+c|0}j[e>>1]=c;a=k[i>>2]|0;k[i>>2]=(a|0)<1?0:a+-1|0;a=n+1|0;return a|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Kf(a,e,d,63-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function Kf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-16|0;if((e|0)<(d+-17|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-47|0)}else ke(a,1,f);ke(a,c+65535&65535,16);return}function Lf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,65535,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8909]|0;k[a+4588>>2]=j+(((k[8910]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=131072){if(f>>>0>131072?(g=b+131072|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,131072-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+65536;g=a+168|0;e=a+164|0;f=-65536;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==65536)break}r=l;return}function Mf(a){a=a|0;var b=0,c=0;k[a>>2]=35968;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Nf(a){a=a|0;var b=0,c=0;k[a>>2]=35968;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,4095,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;Xf(a);d=0;do{k[a+172+(d*12|0)>>2]=64;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=64;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=64;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function Pf(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35744;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];Rf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;Rf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Qf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Rf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;u=r;r=r+32|0;w=u+12|0;t=u;p=a+156|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)s=k[a+24>>2]|0;else s=1 -;b=ia(s<<1,q)|0;k[w>>2]=0;y=w+4|0;k[y>>2]=0;k[w+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,w|0),v=x,x=0,v&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,v=x,x=0,!(v&1)):0){k[w>>2]=d;v=d+(b<<1)|0;k[w+8>>2]=v;sw(d|0,0,c|0)|0;k[y>>2]=v;break}d=Wa()|0;b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[t>>2]=0;v=t+4|0;k[v>>2]=0;k[t+8>>2]=0;do{if(!s)g=18;else{if(!(s>>>0>1073741823?(x=0,qa(178,t|0),o=x,x=0,o&1):0))g=16;if((g|0)==16?(e=s<<2,x=0,f=ta(67,e|0)|0,o=x,x=0,!(o&1)):0){k[t>>2]=f;g=f+(s<<2)|0;k[t+8>>2]=g;sw(f|0,0,e|0)|0;k[v>>2]=g;g=18;break}d=Wa()|0;b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+12|0;a:do{if((k[f>>2]|0)>0){g=a+4580|0;h=(ia(s,q)|0)+1|0;i=a+4584|0;l=a+92|0;m=(s|0)>0;n=a+4576|0;o=0;b:while(1){c=k[w>>2]|0;b=c+2|0;k[g>>2]=b;c=c+(h<<1)|0;k[i>>2]=c;if(!(o&1))b=c;else{k[g>>2]=c;k[i>>2]=b}e=k[l>>2]|0;x=0;Ja(k[(k[e>>2]|0)+12>>2]|0,e|0,b|0,k[p>>2]|0,q|0);e=x;x=0;if(e&1){g=28;break}if(m){b=k[g>>2]|0;c=k[i>>2]|0;d=k[t>>2]|0;e=0;do{k[n>>2]=k[d+(e<<2)>>2];d=k[p>>2]|0;j[b+(d<<1)>>1]=j[b+(d+-1<<1)>>1]|0;j[c+-2>>1]=j[b>>1]|0;x=0;ra(72,a|0,0);d=x;x=0;if(d&1){g=27;break b}d=k[t>>2]|0;k[d+(e<<2)>>2]=k[n>>2];b=(k[g>>2]|0)+(q<<1)|0;k[g>>2]=b;c=(k[i>>2]|0)+(q<<1)|0;k[i>>2]=c;e=e+1|0}while((e|0)<(s|0))}o=o+1|0;if((o|0)>=(k[f>>2]|0)){g=40;break a}}if((g|0)==27){d=Wa()|0;break}else if((g|0)==28){d=Wa()|0;break}}else g=40}while(0);do{if((g|0)==40){x=0;qa(182,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[t>>2]|0;c=b;if(b){d=k[v>>2]|0;if((d|0)!=(b|0))k[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[w>>2]|0;if(!b){r=u;return}c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=u;return}}while(0);b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Sf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4580|0;b=k[p>>2]|0;s=a+156|0;if((k[s>>2]|0)<=0)return;q=a+4584|0;r=a+4588|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Uf(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Tf(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Tf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&4095|0)==(e|0))m=e;else m=e>>31&4095^4095;h=(c-m^q)-q<<20;l=h>>20;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;d=e^l;d=d>>30^d<<1;e=d>>f;if((e|0)<35){if((e|0)>30){g=(e|0)/2|0;ke(a,0,g);e=e-g|0}ke(a,1,e+1|0);ke(a,d&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-1048576?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}function Uf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0;g=(k[a+156>>2]|0)-b|0;h=k[a+4584>>2]|0;l=k[a+4580>>2]|0;e=j[h+(b+-1<<1)>>1]|0;d=0;while(1){c=h+(d+b<<1)|0;if((j[c>>1]|0)!=e<<16>>16){n=d;break}j[c>>1]=e;d=d+1|0;if((d|0)==(g|0)){n=g;break}}f=e&65535;e=(n|0)==(g|0);i=a+4576|0;d=k[36476+(k[i>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[i>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[i>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]|0;c=m[l+(c<<1)>>1]|0;l=f-c|0;if((((l|0)>-1?l:0-l|0)|0)<1){c=d-f<<20>>20;Vf(a,a+4564|0,c);c=c+f|0}else{l=c-f>>31|1;b=(ia(d-c<<20,l)|0)>>20;Vf(a,a+4552|0,b);c=(ia(b,l)|0)+c|0}j[e>>1]=c&4095;a=k[i>>2]|0;k[i>>2]=(a|0)<1?0:a+-1|0;a=n+1|0;return a|0}function Vf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Wf(a,e,d,47-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function Wf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-12|0;if((e|0)<(d+-13|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-43|0)}else ke(a,1,f);ke(a,c+4095&4095,12);return}function Xf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,4095,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8906]|0;k[a+4588>>2]=j+(((k[8907]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=8192){if(f>>>0>8192?(g=b+8192|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,8192-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+4096;g=a+168|0;e=a+164|0;f=-4096;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==4096)break}r=l;return}function Yf(a){a=a|0;var b=0,c=0;k[a>>2]=35940;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Zf(a){a=a|0;var b=0,c=0;k[a>>2]=35940;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function _f(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;hg(a);d=0;do{k[a+172+(d*12|0)>>2]=4;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=4;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=4;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function $f(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35716;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];bg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;bg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function bg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+156|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,v|0),u=x,x=0,u&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[w>>2]|0)+1|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)f=19;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))f=17;if((f|0)==17?(d=q<<2,x=0,e=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=e;f=e+(q<<2)|0;k[s+8>>2]=f;sw(e|0,0,d|0)|0;k[u>>2]=f;f=19;break}c=Wa()|0;b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){e=a+12|0;b:do{if((k[e>>2]|0)>0){f=a+4580|0;g=(ia(q,p)|0)+1|0;h=a+4584|0;j=a+92|0;l=(q|0)>0;m=a+4576|0;n=0;c:while(1){c=k[v>>2]|0;b=c+1|0;k[f>>2]=b;c=c+g|0;k[h>>2]=c;if(!(n&1))b=c;else{k[f>>2]=c;k[h>>2]=b}d=k[j>>2]|0;x=0;Ja(k[(k[d>>2]|0)+12>>2]|0,d|0,b|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){f=29;break}if(l){b=k[f>>2]|0;c=k[s>>2]|0;d=0;do{k[m>>2]=k[c+(d<<2)>>2];c=k[o>>2]|0;i[b+c>>0]=i[b+(c+-1)>>0]|0;i[(k[h>>2]|0)+-1>>0]=i[k[f>>2]>>0]|0;x=0;ra(73,a|0,0);c=x;x=0;if(c&1){f=28;break c}c=k[s>>2]|0;k[c+(d<<2)>>2]=k[m>>2];b=(k[f>>2]|0)+p|0;k[f>>2]=b;k[h>>2]=(k[h>>2]|0)+p;d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){f=41;break b}}if((f|0)==28){c=Wa()|0;break}else if((f|0)==29){c=Wa()|0;break}}else f=41}while(0);do{if((f|0)==41){x=0;qa(182,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);r=t;return}}while(0);b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}function cg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+4580|0;b=k[o>>2]|0;r=a+156|0;if((k[r>>2]|0)<=0)return;p=a+4584|0;q=a+4588|0;e=b;f=l[b+-1>>0]|0;b=l[b>>0]|0;n=0;while(1){m=k[p>>2]|0;j=l[m+(n+-1)>>0]|0;d=n+1|0;c=l[e+d>>0]|0;h=k[q>>2]|0;g=b-f|0;e=f-j|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(eg(a,n,0)|0)+n|0;c=k[o>>2]|0;b=l[c+(d+-1)>>0]|0;c=l[c+d>>0]|0}else{f=b-j>>31;if((f^e|0)<0)e=b;else e=j+((f^g|0)<0?0:g)|0;m=dg(a,h,l[m+n>>0]|0,e,0)|0;i[(k[p>>2]|0)+n>>0]=m}if((d|0)>=(k[r>>2]|0))break;e=k[o>>2]|0;f=b;b=c;n=d}return}function dg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&255|0)==(e|0))m=e;else m=e>>31&255^255;h=(c-m^q)-q<<24;l=h>>24;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;e=e^l;e=e>>30^e<<1;d=e>>f;if((d|0)<23){ke(a,1,d+1|0);ke(a,e&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-16777216?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}function eg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;g=(k[a+156>>2]|0)-b|0;h=k[a+4584>>2]|0;m=k[a+4580>>2]|0;e=i[h+(b+-1)>>0]|0;d=0;while(1){c=h+(d+b)|0;if((i[c>>0]|0)!=e<<24>>24){n=d;break}i[c>>0]=e;d=d+1|0;if((d|0)==(g|0)){n=g;break}}f=e&255;e=(n|0)==(g|0);j=a+4576|0;d=k[36476+(k[j>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[j>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[j>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]|0;c=l[m+c>>0]|0;m=f-c|0;if((((m|0)>-1?m:0-m|0)|0)<1){c=d-f<<24>>24;fg(a,a+4564|0,c);c=c+f|0}else{m=c-f>>31|1;b=(ia(d-c<<24,m)|0)>>24;fg(a,a+4552|0,b);c=(ia(b,m)|0)+c|0}i[e>>0]=c;a=k[j>>2]|0;k[j>>2]=(a|0)<1?0:a+-1|0;a=n+1|0;return a|0}function fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;gg(a,e,d,31-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function gg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-8|0;if((e|0)<(d+-9|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-39|0)}else ke(a,1,f);ke(a,c+255&255,8);return}function hg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8900]|0;k[a+4588>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+256;g=a+168|0;e=a+164|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function ig(a){a=a|0;var b=0,c=0;k[a>>2]=35912;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function jg(a){a=a|0;var b=0,c=0;k[a>>2]=35912;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;tg(a);d=0;do{k[a+172+(d*12|0)>>2]=4;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=4;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=4;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function lg(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35688;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];ng(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;ng(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function ng(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+156|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,v|0),u=x,x=0,u&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[w>>2]|0)+3|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)f=19;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))f=17;if((f|0)==17?(d=q<<2,x=0,e=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=e;f=e+(q<<2)|0;k[s+8>>2]=f;sw(e|0,0,d|0)|0;k[u>>2]=f;f=19;break}d=Wa()|0;b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){e=a+12|0;b:do{if((k[e>>2]|0)>0){f=a+4580|0;g=(ia(q,p)|0)+1|0;h=a+4584|0;j=a+92|0;l=(q|0)>0;m=a+4576|0;n=0;c:while(1){d=k[v>>2]|0;b=d+3|0;k[f>>2]=b;c=d+(g*3|0)|0;k[h>>2]=c;if(!(n&1))b=g;else{k[f>>2]=c;k[h>>2]=b;b=1}c=k[j>>2]|0;x=0;Ja(k[(k[c>>2]|0)+12>>2]|0,c|0,d+(b*3|0)|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){f=29;break}if(l){b=k[s>>2]|0;c=k[f>>2]|0;d=0;do{k[m>>2]=k[b+(d<<2)>>2];y=k[o>>2]|0;b=c+(y*3|0)|0;c=c+((y+-1|0)*3|0)|0;i[b>>0]=i[c>>0]|0;i[b+1>>0]=i[c+1>>0]|0;i[b+2>>0]=i[c+2>>0]|0;b=k[f>>2]|0;c=(k[h>>2]|0)+-3|0;i[c>>0]=i[b>>0]|0;i[c+1>>0]=i[b+1>>0]|0;i[c+2>>0]=i[b+2>>0]|0;x=0;ra(74,a|0,0);c=x;x=0;if(c&1){f=28;break c}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[m>>2];c=(k[f>>2]|0)+(p*3|0)|0;k[f>>2]=c;k[h>>2]=(k[h>>2]|0)+(p*3|0);d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){f=41;break b}}if((f|0)==28){d=Wa()|0;break}else if((f|0)==29){d=Wa()|0;break}}else f=41}while(0);do{if((f|0)==41){x=0;qa(182,a|0);y=x;x=0;if(y&1){d=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=t;return}}while(0);b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=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;A=a+156|0;if((k[A>>2]|0)<=0)return;B=a+4584|0;C=a+4580|0;D=a+4588|0;z=0;while(1){w=z+-1|0;f=k[B>>2]|0;g=k[C>>2]|0;b=z+1|0;e=l[g+(z*3|0)>>0]|0;y=k[D>>2]|0;h=l[g+(w*3|0)>>0]|0;j=e-h|0;m=l[f+(w*3|0)>>0]|0;n=h-m|0;o=((((i[y+((l[g+(b*3|0)>>0]|0)-e)>>0]|0)*9|0)+(i[y+j>>0]|0)|0)*9|0)+(i[y+n>>0]|0)|0;d=l[g+(z*3|0)+1>>0]|0;p=l[g+(w*3|0)+1>>0]|0;q=d-p|0;r=l[f+(w*3|0)+1>>0]|0;s=p-r|0;t=((((i[y+((l[g+(b*3|0)+1>>0]|0)-d)>>0]|0)*9|0)+(i[y+q>>0]|0)|0)*9|0)+(i[y+s>>0]|0)|0;c=l[g+(z*3|0)+2>>0]|0;u=l[g+(w*3|0)+2>>0]|0;v=c-u|0;w=l[f+(w*3|0)+2>>0]|0;x=u-w|0;y=((((i[y+((l[g+(b*3|0)+2>>0]|0)-c)>>0]|0)*9|0)+(i[y+v>>0]|0)|0)*9|0)+(i[y+x>>0]|0)|0;if(!(t|o|y))b=(pg(a,z,0)|0)+z|0;else{g=l[f+(z*3|0)>>0]|0;f=e-m>>31;if((f^n|0)>=0)if((f^j|0)<0)e=m;else e=m-h+e|0;g=qg(a,o,g,e,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+1>>0]|0;e=d-r>>31;if((e^s|0)>=0)if((e^q|0)<0)d=r;else d=r-p+d|0;e=qg(a,t,f,d,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+2>>0]|0;d=c-w>>31;if((d^x|0)>=0)if((d^v|0)<0)c=w;else c=w-u+c|0;y=qg(a,y,f,c,0)|0;z=(k[B>>2]|0)+(z*3|0)|0;i[z>>0]=g;i[z+1>>0]=e;i[z+2>>0]=y}if((b|0)<(k[A>>2]|0))z=b;else break}return}function pg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;m=(k[a+156>>2]|0)-b|0;n=k[a+4584>>2]|0;o=k[a+4580>>2]|0;j=n+((b+-1|0)*3|0)|0;p=i[j>>0]|0;h=i[j+1>>0]|0;j=i[j+2>>0]|0;f=0;while(1){c=n+((f+b|0)*3|0)|0;d=c+1|0;e=c+2|0;if(!(((i[c>>0]|0)==p<<24>>24?(i[d>>0]|0)==h<<24>>24:0)&(i[e>>0]|0)==j<<24>>24))break;i[c>>0]=p;i[d>>0]=h;i[e>>0]=j;f=f+1|0;if((f|0)==(m|0)){f=m;break}}e=(f|0)==(m|0);g=a+4576|0;d=k[36476+(k[g>>2]<<2)>>2]|0;if((1<(f|0))c=f;else{c=f;do{ke(a,1,1);d=k[g>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[g>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]|0;b=m+2|0;e=i[b>>0]|0;o=o+(d*3|0)|0;d=i[o+1>>0]|0;t=i[o+2>>0]|0;o=l[o>>0]|0;q=o-(p&255)>>31|1;r=(ia((l[m>>0]|0)-o<<24,q)|0)>>24;s=a+4552|0;rg(a,s,r);p=d&255;d=p-(h&255)>>31|1;c=(ia((c&255)-p<<24,d)|0)>>24;rg(a,s,c);h=t&255;j=h-(j&255)>>31|1;e=(ia((e&255)-h<<24,j)|0)>>24;rg(a,s,e);o=(ia(r,q)|0)+o&255;p=(ia(c,d)|0)+p&255;a=(ia(e,j)|0)+h&255;i[m>>0]=o;i[n>>0]=p;i[b>>0]=a;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;a=f+1|0;return a|0}if(!c){t=m;return t|0}ke(a,1,1);t=m;return t|0}function qg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&255|0)==(e|0))m=e;else m=e>>31&255^255;h=(c-m^q)-q<<24;l=h>>24;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;e=e^l;e=e>>30^e<<1;d=e>>f;if((d|0)<23){ke(a,1,d+1|0);ke(a,e&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-16777216?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0} -if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}function rg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;sg(a,e,d,31-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-8|0;if((e|0)<(d+-9|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-39|0)}else ke(a,1,f);ke(a,c+255&255,8);return}function tg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8900]|0;k[a+4588>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+256;g=a+168|0;e=a+164|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function ug(a){a=a|0;var b=0,c=0;k[a>>2]=35884;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function vg(a){a=a|0;var b=0,c=0;k[a>>2]=35884;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function wg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;Gg(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function xg(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35660;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];zg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;zg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function zg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;t=r;r=r+32|0;v=t+12|0;s=t;p=a+180|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)n=k[a+24>>2]|0;else n=1;b=ia(n<<1,q)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,v|0),u=x,x=0,u&1):0))o=6;if((o|0)==6?(x=0,c=ta(67,b|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[w>>2]|0)+1|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!n)o=19;else{if(!(n>>>0>1073741823?(x=0,qa(178,s|0),m=x,x=0,m&1):0))o=17;if((o|0)==17?(d=n<<2,x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[s>>2]=e;o=e+(n<<2)|0;k[s+8>>2]=o;sw(e|0,0,d|0)|0;k[u>>2]=o;o=19;break}c=Wa()|0;b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((o|0)==19){g=a+12|0;b:do{if((k[g>>2]|0)>0){h=a+4604|0;j=(ia(n,q)|0)+1|0;l=a+4608|0;m=a+92|0;f=a+4600|0;if((n|0)>0)e=0;else{d=0;while(1){c=k[v>>2]|0;b=c+1|0;k[h>>2]=b;c=c+j|0;k[l>>2]=c;if(!(d&1))b=c;else{k[h>>2]=c;k[l>>2]=b}n=k[m>>2]|0;x=0;Ja(k[(k[n>>2]|0)+12>>2]|0,n|0,b|0,k[p>>2]|0,q|0);n=x;x=0;if(n&1)break;d=d+1|0;if((d|0)>=(k[g>>2]|0)){o=45;break b}}c=Wa()|0;break}c:while(1){c=k[v>>2]|0;b=c+1|0;k[h>>2]=b;c=c+j|0;k[l>>2]=c;if(!(e&1))b=c;else{k[h>>2]=c;k[l>>2]=b}o=k[m>>2]|0;x=0;Ja(k[(k[o>>2]|0)+12>>2]|0,o|0,b|0,k[p>>2]|0,q|0);o=x;x=0;if(o&1){o=28;break}b=k[s>>2]|0;c=k[h>>2]|0;d=0;do{k[f>>2]=k[b+(d<<2)>>2];o=k[p>>2]|0;i[c+o>>0]=i[c+(o+-1)>>0]|0;i[(k[l>>2]|0)+-1>>0]=i[k[h>>2]>>0]|0;x=0;ra(75,a|0,0);o=x;x=0;if(o&1){o=36;break c}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[f>>2];c=(k[h>>2]|0)+q|0;k[h>>2]=c;k[l>>2]=(k[l>>2]|0)+q;d=d+1|0}while((d|0)<(n|0));e=e+1|0;if((e|0)>=(k[g>>2]|0)){o=45;break b}}if((o|0)==28){c=Wa()|0;break}else if((o|0)==36){c=Wa()|0;break}}else o=45}while(0);do{if((o|0)==45){x=0;qa(182,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);r=t;return}}while(0);b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}function Ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+4604|0;b=k[o>>2]|0;r=a+180|0;if((k[r>>2]|0)<=0)return;p=a+4608|0;q=a+4612|0;e=b;f=l[b+-1>>0]|0;b=l[b>>0]|0;n=0;while(1){m=k[p>>2]|0;j=l[m+(n+-1)>>0]|0;d=n+1|0;c=l[e+d>>0]|0;h=k[q>>2]|0;g=b-f|0;e=f-j|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Cg(a,n,0)|0)+n|0;c=k[o>>2]|0;b=l[c+(d+-1)>>0]|0;c=l[c+d>>0]|0}else{f=b-j>>31;if((f^e|0)<0)e=b;else e=j+((f^g|0)<0?0:g)|0;m=Bg(a,h,l[m+n>>0]|0,e,0)|0;i[(k[p>>2]|0)+n>>0]=m}if((d|0)>=(k[r>>2]|0))break;e=k[o>>2]|0;f=b;b=c;n=d}return}function Bg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;Fg(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&255;return r|0}r=e&~(b>>31);r=r&255;return r|0}function Cg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;j=(k[a+180>>2]|0)-b|0;m=k[a+4608>>2]|0;n=k[a+4604>>2]|0;e=i[m+(b+-1)>>0]|0;h=e&255;c=a+144|0;f=0;while(1){d=m+(f+b)|0;g=(l[d>>0]|0)-h|0;if((((g|0)>-1?g:0-g|0)|0)>(k[c>>2]|0))break;i[d>>0]=e;f=f+1|0;if((f|0)==(j|0)){f=j;break}}e=(f|0)==(j|0);g=a+4600|0;d=k[36476+(k[g>>2]<<2)>>2]|0;if((1<(f|0))c=f;else{c=f;do{ke(a,1,1);d=k[g>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[g>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]|0,h,l[n+j>>0]|0)|0;i[b>>0]=a;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;a=f+1|0;return a|0}if(!c){a=j;return a|0}ke(a,1,1);a=j;return a|0}function Dg(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;h=c-d|0;i=a+136|0;g=a+144|0;e=k[g>>2]|0;if((((h|0)>-1?h:0-h|0)|0)>(e|0)){f=d-c>>31|1;b=ia(f,b-d|0)|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;c=((b|0)<0?e:0)+b|0;e=c-((c|0)<((e+1|0)/2|0|0)?0:e)|0;Eg(a,a+4576|0,e);e=ia(e,f)|0;f=k[g>>2]|0;g=f<<1|1;e=(ia(e,g)|0)+d|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&255;return i|0}i=b&~(e>>31);i=i&255;return i|0}else{b=b-c|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;f=((b|0)<0?e:0)+b|0;e=f-((f|0)<((e+1|0)/2|0|0)?0:e)|0;Eg(a,a+4588|0,e);f=k[g>>2]|0;g=f<<1|1;e=(ia(g,e)|0)+c|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&255;return i|0}i=b&~(e>>31);i=i&255;return i|0}return 0}function Eg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Fg(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function Fg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Hg(a){a=a|0;var b=0,c=0;k[a>>2]=35856;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Ig(a){a=a|0;var b=0,c=0;k[a>>2]=35856;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Jg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;Vg(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function Lg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);Mg(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function Mg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+172|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,B=x,x=0,!(B&1)):0){k[C>>2]=d;B=d+(b<<1)|0;k[C+8>>2]=B;sw(d|0,0,c|0)|0;k[D>>2]=B;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=18;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=16;if((g|0)==16?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=18;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4596|0;h=ia(y,w)|0;i=h+1|0;l=a+4600|0;m=(y|0)>0;n=a+160|0;o=a+168|0;p=a+164|0;q=a+156|0;s=a+88|0;t=a+4592|0;u=0;b:while(1){d=k[C>>2]|0;c=d+2|0;k[g>>2]=c;d=d+(i<<1)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;j[c+(e<<1)>>1]=j[c+(e+-1<<1)>>1]|0;j[b+-2>>1]=j[c>>1]|0;x=0;ra(76,a|0,0);e=x;x=0;if(e&1){g=29;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w<<1)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w<<1)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h<<1)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=30;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Ng(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;q=a+4596|0;c=k[q>>2]|0;u=a+172|0;b=k[u>>2]|0;if((b|0)<=0)return;r=a+4600|0;s=a+4604|0;t=a+4592|0;h=c;f=m[c+-2>>1]|0;c=m[c>>1]|0;p=0;while(1){n=k[r>>2]|0;g=j[n+(p+-1<<1)>>1]|0;o=g&65535;e=p+1|0;d=m[h+(e<<1)>>1]|0;l=k[s>>2]|0;h=c-f|0;f=f-o|0;l=((((i[l+(d-c)>>0]|0)*9|0)+(i[l+h>>0]|0)|0)*9|0)+(i[l+f>>0]|0)|0;n=n+(p<<1)|0;if(!l){b=Qg(a,g,n,b-p|0)|0;c=b+p|0;if((c|0)!=(k[u>>2]|0)){o=Rg(a,o,m[(k[q>>2]|0)+(c<<1)>>1]|0)|0;j[(k[r>>2]|0)+(c<<1)>>1]=o;o=k[t>>2]|0;k[t>>2]=(o|0)<1?0:o+-1|0;b=b+1|0}e=b+p|0;d=k[q>>2]|0;c=m[d+(e+-1<<1)>>1]|0;d=m[d+(e<<1)>>1]|0}else{b=c-o>>31;if((b^f|0)<0)b=c;else b=o+((b^h|0)<0?0:h)|0;o=Pg(a,l,m[n>>1]|0,b,0)|0;j[(k[r>>2]|0)+(p<<1)>>1]=o}b=k[u>>2]|0;if((b|0)<=(e|0))break;h=k[q>>2]|0;f=c;c=d;p=e}return}function Og(a){a=a|0;var b=0,c=0,d=0,e=0;d=a+116|0;c=k[d>>2]|0;if((i[c>>0]|0)!=-1){e=a+112|0;b=k[e>>2]|0;if((b|0)<1){qe(a);b=k[e>>2]|0;c=k[d>>2]|0}a=a+108|0;d=k[a>>2]|0;k[e>>2]=b+-1;b=d<<1;k[a>>2]=b;if((i[c>>0]|0)!=-1){b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,6,35648);a=x;x=0;if(!(a&1))ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}}else b=k[a+108>>2]|0;if(!b)return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,6,35648);a=x;x=0;if(!(a&1))ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}function Pg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&65535;return a|0}a=c&~(e>>31);a=a&65535;return a|0}function Qg(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)>0)f=0;else return e|0;do{j[c+(f<<1)>>1]=b;f=f+1|0}while((f|0)!=(e|0));return e|0}function Rg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b-c|0;g=a+128|0;d=a+136|0;if((((f|0)>-1?f:0-f|0)|0)>(k[d>>2]|0)){b=ia(Sg(a,a+4568|0)|0,c-b>>31|1)|0;e=k[d>>2]|0;f=e<<1|1;b=(ia(b,f)|0)+c|0;if((b|0)>=(0-e|0)){d=k[g>>2]|0;if((d+e|0)<(b|0))b=b-(ia(k[a+132>>2]|0,f)|0)|0}else{b=(ia(k[a+132>>2]|0,f)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&65535;return a|0}a=d&~(b>>31);a=a&65535;return a|0}else{c=Sg(a,a+4580|0)|0;f=k[d>>2]|0;e=f<<1|1;b=(ia(e,c)|0)+b|0;if((b|0)>=(0-f|0)){d=k[g>>2]|0;if((d+f|0)<(b|0))b=b-(ia(k[a+132>>2]|0,e)|0)|0}else{b=(ia(k[a+132>>2]|0,e)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&65535;return a|0}a=d&~(b>>31);a=a&65535;return a|0}return 0}function Sg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function Tg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=a+112|0;if((k[f>>2]|0)<16)qe(a);g=a+108|0;c=k[g>>2]|0;if((c|0)>=0)if(!(c&1073741824))if(!(c&536870912))if(!(c&268435456))if(!(c&134217728))if(!(c&67108864))if(!(c&33554432))if(!(c&16777216))if(!(c&8388608))if(!(c&4194304))if(!(c&2097152))if(!(c&1048576))if(!(c&524288))if(!(c&262144))if(!(c&131072)){e=c>>>12&16;b=e+-1|0;if(!e){b=(k[f>>2]|0)+-15|0;k[f>>2]=b;d=c<<15;k[g>>2]=d;c=b;b=15;while(1){if((c|0)<1){qe(a);e=k[g>>2]|0;c=k[f>>2]|0}else e=d;c=c+-1|0;k[f>>2]=c;d=e<<1;k[g>>2]=d;if((e|0)<0)break;else b=b+1|0}return b|0}}else b=14;else b=13;else b=12;else b=11;else b=10;else b=9;else b=8;else b=7;else b=6;else b=5;else b=4;else b=3;else b=2;else b=1;else b=0;a=b+1|0;k[f>>2]=(k[f>>2]|0)-a;k[g>>2]=c<>2]|0;if((c|0)<(b|0)){qe(a);c=k[d>>2]|0;if((c|0)<(b|0)){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}e=a+108|0;a=k[e>>2]|0;k[d>>2]=c-b;k[e>>2]=a<>>(32-b|0)|0}function Vg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0), -(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Wg(a){a=a|0;var b=0,c=0;k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Xg(a){a=a|0;var b=0,c=0;k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Yg(a){a=a|0;var b=0,c=0;k[a>>2]=35828;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Zg(a){a=a|0;var b=0,c=0;k[a>>2]=35828;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function _g(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function $g(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;hh(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function ah(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);bh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function bh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+172|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!(b>>>0>715827882?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(x=0,c=ta(67,b*6|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;d=c+(b*6|0)|0;k[C+8>>2]=d;while(1){j[c>>1]=0;j[c+2>>1]=0;j[c+4>>1]=0;b=b+-1|0;if(!b)break;else c=c+6|0}k[D>>2]=d;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=20;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=18;if((g|0)==18?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=20;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==20){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4596|0;h=ia(y,w)|0;i=h+1|0;l=a+4600|0;m=(y|0)>0;n=a+160|0;o=a+168|0;p=a+164|0;q=a+156|0;s=a+88|0;t=a+4592|0;u=0;b:while(1){d=k[C>>2]|0;c=d+6|0;k[g>>2]=c;d=d+(i*6|0)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];b=k[v>>2]|0;e=c+(b*6|0)|0;c=c+((b+-1|0)*6|0)|0;j[e>>1]=j[c>>1]|0;j[e+2>>1]=j[c+2>>1]|0;j[e+4>>1]=j[c+4>>1]|0;e=(k[l>>2]|0)+-6|0;c=k[g>>2]|0;j[e>>1]=j[c>>1]|0;j[e+2>>1]=j[c+2>>1]|0;j[e+4>>1]=j[c+4>>1]|0;x=0;ra(77,a|0,0);e=x;x=0;if(e&1){g=31;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w*6|0)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w*6|0)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+(((k[q>>2]|0)-h|0)*6|0)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=32;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=44;break a}}if((g|0)==31){d=Wa()|0;break}else if((g|0)==32){d=Wa()|0;break}}else g=44}while(0);do{if((g|0)==44){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}function ch(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=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;N=r;r=r+32|0;D=N+24|0;M=N+18|0;L=N+12|0;E=N+6|0;F=N;G=a+172|0;b=k[G>>2]|0;if((b|0)<=0){r=N;return}H=a+4600|0;I=a+4596|0;J=a+4604|0;K=a+4592|0;C=0;while(1){d=C+-1|0;e=k[H>>2]|0;O=k[I>>2]|0;c=C+1|0;f=m[O+(C*6|0)>>1]|0;B=k[J>>2]|0;g=m[O+(d*6|0)>>1]|0;h=f-g|0;l=m[e+(d*6|0)>>1]|0;n=g-l|0;o=((((i[B+((m[O+(c*6|0)>>1]|0)-f)>>0]|0)*9|0)+(i[B+h>>0]|0)|0)*9|0)+(i[B+n>>0]|0)|0;p=m[O+(C*6|0)+2>>1]|0;q=m[O+(d*6|0)+2>>1]|0;s=p-q|0;t=m[e+(d*6|0)+2>>1]|0;u=q-t|0;v=((((i[B+((m[O+(c*6|0)+2>>1]|0)-p)>>0]|0)*9|0)+(i[B+s>>0]|0)|0)*9|0)+(i[B+u>>0]|0)|0;w=m[O+(C*6|0)+4>>1]|0;x=m[O+(d*6|0)+4>>1]|0;y=w-x|0;z=m[e+(d*6|0)+4>>1]|0;A=x-z|0;B=((((i[B+((m[O+(c*6|0)+4>>1]|0)-w)>>0]|0)*9|0)+(i[B+y>>0]|0)|0)*9|0)+(i[B+A>>0]|0)|0;if(!(v|o|B)){c=e+(d*6|0)|0;j[L>>1]=j[c>>1]|0;j[L+2>>1]=j[c+2>>1]|0;j[L+4>>1]=j[c+4>>1]|0;j[D>>1]=j[c>>1]|0;j[D+2>>1]=j[c+2>>1]|0;j[D+4>>1]=j[c+4>>1]|0;b=dh(a,D,e+(C*6|0)|0,b-C|0)|0;c=b+C|0;if((c|0)!=(k[G>>2]|0)){O=(k[I>>2]|0)+(c*6|0)|0;j[F>>1]=j[O>>1]|0;j[F+2>>1]=j[O+2>>1]|0;j[F+4>>1]=j[O+4>>1]|0;O=(k[H>>2]|0)+(c*6|0)|0;j[M>>1]=j[L>>1]|0;j[M+2>>1]=j[L+2>>1]|0;j[M+4>>1]=j[L+4>>1]|0;j[D>>1]=j[F>>1]|0;j[D+2>>1]=j[F+2>>1]|0;j[D+4>>1]=j[F+4>>1]|0;eh(E,a,M,D);j[O>>1]=j[E>>1]|0;j[O+2>>1]=j[E+2>>1]|0;j[O+4>>1]=j[E+4>>1]|0;O=k[K>>2]|0;k[K>>2]=(O|0)<1?0:O+-1|0;b=b+1|0}c=b+C|0}else{d=m[e+(C*6|0)>>1]|0;b=f-l>>31;if((b^n|0)>=0)if((b^h|0)<0)b=l;else b=l-g+f|0;else b=f;f=fh(a,o,d,b,0)|0;d=m[(k[H>>2]|0)+(C*6|0)+2>>1]|0;b=p-t>>31;if((b^u|0)>=0)if((b^s|0)<0)b=t;else b=t-q+p|0;else b=p;d=fh(a,v,d,b,0)|0;e=m[(k[H>>2]|0)+(C*6|0)+4>>1]|0;b=w-z>>31;if((b^A|0)>=0)if((b^y|0)<0)b=z;else b=z-x+w|0;else b=w;B=fh(a,B,e,b,0)|0;O=k[H>>2]|0;j[O+(C*6|0)>>1]=f;j[O+(C*6|0)+2>>1]=d;j[O+(C*6|0)+4>>1]=B}b=k[G>>2]|0;if((c|0)>=(b|0))break;else C=c}r=N;return}function dh(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;f=0;do{p=c+(f*6|0)|0;j[p>>1]=j[b>>1]|0;j[p+2>>1]=j[b+2>>1]|0;j[p+4>>1]=j[b+4>>1]|0;f=f+1|0}while((f|0)!=(e|0));return e|0}function eh(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,l=0,n=0,o=0;i=b+4568|0;o=gh(b,i)|0;g=gh(b,i)|0;i=gh(b,i)|0;f=b+128|0;e=m[d>>1]|0;l=k[b+136>>2]|0;n=l<<1|1;e=(ia(ia(n,o)|0,e-(m[c>>1]|0)>>31|1)|0)+e|0;o=0-l|0;if((e|0)>=(o|0)){f=k[f>>2]|0;if((f+l|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else{e=(ia(k[b+132>>2]|0,n)|0)+e|0;f=k[f>>2]|0}if((e&f|0)!=(e|0))e=f&~(e>>31);h=e&65535;e=m[d+2>>1]|0;e=(ia(ia(n,g)|0,e-(m[c+2>>1]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+l|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)!=(e|0))e=f&~(e>>31);g=e&65535;e=m[d+4>>1]|0;e=(ia(ia(n,i)|0,e-(m[c+4>>1]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+l|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)==(e|0)){b=e;b=b&65535;j[a>>1]=h;o=a+2|0;j[o>>1]=g;a=a+4|0;j[a>>1]=b;return}b=f&~(e>>31);b=b&65535;j[a>>1]=h;o=a+2|0;j[o>>1]=g;a=a+4|0;j[a>>1]=b;return}function fh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&65535;return a|0}a=c&~(e>>31);a=a&65535;return a|0}function gh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function hh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function ih(a){a=a|0;var b=0,c=0;k[a>>2]=35800;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function jh(a){a=a|0;var b=0,c=0;k[a>>2]=35800;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function kh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function lh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;th(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function mh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);nh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function nh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+172|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,C|0),B=x,x=0,B&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[D>>2]|0)+3|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)f=19;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))f=17;if((f|0)==17?(d=y<<2,x=0,e=ta(67,d|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=e;f=e+(y<<2)|0;k[z+8>>2]=f;sw(e|0,0,d|0)|0;k[B>>2]=f;f=19;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){f=a+8|0;b:do{if((k[f>>2]|0)>0){g=a+4596|0;h=ia(y,w)|0;j=h+1|0;l=a+4600|0;m=(y|0)>0;n=a+160|0;o=a+168|0;p=a+164|0;q=a+156|0;s=a+88|0;t=a+4592|0;u=0;c:while(1){d=k[C>>2]|0;c=d+3|0;k[g>>2]=c;d=d+(j*3|0)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];b=k[v>>2]|0;e=c+(b*3|0)|0;c=c+((b+-1|0)*3|0)|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;c=k[g>>2]|0;e=(k[l>>2]|0)+-3|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;x=0;ra(78,a|0,0);e=x;x=0;if(e&1){f=30;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w*3|0)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w*3|0)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+(((k[q>>2]|0)-h|0)*3|0)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){f=31;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){f=43;break b}}if((f|0)==30){d=Wa()|0;break}else if((f|0)==31){d=Wa()|0;break}}else f=43}while(0);do{if((f|0)==43){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function oh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=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;M=r;r=r+16|0;C=M+12|0;L=M+9|0;K=M+6|0;D=M+3|0;E=M;F=a+172|0;b=k[F>>2]|0;if((b|0)<=0){r=M;return}G=a+4600|0;H=a+4596|0;I=a+4604|0;J=a+4592|0;B=0;while(1){y=B+-1|0;d=k[G>>2]|0;e=d+(y*3|0)|0;N=k[H>>2]|0;c=B+1|0;f=l[N+(B*3|0)>>0]|0;A=k[I>>2]|0;g=l[N+(y*3|0)>>0]|0;h=f-g|0;j=l[e>>0]|0;m=g-j|0;n=((((i[A+((l[N+(c*3|0)>>0]|0)-f)>>0]|0)*9|0)+(i[A+h>>0]|0)|0)*9|0)+(i[A+m>>0]|0)|0;o=l[N+(B*3|0)+1>>0]|0;p=l[N+(y*3|0)+1>>0]|0;q=o-p|0;s=l[d+(y*3|0)+1>>0]|0;t=p-s|0;u=((((i[A+((l[N+(c*3|0)+1>>0]|0)-o)>>0]|0)*9|0)+(i[A+q>>0]|0)|0)*9|0)+(i[A+t>>0]|0)|0;v=l[N+(B*3|0)+2>>0]|0;w=l[N+(y*3|0)+2>>0]|0;x=v-w|0;y=l[d+(y*3|0)+2>>0]|0;z=w-y|0;A=((((i[A+((l[N+(c*3|0)+2>>0]|0)-v)>>0]|0)*9|0)+(i[A+x>>0]|0)|0)*9|0)+(i[A+z>>0]|0)|0;if(!(u|n|A)){i[K>>0]=i[e>>0]|0;i[K+1>>0]=i[e+1>>0]|0;i[K+2>>0]=i[e+2>>0]|0;i[C>>0]=i[e>>0]|0;i[C+1>>0]=i[e+1>>0]|0;i[C+2>>0]=i[e+2>>0]|0;b=ph(a,C,d+(B*3|0)|0,b-B|0)|0;c=b+B|0;if((c|0)!=(k[F>>2]|0)){N=(k[H>>2]|0)+(c*3|0)|0;i[E>>0]=i[N>>0]|0;i[E+1>>0]=i[N+1>>0]|0;i[E+2>>0]=i[N+2>>0]|0;N=k[G>>2]|0;i[L>>0]=i[K>>0]|0;i[L+1>>0]=i[K+1>>0]|0;i[L+2>>0]=i[K+2>>0]|0;i[C>>0]=i[E>>0]|0;i[C+1>>0]=i[E+1>>0]|0;i[C+2>>0]=i[E+2>>0]|0;qh(D,a,L,C);N=N+(c*3|0)|0;i[N>>0]=i[D>>0]|0;i[N+1>>0]=i[D+1>>0]|0;i[N+2>>0]=i[D+2>>0]|0;N=k[J>>2]|0;k[J>>2]=(N|0)<1?0:N+-1|0;b=b+1|0}c=b+B|0}else{d=l[d+(B*3|0)>>0]|0;b=f-j>>31;if((b^m|0)>=0)if((b^h|0)<0)b=j;else b=j-g+f|0;else b=f;f=rh(a,n,d,b,0)|0;d=l[(k[G>>2]|0)+(B*3|0)+1>>0]|0;b=o-s>>31;if((b^t|0)>=0)if((b^q|0)<0)b=s;else b=s-p+o|0;else b=o;d=rh(a,u,d,b,0)|0;e=l[(k[G>>2]|0)+(B*3|0)+2>>0]|0;b=v-y>>31;if((b^z|0)>=0)if((b^x|0)<0)b=y;else b=y-w+v|0;else b=v;A=rh(a,A,e,b,0)|0;N=(k[G>>2]|0)+(B*3|0)|0;i[N>>0]=f;i[N+1>>0]=d;i[N+2>>0]=A}b=k[F>>2]|0;if((c|0)>=(b|0))break;else B=c}r=M;return}function ph(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;f=0;do{o=c+(f*3|0)|0;i[o>>0]=i[b>>0]|0;i[o+1>>0]=i[b+1>>0]|0;i[o+2>>0]=i[b+2>>0]|0;f=f+1|0}while((f|0)!=(e|0));return e|0}function qh(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,j=0,m=0,n=0,o=0;j=b+4568|0;o=sh(b,j)|0;g=sh(b,j)|0;j=sh(b,j)|0;f=b+128|0;e=l[d>>0]|0;m=k[b+136>>2]|0;n=m<<1|1;e=(ia(ia(n,o)|0,e-(l[c>>0]|0)>>31|1)|0)+e|0;o=0-m|0;if((e|0)>=(o|0)){f=k[f>>2]|0;if((f+m|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else{e=(ia(k[b+132>>2]|0,n)|0)+e|0;f=k[f>>2]|0}if((e&f|0)!=(e|0))e=f&~(e>>31);h=e&255;e=l[d+1>>0]|0;e=(ia(ia(n,g)|0,e-(l[c+1>>0]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+m|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)!=(e|0))e=f&~(e>>31);g=e&255;e=l[d+2>>0]|0;e=(ia(ia(n,j)|0,e-(l[c+2>>0]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+m|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)==(e|0)){b=e;b=b&255;i[a>>0]=h;o=a+1|0;i[o>>0]=g;a=a+2|0;i[a>>0]=b;return}b=f&~(e>>31);b=b&255;i[a>>0]=h;o=a+1|0;i[o>>0]=g;a=a+2|0;i[a>>0]=b;return}function rh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&255;return a|0}a=c&~(e>>31);a=a&255;return a|0}function sh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function th(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0 -;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function uh(a){a=a|0;var b=0,c=0;k[a>>2]=35772;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function vh(a){a=a|0;var b=0,c=0;k[a>>2]=35772;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function wh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function xh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,65535,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;Fh(a);d=0;do{k[a+164+(d*12|0)>>2]=1024;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=1024;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=1024;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function yh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);zh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function zh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,B=x,x=0,!(B&1)):0){k[C>>2]=d;B=d+(b<<1)|0;k[C+8>>2]=B;sw(d|0,0,c|0)|0;k[D>>2]=B;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=18;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=16;if((g|0)==16?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=18;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;i=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;b:while(1){d=k[C>>2]|0;c=d+2|0;k[g>>2]=c;d=d+(i<<1)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;j[c+(e<<1)>>1]=j[c+(e+-1<<1)>>1]|0;j[b+-2>>1]=j[c>>1]|0;x=0;ra(79,a|0,0);e=x;x=0;if(e&1){g=29;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w<<1)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w<<1)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h<<1)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=30;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Ah(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4572|0;b=k[p>>2]|0;s=a+148|0;if((k[s>>2]|0)<=0)return;q=a+4576|0;r=a+4580|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Ch(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Bh(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Bh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&65535|0)!=(c|0))c=c>>31&65535^65535;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<47){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&65535;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&65535;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&65535;return b|0}function Ch(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4576|0;e=k[f>>2]|0;c=j[e+(b+-1<<1)>>1]|0;g=a+148|0;e=Dh(a,c,e+(b<<1)|0,(k[g>>2]|0)-b|0)|0;d=e+b|0;if((d|0)==(k[g>>2]|0)){g=e;return g|0}c=c&65535;b=m[(k[a+4572>>2]|0)+(d<<1)>>1]|0;g=c-b|0;if((((g|0)>-1?g:0-g|0)|0)<1)c=(Eh(a,a+4556|0)|0)+c|0;else c=(ia(Eh(a,a+4544|0)|0,b-c>>31|1)|0)+b|0;j[(k[f>>2]|0)+(d<<1)>>1]=c;g=a+4568|0;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;g=e+1|0;return g|0}function Dh(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)>0)f=0;else return e|0;do{j[c+(f<<1)>>1]=b;f=f+1|0}while((f|0)!=(e|0));return e|0}function Eh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(46-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,16)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function Fh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,65535,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8909]|0;k[a+4580>>2]=j+(((k[8910]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=131072){if(f>>>0>131072?(g=b+131072|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,131072-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+65536;g=a+160|0;e=a+156|0;f=-65536;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==65536)break}r=l;return}function Gh(a){a=a|0;var b=0,c=0;k[a>>2]=35744;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Hh(a){a=a|0;var b=0,c=0;k[a>>2]=35744;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Ih(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Jh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,4095,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;Rh(a);d=0;do{k[a+164+(d*12|0)>>2]=64;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=64;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=64;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function Kh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);Lh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function Lh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,B=x,x=0,!(B&1)):0){k[C>>2]=d;B=d+(b<<1)|0;k[C+8>>2]=B;sw(d|0,0,c|0)|0;k[D>>2]=B;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=18;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=16;if((g|0)==16?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=18;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;i=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;b:while(1){d=k[C>>2]|0;c=d+2|0;k[g>>2]=c;d=d+(i<<1)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;j[c+(e<<1)>>1]=j[c+(e+-1<<1)>>1]|0;j[b+-2>>1]=j[c>>1]|0;x=0;ra(80,a|0,0);e=x;x=0;if(e&1){g=29;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w<<1)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w<<1)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h<<1)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=30;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4572|0;b=k[p>>2]|0;s=a+148|0;if((k[s>>2]|0)<=0)return;q=a+4576|0;r=a+4580|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Oh(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Nh(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Nh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&4095|0)!=(c|0))c=c>>31&4095^4095;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<35){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}function Oh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4576|0;e=k[f>>2]|0;c=j[e+(b+-1<<1)>>1]|0;g=a+148|0;e=Ph(a,c,e+(b<<1)|0,(k[g>>2]|0)-b|0)|0;d=e+b|0;if((d|0)==(k[g>>2]|0)){g=e;return g|0}c=c&65535;b=m[(k[a+4572>>2]|0)+(d<<1)>>1]|0;g=c-b|0;if((((g|0)>-1?g:0-g|0)|0)<1)c=(Qh(a,a+4556|0)|0)+c|0;else c=(ia(Qh(a,a+4544|0)|0,b-c>>31|1)|0)+b|0;j[(k[f>>2]|0)+(d<<1)>>1]=c&4095;g=a+4568|0;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;g=e+1|0;return g|0}function Ph(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)>0)f=0;else return e|0;do{j[c+(f<<1)>>1]=b;f=f+1|0}while((f|0)!=(e|0));return e|0}function Qh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(34-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,12)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function Rh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,4095,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8906]|0;k[a+4580>>2]=j+(((k[8907]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=8192){if(f>>>0>8192?(g=b+8192|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,8192-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+4096;g=a+160|0;e=a+156|0;f=-4096;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==4096)break}r=l;return}function Sh(a){a=a|0;var b=0,c=0;k[a>>2]=35716;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Th(a){a=a|0;var b=0,c=0;k[a>>2]=35716;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Uh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Vh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;bi(a);d=0;do{k[a+164+(d*12|0)>>2]=4;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=4;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=4;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function Wh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);Xh(a) -;b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function Xh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[D>>2]|0)+1|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)f=19;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))f=17;if((f|0)==17?(d=y<<2,x=0,e=ta(67,d|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=e;f=e+(y<<2)|0;k[z+8>>2]=f;sw(e|0,0,d|0)|0;k[B>>2]=f;f=19;break}c=Wa()|0;b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){f=a+8|0;b:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;j=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;c:while(1){d=k[C>>2]|0;c=d+1|0;k[g>>2]=c;d=d+j|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;i[c+e>>0]=i[c+(e+-1)>>0]|0;i[(k[l>>2]|0)+-1>>0]=i[k[g>>2]>>0]|0;x=0;ra(81,a|0,0);e=x;x=0;if(e&1){f=30;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+w|0;k[g>>2]=c;b=(k[l>>2]|0)+w|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){f=31;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){f=43;break b}}if((f|0)==30){c=Wa()|0;break}else if((f|0)==31){c=Wa()|0;break}}else f=43}while(0);do{if((f|0)==43){x=0;qa(183,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);r=A;return}}while(0);b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}function Yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+4572|0;b=k[o>>2]|0;r=a+148|0;if((k[r>>2]|0)<=0)return;p=a+4576|0;q=a+4580|0;e=b;f=l[b+-1>>0]|0;b=l[b>>0]|0;n=0;while(1){m=k[p>>2]|0;j=l[m+(n+-1)>>0]|0;d=n+1|0;c=l[e+d>>0]|0;h=k[q>>2]|0;g=b-f|0;e=f-j|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(_h(a,n,0)|0)+n|0;c=k[o>>2]|0;b=l[c+(d+-1)>>0]|0;c=l[c+d>>0]|0}else{f=b-j>>31;if((f^e|0)<0)e=b;else e=j+((f^g|0)<0?0:g)|0;m=Zh(a,h,l[m+n>>0]|0,e,0)|0;i[(k[p>>2]|0)+n>>0]=m}if((d|0)>=(k[r>>2]|0))break;e=k[o>>2]|0;f=b;b=c;n=d}return}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,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&255|0)!=(c|0))c=c>>31&255^255;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<23){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}function _h(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4576|0;e=k[f>>2]|0;c=i[e+(b+-1)>>0]|0;g=a+148|0;e=$h(a,c,e+b|0,(k[g>>2]|0)-b|0)|0;d=e+b|0;if((d|0)==(k[g>>2]|0)){g=e;return g|0}c=c&255;b=l[(k[a+4572>>2]|0)+d>>0]|0;g=c-b|0;if((((g|0)>-1?g:0-g|0)|0)<1)c=(ai(a,a+4556|0)|0)+c|0;else c=(ia(ai(a,a+4544|0)|0,b-c>>31|1)|0)+b|0;i[(k[f>>2]|0)+d>>0]=c;g=a+4568|0;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;g=e+1|0;return g|0}function $h(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;sw(c|0,b|0,e|0)|0;return e|0}function ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(22-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,8)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function bi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8900]|0;k[a+4580>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+256;g=a+160|0;e=a+156|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function ci(a){a=a|0;var b=0,c=0;k[a>>2]=35688;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function di(a){a=a|0;var b=0,c=0;k[a>>2]=35688;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function ei(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function fi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;ni(a);d=0;do{k[a+164+(d*12|0)>>2]=4;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=4;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=4;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function gi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);hi(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function hi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,C|0),B=x,x=0,B&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[D>>2]|0)+3|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)f=19;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))f=17;if((f|0)==17?(d=y<<2,x=0,e=ta(67,d|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=e;f=e+(y<<2)|0;k[z+8>>2]=f;sw(e|0,0,d|0)|0;k[B>>2]=f;f=19;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){f=a+8|0;b:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;j=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;c:while(1){d=k[C>>2]|0;c=d+3|0;k[g>>2]=c;d=d+(j*3|0)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];b=k[v>>2]|0;e=c+(b*3|0)|0;c=c+((b+-1|0)*3|0)|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;c=k[g>>2]|0;e=(k[l>>2]|0)+-3|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;x=0;ra(82,a|0,0);e=x;x=0;if(e&1){f=30;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w*3|0)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w*3|0)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+(((k[q>>2]|0)-h|0)*3|0)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){f=31;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){f=43;break b}}if((f|0)==30){d=Wa()|0;break}else if((f|0)==31){d=Wa()|0;break}}else f=43}while(0);do{if((f|0)==43){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function ii(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=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;A=a+148|0;if((k[A>>2]|0)<=0)return;B=a+4576|0;C=a+4572|0;D=a+4580|0;z=0;while(1){w=z+-1|0;f=k[B>>2]|0;g=k[C>>2]|0;b=z+1|0;e=l[g+(z*3|0)>>0]|0;y=k[D>>2]|0;h=l[g+(w*3|0)>>0]|0;j=e-h|0;m=l[f+(w*3|0)>>0]|0;n=h-m|0;o=((((i[y+((l[g+(b*3|0)>>0]|0)-e)>>0]|0)*9|0)+(i[y+j>>0]|0)|0)*9|0)+(i[y+n>>0]|0)|0;d=l[g+(z*3|0)+1>>0]|0;p=l[g+(w*3|0)+1>>0]|0;q=d-p|0;r=l[f+(w*3|0)+1>>0]|0;s=p-r|0;t=((((i[y+((l[g+(b*3|0)+1>>0]|0)-d)>>0]|0)*9|0)+(i[y+q>>0]|0)|0)*9|0)+(i[y+s>>0]|0)|0;c=l[g+(z*3|0)+2>>0]|0;u=l[g+(w*3|0)+2>>0]|0;v=c-u|0;w=l[f+(w*3|0)+2>>0]|0;x=u-w|0;y=((((i[y+((l[g+(b*3|0)+2>>0]|0)-c)>>0]|0)*9|0)+(i[y+v>>0]|0)|0)*9|0)+(i[y+x>>0]|0)|0;if(!(t|o|y))b=(ji(a,z,0)|0)+z|0;else{g=l[f+(z*3|0)>>0]|0;f=e-m>>31;if((f^n|0)>=0)if((f^j|0)<0)e=m;else e=m-h+e|0;g=ki(a,o,g,e,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+1>>0]|0;e=d-r>>31;if((e^s|0)>=0)if((e^q|0)<0)d=r;else d=r-p+d|0;e=ki(a,t,f,d,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+2>>0]|0;d=c-w>>31;if((d^x|0)>=0)if((d^v|0)<0)c=w;else c=w-u+c|0;y=ki(a,y,f,c,0)|0;z=(k[B>>2]|0)+(z*3|0)|0;i[z>>0]=g;i[z+1>>0]=e;i[z+2>>0]=y}if((b|0)<(k[A>>2]|0))z=b;else break}return}function ji(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;j=r;r=r+16|0;m=j+3|0;n=j;f=a+4576|0;c=k[f>>2]|0;d=c+((b+-1|0)*3|0)|0;g=i[d>>0]|0;h=i[d+1>>0]|0;d=i[d+2>>0]|0;i[n>>0]=g;i[n+1>>0]=h;i[n+2>>0]=d;l=a+148|0;e=(k[l>>2]|0)-b|0;i[m>>0]=i[n>>0]|0;i[m+1>>0]=i[n+1>>0]|0;i[m+2>>0]=i[n+2>>0]|0;e=li(a,m,c+(b*3|0)|0,e)|0;c=e+b|0;if((c|0)==(k[l>>2]|0)){n=e;r=j;return n|0}m=(k[a+4572>>2]|0)+(c*3|0)|0;b=i[m>>0]|0;l=i[m+1>>0]|0;m=i[m+2>>0]|0;n=k[f>>2]|0;f=a+4544|0;p=mi(a,f)|0;o=mi(a,f)|0;b=b&255;b=(ia(b-(g&255)>>31|1,p)|0)+b&255;l=l&255;l=(ia(l-(h&255)>>31|1,o)|0)+l&255;m=m&255;m=(ia(m-(d&255)>>31|1,mi(a,f)|0)|0)+m&255;n=n+(c*3|0)|0;i[n>>0]=b;i[n+1>>0]=l;i[n+2>>0]=m;n=a+4568|0;m=k[n>>2]|0;k[n>>2]=(m|0)<1?0:m+-1|0;n=e+1|0;r=j;return n|0}function ki(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&255|0)!=(c|0))c=c>>31&255^255;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<23){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}function li(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;f=0;do{o=c+(f*3|0)|0;i[o>>0]=i[b>>0]|0;i[o+1>>0]=i[b+1>>0]|0;i[o+2>>0]=i[b+2>>0]|0;f=f+1|0}while((f|0)!=(e|0));return e|0}function mi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(22-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,8)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function Vp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+128|0;f=m;o=m+116|0;p=m+104|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,0,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=cv(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Wp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+240|0;g=m+8|0;a=m;o=m+204|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,0,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,23,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=cv(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Xp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+352|0;t=z+312|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+316|0;s=z+80|0;h=z+84|0;y=z+76|0;w=z+72|0;u=z+68|0;v=z+64|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58898,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,k[n>>2]=k[c+8>>2],p[n+8>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<3)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(4,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(40,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function Yp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;y=r;r=r+16|0;z=y;w=Ss(g,44212)|0;u=Ss(g,44368)|0;Mb[k[(k[u>>2]|0)+20>>2]&127](z,u);k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,g|0)|0;v=x;x=0;if(v&1)t=8;else{l=k[f>>2]|0;k[f>>2]=l+4;k[l>>2]=g;l=a+1|0;t=10}break}default:{l=a;t=10}}a:do{if((t|0)==10){v=c;b:do{if((v-l|0)>1?(i[l>>0]|0)==48:0){h=l+1|0;switch(i[h>>0]|0){case 88:case 120:break;default:{t=11;break b}}x=0;g=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,48)|0;s=x;x=0;if(s&1){t=8;break a}s=k[f>>2]|0;k[f>>2]=s+4;k[s>>2]=g;l=l+2|0;x=0;g=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,i[h>>0]|0)|0;s=x;x=0;if(s&1){t=8;break a}s=k[f>>2]|0;k[f>>2]=s+4;k[s>>2]=g;if(l>>>0>>0){g=l;while(1){h=i[g>>0]|0;x=0;j=Da(3)|0;s=x;x=0;if(s&1)break;x=0;h=Aa(39,h<<24>>24|0,j|0)|0;s=x;x=0;if(s&1)break;if(!h){s=l;break b}g=g+1|0;if(g>>>0>=c>>>0){s=l;break b}}g=Wa()|0;break a}else{s=l;g=l}}else t=11}while(0);c:do{if((t|0)==11)if(l>>>0>>0){g=l;while(1){h=i[g>>0]|0;x=0;j=Da(3)|0;s=x;x=0;if(s&1)break;x=0;h=Aa(40,h<<24>>24|0,j|0)|0;s=x;x=0;if(s&1)break;if(!h){s=l;break c}g=g+1|0;if(g>>>0>=c>>>0){s=l;break c}}g=Wa()|0;break a}else{s=l;g=l}}while(0);p=i[z>>0]|0;q=z+4|0;if(((p&1)==0?(p&255)>>>1:k[q>>2]|0)|0){if((s|0)!=(g|0)?(m=g+-1|0,s>>>0>>0):0){j=s;h=m;do{p=i[j>>0]|0;i[j>>0]=i[h>>0]|0;i[h>>0]=p;j=j+1|0;h=h+-1|0}while(j>>>0>>0)}x=0;m=ta(k[(k[u>>2]|0)+16>>2]|0,u|0)|0;p=x;x=0;if(p&1){t=8;break}n=z+8|0;o=z+1|0;d:do{if(s>>>0>>0){h=0;j=0;p=s;while(1){l=i[((i[z>>0]&1)==0?o:k[n>>2]|0)+j>>0]|0;if(l<<24>>24>0&(h|0)==(l<<24>>24|0)){h=k[f>>2]|0;k[f>>2]=h+4;k[h>>2]=m;h=i[z>>0]|0;l=0;j=(j>>>0<(((h&1)==0?(h&255)>>>1:k[q>>2]|0)+-1|0)>>>0&1)+j|0}else l=h;x=0;h=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,i[p>>0]|0)|0;A=x;x=0;if(A&1)break;A=k[f>>2]|0;k[f>>2]=A+4;k[A>>2]=h;p=p+1|0;if(p>>>0>=g>>>0)break d;else h=l+1|0}g=Wa()|0;break a}}while(0);h=d+(s-a<<2)|0;l=k[f>>2]|0;if((h|0)!=(l|0)){j=l+-4|0;if(h>>>0>>0){do{A=k[h>>2]|0;k[h>>2]=k[j>>2];k[j>>2]=A;h=h+4|0;j=j+-4|0}while(h>>>0>>0);m=w;h=l}else{m=w;h=l}}else m=w}else{x=0;Ea(k[(k[w>>2]|0)+48>>2]|0,w|0,s|0,g|0,k[f>>2]|0)|0;A=x;x=0;if(A&1){t=8;break}h=(k[f>>2]|0)+(g-s<<2)|0;k[f>>2]=h;m=w}e:do{if(g>>>0>>0){while(1){h=i[g>>0]|0;if(h<<24>>24==46){j=g;break}x=0;j=Aa(k[(k[m>>2]|0)+44>>2]|0,w|0,h|0)|0;A=x;x=0;if(A&1){t=4;break}A=k[f>>2]|0;h=A+4|0;k[f>>2]=h;k[A>>2]=j;g=g+1|0;if(g>>>0>=c>>>0)break e}if((t|0)==4){g=Wa()|0;break a}x=0;g=ta(k[(k[u>>2]|0)+12>>2]|0,u|0)|0;A=x;x=0;if(A&1){t=8;break a}A=k[f>>2]|0;h=A+4|0;k[f>>2]=h;k[A>>2]=g;g=j+1|0}}while(0);x=0;Ea(k[(k[w>>2]|0)+48>>2]|0,w|0,g|0,c|0,h|0)|0;A=x;x=0;if(A&1)t=8;else{A=(k[f>>2]|0)+(v-g<<2)|0;k[f>>2]=A;k[e>>2]=(b|0)==(c|0)?A:d+(b-a<<2)|0;Sm(z);r=y;return}}}while(0);if((t|0)==8)g=Wa()|0;Sm(z);fb(g|0)}function Zp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+352|0;t=z+304|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+308|0;s=z+72|0;h=z+76|0;y=z+68|0;w=z+64|0;u=z+60|0;v=z+56|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58899,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,p[n>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<3)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(4,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(40,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function _p(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+192|0;j=o;a=o+180|0;m=o+160|0;n=o+12|0;h=o+8|0;l=o+4|0;i[a>>0]=i[58901]|0;i[a+1>>0]=i[58902]|0;i[a+2>>0]=i[58903]|0;i[a+3>>0]=i[58904]|0;i[a+4>>0]=i[58905]|0;i[a+5>>0]=i[58906]|0;f=fp()|0;k[j>>2]=e;a=av(m,20,f,a,j)|0;e=m+a|0;f=Fp(m,e,c)|0;g=tn(c)|0;k[h>>2]=g;x=0;h=Aa(37,h|0,44212)|0;p=x;x=0;if(p&1){p=Wa()|0;zm(g)|0;fb(p|0)}else{zm(g)|0;Zb[k[(k[h>>2]|0)+48>>2]&31](h,m,e,n)|0;p=n+(a<<2)|0;k[l>>2]=k[b>>2];k[j>>2]=k[l>>2];p=cv(j,n,(f|0)==(e|0)?p:n+(f-m<<2)|0,p,c,d)|0;r=o;return p|0}return 0}function $p(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0;C=r;r=r+32|0;v=C+16|0;u=C+12|0;z=C+8|0;w=C+4|0;y=C;m=tn(d)|0;k[z>>2]=m;x=0;z=Aa(37,z|0,44220)|0;t=x;x=0;if(t&1){C=Wa()|0;zm(m)|0;fb(C|0)}zm(m)|0;k[e>>2]=0;t=z+8|0;m=k[b>>2]|0;a:do{if((g|0)!=(h|0)){b:while(1){n=m;if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)?(Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0)==-1:0){k[b>>2]=0;m=0;n=0}}else m=0;q=(m|0)==0;p=k[c>>2]|0;o=p;do{if(p){if((k[p+12>>2]|0)==(k[p+16>>2]|0)?(Ob[k[(k[p>>2]|0)+36>>2]&127](p)|0)==-1:0){k[c>>2]=0;o=0;B=12;break}if(!q){B=13;break b}}else B=12}while(0);if((B|0)==12){B=0;if(q){B=13;break}else p=0}c:do{if((Qb[k[(k[z>>2]|0)+36>>2]&63](z,i[g>>0]|0,0)|0)<<24>>24==37){p=g+1|0;if((p|0)==(h|0)){B=17;break b}s=Qb[k[(k[z>>2]|0)+36>>2]&63](z,i[p>>0]|0,0)|0;switch(s<<24>>24){case 48:case 69:{q=g+2|0;if((q|0)==(h|0)){B=20;break b}g=p;p=Qb[k[(k[z>>2]|0)+36>>2]&63](z,i[q>>0]|0,0)|0;m=s;break}default:{p=s;m=0}}s=k[(k[a>>2]|0)+36>>2]|0;k[w>>2]=n;k[y>>2]=o;k[u>>2]=k[w>>2];k[v>>2]=k[y>>2];s=ac[s&15](a,u,v,d,e,f,p,m)|0;k[b>>2]=s;g=g+2|0}else{n=i[g>>0]|0;if(n<<24>>24>-1?(A=k[t>>2]|0,(j[A+(n<<24>>24<<1)>>1]&8192)!=0):0){do{g=g+1|0;if((g|0)==(h|0)){g=h;break}n=i[g>>0]|0;if(n<<24>>24<=-1)break}while((j[A+(n<<24>>24<<1)>>1]&8192)!=0);n=p;while(1){if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)?(Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0)==-1:0){k[b>>2]=0;m=0}}else m=0;o=(m|0)==0;do{if(p){if((k[p+12>>2]|0)!=(k[p+16>>2]|0))if(o){s=n;break}else break c;if((Ob[k[(k[p>>2]|0)+36>>2]&127](p)|0)!=-1)if(o^(n|0)==0){s=n;p=n;break}else break c;else{k[c>>2]=0;n=0;B=39;break}}else B=39}while(0);if((B|0)==39){B=0;if(o)break c;else{s=n;p=0}}o=m+12|0;n=k[o>>2]|0;q=m+16|0;if((n|0)==(k[q>>2]|0))n=Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0;else n=l[n>>0]|0;if((n&255)<<24>>24<=-1)break c;if(!(j[(k[t>>2]|0)+(n<<24>>24<<1)>>1]&8192))break c;n=k[o>>2]|0;if((n|0)==(k[q>>2]|0)){Ob[k[(k[m>>2]|0)+40>>2]&127](m)|0;n=s;continue}else{k[o>>2]=n+1;n=s;continue}}}o=m+12|0;n=k[o>>2]|0;p=m+16|0;if((n|0)==(k[p>>2]|0))n=Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0;else n=l[n>>0]|0;s=Vb[k[(k[z>>2]|0)+12>>2]&63](z,n&255)|0;if(s<<24>>24!=(Vb[k[(k[z>>2]|0)+12>>2]&63](z,i[g>>0]|0)|0)<<24>>24){B=57;break b}n=k[o>>2]|0;if((n|0)==(k[p>>2]|0))Ob[k[(k[m>>2]|0)+40>>2]&127](m)|0;else k[o>>2]=n+1;g=g+1|0}}while(0);m=k[b>>2]|0;if(!((g|0)!=(h|0)&(k[e>>2]|0)==0))break a}if((B|0)==13){k[e>>2]=4;break}else if((B|0)==17){k[e>>2]=4;break}else if((B|0)==20){k[e>>2]=4;break}else if((B|0)==57){k[e>>2]=4;m=k[b>>2]|0;break}}}while(0);if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)?(Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0)==-1:0){k[b>>2]=0;m=0}}else m=0;g=(m|0)==0;n=k[c>>2]|0;do{if(n){if((k[n+12>>2]|0)==(k[n+16>>2]|0)?(Ob[k[(k[n>>2]|0)+36>>2]&127](n)|0)==-1:0){k[c>>2]=0;B=67;break}if(!g)B=68}else B=67}while(0);if((B|0)==67?g:0)B=68;if((B|0)==68)k[e>>2]=k[e>>2]|2;r=C;return m|0}function aq(a){a=a|0;return}function bq(a){a=a|0;mj(a);return}function cq(a){a=a|0;return 2}function dq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=$p(a,i,h,d,e,f,58907,58915)|0;r=g;return a|0}function eq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0;g=r;r=r+16|0;h=g+12|0;j=g+8|0;m=g+4|0;l=g;n=a+8|0;n=Ob[k[(k[n>>2]|0)+20>>2]&127](n)|0;k[m>>2]=k[b>>2];k[l>>2]=k[c>>2];c=i[n>>0]|0;o=(c&1)==0;b=o?n+1|0:k[n+8>>2]|0;c=b+(o?(c&255)>>>1:k[n+4>>2]|0)|0;k[j>>2]=k[m>>2];k[h>>2]=k[l>>2];a=$p(a,j,h,d,e,f,b,c)|0;r=g;return a|0}function fq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44220)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];gq(a,f+24|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function gq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[k[a>>2]>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Hu(c,h,a,a+168|0,f,e,0)|0)-a|0;if((c|0)<168)k[b>>2]=((c|0)/12|0|0)%7|0;r=g;return}function hq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0 -;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44220)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];iq(a,f+16|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function iq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[(k[a>>2]|0)+4>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Hu(c,h,a,a+288|0,f,e,0)|0)-a|0;if((c|0)<288)k[b>>2]=((c|0)/12|0|0)%12|0;r=g;return}function jq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44220)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];kq(a,f+20|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function kq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,4)|0;if(!(k[e>>2]&4)){if((a|0)<69)a=a+2e3|0;else a=(a+-69|0)>>>0<31?a+1900|0:a;k[b>>2]=a+-1900}r=g;return}function lq(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=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;U=r;r=r+144|0;j=U+132|0;h=U+116|0;N=U+128|0;w=U+124|0;I=U+120|0;O=U+112|0;P=U+108|0;Q=U+104|0;R=U+100|0;S=U+96|0;T=U+92|0;l=U+88|0;m=U+84|0;n=U+80|0;o=U+76|0;p=U+72|0;q=U+68|0;s=U+64|0;t=U+60|0;u=U+56|0;v=U+52|0;y=U+48|0;z=U+44|0;A=U+40|0;B=U+36|0;C=U+32|0;D=U+28|0;E=U+24|0;F=U+20|0;G=U+16|0;H=U+12|0;J=U+8|0;K=U+4|0;L=U;k[e>>2]=0;M=tn(d)|0;k[N>>2]=M;x=0;N=Aa(37,N|0,44220)|0;W=x;x=0;if(W&1){W=Wa()|0;zm(M)|0;fb(W|0)}zm(M)|0;do{switch(g<<24>>24|0){case 65:case 97:{k[w>>2]=k[c>>2];k[j>>2]=k[w>>2];gq(a,f+24|0,b,j,e,N);V=28;break}case 104:case 66:case 98:{k[I>>2]=k[c>>2];k[j>>2]=k[I>>2];iq(a,f+16|0,b,j,e,N);V=28;break}case 99:{V=a+8|0;V=Ob[k[(k[V>>2]|0)+12>>2]&127](V)|0;k[O>>2]=k[b>>2];k[P>>2]=k[c>>2];g=i[V>>0]|0;c=(g&1)==0;W=c?V+1|0:k[V+8>>2]|0;V=W+(c?(g&255)>>>1:k[V+4>>2]|0)|0;k[h>>2]=k[O>>2];k[j>>2]=k[P>>2];V=$p(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 101:case 100:{k[Q>>2]=k[c>>2];k[j>>2]=k[Q>>2];mq(a,f+12|0,b,j,e,N);V=28;break}case 68:{k[R>>2]=k[b>>2];k[S>>2]=k[c>>2];k[h>>2]=k[R>>2];k[j>>2]=k[S>>2];V=$p(a,h,j,d,e,f,58915,58923)|0;k[b>>2]=V;V=28;break}case 70:{k[T>>2]=k[b>>2];k[l>>2]=k[c>>2];k[h>>2]=k[T>>2];k[j>>2]=k[l>>2];V=$p(a,h,j,d,e,f,58923,58931)|0;k[b>>2]=V;V=28;break}case 72:{k[m>>2]=k[c>>2];k[j>>2]=k[m>>2];nq(a,f+8|0,b,j,e,N);V=28;break}case 73:{k[n>>2]=k[c>>2];k[j>>2]=k[n>>2];oq(a,f+8|0,b,j,e,N);V=28;break}case 106:{k[o>>2]=k[c>>2];k[j>>2]=k[o>>2];pq(a,f+28|0,b,j,e,N);V=28;break}case 109:{k[p>>2]=k[c>>2];k[j>>2]=k[p>>2];qq(a,f+16|0,b,j,e,N);V=28;break}case 77:{k[q>>2]=k[c>>2];k[j>>2]=k[q>>2];rq(a,f+4|0,b,j,e,N);V=28;break}case 116:case 110:{k[s>>2]=k[c>>2];k[j>>2]=k[s>>2];sq(a,b,j,e,N);V=28;break}case 112:{k[t>>2]=k[c>>2];k[j>>2]=k[t>>2];tq(a,f+8|0,b,j,e,N);V=28;break}case 114:{k[u>>2]=k[b>>2];k[v>>2]=k[c>>2];k[h>>2]=k[u>>2];k[j>>2]=k[v>>2];V=$p(a,h,j,d,e,f,58931,58942)|0;k[b>>2]=V;V=28;break}case 82:{k[y>>2]=k[b>>2];k[z>>2]=k[c>>2];k[h>>2]=k[y>>2];k[j>>2]=k[z>>2];V=$p(a,h,j,d,e,f,58942,58947)|0;k[b>>2]=V;V=28;break}case 83:{k[A>>2]=k[c>>2];k[j>>2]=k[A>>2];uq(a,f,b,j,e,N);V=28;break}case 84:{k[B>>2]=k[b>>2];k[C>>2]=k[c>>2];k[h>>2]=k[B>>2];k[j>>2]=k[C>>2];V=$p(a,h,j,d,e,f,58947,58955)|0;k[b>>2]=V;V=28;break}case 119:{k[D>>2]=k[c>>2];k[j>>2]=k[D>>2];vq(a,f+24|0,b,j,e,N);V=28;break}case 120:{W=k[(k[a>>2]|0)+20>>2]|0;k[E>>2]=k[b>>2];k[F>>2]=k[c>>2];k[h>>2]=k[E>>2];k[j>>2]=k[F>>2];h=Nb[W&63](a,h,j,d,e,f)|0;break}case 88:{V=a+8|0;V=Ob[k[(k[V>>2]|0)+24>>2]&127](V)|0;k[G>>2]=k[b>>2];k[H>>2]=k[c>>2];g=i[V>>0]|0;c=(g&1)==0;W=c?V+1|0:k[V+8>>2]|0;V=W+(c?(g&255)>>>1:k[V+4>>2]|0)|0;k[h>>2]=k[G>>2];k[j>>2]=k[H>>2];V=$p(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 121:{k[J>>2]=k[c>>2];k[j>>2]=k[J>>2];kq(a,f+20|0,b,j,e,N);V=28;break}case 89:{k[K>>2]=k[c>>2];k[j>>2]=k[K>>2];wq(a,f+20|0,b,j,e,N);V=28;break}case 37:{k[L>>2]=k[c>>2];k[j>>2]=k[L>>2];xq(a,b,j,e,N);V=28;break}default:{k[e>>2]=k[e>>2]|4;V=28}}}while(0);if((V|0)==28)h=k[b>>2]|0;r=U;return h|0}function mq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<31&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function nq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<24&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function oq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<12&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function pq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,3)|0;c=k[e>>2]|0;if((a|0)<366&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function qq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<13&(c&4|0)==0)k[b>>2]=a+-1;else k[e>>2]=c|4;r=g;return}function rq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<60&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function sq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=e+8|0;a:while(1){e=k[b>>2]|0;do{if(e){if((k[e+12>>2]|0)==(k[e+16>>2]|0))if((Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0)==-1){k[b>>2]=0;e=0;break}else{e=k[b>>2]|0;break}}else e=0}while(0);e=(e|0)==0;a=k[c>>2]|0;do{if(a){if((k[a+12>>2]|0)!=(k[a+16>>2]|0))if(e)break;else break a;if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)!=-1)if(e)break;else break a;else{k[c>>2]=0;h=12;break}}else h=12}while(0);if((h|0)==12){h=0;if(e){a=0;break}else a=0}e=k[b>>2]|0;f=k[e+12>>2]|0;if((f|0)==(k[e+16>>2]|0))e=Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0;else e=l[f>>0]|0;if((e&255)<<24>>24<=-1)break;if(!(j[(k[g>>2]|0)+(e<<24>>24<<1)>>1]&8192))break;e=k[b>>2]|0;a=e+12|0;f=k[a>>2]|0;if((f|0)==(k[e+16>>2]|0)){Ob[k[(k[e>>2]|0)+40>>2]&127](e)|0;continue}else{k[a>>2]=f+1;continue}}e=k[b>>2]|0;do{if(e){if((k[e+12>>2]|0)==(k[e+16>>2]|0))if((Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0)==-1){k[b>>2]=0;e=0;break}else{e=k[b>>2]|0;break}}else e=0}while(0);e=(e|0)==0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)?(Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1:0){k[c>>2]=0;h=32;break}if(!e)h=33}else h=32}while(0);if((h|0)==32?e:0)h=33;if((h|0)==33)k[d>>2]=k[d>>2]|2;return}function tq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0;m=r;r=r+16|0;h=m+4|0;j=m;l=a+8|0;l=Ob[k[(k[l>>2]|0)+8>>2]&127](l)|0;a=i[l>>0]|0;if(!(a&1))g=(a&255)>>>1;else g=k[l+4>>2]|0;a=i[l+12>>0]|0;if(!(a&1))a=(a&255)>>>1;else a=k[l+16>>2]|0;do{if((g|0)!=(0-a|0)){k[j>>2]=k[d>>2];k[h>>2]=k[j>>2];a=Hu(c,h,l,l+24|0,f,e,0)|0;g=k[b>>2]|0;if((a|0)==(l|0)&(g|0)==12){k[b>>2]=0;break}if((g|0)<12&(a-l|0)==12)k[b>>2]=g+12}else k[e>>2]=k[e>>2]|4}while(0);r=m;return}function uq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<61&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function vq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,1)|0;c=k[e>>2]|0;if((a|0)<7&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function wq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,4)|0;if(!(k[e>>2]&4))k[b>>2]=a+-1900;r=g;return}function xq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a=k[b>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0))if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}else a=0}while(0);f=(a|0)==0;a=k[c>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)?(Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1:0){k[c>>2]=0;h=11;break}if(f){g=a;h=13}else h=12}else h=11}while(0);if((h|0)==11)if(f)h=12;else{g=0;h=13}a:do{if((h|0)==12)k[d>>2]=k[d>>2]|6;else if((h|0)==13){a=k[b>>2]|0;f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=l[f>>0]|0;if((Qb[k[(k[e>>2]|0)+36>>2]&63](e,a&255,0)|0)<<24>>24!=37){k[d>>2]=k[d>>2]|4;break}a=k[b>>2]|0;f=a+12|0;e=k[f>>2]|0;if((e|0)==(k[a+16>>2]|0)){Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;a=k[b>>2]|0;if(!a)a=0;else h=21}else{k[f>>2]=e+1;h=21}do{if((h|0)==21)if((k[a+12>>2]|0)==(k[a+16>>2]|0))if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}while(0);a=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)?(Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0)==-1:0){k[c>>2]=0;h=30;break}if(a)break a}else h=30}while(0);if((h|0)==30?!a:0)break;k[d>>2]=k[d>>2]|2}}while(0);return}function yq(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;w=r;r=r+32|0;q=w+16|0;p=w+12|0;u=w+8|0;s=w+4|0;t=w;i=tn(d)|0;k[u>>2]=i;x=0;u=Aa(37,u|0,44212)|0;o=x;x=0;if(o&1){w=Wa()|0;zm(i)|0;fb(w|0)}zm(i)|0;k[e>>2]=0;i=k[b>>2]|0;a:do{if((g|0)!=(h|0)){b:while(1){l=i;if(i){j=k[i+12>>2]|0;if((j|0)==(k[i+16>>2]|0))j=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else j=k[j>>2]|0;if((j|0)==-1){k[b>>2]=0;i=0;n=1;o=0}else{n=0;o=l}}else{i=0;n=1;o=l}m=k[c>>2]|0;j=m;do{if(m){l=k[m+12>>2]|0;if((l|0)==(k[m+16>>2]|0))l=Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0;else l=k[l>>2]|0;if((l|0)!=-1)if(n)break;else{v=17;break b}else{k[c>>2]=0;j=0;v=15;break}}else v=15}while(0);if((v|0)==15){v=0;if(n){v=17;break}else m=0}c:do{if((Qb[k[(k[u>>2]|0)+52>>2]&63](u,k[g>>2]|0,0)|0)<<24>>24==37){l=g+4|0;if((l|0)==(h|0)){v=21;break b}n=Qb[k[(k[u>>2]|0)+52>>2]&63](u,k[l>>2]|0,0)|0;switch(n<<24>>24){case 48:case 69:{m=g+8|0;if((m|0)==(h|0)){v=24;break b}g=l;l=Qb[k[(k[u>>2]|0)+52>>2]&63](u,k[m>>2]|0,0)|0;i=n;break}default:{l=n;i=0}}n=k[(k[a>>2]|0)+36>>2]|0;k[s>>2]=o;k[t>>2]=j;k[p>>2]=k[s>>2];k[q>>2]=k[t>>2];o=ac[n&15](a,p,q,d,e,f,l,i)|0;k[b>>2]=o;g=g+8|0}else{if(!(Qb[k[(k[u>>2]|0)+12>>2]&63](u,8192,k[g>>2]|0)|0)){l=i+12|0;j=k[l>>2]|0;m=i+16|0;if((j|0)==(k[m>>2]|0))j=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else j=k[j>>2]|0;o=Vb[k[(k[u>>2]|0)+28>>2]&63](u,j)|0;if((o|0)!=(Vb[k[(k[u>>2]|0)+28>>2]&63](u,k[g>>2]|0)|0)){v=61;break b}j=k[l>>2]|0;if((j|0)==(k[m>>2]|0))Ob[k[(k[i>>2]|0)+40>>2]&127](i)|0;else k[l>>2]=j+4;g=g+4|0;break}do{g=g+4|0;if((g|0)==(h|0)){g=h;break}}while(Qb[k[(k[u>>2]|0)+12>>2]&63](u,8192,k[g>>2]|0)|0);j=m;n=m;while(1){if(i){l=k[i+12>>2]|0;if((l|0)==(k[i+16>>2]|0))l=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else l=k[l>>2]|0;if((l|0)==-1){k[b>>2]=0;m=1;i=0}else m=0}else{m=1;i=0}do{if(n){l=k[n+12>>2]|0;if((l|0)==(k[n+16>>2]|0))l=Ob[k[(k[n>>2]|0)+36>>2]&127](n)|0;else l=k[l>>2]|0;if((l|0)!=-1)if(m^(j|0)==0){o=j;n=j;break}else break c;else{k[c>>2]=0;j=0;v=44;break}}else v=44}while(0);if((v|0)==44){v=0;if(m)break c;else{o=j;n=0}}l=i+12|0;j=k[l>>2]|0;m=i+16|0;if((j|0)==(k[m>>2]|0))j=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else j=k[j>>2]|0;if(!(Qb[k[(k[u>>2]|0)+12>>2]&63](u,8192,j)|0))break c;j=k[l>>2]|0;if((j|0)==(k[m>>2]|0)){Ob[k[(k[i>>2]|0)+40>>2]&127](i)|0;j=o;continue}else{k[l>>2]=j+4;j=o;continue}}}}while(0);i=k[b>>2]|0;if(!((g|0)!=(h|0)&(k[e>>2]|0)==0))break a}if((v|0)==17){k[e>>2]=4;break}else if((v|0)==21){k[e>>2]=4;break}else if((v|0)==24){k[e>>2]=4;break}else if((v|0)==61){k[e>>2]=4;i=k[b>>2]|0;break}}}while(0);if(i){g=k[i+12>>2]|0;if((g|0)==(k[i+16>>2]|0))g=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else g=k[g>>2]|0;if((g|0)==-1){k[b>>2]=0;i=0;l=1}else l=0}else{i=0;l=1}g=k[c>>2]|0;do{if(g){j=k[g+12>>2]|0;if((j|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=k[j>>2]|0;if((g|0)!=-1)if(l)break;else{v=76;break}else{k[c>>2]=0;v=74;break}}else v=74}while(0);if((v|0)==74?l:0)v=76;if((v|0)==76)k[e>>2]=k[e>>2]|2;r=w;return i|0}function zq(a){a=a|0;return}function Aq(a){a=a|0;mj(a);return}function Bq(a){a=a|0;return 2}function Cq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=yq(a,i,h,d,e,f,44788,44820)|0;r=g;return a|0}function Dq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;g=r;r=r+16|0;h=g+12|0;j=g+8|0;m=g+4|0;l=g;p=a+8|0;p=Ob[k[(k[p>>2]|0)+20>>2]&127](p)|0;k[m>>2]=k[b>>2];k[l>>2]=k[c>>2];n=i[p>>0]|0;o=(n&1)==0;c=p+4|0;b=o?c:k[p+8>>2]|0;c=b+((o?(n&255)>>>1:k[c>>2]|0)<<2)|0;k[j>>2]=k[m>>2];k[h>>2]=k[l>>2];a=yq(a,j,h,d,e,f,b,c)|0;r=g;return a|0}function Eq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44212)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];Fq(a,f+24|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function Fq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[k[a>>2]>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Su(c,h,a,a+168|0,f,e,0)|0)-a|0;if((c|0)<168)k[b>>2]=((c|0)/12|0|0)%7|0;r=g;return}function Gq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44212)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];Hq(a,f+16|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function Hq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[(k[a>>2]|0)+4>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Su(c,h,a,a+288|0,f,e,0)|0)-a|0;if((c|0)<288)k[b>>2]=((c|0)/12|0|0)%12|0;r=g;return}function Iq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44212)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];Jq(a,f+20|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function Jq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,4)|0;if(!(k[e>>2]&4)){if((a|0)<69)a=a+2e3|0;else a=(a+-69|0)>>>0<31?a+1900|0:a;k[b>>2]=a+-1900}r=g;return}function Kq(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=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;U=r;r=r+144|0;j=U+132|0;h=U+116|0;N=U+128|0;w=U+124|0;I=U+120|0;O=U+112|0;P=U+108|0;Q=U+104|0;R=U+100|0;S=U+96|0;T=U+92|0;l=U+88|0;m=U+84|0;n=U+80|0;o=U+76|0;p=U+72|0;q=U+68|0;s=U+64|0;t=U+60|0;u=U+56|0;v=U+52|0;y=U+48|0;z=U+44|0;A=U+40|0;B=U+36|0;C=U+32|0;D=U+28|0;E=U+24|0;F=U+20|0;G=U+16|0;H=U+12|0;J=U+8|0;K=U+4|0;L=U;k[e>>2]=0;M=tn(d)|0;k[N>>2]=M;x=0;N=Aa(37,N|0,44212)|0;W=x;x=0;if(W&1){W=Wa()|0;zm(M)|0;fb(W|0)}zm(M)|0;do{switch(g<<24>>24|0){case 65:case 97:{k[w>>2]=k[c>>2];k[j>>2]=k[w>>2];Fq(a,f+24|0,b,j,e,N);V=28;break}case 104:case 66:case 98:{k[I>>2]=k[c>>2];k[j>>2]=k[I>>2];Hq(a,f+16|0,b,j,e,N);V=28;break}case 99:{W=a+8|0;W=Ob[k[(k[W>>2]|0)+12>>2]&127](W)|0;k[O>>2]=k[b>>2];k[P>>2]=k[c>>2];g=i[W>>0]|0;c=(g&1)==0;V=W+4|0;W=c?V:k[W+8>>2]|0;V=W+((c?(g&255)>>>1:k[V>>2]|0)<<2)|0;k[h>>2]=k[O>>2];k[j>>2]=k[P>>2];V=yq(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 101:case 100:{k[Q>>2]=k[c>>2];k[j>>2]=k[Q>>2];Lq(a,f+12|0,b,j,e,N);V=28;break}case 68:{k[R>>2]=k[b>>2];k[S>>2]=k[c>>2];k[h>>2]=k[R>>2];k[j>>2]=k[S>>2];V=yq(a,h,j,d,e,f,44820,44852)|0;k[b>>2]=V;V=28;break}case 70:{k[T>>2]=k[b>>2];k[l>>2]=k[c>>2];k[h>>2]=k[T>>2];k[j>>2]=k[l>>2];V=yq(a,h,j,d,e,f,44852,44884)|0;k[b>>2]=V;V=28;break}case 72:{k[m>>2]=k[c>>2];k[j>>2]=k[m>>2];Mq(a,f+8|0,b,j,e,N);V=28;break}case 73:{k[n>>2]=k[c>>2];k[j>>2]=k[n>>2];Nq(a,f+8|0,b,j,e,N);V=28;break}case 106:{k[o>>2]=k[c>>2];k[j>>2]=k[o>>2];Oq(a,f+28|0,b,j,e,N);V=28;break}case 109:{k[p>>2]=k[c>>2];k[j>>2]=k[p>>2];Pq(a,f+16|0,b,j,e,N);V=28;break}case 77:{k[q>>2]=k[c>>2];k[j>>2]=k[q>>2];Qq(a,f+4|0,b,j,e,N);V=28;break}case 116:case 110:{k[s>>2]=k[c>>2];k[j>>2]=k[s>>2];Rq(a,b,j,e,N);V=28;break}case 112:{k[t>>2]=k[c>>2];k[j>>2]=k[t>>2];Sq(a,f+8|0,b,j,e,N);V=28;break}case 114:{k[u>>2]=k[b>>2];k[v>>2]=k[c>>2];k[h>>2]=k[u>>2];k[j>>2]=k[v>>2];V=yq(a,h,j,d,e,f,44884,44928)|0;k[b>>2]=V;V=28;break}case 82:{k[y>>2]=k[b>>2];k[z>>2]=k[c>>2];k[h>>2]=k[y>>2];k[j>>2]=k[z>>2];V=yq(a,h,j,d,e,f,44928,44948)|0;k[b>>2]=V;V=28;break}case 83:{k[A>>2]=k[c>>2];k[j>>2]=k[A>>2];Tq(a,f,b,j,e,N);V=28;break}case 84:{k[B>>2]=k[b>>2];k[C>>2]=k[c>>2];k[h>>2]=k[B>>2];k[j>>2]=k[C>>2];V=yq(a,h,j,d,e,f,44948,44980)|0;k[b>>2]=V;V=28;break}case 119:{k[D>>2]=k[c>>2];k[j>>2]=k[D>>2];Uq(a,f+24|0,b,j,e,N);V=28;break}case 120:{W=k[(k[a>>2]|0)+20>>2]|0;k[E>>2]=k[b>>2];k[F>>2]=k[c>>2];k[h>>2]=k[E>>2];k[j>>2]=k[F>>2];h=Nb[W&63](a,h,j,d,e,f)|0;break}case 88:{W=a+8|0;W=Ob[k[(k[W>>2]|0)+24>>2]&127](W)|0;k[G>>2]=k[b>>2];k[H>>2]=k[c>>2];g=i[W>>0]|0;c=(g&1)==0;V=W+4|0;W=c?V:k[W+8>>2]|0;V=W+((c?(g&255)>>>1:k[V>>2]|0)<<2)|0;k[h>>2]=k[G>>2];k[j>>2]=k[H>>2];V=yq(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 121:{k[J>>2]=k[c>>2];k[j>>2]=k[J>>2];Jq(a,f+20|0,b,j,e,N);V=28;break}case 89:{k[K>>2]=k[c>>2];k[j>>2]=k[K>>2];Vq(a,f+20|0,b,j,e,N);V=28;break}case 37:{k[L>>2]=k[c>>2];k[j>>2]=k[L>>2];Wq(a,b,j,e,N);V=28;break}default:{k[e>>2]=k[e>>2]|4;V=28}}}while(0);if((V|0)==28)h=k[b>>2]|0;r=U;return h|0}function Lq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<31&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Mq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<24&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Nq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<12&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Oq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,3)|0;c=k[e>>2]|0;if((a|0)<366&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Pq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<13&(c&4|0)==0)k[b>>2]=a+-1;else k[e>>2]=c|4;r=g;return}function Qq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<60&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Rq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a:while(1){a=k[b>>2]|0;do{if(a){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;g=1;break}else{g=(k[b>>2]|0)==0;break}}else g=1}while(0);f=k[c>>2]|0;do{if(f){a=k[f+12>>2]|0;if((a|0)==(k[f+16>>2]|0))a=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(g){g=f;break}else{g=f;break a}else{k[c>>2]=0;h=15;break}}else h=15}while(0);if((h|0)==15){h=0;if(g){g=0;break}else g=0}a=k[b>>2]|0;f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if(!(Qb[k[(k[e>>2]|0)+12>>2]&63](e,8192,a)|0))break;a=k[b>>2]|0;f=a+12|0;g=k[f>>2]|0;if((g|0)==(k[a+16>>2]|0)){Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;continue}else{k[f>>2]=g+4;continue}}a=k[b>>2]|0;do{if(a){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;f=1;break}else{f=(k[b>>2]|0)==0;break}}else f=1}while(0);do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0))a=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(f)break;else{h=39;break}else{k[c>>2]=0;h=37;break}}else h=37}while(0);if((h|0)==37?f:0)h=39;if((h|0)==39)k[d>>2]=k[d>>2]|2;return}function Sq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0;m=r;r=r+16|0;h=m+4|0;j=m;l=a+8|0;l=Ob[k[(k[l>>2]|0)+8>>2]&127](l)|0;a=i[l>>0]|0;if(!(a&1))g=(a&255)>>>1;else g=k[l+4>>2]|0;a=i[l+12>>0]|0;if(!(a&1))a=(a&255)>>>1;else a=k[l+16>>2]|0;do{if((g|0)!=(0-a|0)){k[j>>2]=k[d>>2];k[h>>2]=k[j>>2];a=Su(c,h,l,l+24|0,f,e,0)|0;g=k[b>>2]|0;if((a|0)==(l|0)&(g|0)==12){k[b>>2]=0;break}if((g|0)<12&(a-l|0)==12)k[b>>2]=g+12}else k[e>>2]=k[e>>2]|4}while(0);r=m;return}function Tq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<61&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Uq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,1)|0;c=k[e>>2]|0;if((a|0)<7&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Vq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,4)|0;if(!(k[e>>2]&4))k[b>>2]=a+-1900;r=g;return}function Wq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;a=k[b>>2]|0;do{if(a){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;g=1;break}else{g=(k[b>>2]|0)==0;break}}else g=1}while(0);f=k[c>>2]|0;do{if(f){a=k[f+12>>2]|0;if((a|0)==(k[f+16>>2]|0))a=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(g){h=f;i=17;break}else{i=16;break}else{k[c>>2]=0;i=14;break}}else i=14}while(0);if((i|0)==14)if(g)i=16;else{h=0;i=17}a:do{if((i|0)==16)k[d>>2]=k[d>>2]|6;else if((i|0)==17){a=k[b>>2]|0;f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((Qb[k[(k[e>>2]|0)+52>>2]&63](e,a,0)|0)<<24>>24!=37){k[d>>2]=k[d>>2]|4;break}a=k[b>>2]|0;f=a+12|0;g=k[f>>2]|0;if((g|0)==(k[a+16>>2]|0)){Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;a=k[b>>2]|0;if(!a)f=1;else i=25}else{k[f>>2]=g+4;i=25}do{if((i|0)==25){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;f=1;break}else{f=(k[b>>2]|0)==0;break}}}while(0);do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0))a=Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(f)break a;else break;else{k[c>>2]=0;i=37;break}}else i=37}while(0);if((i|0)==37?!f:0)break;k[d>>2]=k[d>>2]|2}}while(0);return}function Xq(a){a=a|0;Yq(a+8|0);return}function Yq(a){a=a|0;var b=0,c=0,d=0;b=k[a>>2]|0;x=0;c=Da(3)|0;d=x;x=0;do{if(!(d&1)){if((b|0)!=(c|0)?(x=0,qa(188,k[a>>2]|0),d=x,x=0,d&1):0)break;return}}while(0);d=Wa(0)|0;oc(d)}function Zq(a){a=a|0;Yq(a+8|0);mj(a);return}function _q(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0;j=r;r=r+112|0;h=j+4|0;c=j;k[c>>2]=h+100;$q(a+8|0,h,c,e,f,g);e=k[c>>2]|0;c=k[b>>2]|0;if((h|0)!=(e|0))do{g=i[h>>0]|0;do{if(c){d=c+24|0;f=k[d>>2]|0;if((f|0)==(k[c+28>>2]|0)){b=(Vb[k[(k[c>>2]|0)+52>>2]&63](c,g&255)|0)==-1;c=b?0:c;break}else{k[d>>2]=f+1;i[f>>0]=g;break}}else c=0}while(0);h=h+1|0}while((h|0)!=(e|0));r=j;return c|0}function $q(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0;l=r;r=r+16|0;j=l;i[j>>0]=37;g=j+1|0;i[g>>0]=e;h=j+2|0;i[h>>0]=f;i[j+3>>0]=0;if(f<<24>>24){i[g>>0]=f;i[h>>0]=e}a=b+(_a(b|0,(k[c>>2]|0)-b|0,j|0,d|0,k[a>>2]|0)|0)|0;k[c>>2]=a;r=l;return}function ar(a){a=a|0;Yq(a+8|0);return}function br(a){a=a|0;Yq(a+8|0);mj(a);return}function cr(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;h=r;r=r+416|0;d=h+8|0;c=h;k[c>>2]=d+400;dr(a+8|0,d,c,e,f,g);a=k[c>>2]|0;c=k[b>>2]|0;if((d|0)!=(a|0)){e=d;do{d=k[e>>2]|0;if(!c)c=0;else{f=c+24|0;g=k[f>>2]|0;if((g|0)==(k[c+28>>2]|0))d=Vb[k[(k[c>>2]|0)+52>>2]&63](c,d)|0;else{k[f>>2]=g+4;k[g>>2]=d}c=(d|0)==-1?0:c}e=e+4|0}while((e|0)!=(a|0))}r=h;return c|0}function dr(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+128|0;j=g+16|0;l=g+12|0;h=g;i=g+8|0;k[l>>2]=j+100;$q(a,j,l,d,e,f);e=h;k[e>>2]=0;k[e+4>>2]=0;k[i>>2]=j;e=(k[c>>2]|0)-b>>2;f=Ak(k[a>>2]|0)|0;x=0;e=Ea(18,b|0,i|0,e|0,h|0)|0;a=x;x=0;if(a&1){e=Wa()|0;if((f|0)!=0?(x=0,ta(75,f|0)|0,l=x,x=0,l&1):0){l=Wa(0)|0;oc(l)}fb(e|0)}if((f|0)!=0?(x=0,ta(75,f|0)|0,l=x,x=0,l&1):0){l=Wa(0)|0;oc(l)}if((e|0)==-1)$r(58955);else{k[c>>2]=b+(e<<2);r=g;return}}function er(a){a=a|0;return}function fr(a){a=a|0;mj(a);return}function gr(a){a=a|0;return 127}function hr(a){a=a|0;return 127}function ir(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function jr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function kr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function lr(a,b){a=a|0;b=b|0;Rm(a,1,45);return}function mr(a){a=a|0;return 0}function nr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function or(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function pr(a){a=a|0;return}function qr(a){a=a|0;mj(a);return}function rr(a){a=a|0;return 127}function sr(a){a=a|0;return 127}function tr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function ur(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function vr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function wr(a,b){a=a|0;b=b|0;Rm(a,1,45);return}function xr(a){a=a|0;return 0}function yr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function zr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Ar(a){a=a|0;return}function Br(a){a=a|0;mj(a);return}function Cr(a){a=a|0;return 2147483647}function Dr(a){a=a|0;return 2147483647}function Er(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Fr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Gr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Hr(a,b){a=a|0;b=b|0;dn(a,1,45);return}function Ir(a){a=a|0;return 0}function Jr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Kr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Lr(a){a=a|0;return}function Mr(a){a=a|0;mj(a);return}function Nr(a){a=a|0;return 2147483647}function Or(a){a=a|0;return 2147483647}function Pr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Qr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Rr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Sr(a,b){a=a|0;b=b|0;dn(a,1,45);return}function Tr(a){a=a|0;return 0}function Ur(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Vr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Wr(a){a=a|0;return}function Xr(a){a=a|0;mj(a);return}function Yr(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;B=r;r=r+240|0;z=B+24|0;A=B;a=B+136|0;D=B+16|0;y=B+12|0;C=B+8|0;n=B+134|0;j=B+4|0;w=B+124|0;k[D>>2]=a;E=D+4|0;k[E>>2]=189;l=a+100|0;x=0;h=ta(68,e|0)|0;v=x;x=0;if(!(v&1)){k[C>>2]=h;x=0;a=Aa(37,C|0,44220)|0;v=x;x=0;a:do{if(!(v&1)?(i[n>>0]=0,k[j>>2]=k[c>>2],m=k[e+4>>2]|0,x=0,k[z>>2]=k[j>>2],m=ua(1,b|0,z|0,d|0,C|0,m|0,f|0,n|0,a|0,D|0,y|0,l|0)|0,v=x,x=0,!(v&1)):0){b:do{if(m){x=0;Ea(k[(k[a>>2]|0)+32>>2]|0,a|0,58976,58986,w|0)|0;v=x;x=0;if(v&1){G=10;break a}j=k[y>>2]|0;l=k[D>>2]|0;a=j-l|0;if((a|0)>98){a=Pl(a+2|0)|0;h=a;if(!a){x=0;Ga(6);v=x;x=0;if(!(v&1)){a=0;G=13}}else G=13}else{h=0;a=z;G=13}do{if((G|0)==13){if(i[n>>0]|0){i[a>>0]=45;a=a+1|0}u=w+10|0;v=w;if(l>>>0>>0){m=w+1|0;d=m+1|0;e=d+1|0;n=e+1|0;o=n+1|0;p=o+1|0;q=p+1|0;s=q+1|0;t=s+1|0;do{j=i[l>>0]|0;do{if((i[w>>0]|0)!=j<<24>>24)if((i[m>>0]|0)!=j<<24>>24)if((i[d>>0]|0)!=j<<24>>24)if((i[e>>0]|0)!=j<<24>>24)if((i[n>>0]|0)==j<<24>>24)j=n;else{if((i[o>>0]|0)==j<<24>>24){j=o;break}if((i[p>>0]|0)==j<<24>>24){j=p;break}if((i[q>>0]|0)==j<<24>>24){j=q;break}if((i[s>>0]|0)==j<<24>>24){j=s;break}j=(i[t>>0]|0)==j<<24>>24?t:u}else j=e;else j=d;else j=m;else j=w}while(0);i[a>>0]=i[58976+(j-v)>>0]|0;l=l+1|0;a=a+1|0}while(l>>>0<(k[y>>2]|0)>>>0)}i[a>>0]=0;k[A>>2]=g;if((jl(z,58987,A)|0)!=1?(x=0,qa(190,58991),g=x,x=0,g&1):0)break;if(h)Ql(h);break b}}while(0);a=Wa()|0;if(!h){j=a;h=D;break a}Ql(h);j=a;h=D;break a}}while(0);a=k[b>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}if((a|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}}else a=0}while(0);h=(a|0)==0;a=k[c>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}if((a|0)==-1){k[c>>2]=0;G=37;break}}if(!h)G=38}else G=37}while(0);if((G|0)==37?h:0)G=38;if((G|0)==38)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(k[C>>2]|0)|0;a=k[D>>2]|0;k[D>>2]=0;if((a|0)!=0?(x=0,qa(k[E>>2]|0,a|0),G=x,x=0,G&1):0){G=Wa(0)|0;oc(G)}r=B;return h|0}else G=10}while(0);if((G|0)==10){j=Wa()|0;h=D}zm(k[C>>2]|0)|0;a=k[h>>2]|0;k[h>>2]=0;if(!a)F=j;else{h=k[E>>2]|0;G=45}}else{j=Wa()|0;k[D>>2]=0;h=189;G=45}if((G|0)==45){x=0;qa(h|0,a|0);G=x;x=0;if(G&1){G=Wa(0)|0;oc(G)}else F=j}fb(F|0);return 0}function Zr(a){a=a|0;return}function _r(a,b,c,d,e,f,g,h,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,s=0,t=0,u=0,v=0,w=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;ba=r;r=r+512|0;P=ba+88|0;t=ba+96|0;da=ba+80|0;T=ba+72|0;S=ba+68|0;U=ba+500|0;Q=ba+497|0;V=ba+496|0;Y=ba+56|0;aa=ba+44|0;_=ba+32|0;Z=ba+20|0;$=ba+8|0;R=ba+4|0;X=ba;k[P>>2]=o;k[da>>2]=t;ca=da+4|0;k[ca>>2]=189;k[T>>2]=t;k[S>>2]=t+400;k[Y>>2]=0;k[Y+4>>2]=0;k[Y+8>>2]=0;k[aa>>2]=0;k[aa+4>>2]=0;k[aa+8>>2]=0;k[_>>2]=0;k[_+4>>2]=0;k[_+8>>2]=0;k[Z>>2]=0;k[Z+4>>2]=0;k[Z+8>>2]=0;k[$>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0;x=0;za(1,c|0,d|0,U|0,Q|0,V|0,Y|0,aa|0,_|0,Z|0,R|0);O=x;x=0;a:do{if(O&1)h=Wa()|0;else{k[n>>2]=k[m>>2];I=h+8|0;J=_+4|0;K=Z+4|0;L=Z+8|0;M=Z+1|0;N=_+8|0;O=_+1|0;z=(e&512|0)!=0;A=aa+8|0;B=aa+1|0;C=aa+4|0;D=$+4|0;E=$+8|0;F=$+1|0;G=U+3|0;H=Y+4|0;y=0;s=0;b:while(1){o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);o=(o|0)==0;h=k[b>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(o){w=h;break}else{W=235;break b}x=0;c=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=24;break b}if((c|0)!=-1)if(o){w=h;break}else{W=235;break b}else{k[b>>2]=0;W=15;break}}else W=15}while(0);if((W|0)==15){W=0;if(o){W=235;break}else w=0}c:do{switch(i[U+y>>0]|0){case 1:{if((y|0)!=3){o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;W=x;x=0;if(W&1){W=24;break b}}else o=l[h>>0]|0;if((o&255)<<24>>24<=-1){W=40;break b}if(!(j[(k[I>>2]|0)+(o<<24>>24<<1)>>1]&8192)){W=40;break b}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;W=x;x=0;if(W&1){W=24;break b}}else{k[h>>2]=c+1;o=l[c>>0]|0}x=0;ra(67,$|0,o&255|0);W=x;x=0;if(W&1){W=24;break b}else{o=w;d=w;W=42}}break}case 0:{if((y|0)!=3){o=w;d=w;W=42}break}case 3:{h=i[_>>0]|0;o=(h&1)==0?(h&255)>>>1:k[J>>2]|0;c=i[Z>>0]|0;d=(c&1)==0?(c&255)>>>1:k[K>>2]|0;if((o|0)!=(0-d|0)){if(!o){o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}h=i[Z>>0]|0}else{o=l[h>>0]|0;h=c}if((o&255)<<24>>24!=(i[((h&1)==0?M:k[L>>2]|0)>>0]|0))break c;o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;i[g>>0]=1;w=i[Z>>0]|0;s=((w&1)==0?(w&255)>>>1:k[K>>2]|0)>>>0>1?Z:s;break c}e=k[a>>2]|0;p=k[e+12>>2]|0;c=k[e+16>>2]|0;o=(p|0)==(c|0);if(!d){if(o){x=0;o=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}h=i[_>>0]|0}else o=l[p>>0]|0;if((o&255)<<24>>24!=(i[((h&1)==0?O:k[N>>2]|0)>>0]|0)){i[g>>0]=1;break c}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0 -;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;w=i[_>>0]|0;s=((w&1)==0?(w&255)>>>1:k[J>>2]|0)>>>0>1?_:s;break c}if(o){x=0;o=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}c=k[a>>2]|0;h=i[_>>0]|0;e=c;p=k[c+12>>2]|0;c=k[c+16>>2]|0}else o=l[p>>0]|0;d=e+12|0;c=(p|0)==(c|0);if((o&255)<<24>>24==(i[((h&1)==0?O:k[N>>2]|0)>>0]|0)){if(c){x=0;ta(k[(k[e>>2]|0)+40>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[d>>2]=p+1;w=i[_>>0]|0;s=((w&1)==0?(w&255)>>>1:k[J>>2]|0)>>>0>1?_:s;break c}if(c){x=0;o=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}}else o=l[p>>0]|0;if((o&255)<<24>>24!=(i[((i[Z>>0]&1)==0?M:k[L>>2]|0)>>0]|0)){W=104;break b}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;i[g>>0]=1;w=i[Z>>0]|0;s=((w&1)==0?(w&255)>>>1:k[K>>2]|0)>>>0>1?Z:s}break}case 2:{if(!(y>>>0<2|(s|0)!=0)?!(z|(y|0)==2&(i[G>>0]|0)!=0):0){s=0;break c}u=i[aa>>0]|0;o=(u&1)==0;v=k[A>>2]|0;c=o?B:v;q=c;d:do{if((y|0)!=0?(l[U+(y+-1)>>0]|0)<2:0){p=o?(u&255)>>>1:k[C>>2]|0;d=c+p|0;e=k[I>>2]|0;e:do{if(!p)h=q;else{p=c;h=q;do{o=i[p>>0]|0;if(o<<24>>24<=-1)break e;if(!(j[e+(o<<24>>24<<1)>>1]&8192))break e;p=p+1|0;h=p}while((p|0)!=(d|0))}}while(0);d=h-q|0;e=i[$>>0]|0;o=(e&1)==0;e=o?(e&255)>>>1:k[D>>2]|0;if(e>>>0>=d>>>0){o=o?F:k[E>>2]|0;p=o+e|0;if((h|0)!=(q|0)){o=o+(e-d)|0;while(1){if((i[o>>0]|0)!=(i[c>>0]|0)){h=q;break d}o=o+1|0;if((o|0)==(p|0))break;else c=c+1|0}}}else h=q}else h=q}while(0);o=(u&1)==0;o=(o?B:v)+(o?(u&255)>>>1:k[C>>2]|0)|0;f:do{if((h|0)!=(o|0)){e=w;d=w;o=h;while(1){h=k[a>>2]|0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=21;break b}if((h|0)==-1){k[a>>2]=0;h=0;break}else{h=k[a>>2]|0;break}}}else h=0}while(0);c=(h|0)==0;do{if(d){if((k[d+12>>2]|0)!=(k[d+16>>2]|0))if(c){h=e;p=d;break}else break f;x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){W=21;break b}if((h|0)!=-1)if(c^(e|0)==0){h=e;p=e;break}else break f;else{k[b>>2]=0;h=0;W=131;break}}else{h=e;W=131}}while(0);if((W|0)==131){W=0;if(c)break f;else p=0}c=k[a>>2]|0;d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=21;break b}}else c=l[d>>0]|0;if((c&255)<<24>>24!=(i[o>>0]|0))break f;c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=21;break b}}else k[d>>2]=e+1;o=o+1|0;c=i[aa>>0]|0;w=(c&1)==0;c=(w?B:k[A>>2]|0)+(w?(c&255)>>>1:k[C>>2]|0)|0;if((o|0)==(c|0)){o=c;break}else{e=h;d=p}}}}while(0);if(z?(w=i[aa>>0]|0,v=(w&1)==0,(o|0)!=((v?B:k[A>>2]|0)+(v?(w&255)>>>1:k[C>>2]|0)|0)):0){W=143;break b}break}case 4:{q=i[V>>0]|0;h=w;e=w;o=0;g:while(1){c=k[a>>2]|0;do{if(c){if((k[c+12>>2]|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=23;break b}if((c|0)==-1){k[a>>2]=0;c=0;break}else{c=k[a>>2]|0;break}}}else c=0}while(0);d=(c|0)==0;do{if(e){if((k[e+12>>2]|0)!=(k[e+16>>2]|0))if(d){p=h;break}else{d=h;break g}x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=23;break b}if((c|0)!=-1)if(d^(h|0)==0){p=h;e=h;break}else{d=h;break g}else{k[b>>2]=0;h=0;W=156;break}}else W=156}while(0);if((W|0)==156){W=0;if(d){d=h;break}else{p=h;e=0}}h=k[a>>2]|0;c=k[h+12>>2]|0;if((c|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=23;break b}}else h=l[c>>0]|0;c=h&255;if(c<<24>>24>-1?(j[(k[I>>2]|0)+(h<<24>>24<<1)>>1]&2048)!=0:0){h=k[n>>2]|0;if((h|0)==(k[P>>2]|0)){x=0;Fa(12,m|0,n|0,P|0);w=x;x=0;if(w&1){W=23;break b}h=k[n>>2]|0}k[n>>2]=h+1;i[h>>0]=c;o=o+1|0}else{w=i[Y>>0]|0;if(!(c<<24>>24==q<<24>>24&((o|0)!=0?(((w&1)==0?(w&255)>>>1:k[H>>2]|0)|0)!=0:0))){d=p;break}if((t|0)==(k[S>>2]|0)){x=0;Fa(13,da|0,T|0,S|0);w=x;x=0;if(w&1){W=23;break b}t=k[T>>2]|0}w=t+4|0;k[T>>2]=w;k[t>>2]=o;t=w;o=0}h=k[a>>2]|0;c=h+12|0;d=k[c>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;ta(k[(k[h>>2]|0)+40>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=23;break b}else{h=p;continue}}else{k[c>>2]=d+1;h=p;continue}}if((o|0)!=0?(k[da>>2]|0)!=(t|0):0){if((t|0)==(k[S>>2]|0)){x=0;Fa(13,da|0,T|0,S|0);w=x;x=0;if(w&1){W=24;break b}t=k[T>>2]|0}w=t+4|0;k[T>>2]=w;k[t>>2]=o;t=w}p=k[R>>2]|0;if((p|0)>0){o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);o=(o|0)==0;do{if(d){if((k[d+12>>2]|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){W=24;break b}if((h|0)==-1){k[b>>2]=0;W=193;break}}if(!o){W=198;break b}}else W=193}while(0);if((W|0)==193){W=0;if(o){W=198;break b}else d=0}o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else o=l[h>>0]|0;if((o&255)<<24>>24!=(i[Q>>0]|0)){W=198;break b}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;if((p|0)>0){e=d;c=d;q=p;while(1){o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=22;break b}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);h=(o|0)==0;do{if(c){if((k[c+12>>2]|0)!=(k[c+16>>2]|0))if(h){o=e;p=c;break}else{W=222;break b}x=0;o=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=22;break b}if((o|0)!=-1)if(h^(e|0)==0){o=e;p=e;break}else{W=222;break b}else{k[b>>2]=0;o=0;W=215;break}}else{o=e;W=215}}while(0);if((W|0)==215){W=0;if(h){W=222;break b}else p=0}h=k[a>>2]|0;c=k[h+12>>2]|0;if((c|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=22;break b}}else h=l[c>>0]|0;if((h&255)<<24>>24<=-1){W=222;break b}if(!(j[(k[I>>2]|0)+(h<<24>>24<<1)>>1]&2048)){W=222;break b}if((k[n>>2]|0)==(k[P>>2]|0)?(x=0,Fa(12,m|0,n|0,P|0),w=x,x=0,w&1):0){W=22;break b}h=k[a>>2]|0;c=k[h+12>>2]|0;if((c|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=22;break b}}else h=l[c>>0]|0;c=k[n>>2]|0;k[n>>2]=c+1;i[c>>0]=h;h=q;q=q+-1|0;k[R>>2]=q;c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=22;break b}}else k[d>>2]=e+1;if((h|0)<=1)break;else{e=o;c=p}}}}if((k[n>>2]|0)==(k[m>>2]|0)){W=233;break b}break}default:{}}}while(0);h:do{if((W|0)==42)while(1){W=0;h=k[a>>2]|0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=20;break b}if((h|0)==-1){k[a>>2]=0;h=0;break}else{h=k[a>>2]|0;break}}}else h=0}while(0);c=(h|0)==0;do{if(d){if((k[d+12>>2]|0)!=(k[d+16>>2]|0))if(c){e=o;break}else break h;x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){W=20;break b}if((h|0)!=-1)if(c^(o|0)==0){e=o;d=o;break}else break h;else{k[b>>2]=0;o=0;W=54;break}}else W=54}while(0);if((W|0)==54){W=0;if(c)break h;else{e=o;d=0}}o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=20;break b}}else o=l[h>>0]|0;if((o&255)<<24>>24<=-1)break h;if(!(j[(k[I>>2]|0)+(o<<24>>24<<1)>>1]&8192))break h;o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;W=x;x=0;if(W&1){W=20;break b}}else{k[h>>2]=c+1;o=l[c>>0]|0}x=0;ra(67,$|0,o&255|0);W=x;x=0;if(W&1){W=20;break b}else{o=e;W=42}}}while(0);y=y+1|0;if(y>>>0>=4){W=235;break}}i:switch(W|0){case 20:{h=Wa()|0;break a}case 21:{h=Wa()|0;break a}case 22:{h=Wa()|0;break a}case 23:{h=Wa()|0;break a}case 24:{h=Wa()|0;break a}case 40:{k[f>>2]=k[f>>2]|4;h=0;break}case 104:{k[f>>2]=k[f>>2]|4;h=0;break}case 143:{k[f>>2]=k[f>>2]|4;h=0;break}case 198:{k[f>>2]=k[f>>2]|4;h=0;break}case 222:{k[f>>2]=k[f>>2]|4;h=0;break}case 233:{k[f>>2]=k[f>>2]|4;h=0;break}case 235:{j:do{if(s){e=s+1|0;p=s+8|0;q=s+4|0;c=1;k:while(1){o=i[s>>0]|0;if(!(o&1))o=(o&255)>>>1;else o=k[q>>2]|0;if(c>>>0>=o>>>0)break j;o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;n=x;x=0;if(n&1){W=19;break k}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);h=(o|0)==0;o=k[b>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;n=x;x=0;if(n&1){W=19;break k}if((o|0)==-1){k[b>>2]=0;W=253;break}}if(!h){W=260;break k}}else W=253}while(0);if((W|0)==253?(W=0,h):0){W=260;break}o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;n=x;x=0;if(n&1){W=19;break}}else o=l[h>>0]|0;if(!(i[s>>0]&1))h=e;else h=k[p>>2]|0;if((o&255)<<24>>24!=(i[h+c>>0]|0)){W=260;break}o=c+1|0;h=k[a>>2]|0;c=h+12|0;d=k[c>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;ta(k[(k[h>>2]|0)+40>>2]|0,h|0)|0;n=x;x=0;if(n&1){W=19;break}else{c=o;continue}}else{k[c>>2]=d+1;c=o;continue}}if((W|0)==19){h=Wa()|0;break a}else if((W|0)==260){k[f>>2]=k[f>>2]|4;h=0;break i}}}while(0);o=k[da>>2]|0;if((o|0)!=(t|0)?(k[X>>2]=0,cs(Y,o,t,X),(k[X>>2]|0)!=0):0){k[f>>2]=k[f>>2]|4;h=0}else h=1;break}}Sm($);Sm(Z);Sm(_);Sm(aa);Sm(Y);o=k[da>>2]|0;k[da>>2]=0;if((o|0)!=0?(x=0,qa(k[ca>>2]|0,o|0),da=x,x=0,da&1):0){da=Wa(0)|0;oc(da)}r=ba;return h|0}}while(0);Sm($);Sm(Z);Sm(_);Sm(aa);Sm(Y);o=k[da>>2]|0;k[da>>2]=0;if((o|0)!=0?(x=0,qa(k[ca>>2]|0,o|0),da=x,x=0,da&1):0){da=Wa(0)|0;oc(da)}fb(h|0);return 0}function $r(a){a=a|0;var b=0;b=Va(8)|0;x=0;ra(90,b|0,a|0);a=x;x=0;if(a&1){a=Wa()|0;Ua(b|0);fb(a|0)}else ub(b|0,616,80)}function as(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;v=r;r=r+144|0;h=v+24|0;a=v+32|0;w=v+16|0;q=v+8|0;n=v+4|0;o=v+28|0;j=v;k[w>>2]=a;A=w+4|0;k[A>>2]=189;l=a+100|0;x=0;u=ta(68,e|0)|0;m=x;x=0;if(!(m&1)){k[n>>2]=u;x=0;m=Aa(37,n|0,44220)|0;a=x;x=0;a:do{if(!(a&1)?(i[o>>0]=0,s=k[c>>2]|0,k[j>>2]=s,p=k[e+4>>2]|0,t=s,x=0,k[h>>2]=k[j>>2],p=ua(1,b|0,h|0,d|0,n|0,p|0,f|0,o|0,m|0,w|0,q|0,l|0)|0,e=x,x=0,!(e&1)):0){if(p){if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}if(i[o>>0]|0){x=0;a=Aa(k[(k[m>>2]|0)+28>>2]|0,m|0,45)|0;e=x;x=0;if(e&1)break;x=0;ra(67,g|0,a|0);e=x;x=0;if(e&1)break}x=0;j=Aa(k[(k[m>>2]|0)+28>>2]|0,m|0,48)|0;e=x;x=0;if(e&1)break;a=k[w>>2]|0;l=k[q>>2]|0;h=l+-1|0;b:do{if(a>>>0>>0)do{if((i[a>>0]|0)!=j<<24>>24)break b;a=a+1|0}while(a>>>0>>0)}while(0);x=0;va(32,g|0,a|0,l|0)|0;g=x;x=0;if(g&1)break}a=k[b>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1)break a;if((a|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}}else a=0}while(0);h=(a|0)==0;do{if(s){if((k[t+12>>2]|0)==(k[t+16>>2]|0)){x=0;a=ta(k[(k[s>>2]|0)+36>>2]|0,t|0)|0;t=x;x=0;if(t&1)break a;if((a|0)==-1){k[c>>2]=0;z=29;break}}if(!h)z=30}else z=29}while(0);if((z|0)==29?h:0)z=30;if((z|0)==30)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(u)|0;a=k[w>>2]|0;k[w>>2]=0;if((a|0)!=0?(x=0,qa(k[A>>2]|0,a|0),A=x,x=0,A&1):0){A=Wa(0)|0;oc(A)}r=v;return h|0}}while(0);h=Wa()|0;zm(u)|0;a=k[w>>2]|0;k[w>>2]=0;if(!a)y=h;else z=36}else{h=Wa()|0;k[w>>2]=0;z=36}if((z|0)==36){x=0;qa(k[A>>2]|0,a|0);A=x;x=0;if(A&1){A=Wa(0)|0;oc(A)}else y=h}fb(y|0);return 0}function bs(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;z=r;r=r+112|0;m=z+100|0;n=z+88|0;o=z+76|0;p=z+64|0;q=z+52|0;s=z+48|0;t=z+36|0;u=z+24|0;v=z+12|0;w=z;do{if(a){a=Ss(b,43828)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](m,a);w=k[m>>2]|0;i[c>>0]=w;i[c+1>>0]=w>>8;i[c+2>>0]=w>>16;i[c+3>>0]=w>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](n,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[n>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;Sm(n);Mb[k[(k[a>>2]|0)+28>>2]&127](o,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[o>>2];k[h+4>>2]=k[o+4>>2];k[h+8>>2]=k[o+8>>2];k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;Sm(o);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[d>>0]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[e>>0]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](p,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[p>>2];k[f+4>>2]=k[p+4>>2];k[f+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;Sm(p);Mb[k[(k[a>>2]|0)+24>>2]&127](q,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[q>>2];k[g+4>>2]=k[q+4>>2];k[g+8>>2]=k[q+8>>2];k[q>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;Sm(q);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(b,43764)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](s,a);s=k[s>>2]|0;i[c>>0]=s;i[c+1>>0]=s>>8;i[c+2>>0]=s>>16;i[c+3>>0]=s>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](t,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[t>>2];k[j+4>>2]=k[t+4>>2];k[j+8>>2]=k[t+8>>2];k[t>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;Sm(t);Mb[k[(k[a>>2]|0)+28>>2]&127](u,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[u>>2];k[h+4>>2]=k[u+4>>2];k[h+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;Sm(u);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[d>>0]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[e>>0]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](v,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[v>>2];k[f+4>>2]=k[v+4>>2];k[f+8>>2]=k[v+8>>2];k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;Sm(v);Mb[k[(k[a>>2]|0)+24>>2]&127](w,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[w>>2];k[g+4>>2]=k[w+4>>2];k[g+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;Sm(w);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=y;r=z;return}function cs(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;e=i[a>>0]|0;g=a+4|0;f=k[g>>2]|0;a:do{if(((e&1)==0?(e&255)>>>1:f)|0){if((b|0)!=(c|0)){e=c+-4|0;if(e>>>0>b>>>0){f=b;do{h=k[f>>2]|0;k[f>>2]=k[e>>2];k[e>>2]=h;f=f+4|0;e=e+-4|0}while(f>>>0>>0)}e=i[a>>0]|0;f=k[g>>2]|0}h=(e&1)==0;g=h?a+1|0:k[a+8>>2]|0;c=c+-4|0;a=g+(h?(e&255)>>>1:f)|0;f=i[g>>0]|0;e=f<<24>>24<1|f<<24>>24==127;b:do{if(c>>>0>b>>>0){while(1){if(!e?(f<<24>>24|0)!=(k[b>>2]|0):0)break;g=(a-g|0)>1?g+1|0:g;b=b+4|0;f=i[g>>0]|0;e=f<<24>>24<1|f<<24>>24==127;if(b>>>0>=c>>>0)break b}k[d>>2]=4;break a}}while(0);if(!e?((k[c>>2]|0)+-1|0)>>>0>=f<<24>>24>>>0:0)k[d>>2]=4}}while(0);return}function ds(a){a=a|0;return}function es(a){a=a|0;mj(a);return}function fs(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;B=r;r=r+576|0;w=B+424|0;A=B;a=B+24|0;D=B+16|0;y=B+12|0;C=B+8|0;n=B+464|0;j=B+4|0;z=B+468|0;k[D>>2]=a;F=D+4|0;k[F>>2]=189;l=a+400|0;x=0;h=ta(68,e|0)|0;v=x;x=0;if(!(v&1)){k[C>>2]=h;x=0;a=Aa(37,C|0,44212)|0;v=x;x=0;a:do{if(!(v&1)?(i[n>>0]=0,k[j>>2]=k[c>>2],m=k[e+4>>2]|0,x=0,k[w>>2]=k[j>>2],m=ua(2,b|0,w|0,d|0,C|0,m|0,f|0,n|0,a|0,D|0,y|0,l|0)|0,v=x,x=0,!(v&1)):0){b:do{if(m){x=0;Ea(k[(k[a>>2]|0)+48>>2]|0,a|0,59007,59017,w|0)|0;v=x;x=0;if(v&1){G=10;break a}j=k[y>>2]|0;l=k[D>>2]|0;a=j-l|0;if((a|0)>392){a=Pl((a>>2)+2|0)|0;h=a;if(!a){x=0;Ga(6);v=x;x=0;if(!(v&1)){a=0;G=13}}else G=13}else{h=0;a=z;G=13}do{if((G|0)==13){if(i[n>>0]|0){i[a>>0]=45;a=a+1|0}u=w+40|0;v=w;if(l>>>0>>0){m=w+4|0;d=m+4|0;e=d+4|0;n=e+4|0;o=n+4|0;p=o+4|0;q=p+4|0;s=q+4|0;t=s+4|0;do{j=k[l>>2]|0;do{if((k[w>>2]|0)!=(j|0))if((k[m>>2]|0)!=(j|0))if((k[d>>2]|0)!=(j|0))if((k[e>>2]|0)!=(j|0))if((k[n>>2]|0)==(j|0))j=n;else{if((k[o>>2]|0)==(j|0)){j=o;break}if((k[p>>2]|0)==(j|0)){j=p;break}if((k[q>>2]|0)==(j|0)){j=q;break}if((k[s>>2]|0)==(j|0)){j=s;break}j=(k[t>>2]|0)==(j|0)?t:u}else j=e;else j=d;else j=m;else j=w}while(0);i[a>>0]=i[59007+(j-v>>2)>>0]|0;l=l+4|0;a=a+1|0}while(l>>>0<(k[y>>2]|0)>>>0)}i[a>>0]=0;k[A>>2]=g;if((jl(z,58987,A)|0)!=1?(x=0,qa(190,58991),g=x,x=0,g&1):0)break;if(h)Ql(h);break b}}while(0);a=Wa()|0;if(!h){j=a;h=D;break a}Ql(h);j=a;h=D;break a}}while(0);a=k[b>>2]|0;do{if(a){h=k[a+12>>2]|0;if((h|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}}else a=k[h>>2]|0;if((a|0)==-1){k[b>>2]=0;j=1;break}else{j=(k[b>>2]|0)==0;break}}else j=1}while(0);a=k[c>>2]|0;do{if(a){h=k[a+12>>2]|0;if((h|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}}else a=k[h>>2]|0;if((a|0)!=-1)if(j)break;else{G=40;break}else{k[c>>2]=0;G=38;break}}else G=38}while(0);if((G|0)==38?j:0)G=40;if((G|0)==40)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(k[C>>2]|0)|0;a=k[D>>2]|0;k[D>>2]=0;if((a|0)!=0?(x=0,qa(k[F>>2]|0,a|0),G=x,x=0,G&1):0){G=Wa(0)|0;oc(G)}r=B;return h|0}else G=10}while(0);if((G|0)==10){j=Wa()|0;h=D}zm(k[C>>2]|0)|0;a=k[h>>2]|0;k[h>>2]=0;if(!a)E=j;else{h=k[F>>2]|0;G=47}}else{j=Wa()|0;k[D>>2]=0;h=189;G=47}if((G|0)==47){x=0;qa(h|0,a|0);G=x;x=0;if(G&1){G=Wa(0)|0;oc(G)}else E=j}fb(E|0);return 0}function gs(a,b,c,d,e,f,g,h,j,m,n){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;m=m|0;n=n|0;var o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=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;Y=r;r=r+512|0;K=Y+96|0;o=Y+104|0;_=Y+88|0;O=Y+80|0;N=Y+76|0;P=Y+504|0;L=Y+72|0;Q=Y+68|0;T=Y+56|0;X=Y+44|0;V=Y+32|0;U=Y+20|0;W=Y+8|0;M=Y+4|0;S=Y;k[K>>2]=n;k[_>>2]=o;Z=_+4|0;k[Z>>2]=189;k[O>>2]=o;k[N>>2]=o+400;k[T>>2]=0;k[T+4>>2]=0;k[T+8>>2]=0;k[X>>2]=0;k[X+4>>2]=0;k[X+8>>2]=0;k[V>>2]=0;k[V+4>>2]=0;k[V+8>>2]=0;k[U>>2]=0;k[U+4>>2]=0;k[U+8>>2]=0;k[W>>2]=0;k[W+4>>2]=0;k[W+8>>2]=0;x=0;za(2,c|0,d|0,P|0,L|0,Q|0,T|0,X|0,V|0,U|0,M|0);J=x;x=0;a:do{if(J&1)c=Wa()|0;else{k[m>>2]=k[j>>2];G=V+4|0;H=U+4|0;I=U+8|0;J=V+8|0;z=(e&512|0)!=0;A=X+8|0;B=X+4|0;C=W+4|0;D=W+8|0;E=P+3|0;F=T+4|0;y=0;q=0;b:while(1){n=k[a>>2]|0;do{if(n){c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else n=k[c>>2]|0;if((n|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);c=k[b>>2]|0;do{if(c){n=k[c+12>>2]|0;if((n|0)==(k[c+16>>2]|0)){x=0;n=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else n=k[n>>2]|0;if((n|0)!=-1)if(d){w=c;break}else{s=o;R=244;break b}else{k[b>>2]=0;R=16;break}}else R=16}while(0);if((R|0)==16){R=0;if(d){s=o;R=244;break}else w=0}c:do{switch(i[P+y>>0]|0){case 1:{if((y|0)!=3){n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;R=x;x=0;if(R&1){R=26;break b}}else n=k[c>>2]|0;x=0;n=va(k[(k[h>>2]|0)+12>>2]|0,h|0,8192,n|0)|0;R=x;x=0;if(R&1){R=26;break b}if(!n){R=42;break b}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;R=x;x=0;if(R&1){R=26;break b}}else{k[c>>2]=d+4;n=k[d>>2]|0}x=0;ra(92,W|0,n|0);R=x;x=0;if(R&1){R=26;break b}else{n=w;e=w;R=44}}else n=o;break}case 0:{if((y|0)==3)n=o;else{n=w;e=w;R=44}break}case 3:{c=i[V>>0]|0;n=(c&1)==0?(c&255)>>>1:k[G>>2]|0;d=i[U>>0]|0;e=(d&1)==0?(d&255)>>>1:k[H>>2]|0;if((n|0)==(0-e|0))n=o;else{if(!n){n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}c=i[U>>0]|0}else{n=k[c>>2]|0;c=d}if((n|0)!=(k[((c&1)==0?H:k[I>>2]|0)>>2]|0)){n=o;break c}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[c>>2]=d+4;i[g>>0]=1;w=i[U>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[H>>2]|0)>>>0>1?U:q;break c}p=k[a>>2]|0;s=k[p+12>>2]|0;d=k[p+16>>2]|0;n=(s|0)==(d|0);if(!e){if(n){x=0;n=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}c=i[V>>0]|0}else n=k[s>>2]|0;if((n|0)!=(k[((c&1)==0?G:k[J>>2]|0)>>2]|0)){i[g>>0]=1;n=o;break c}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[c>>2]=d+4;w=i[V>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[G>>2]|0)>>>0>1?V:q;break c}if(n){x=0;n=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}d=k[a>>2]|0;c=i[V>>0]|0;p=d;s=k[d+12>>2]|0;d=k[d+16>>2]|0}else n=k[s>>2]|0;e=p+12|0;d=(s|0)==(d|0);if((n|0)==(k[((c&1)==0?G:k[J>>2]|0)>>2]|0)){if(d){x=0;ta(k[(k[p>>2]|0)+40>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[e>>2]=s+4;w=i[V>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[G>>2]|0)>>>0>1?V:q;break c}if(d){x=0;n=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}}else n=k[s>>2]|0;if((n|0)!=(k[((i[U>>0]&1)==0?H:k[I>>2]|0)>>2]|0)){R=107;break b}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[c>>2]=d+4;i[g>>0]=1;w=i[U>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[H>>2]|0)>>>0>1?U:q}break}case 2:{if(!(y>>>0<2|(q|0)!=0)?!(z|(y|0)==2&(i[E>>0]|0)!=0):0){n=o;q=0;break c}e=i[X>>0]|0;d=k[A>>2]|0;c=(e&1)==0?B:d;n=c;d:do{if((y|0)!=0?(l[P+(y+-1)>>0]|0)<2:0){v=(e&1)==0;e:do{if((c|0)!=((v?B:d)+((v?(e&255)>>>1:k[B>>2]|0)<<2)|0)){e=c;while(1){x=0;c=va(k[(k[h>>2]|0)+12>>2]|0,h|0,8192,k[e>>2]|0)|0;v=x;x=0;if(v&1){R=23;break b}if(!c)break;e=e+4|0;n=e;c=i[X>>0]|0;d=k[A>>2]|0;v=(c&1)==0;if((e|0)==((v?B:d)+((v?(c&255)>>>1:k[B>>2]|0)<<2)|0)){e=c;break e}}e=i[X>>0]|0;d=k[A>>2]|0}}while(0);s=(e&1)==0?B:d;c=s;t=n-c>>2;u=i[W>>0]|0;p=(u&1)==0;u=p?(u&255)>>>1:k[C>>2]|0;if(u>>>0>=t>>>0){p=p?C:k[D>>2]|0;v=p+(u<<2)|0;if(!t)c=n;else{p=p+(u-t<<2)|0;while(1){if((k[p>>2]|0)!=(k[s>>2]|0))break d;p=p+4|0;if((p|0)==(v|0)){c=n;break}else s=s+4|0}}}}else c=n}while(0);n=(e&1)==0;n=(n?B:d)+((n?(e&255)>>>1:k[B>>2]|0)<<2)|0;f:do{if((c|0)!=(n|0)){p=w;e=w;n=c;while(1){c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=22;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(e){c=k[e+12>>2]|0;if((c|0)==(k[e+16>>2]|0)){x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=22;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d^(p|0)==0){c=p;s=p;break}else break f;else{k[b>>2]=0;c=0;R=136;break}}else{c=p;R=136}}while(0);if((R|0)==136){R=0;if(d)break f;else s=0}d=k[a>>2]|0;e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=22;break b}}else d=k[e>>2]|0;if((d|0)!=(k[n>>2]|0))break f;d=k[a>>2]|0;e=d+12|0;p=k[e>>2]|0;if((p|0)==(k[d+16>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=22;break b}}else k[e>>2]=p+4;n=n+4|0;d=i[X>>0]|0;w=(d&1)==0;d=(w?B:k[A>>2]|0)+((w?(d&255)>>>1:k[B>>2]|0)<<2)|0;if((n|0)==(d|0)){n=d;break}else{p=c;e=s}}}}while(0);if(z?(w=i[X>>0]|0,v=(w&1)==0,(n|0)!=((v?B:k[A>>2]|0)+((v?(w&255)>>>1:k[B>>2]|0)<<2)|0)):0){R=148;break b}else n=o;break}case 4:{u=k[Q>>2]|0;t=w;p=w;n=o;c=0;g:while(1){d=k[a>>2]|0;do{if(d){e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=25;break b}}else d=k[e>>2]|0;if((d|0)==-1){k[a>>2]=0;e=1;break}else{e=(k[a>>2]|0)==0;break}}else e=1}while(0);do{if(p){d=k[p+12>>2]|0;if((d|0)==(k[p+16>>2]|0)){x=0;d=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=25;break b}}else d=k[d>>2]|0;if((d|0)!=-1)if(e^(t|0)==0){d=t;s=t;break}else{o=t;break g}else{k[b>>2]=0;d=0;R=162;break}}else{d=t;R=162}}while(0);if((R|0)==162){R=0;if(e){o=d;break}else s=0}e=k[a>>2]|0;o=k[e+12>>2]|0;if((o|0)==(k[e+16>>2]|0)){x=0;e=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=25;break b}}else e=k[o>>2]|0;x=0;o=va(k[(k[h>>2]|0)+12>>2]|0,h|0,2048,e|0)|0;w=x;x=0;if(w&1){R=25;break b}if(o){o=k[m>>2]|0;if((o|0)==(k[K>>2]|0)){x=0;Fa(14,j|0,m|0,K|0);w=x;x=0;if(w&1){R=25;break b}o=k[m>>2]|0}k[m>>2]=o+4;k[o>>2]=e;c=c+1|0}else{w=i[T>>0]|0;if(!((e|0)==(u|0)&((c|0)!=0?(((w&1)==0?(w&255)>>>1:k[F>>2]|0)|0)!=0:0))){o=d;break}if((n|0)==(k[N>>2]|0)){x=0;Fa(13,_|0,O|0,N|0);w=x;x=0;if(w&1){R=25;break b}n=k[O>>2]|0}w=n+4|0;k[O>>2]=w;k[n>>2]=c;n=w;c=0}e=k[a>>2]|0;o=e+12|0;p=k[o>>2]|0;if((p|0)==(k[e+16>>2]|0)){x=0;ta(k[(k[e>>2]|0)+40>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=25;break b}else{t=d;p=s;continue}}else{k[o>>2]=p+4;t=d;p=s;continue}}if((c|0)!=0?(k[_>>2]|0)!=(n|0):0){if((n|0)==(k[N>>2]|0)){x=0;Fa(13,_|0,O|0,N|0);w=x;x=0;if(w&1){R=26;break b}n=k[O>>2]|0}w=n+4|0;k[O>>2]=w;k[n>>2]=c;n=w}s=k[M>>2]|0;if((s|0)>0){c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(o){c=k[o+12>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;c=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){R=26;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d)break;else{R=206;break b}else{k[b>>2]=0;R=200;break}}else R=200}while(0);if((R|0)==200){R=0;if(d){R=206;break b}else o=0}c=k[a>>2]|0;d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else c=k[d>>2]|0;if((c|0)!=(k[L>>2]|0)){R=206;break b}c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[d>>2]=e+4;if((s|0)>0){p=o;e=o;t=s;while(1){c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=24;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(e){c=k[e+12>>2]|0;if((c|0)==(k[e+16>>2]|0)){x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=24;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d^(p|0)==0){c=p;s=p;break}else{R=231;break b}else{k[b>>2]=0;c=0;R=224;break}}else{c=p;R=224}}while(0);if((R|0)==224){R=0;if(d){R=231;break b}else s=0}d=k[a>>2]|0;e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=24;break b}}else d=k[e>>2]|0;x=0;d=va(k[(k[h>>2]|0)+12>>2]|0,h|0,2048,d|0)|0;w=x;x=0;if(w&1){R=24;break b}if(!d){R=231;break b}if((k[m>>2]|0)==(k[K>>2]|0)?(x=0,Fa(14,j|0,m|0,K|0),w=x,x=0,w&1):0){R=24;break b}d=k[a>>2]|0;e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=24;break b}}else d=k[e>>2]|0;e=k[m>>2]|0;k[m>>2]=e+4;k[e>>2]=d;d=t;t=t+-1|0;k[M>>2]=t;e=k[a>>2]|0;o=e+12|0;p=k[o>>2]|0;if((p|0)==(k[e+16>>2]|0)){x=0;ta(k[(k[e>>2]|0)+40>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=24;break b}}else k[o>>2]=p+4;if((d|0)<=1)break;else{p=c;e=s}}}}if((k[m>>2]|0)==(k[j>>2]|0)){R=242;break b}break}default:n=o}}while(0);h:do{if((R|0)==44)while(1){R=0;c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=21;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(e){c=k[e+12>>2]|0;if((c|0)==(k[e+16>>2]|0)){x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=21;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d^(n|0)==0){p=n;e=n;break}else{n=o;break h}else{k[b>>2]=0;n=0;R=57;break}}else R=57}while(0);if((R|0)==57){R=0;if(d){n=o;break h}else{p=n;e=0}}n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=21;break b}}else n=k[c>>2]|0;x=0;n=va(k[(k[h>>2]|0)+12>>2]|0,h|0,8192,n|0)|0;w=x;x=0;if(w&1){R=21;break b}if(!n){n=o;break h}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;R=x;x=0;if(R&1){R=21;break b}}else{k[c>>2]=d+4;n=k[d>>2]|0}x=0;ra(92,W|0,n|0);R=x;x=0;if(R&1){R=21;break b}else{n=p;R=44}}}while(0);y=y+1|0;if(y>>>0>=4){s=n;R=244;break}else o=n}i:switch(R|0){case 21:{c=Wa()|0;break a}case 22:{c=Wa()|0;break a}case 23:{c=Wa()|0;break a}case 24:{c=Wa()|0;break a}case 25:{c=Wa()|0;break a}case 26:{c=Wa()|0;break a}case 42:{k[f>>2]=k[f>>2]|4;c=0;break}case 107:{k[f>>2]=k[f>>2]|4;c=0;break}case 148:{k[f>>2]=k[f>>2]|4;c=0;break}case 206:{k[f>>2]=k[f>>2]|4;c=0;break}case 231:{k[f>>2]=k[f>>2]|4;c=0;break}case 242:{k[f>>2]=k[f>>2]|4;c=0;break}case 244:{j:do{if(q){o=q+4|0;p=q+8|0;e=1;k:while(1){n=i[q>>0]|0;if(!(n&1))n=(n&255)>>>1;else n=k[o>>2]|0;if(e>>>0>=n>>>0)break j;n=k[a>>2]|0;do{if(n){c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;m=x;x=0;if(m&1){R=20;break k}}else n=k[c>>2]|0;if((n|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);n=k[b>>2]|0;do{if(n){c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;m=x;x=0;if(m&1){R=20;break k}}else n=k[c>>2]|0;if((n|0)!=-1)if(d)break;else{R=271;break k}else{k[b>>2]=0;R=263;break}}else R=263}while(0);if((R|0)==263?(R=0,d):0){R=271;break}n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;m=x;x=0;if(m&1){R=20;break}}else n=k[c>>2]|0;if(!(i[q>>0]&1))c=o;else c=k[p>>2]|0;if((n|0)!=(k[c+(e<<2)>>2]|0)){R=271;break}n=e+1|0;c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;m=x;x=0;if(m&1){R=20;break}else{e=n;continue}}else{k[d>>2]=e+4;e=n;continue}}if((R|0)==20){c=Wa()|0;break a}else if((R|0)==271){k[f>>2]=k[f>>2]|4;c=0;break i}}}while(0);n=k[_>>2]|0;if((n|0)!=(s|0)?(k[S>>2]=0,cs(T,n,s,S),(k[S>>2]|0)!=0):0){k[f>>2]=k[f>>2]|4;c=0}else c=1;break}}en(W);en(U);en(V);en(X);Sm(T);n=k[_>>2]|0;k[_>>2]=0;if((n|0)!=0?(x=0,qa(k[Z>>2]|0,n|0),_=x,x=0,_&1):0){_=Wa(0)|0;oc(_)}r=Y;return c|0}}while(0);en(W);en(U);en(V);en(X);Sm(T);n=k[_>>2]|0;k[_>>2]=0;if((n|0)!=0?(x=0,qa(k[Z>>2]|0,n|0),_=x,x=0,_&1):0){_=Wa(0)|0;oc(_)}fb(c|0);return 0}function hs(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;v=r;r=r+432|0;h=v+424|0;a=v+24|0;y=v+16|0;q=v+8|0;n=v+4|0;o=v+428|0;j=v;k[y>>2]=a;A=y+4|0;k[A>>2]=189;l=a+400|0;x=0;u=ta(68,e|0)|0;m=x;x=0;if(!(m&1)){k[n>>2]=u;x=0;m=Aa(37,n|0,44212)|0;a=x;x=0;a:do{if(!(a&1)?(i[o>>0]=0,s=k[c>>2]|0,k[j>>2]=s,p=k[e+4>>2]|0,t=s,x=0,k[h>>2]=k[j>>2],p=ua(2,b|0,h|0,d|0,n|0,p|0,f|0,o|0,m|0,y|0,q|0,l|0)|0,e=x,x=0,!(e&1)):0){if(p){if(!(i[g>>0]&1))i[g>>0]=0;else k[k[g+8>>2]>>2]=0;k[g+4>>2]=0;if(i[o>>0]|0){x=0;a=Aa(k[(k[m>>2]|0)+44>>2]|0,m|0,45)|0;e=x;x=0;if(e&1)break;x=0;ra(92,g|0,a|0);e=x;x=0;if(e&1)break}x=0;j=Aa(k[(k[m>>2]|0)+44>>2]|0,m|0,48)|0;e=x;x=0;if(e&1)break;a=k[y>>2]|0;l=k[q>>2]|0;h=l+-4|0;b:do{if(a>>>0>>0)do{if((k[a>>2]|0)!=(j|0))break b;a=a+4|0}while(a>>>0>>0)}while(0);x=0;va(33,g|0,a|0,l|0)|0;g=x;x=0;if(g&1)break}a=k[b>>2]|0;do{if(a){h=k[a+12>>2]|0;if((h|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1)break a}else a=k[h>>2]|0;if((a|0)==-1){k[b>>2]=0;h=1;break}else{h=(k[b>>2]|0)==0;break}}else h=1}while(0);do{if(s){a=k[t+12>>2]|0;if((a|0)==(k[t+16>>2]|0)){x=0;a=ta(k[(k[s>>2]|0)+36>>2]|0,t|0)|0;t=x;x=0;if(t&1)break a}else a=k[a>>2]|0;if((a|0)!=-1)if(h)break;else{z=32;break}else{k[c>>2]=0;z=30;break}}else z=30}while(0);if((z|0)==30?h:0)z=32;if((z|0)==32)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(u)|0;a=k[y>>2]|0;k[y>>2]=0;if((a|0)!=0?(x=0,qa(k[A>>2]|0,a|0),A=x,x=0,A&1):0){A=Wa(0)|0;oc(A)}r=v;return h|0}}while(0);h=Wa()|0;zm(u)|0;a=k[y>>2]|0;k[y>>2]=0;if(!a)w=h;else z=38}else{h=Wa()|0;k[y>>2]=0;z=38}if((z|0)==38){x=0;qa(k[A>>2]|0,a|0);A=x;x=0;if(A&1){A=Wa(0)|0;oc(A)}else w=h}fb(w|0);return 0}function is(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;z=r;r=r+112|0;m=z+100|0;n=z+88|0;o=z+76|0;p=z+64|0;q=z+52|0;s=z+48|0;t=z+36|0;u=z+24|0;v=z+12|0;w=z;do{if(a){a=Ss(b,43956)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](m,a);w=k[m>>2]|0;i[c>>0]=w;i[c+1>>0]=w>>8;i[c+2>>0]=w>>16;i[c+3>>0]=w>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](n,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[n>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;en(n);Mb[k[(k[a>>2]|0)+28>>2]&127](o,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[o>>2];k[h+4>>2]=k[o+4>>2];k[h+8>>2]=k[o+8>>2];k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;en(o);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[d>>2]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[e>>2]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](p,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[p>>2] -;k[f+4>>2]=k[p+4>>2];k[f+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;Sm(p);Mb[k[(k[a>>2]|0)+24>>2]&127](q,a);if(!(i[g>>0]&1))i[g>>0]=0;else k[k[g+8>>2]>>2]=0;k[g+4>>2]=0;x=0;ra(93,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[q>>2];k[g+4>>2]=k[q+4>>2];k[g+8>>2]=k[q+8>>2];k[q>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;en(q);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(b,43892)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](s,a);s=k[s>>2]|0;i[c>>0]=s;i[c+1>>0]=s>>8;i[c+2>>0]=s>>16;i[c+3>>0]=s>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](t,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[t>>2];k[j+4>>2]=k[t+4>>2];k[j+8>>2]=k[t+8>>2];k[t>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;en(t);Mb[k[(k[a>>2]|0)+28>>2]&127](u,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[u>>2];k[h+4>>2]=k[u+4>>2];k[h+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;en(u);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[d>>2]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[e>>2]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](v,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[v>>2];k[f+4>>2]=k[v+4>>2];k[f+8>>2]=k[v+8>>2];k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;Sm(v);Mb[k[(k[a>>2]|0)+24>>2]&127](w,a);if(!(i[g>>0]&1))i[g>>0]=0;else k[k[g+8>>2]>>2]=0;k[g+4>>2]=0;x=0;ra(93,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[w>>2];k[g+4>>2]=k[w+4>>2];k[g+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;en(w);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=y;r=z;return}function js(a){a=a|0;return}function ks(a){a=a|0;mj(a);return}function ls(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;D=r;r=r+384|0;u=D+8|0;g=D;j=D+284|0;l=D+72|0;h=D+184|0;F=D+68|0;A=D+80|0;w=D+77|0;B=D+76|0;G=D+56|0;I=D+44|0;H=D+32|0;m=D+28|0;t=D+84|0;z=D+24|0;y=D+20|0;v=D+16|0;k[l>>2]=j;p[u>>3]=f;j=il(j,100,59018,u)|0;do{if(j>>>0>99){x=0;a=Da(3)|0;C=x;x=0;if(!(C&1)?(x=0,p[g>>3]=f,q=Ea(17,l|0,a|0,59018,g|0)|0,C=x,x=0,!(C&1)):0){a=k[l>>2]|0;if(!a){x=0;Ga(6);C=x;x=0;if(C&1){a=0;g=0;C=7;break}a=k[l>>2]|0}h=Pl(q)|0;g=h;if(!h){x=0;Ga(6);C=x;x=0;if(C&1)C=7;else{s=0;C=10}}else{s=h;C=10}}else{a=0;g=0;C=7}}else{g=0;a=0;s=h;q=j;C=10}}while(0);if((C|0)==10){x=0;h=ta(68,d|0)|0;o=x;x=0;if(o&1)C=7;else{k[F>>2]=h;x=0;o=Aa(37,F|0,44220)|0;n=x;x=0;if(!(n&1)?(n=k[l>>2]|0,x=0,Ea(k[(k[o>>2]|0)+32>>2]|0,o|0,n|0,n+q|0,s|0)|0,n=x,x=0,!(n&1)):0){if(!q)n=0;else n=(i[k[l>>2]>>0]|0)==45;k[G>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;k[I>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;k[H>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;x=0;za(3,c|0,n|0,F|0,A|0,w|0,B|0,G|0,I|0,H|0,m|0);c=x;x=0;if(!(c&1)){m=k[m>>2]|0;if((q|0)>(m|0)){c=i[H>>0]|0;j=i[I>>0]|0;j=(q-m<<1|1)+m+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}else{c=i[H>>0]|0;j=i[I>>0]|0;j=m+2+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}if(j>>>0>100){j=Pl(j)|0;l=j;if(!j){x=0;Ga(6);t=x;x=0;if(!(t&1)){j=0;C=26}}else C=26}else{l=0;j=t;C=26}if((C|0)==26){x=0;wa(1,j|0,z|0,y|0,k[d+4>>2]|0,s|0,s+q|0,o|0,n|0,A|0,i[w>>0]|0,i[B>>0]|0,G|0,I|0,H|0,m|0);B=x;x=0;if(!(B&1)?(k[v>>2]=k[b>>2],b=k[z>>2]|0,E=k[y>>2]|0,x=0,k[u>>2]=k[v>>2],E=sa(39,u|0,j|0,b|0,E|0,d|0,e|0)|0,b=x,x=0,!(b&1)):0){if(l){Ql(l);h=k[F>>2]|0}Sm(H);Sm(I);Sm(G);zm(h)|0;if(g)Ql(g);if(a)Ql(a);r=D;return E|0}}j=Wa()|0;if(l){Ql(l);h=k[F>>2]|0}}else j=Wa()|0;Sm(H);Sm(I);Sm(G)}else j=Wa()|0;zm(h)|0}}if((C|0)==7)j=Wa()|0;if(g)Ql(g);if(a)Ql(a);fb(j|0);return 0}function ms(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;D=r;r=r+112|0;o=D+108|0;p=D+96|0;t=D+92|0;u=D+80|0;v=D+68|0;w=D+56|0;y=D+52|0;z=D+40|0;A=D+36|0;B=D+24|0;q=D+12|0;s=D;do{if(a){a=Ss(c,43828)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](o,a);b=k[o>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](p,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[p>>2];k[j+4>>2]=k[p+4>>2];k[j+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;Sm(p);n=a;break}}else{Mb[k[c+40>>2]&127](t,a);b=k[t>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](u,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[u>>2];k[j+4>>2]=k[u+4>>2];k[j+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;Sm(u);n=a;break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[e>>0]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[f>>0]=j;Mb[k[(k[n>>2]|0)+20>>2]&127](v,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[v>>2];k[g+4>>2]=k[v+4>>2];k[g+8>>2]=k[v+8>>2];k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;Sm(v);Mb[k[(k[n>>2]|0)+24>>2]&127](w,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[w>>2];k[h+4>>2]=k[w+4>>2];k[h+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;Sm(w);C=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(c,43764)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](y,a);b=k[y>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](z,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[z>>2];k[j+4>>2]=k[z+4>>2];k[j+8>>2]=k[z+8>>2];k[z>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;Sm(z);m=a;break}}else{Mb[k[c+40>>2]&127](A,a);b=k[A>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](B,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[B>>2];k[j+4>>2]=k[B+4>>2];k[j+8>>2]=k[B+8>>2];k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;Sm(B);m=a;break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[e>>0]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[f>>0]=j;Mb[k[(k[m>>2]|0)+20>>2]&127](q,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[q>>2];k[g+4>>2]=k[q+4>>2];k[g+8>>2]=k[q+8>>2];k[q>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;Sm(q);Mb[k[(k[m>>2]|0)+24>>2]&127](s,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[s>>2];k[h+4>>2]=k[s+4>>2];k[h+8>>2]=k[s+8>>2];k[s>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;Sm(s);C=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=C;r=D;return}function ns(a,b,c,d,e,f,g,h,l,m,n,o,p,q,r){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var 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;k[c>>2]=a;N=q+4|0;O=q+8|0;P=q+1|0;H=p+4|0;I=(d&512|0)==0;J=p+8|0;K=p+1|0;L=g+8|0;M=(r|0)>0;A=o+4|0;B=o+8|0;C=o+1|0;D=r+1|0;F=-2-r-((r|0)<0?~r:-1)|0;G=(r|0)>0;z=0;do{switch(i[l+z>>0]|0){case 0:{k[b>>2]=k[c>>2];break}case 1:{k[b>>2]=k[c>>2];x=Vb[k[(k[g>>2]|0)+28>>2]&63](g,32)|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x;break}case 3:{y=i[q>>0]|0;s=(y&1)==0;if((s?(y&255)>>>1:k[N>>2]|0)|0){x=i[(s?P:k[O>>2]|0)>>0]|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x}break}case 2:{u=i[p>>0]|0;s=(u&1)==0;u=s?(u&255)>>>1:k[H>>2]|0;if(!(I|(u|0)==0)){t=s?K:k[J>>2]|0;v=t+u|0;s=k[c>>2]|0;if(u)do{i[s>>0]=i[t>>0]|0;t=t+1|0;s=s+1|0}while((t|0)!=(v|0));k[c>>2]=s}break}case 4:{s=k[c>>2]|0;e=h?e+1|0:e;w=e;v=k[L>>2]|0;a:do{if(e>>>0>>0){t=e;do{u=i[t>>0]|0;if(u<<24>>24<=-1)break a;if(!(j[v+(u<<24>>24<<1)>>1]&2048))break a;t=t+1|0}while(t>>>0>>0)}else t=e}while(0);u=t;if(M){x=-2-u-~(u>>>0>w>>>0?w:u)|0;x=F>>>0>x>>>0?F:x;if(t>>>0>e>>>0&G){u=t;w=r;while(1){u=u+-1|0;y=i[u>>0]|0;v=k[c>>2]|0;k[c>>2]=v+1;i[v>>0]=y;v=(w|0)>1;if(!(u>>>0>e>>>0&v))break;else w=w+-1|0}}else v=G;y=D+x|0;u=t+(x+1)|0;if(v)w=Vb[k[(k[g>>2]|0)+28>>2]&63](g,48)|0;else w=0;t=k[c>>2]|0;k[c>>2]=t+1;if((y|0)>0){v=y;while(1){i[t>>0]=w;t=k[c>>2]|0;k[c>>2]=t+1;if((v|0)>1)v=v+-1|0;else break}}i[t>>0]=m}else u=t;if((u|0)!=(e|0)){y=i[o>>0]|0;t=(y&1)==0;if(!((t?(y&255)>>>1:k[A>>2]|0)|0))t=-1;else t=i[(t?C:k[B>>2]|0)>>0]|0;if((u|0)!=(e|0)){v=0;w=0;while(1){if((w|0)==(t|0)){y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=n;v=v+1|0;y=i[o>>0]|0;t=(y&1)==0;if(v>>>0<(t?(y&255)>>>1:k[A>>2]|0)>>>0){t=i[(t?C:k[B>>2]|0)+v>>0]|0;t=t<<24>>24==127?-1:t<<24>>24;w=0}else{t=w;w=0}}u=u+-1|0;x=i[u>>0]|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x;if((u|0)==(e|0))break;else w=w+1|0}}}else{x=Vb[k[(k[g>>2]|0)+28>>2]&63](g,48)|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x}t=k[c>>2]|0;if((s|0)!=(t|0)?(E=t+-1|0,s>>>0>>0):0){t=E;do{y=i[s>>0]|0;i[s>>0]=i[t>>0]|0;i[t>>0]=y;s=s+1|0;t=t+-1|0}while(s>>>0>>0)}break}default:{}}z=z+1|0}while((z|0)!=4);t=i[q>>0]|0;e=(t&1)==0;t=e?(t&255)>>>1:k[N>>2]|0;if(t>>>0>1){s=e?P:k[O>>2]|0;u=s+t|0;e=k[c>>2]|0;if((t|0)!=1){s=s+1|0;do{i[e>>0]=i[s>>0]|0;e=e+1|0;s=s+1|0}while((s|0)!=(u|0))}k[c>>2]=e}switch(d&176|0){case 32:{k[b>>2]=k[c>>2];break}case 16:break;default:k[b>>2]=a}return}function os(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;z=r;r=r+176|0;p=z+56|0;B=z+52|0;w=z+64|0;t=z+61|0;y=z+60|0;C=z+40|0;E=z+28|0;D=z+16|0;l=z+12|0;o=z+68|0;v=z+8|0;u=z+4|0;q=z;a=tn(d)|0;k[B>>2]=a;x=0;s=Aa(37,B|0,44220)|0;n=x;x=0;do{if(n&1)F=13;else{m=i[f>>0]|0;g=(m&1)==0;n=f+4|0;if(!((g?(m&255)>>>1:k[n>>2]|0)|0))m=0;else{g=i[(g?f+1|0:k[f+8>>2]|0)>>0]|0;x=0;h=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,45)|0;m=x;x=0;if(m&1){F=13;break}m=g<<24>>24==h<<24>>24}k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;x=0;za(3,c|0,m|0,B|0,w|0,t|0,y|0,C|0,E|0,D|0,l|0);j=x;x=0;if(!(j&1)){j=i[f>>0]|0;c=k[n>>2]|0;g=(j&1)==0?(j&255)>>>1:c;l=k[l>>2]|0;if((g|0)>(l|0)){G=i[D>>0]|0;h=i[E>>0]|0;g=(g-l<<1|1)+l+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((h&1)==0?(h&255)>>>1:k[E+4>>2]|0)|0}else{G=i[D>>0]|0;g=i[E>>0]|0;g=l+2+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((g&1)==0?(g&255)>>>1:k[E+4>>2]|0)|0}if(g>>>0>100){g=Pl(g)|0;h=g;if(!g){x=0;Ga(6);G=x;x=0;if(!(G&1)){j=i[f>>0]|0;c=k[n>>2]|0;g=0;F=17}}else F=17}else{h=0;g=o;F=17}if((F|0)==17){G=(j&1)==0;f=G?f+1|0:k[f+8>>2]|0;x=0;wa(1,g|0,v|0,u|0,k[d+4>>2]|0,f|0,f+(G?(j&255)>>>1:c)|0,s|0,m|0,w|0,i[t>>0]|0,i[y>>0]|0,C|0,E|0,D|0,l|0);G=x;x=0;if(!(G&1)?(k[q>>2]=k[b>>2],G=k[v>>2]|0,A=k[u>>2]|0,x=0,k[p>>2]=k[q>>2],A=sa(39,p|0,g|0,G|0,A|0,d|0,e|0)|0,G=x,x=0,!(G&1)):0){if(h){Ql(h);a=k[B>>2]|0}Sm(D);Sm(E);Sm(C);zm(a)|0;r=z;return A|0}}g=Wa()|0;if(h){Ql(h);a=k[B>>2]|0}}else g=Wa()|0;Sm(D);Sm(E);Sm(C)}}while(0);if((F|0)==13)g=Wa()|0;zm(a)|0;fb(g|0);return 0}function ps(a){a=a|0;return}function qs(a){a=a|0;mj(a);return}function rs(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;D=r;r=r+992|0;u=D+8|0;g=D;j=D+888|0;l=D+880|0;h=D+480|0;F=D+76|0;A=D+884|0;w=D+72|0;B=D+68|0;G=D+56|0;I=D+44|0;H=D+32|0;m=D+28|0;t=D+80|0;z=D+24|0;y=D+20|0;v=D+16|0;k[l>>2]=j;p[u>>3]=f;j=il(j,100,59018,u)|0;do{if(j>>>0>99){x=0;a=Da(3)|0;C=x;x=0;if(!(C&1)?(x=0,p[g>>3]=f,q=Ea(17,l|0,a|0,59018,g|0)|0,C=x,x=0,!(C&1)):0){a=k[l>>2]|0;if(!a){x=0;Ga(6);C=x;x=0;if(C&1){a=0;g=0;C=7;break}a=k[l>>2]|0}h=Pl(q<<2)|0;g=h;if(!h){x=0;Ga(6);C=x;x=0;if(C&1)C=7;else{s=0;C=10}}else{s=h;C=10}}else{a=0;g=0;C=7}}else{g=0;a=0;s=h;q=j;C=10}}while(0);if((C|0)==10){x=0;h=ta(68,d|0)|0;o=x;x=0;if(o&1)C=7;else{k[F>>2]=h;x=0;o=Aa(37,F|0,44212)|0;n=x;x=0;if(!(n&1)?(n=k[l>>2]|0,x=0,Ea(k[(k[o>>2]|0)+48>>2]|0,o|0,n|0,n+q|0,s|0)|0,n=x,x=0,!(n&1)):0){if(!q)n=0;else n=(i[k[l>>2]>>0]|0)==45;k[G>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;k[I>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;k[H>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;x=0;za(4,c|0,n|0,F|0,A|0,w|0,B|0,G|0,I|0,H|0,m|0);c=x;x=0;if(!(c&1)){m=k[m>>2]|0;if((q|0)>(m|0)){c=i[H>>0]|0;j=i[I>>0]|0;j=(q-m<<1|1)+m+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}else{c=i[H>>0]|0;j=i[I>>0]|0;j=m+2+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}if(j>>>0>100){j=Pl(j<<2)|0;l=j;if(!j){x=0;Ga(6);t=x;x=0;if(!(t&1)){j=0;C=26}}else C=26}else{l=0;j=t;C=26}if((C|0)==26){x=0;wa(2,j|0,z|0,y|0,k[d+4>>2]|0,s|0,s+(q<<2)|0,o|0,n|0,A|0,k[w>>2]|0,k[B>>2]|0,G|0,I|0,H|0,m|0);B=x;x=0;if(!(B&1)?(k[v>>2]=k[b>>2],b=k[z>>2]|0,E=k[y>>2]|0,x=0,k[u>>2]=k[v>>2],E=sa(40,u|0,j|0,b|0,E|0,d|0,e|0)|0,b=x,x=0,!(b&1)):0){if(l){Ql(l);h=k[F>>2]|0}en(H);en(I);Sm(G);zm(h)|0;if(g)Ql(g);if(a)Ql(a);r=D;return E|0}}j=Wa()|0;if(l){Ql(l);h=k[F>>2]|0}}else j=Wa()|0;en(H);en(I);Sm(G)}else j=Wa()|0;zm(h)|0}}if((C|0)==7)j=Wa()|0;if(g)Ql(g);if(a)Ql(a);fb(j|0);return 0}function ss(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0;B=r;r=r+112|0;m=B+108|0;n=B+96|0;q=B+92|0;s=B+80|0;t=B+68|0;u=B+56|0;v=B+52|0;w=B+40|0;y=B+36|0;z=B+24|0;o=B+12|0;p=B;do{if(a){a=Ss(c,43956)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](m,a);b=k[m>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](n,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[n>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;en(n);break}}else{Mb[k[c+40>>2]&127](q,a);b=k[q>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](s,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[s>>2];k[j+4>>2]=k[s+4>>2];k[j+8>>2]=k[s+8>>2];k[s>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;en(s);break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[e>>2]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[f>>2]=j;Mb[k[(k[a>>2]|0)+20>>2]&127](t,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[t>>2];k[g+4>>2]=k[t+4>>2];k[g+8>>2]=k[t+8>>2];k[t>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;Sm(t);Mb[k[(k[a>>2]|0)+24>>2]&127](u,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[u>>2];k[h+4>>2]=k[u+4>>2];k[h+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;en(u);A=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(c,43892)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](v,a);b=k[v>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](w,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[w>>2];k[j+4>>2]=k[w+4>>2];k[j+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;en(w);break}}else{Mb[k[c+40>>2]&127](y,a);b=k[y>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](z,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[z>>2];k[j+4>>2]=k[z+4>>2];k[j+8>>2]=k[z+8>>2];k[z>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;en(z);break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[e>>2]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[f>>2]=j;Mb[k[(k[a>>2]|0)+20>>2]&127](o,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[o>>2];k[g+4>>2]=k[o+4>>2];k[g+8>>2]=k[o+8>>2];k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;Sm(o);Mb[k[(k[a>>2]|0)+24>>2]&127](p,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[p>>2];k[h+4>>2]=k[p+4>>2];k[h+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;en(p);A=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=A;r=B;return}function ts(a,b,c,d,e,f,g,h,j,l,m,n,o,p,q){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var 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;k[c>>2]=a;J=p+4|0;K=p+8|0;C=o+4|0;D=(d&512|0)==0;E=o+8|0;F=(q|0)>0;G=n+4|0;H=n+8|0;I=n+1|0;A=(q|0)>0;z=0;do{switch(i[j+z>>0]|0){case 0:{k[b>>2]=k[c>>2];break}case 1:{k[b>>2]=k[c>>2];x=Vb[k[(k[g>>2]|0)+44>>2]&63](g,32)|0;y=k[c>>2]|0;k[c>>2]=y+4;k[y>>2]=x;break}case 3:{y=i[p>>0]|0;r=(y&1)==0;if((r?(y&255)>>>1:k[J>>2]|0)|0){x=k[(r?J:k[K>>2]|0)>>2]|0;y=k[c>>2]|0;k[c>>2]=y+4;k[y>>2]=x}break}case 2:{v=i[o>>0]|0;r=(v&1)==0;v=r?(v&255)>>>1:k[C>>2]|0;if(!(D|(v|0)==0)){r=r?C:k[E>>2]|0;t=r+(v<<2)|0;u=k[c>>2]|0;if(v){s=u;while(1){k[s>>2]=k[r>>2];r=r+4|0;if((r|0)==(t|0))break;else s=s+4|0}}k[c>>2]=u+(v<<2)}break}case 4:{r=k[c>>2]|0;e=h?e+4|0:e;a:do{if(e>>>0>>0){s=e;do{if(!(Qb[k[(k[g>>2]|0)+12>>2]&63](g,2048,k[s>>2]|0)|0))break a;s=s+4|0}while(s>>>0>>0)}else s=e}while(0);if(F){if(s>>>0>e>>>0&A){v=k[c>>2]|0;u=q;while(1){s=s+-4|0;t=v+4|0;k[v>>2]=k[s>>2];w=u+-1|0;u=(u|0)>1;if(s>>>0>e>>>0&u){v=t;u=w}else{v=w;break}}k[c>>2]=t;t=v}else{u=A;t=q}if(u)w=Vb[k[(k[g>>2]|0)+44>>2]&63](g,48)|0;else w=0;x=k[c>>2]|0;u=t+((t|0)<0?~t:-1)|0;if((t|0)>0){v=x;while(1){k[v>>2]=w;if((t|0)>1){v=v+4|0;t=t+-1|0}else break}}k[c>>2]=x+(u+2<<2);k[x+(u+1<<2)>>2]=l}if((s|0)==(e|0)){x=Vb[k[(k[g>>2]|0)+44>>2]&63](g,48)|0;y=k[c>>2]|0;s=y+4|0;k[c>>2]=s;k[y>>2]=x}else{x=i[n>>0]|0;t=(x&1)==0;y=k[G>>2]|0;if(!((t?(x&255)>>>1:y)|0))t=-1;else t=i[(t?I:k[H>>2]|0)>>0]|0;if((s|0)!=(e|0)){w=0;x=0;while(1){u=k[c>>2]|0;if((x|0)==(t|0)){v=u+4|0;k[c>>2]=v;k[u>>2]=m;w=w+1|0;u=i[n>>0]|0;t=(u&1)==0;if(w>>>0<(t?(u&255)>>>1:y)>>>0){t=i[(t?I:k[H>>2]|0)+w>>0]|0;u=v;t=t<<24>>24==127?-1:t<<24>>24;v=0}else{u=v;t=x;v=0}}else v=x;s=s+-4|0;x=k[s>>2]|0;k[c>>2]=u+4;k[u>>2]=x;if((s|0)==(e|0))break;else x=v+1|0}}s=k[c>>2]|0}if((r|0)!=(s|0)?(B=s+-4|0,r>>>0>>0):0){s=B;do{y=k[r>>2]|0;k[r>>2]=k[s>>2];k[s>>2]=y;r=r+4|0;s=s+-4|0}while(r>>>0>>0)}break}default:{}}z=z+1|0}while((z|0)!=4);r=i[p>>0]|0;e=(r&1)==0;r=e?(r&255)>>>1:k[J>>2]|0;if(r>>>0>1){s=e?J:k[K>>2]|0;e=s+4|0;s=s+(r<<2)|0;t=k[c>>2]|0;u=s-e|0;if((r|0)!=1){r=t;while(1){k[r>>2]=k[e>>2];e=e+4|0;if((e|0)==(s|0))break;else r=r+4|0}}k[c>>2]=t+(u>>>2<<2)}switch(d&176|0){case 32:{k[b>>2]=k[c>>2];break}case 16:break;default:k[b>>2]=a}return}function us(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;z=r;r=r+480|0;o=z+468|0;B=z+464|0;w=z+472|0;t=z+56|0;y=z+52|0;C=z+40|0;E=z+28|0;D=z+16|0;l=z+12|0;n=z+64|0;v=z+8|0;u=z+4|0;p=z;a=tn(d)|0;k[B>>2]=a;x=0;q=Aa(37,B|0,44212)|0;s=x;x=0;do{if(s&1)F=13;else{m=i[f>>0]|0;g=(m&1)==0;s=f+4|0;if(!((g?(m&255)>>>1:k[s>>2]|0)|0))m=0;else{g=k[(g?s:k[f+8>>2]|0)>>2]|0;x=0;h=Aa(k[(k[q>>2]|0)+44>>2]|0,q|0,45)|0;m=x;x=0;if(m&1){F=13;break}m=(g|0)==(h|0)}k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;x=0;za(4,c|0,m|0,B|0,w|0,t|0,y|0,C|0,E|0,D|0,l|0);j=x;x=0;if(!(j&1)){j=i[f>>0]|0;c=k[s>>2]|0;g=(j&1)==0?(j&255)>>>1:c;l=k[l>>2]|0;if((g|0)>(l|0)){G=i[D>>0]|0;h=i[E>>0]|0;g=(g-l<<1|1)+l+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((h&1)==0?(h&255)>>>1:k[E+4>>2]|0)|0}else{G=i[D>>0]|0;g=i[E>>0]|0;g=l+2+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((g&1)==0?(g&255)>>>1:k[E+4>>2]|0)|0}if(g>>>0>100){g=Pl(g<<2)|0;h=g;if(!g){x=0;Ga(6);G=x;x=0;if(!(G&1)){j=i[f>>0]|0;c=k[s>>2]|0;g=0;F=17}}else F=17}else{h=0;g=n;F=17}if((F|0)==17){G=(j&1)==0;f=G?s:k[f+8>>2]|0;x=0;wa(2,g|0,v|0,u|0,k[d+4>>2]|0,f|0,f+((G?(j&255)>>>1:c)<<2)|0,q|0,m|0,w|0,k[t>>2]|0,k[y>>2]|0,C|0,E|0,D|0,l|0);G=x;x=0;if(!(G&1)?(k[p>>2]=k[b>>2],G=k[v>>2]|0,A=k[u>>2]|0,x=0,k[o>>2]=k[p>>2],A=sa(40,o|0,g|0,G|0,A|0,d|0,e|0)|0,G=x,x=0,!(G&1)):0){if(h){Ql(h);a=k[B>>2]|0}en(D);en(E);Sm(C);zm(a)|0;r=z;return A|0}}g=Wa()|0;if(h){Ql(h);a=k[B>>2]|0}}else g=Wa()|0;en(D);en(E);Sm(C)}}while(0);if((F|0)==13)g=Wa()|0;zm(a)|0;fb(g|0);return 0}function vs(a){a=a|0;return}function ws(a){a=a|0;mj(a);return}function xs(a,b,c){a=a|0;b=b|0;c=c|0;a=vk((i[b>>0]&1)==0?b+1|0:k[b+8>>2]|0,1)|0;return a>>>((a|0)!=(-1|0)&1)|0}function ys(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0;h=r;r=r+16|0;j=h;k[j>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;g=i[f>>0]|0;l=(g&1)==0;b=l?f+1|0:k[f+8>>2]|0;g=l?(g&255)>>>1:k[f+4>>2]|0;f=b+g|0;a:do{if((g|0)>0){while(1){x=0;ra(67,j|0,i[b>>0]|0);l=x;x=0;if(l&1)break;b=b+1|0;if(b>>>0>=f>>>0){g=4;break a}}b=Wa()|0;g=7}else g=4}while(0);b:do{if((g|0)==4){x=0;b=Ea(19,((c|0)==-1?-1:c<<1)|0,d|0,e|0,((i[j>>0]&1)==0?j+1|0:k[j+8>>2]|0)|0)|0;l=x;x=0;if(l&1){b=Wa()|0;g=7;break}k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;l=xl(b)|0;f=b+l|0;c:do{if((l|0)>0){while(1){x=0;ra(67,a|0,i[b>>0]|0);l=x;x=0;if(l&1)break;b=b+1|0;if(b>>>0>=f>>>0)break c}b=Wa()|0;Sm(a);break b}}while(0);Sm(j);r=h;return}}while(0);Sm(j);fb(b|0)}function zs(a,b){a=a|0;b=b|0;return}function As(a){a=a|0;return}function Bs(a){a=a|0;mj(a);return}function Cs(a,b,c){a=a|0;b=b|0;c=c|0;a=vk((i[b>>0]&1)==0?b+1|0:k[b+8>>2]|0,1)|0;return a>>>((a|0)!=(-1|0)&1)|0}function Ds(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;v=r;r=r+224|0;n=v+184|0;m=v+192|0;l=v+180|0;o=v+176|0;t=v+168|0;s=v+40|0;q=v+32|0;u=v+28|0;w=v+16|0;j=v+8|0;p=v;k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;k[j+4>>2]=0;k[j>>2]=44696;h=i[f>>0]|0;y=(h&1)==0;g=f+4|0;b=y?g:k[f+8>>2]|0;f=y?(h&255)>>>1:k[g>>2]|0;g=b+(f<<2)|0;h=m+32|0;a:do{if((f|0)>0){b:while(1){k[o>>2]=b;x=0;f=Ha(k[(k[j>>2]|0)+12>>2]|0,j|0,n|0,b|0,g|0,o|0,m|0,h|0,l|0)|0;y=x;x=0;if(y&1){f=12;break}if((f|0)==2?1:(k[o>>2]|0)==(b|0)){f=5;break}if(m>>>0<(k[l>>2]|0)>>>0){b=m;do{x=0;ra(67,w|0,i[b>>0]|0);y=x;x=0;if(y&1){f=11;break b}b=b+1|0}while(b>>>0<(k[l>>2]|0)>>>0)}b=k[o>>2]|0;if(!((f|0)!=2&b>>>0>>0)){f=9;break a}}if((f|0)==5){x=0;qa(190,58955);x=0;b=Wa()|0}else if((f|0)==11)b=Wa()|0;else if((f|0)==12)b=Wa()|0}else f=9}while(0);c:do{if((f|0)==9){x=0;b=Ea(19,((c|0)==-1?-1:c<<1)|0,d|0,e|0,((i[w>>0]&1)==0?w+1|0:k[w+8>>2]|0)|0)|0;y=x;x=0;if(y&1){b=Wa()|0;break}k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[p+4>>2]=0;k[p>>2]=44744;y=xl(b)|0;g=b+y|0;h=g;j=s+128|0;d:do{if((y|0)>0){e:while(1){k[u>>2]=b;x=0;f=Ha(k[(k[p>>2]|0)+16>>2]|0,p|0,t|0,b|0,((h-b|0)>32?b+32|0:g)|0,u|0,s|0,j|0,q|0)|0;y=x;x=0;if(y&1){f=24;break}if((f|0)==2?1:(k[u>>2]|0)==(b|0)){f=18;break}if(s>>>0<(k[q>>2]|0)>>>0){b=s;do{x=0;ra(92,a|0,k[b>>2]|0);y=x;x=0;if(y&1){f=23;break e}b=b+4|0}while(b>>>0<(k[q>>2]|0)>>>0)}b=k[u>>2]|0;if(!((f|0)!=2&b>>>0>>0))break d}if((f|0)==18){x=0;qa(190,58955);x=0;b=Wa()|0}else if((f|0)==23)b=Wa()|0;else if((f|0)==24)b=Wa()|0;en(a);break c}}while(0);Sm(w);r=v;return}}while(0);Sm(w);fb(b|0)}function Es(a,b){a=a|0;b=b|0;return}function Fs(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;k[a+4>>2]=b+-1;k[a>>2]=44196;f=a+8|0;x=0;ra(94,f|0,28);e=x;x=0;if(e&1)b=Wa()|0;else{e=a+144|0;x=0;Fa(5,e|0,58885,1);d=x;x=0;if(d&1)b=Wa()|0;else{c=k[f>>2]|0;d=a+12|0;b=k[d>>2]|0;if((b|0)!=(c|0)){do{b=b+-4|0}while((b|0)!=(c|0));k[d>>2]=b}k[495]=0;k[494]=43124;x=0;ra(95,a|0,1976);d=x;x=0;do{if(((((((((((((!(d&1)?(k[497]=0,k[496]=43164,x=0,ra(96,a|0,1984),d=x,x=0,!(d&1)):0)?(k[499]=0,k[498]=44236,k[500]=0,i[2004]=0,d=Ys()|0,k[500]=d,x=0,ra(97,a|0,1992),d=x,x=0,!(d&1)):0)?(k[503]=0,k[502]=44484,x=0,ra(98,a|0,2008),d=x,x=0,!(d&1)):0)?(k[505]=0,k[504]=44552,x=0,ra(99,a|0,2016),d=x,x=0,!(d&1)):0)?(x=0,ra(100,2024,1),d=x,x=0,!(d&1)):0)?(x=0,ra(101,a|0,2024),d=x,x=0,!(d&1)):0)?(k[511]=0,k[510]=44600,x=0,ra(102,a|0,2040),d=x,x=0,!(d&1)):0)?(k[513]=0,k[512]=44648,x=0,ra(103,a|0,2048),d=x,x=0,!(d&1)):0)?(bu(2056,1),x=0,ra(104,a|0,2056),d=x,x=0,!(d&1)):0)?(cu(2080,1),x=0,ra(105,a|0,2080),d=x,x=0,!(d&1)):0)?(k[529]=0,k[528]=43204,x=0,ra(106,a|0,2112),d=x,x=0,!(d&1)):0)?(k[531]=0,k[530]=43276,x=0,ra(107,a|0,2120),d=x,x=0,!(d&1)):0)?(k[533]=0,k[532]=43348,x=0,ra(108,a|0,2128),d=x,x=0,!(d&1)):0){k[535]=0;k[534]=43408;x=0;ra(109,a|0,2136);d=x;x=0;if(d&1){g=42;break}k[537]=0;k[536]=43716;x=0;ra(110,a|0,2144);d=x;x=0;if(d&1){g=42;break}k[539]=0;k[538]=43780;x=0;ra(111,a|0,2152);d=x;x=0;if(d&1){g=42;break}k[541]=0;k[540]=43844;x=0;ra(112,a|0,2160);d=x;x=0;if(d&1){g=42;break}k[543]=0;k[542]=43908;x=0;ra(113,a|0,2168);d=x;x=0;if(d&1){g=42;break}k[545]=0;k[544]=43972;x=0;ra(114,a|0,2176);d=x;x=0;if(d&1){g=42;break}k[547]=0;k[546]=44008;x=0;ra(115,a|0,2184);d=x;x=0;if(d&1){g=42;break}k[549]=0;k[548]=44044;x=0;ra(116,a|0,2192);d=x;x=0;if(d&1){g=42;break}k[551]=0;k[550]=44080;x=0;ra(117,a|0,2200);d=x;x=0;if(d&1){g=42;break}k[553]=0;k[552]=43468;k[554]=43516;x=0;ra(118,a|0,2208);d=x;x=0;if(d&1){g=42;break}k[557]=0;k[556]=43560;k[558]=43608;x=0;ra(119,a|0,2224);d=x;x=0;if(d&1){g=42;break}k[561]=0;k[560]=44464;x=0;b=Da(3)|0;d=x;x=0;if(d&1){b=Wa()|0;break}k[562]=b;k[560]=43652;x=0;ra(120,a|0,2240);d=x;x=0;if(d&1){g=42;break}k[565]=0;k[564]=44464;x=0;b=Da(3)|0;d=x;x=0;if(d&1){b=Wa()|0;break}k[566]=b;k[564]=43684;x=0;ra(121,a|0,2256);g=x;x=0;if(g&1){g=42;break}k[569]=0;k[568]=44116;x=0;ra(122,a|0,2272);g=x;x=0;if(g&1){g=42;break}k[571]=0;k[570]=44156;x=0;ra(123,a|0,2280);g=x;x=0;if(g&1){g=42;break}return}else g=42}while(0);if((g|0)==42)b=Wa()|0;Sm(e)}Nv(f)}fb(b|0)}function Gs(){var a=0;do{if((i[2288]|0)==0?(Qa(2288)|0)!=0:0){x=0;Da(4)|0;a=x;x=0;if(a&1){a=Wa()|0;Bb(2288);fb(a|0)}else{k[11246]=44980;Ya(2288);break}}}while(0);return k[11246]|0}function Hs(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;ym(b);e=a+8|0;d=k[e>>2]|0;do{if((k[a+12>>2]|0)-d>>2>>>0<=c>>>0){x=0;ra(124,e|0,c+1|0);a=x;x=0;if(!(a&1)){d=k[e>>2]|0;break}d=Wa()|0;if(b)zm(b)|0;fb(d|0)}}while(0);a=k[d+(c<<2)>>2]|0;if(a){zm(a)|0;d=k[e>>2]|0}k[d+(c<<2)>>2]=b;return}function Is(a){a=a|0;var b=0,c=0,d=0,e=0;k[a>>2]=44196;d=a+8|0;e=a+12|0;b=k[d>>2]|0;if((k[e>>2]|0)!=(b|0)){c=0;do{b=k[b+(c<<2)>>2]|0;if(b)zm(b)|0;c=c+1|0;b=k[d>>2]|0}while(c>>>0<(k[e>>2]|0)-b>>2>>>0)}Sm(a+144|0);Nv(d);return}function Js(a){a=a|0;Is(a);mj(a);return}function Ks(a,b){a=a|0;b=b|0;if(Pv(a,b)|0)return k[(k[a+8>>2]|0)+(b<<2)>>2]|0;else{a=Va(4)|0;Aj(a);ub(a|0,640,82)}return 0}function Ls(){Fs(2296,1);k[11245]=2296;return 44980}function Ms(){var a=0;a=Gs()|0;a=k[a>>2]|0;k[11247]=a;ym(a);return 44988}function Ns(){var a=0;do{if((i[2456]|0)==0?(Qa(2456)|0)!=0:0){x=0;Da(5)|0;a=x;x=0;if(a&1){a=Wa()|0;Bb(2456);fb(a|0)}else{k[11248]=44988;Ya(2456);break}}}while(0);return k[11248]|0}function Os(a){a=a|0;var b=0,c=0;x=0;b=Da(6)|0;c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}else{c=k[b>>2]|0;k[a>>2]=c;ym(c);return}}function Ps(a,b){a=a|0;b=b|0;b=k[b>>2]|0;k[a>>2]=b;ym(b);return}function Qs(a){a=a|0;zm(k[a>>2]|0)|0;return}function Rs(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;if((k[a>>2]|0)!=-1){k[b>>2]=a;k[b+4>>2]=191;k[b+8>>2]=0;Om(a,b,192)}r=c;return(k[a+4>>2]|0)+-1|0}function Ss(a,b){a=a|0;b=b|0;a=k[a>>2]|0;return Ks(a,Rs(b)|0)|0}function Ts(a){a=a|0;mj(a);return}function Us(a){a=a|0;if(a)Lb[k[(k[a>>2]|0)+4>>2]&255](a);return}function Vs(a){a=a|0;var b=0;b=k[11052]|0;k[11052]=b+1;k[a+4>>2]=b+1;return}function Ws(a){a=a|0;mj(a);return}function Xs(a,b,c){a=a|0;b=b|0;c=c|0;if(c>>>0<128){c=(Ys()|0)+(c<<1)|0;c=(j[c>>1]&b)<<16>>16!=0}else c=0;return c|0}function Ys(){var a=0,b=0;x=0;a=Da(7)|0;b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else return k[a>>2]|0;return 0}function Zs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=(c-b|0)>>>2;if((b|0)!=(c|0)){e=b;while(1){a=k[e>>2]|0;if(a>>>0<128){a=(Ys()|0)+(a<<1)|0;a=m[a>>1]|0}else a=0;j[d>>1]=a;e=e+4|0;if((e|0)==(c|0))break;else d=d+2|0}}return b+(f<<2)|0}function _s(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a:do{if((c|0)==(d|0))c=d;else while(1){a=k[c>>2]|0;if(a>>>0<128?(a=(Ys()|0)+(a<<1)|0,(j[a>>1]&b)<<16>>16!=0):0)break a;c=c+4|0;if((c|0)==(d|0)){c=d;break}}}while(0);return c|0}function $s(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a:do{if((c|0)==(d|0))c=d;else while(1){a=k[c>>2]|0;if(a>>>0>=128)break a;a=(Ys()|0)+(a<<1)|0;if(!((j[a>>1]&b)<<16>>16))break a;c=c+4|0;if((c|0)==(d|0)){c=d;break}}}while(0);return c|0}function at(a,b){a=a|0;b=b|0;if(b>>>0<128){b=(bt()|0)+(b<<2)|0;b=k[b>>2]|0}return b|0}function bt(){var a=0,b=0;x=0;a=Da(8)|0;b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else return k[a>>2]|0;return 0}function ct(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=(c-b|0)>>>2;if((b|0)!=(c|0)){d=b;do{a=k[d>>2]|0;if(a>>>0<128){a=(bt()|0)+(a<<2)|0;a=k[a>>2]|0}k[d>>2]=a;d=d+4|0}while((d|0)!=(c|0))}return b+(e<<2)|0}function dt(a,b){a=a|0;b=b|0;if(b>>>0<128){b=(et()|0)+(b<<2)|0;b=k[b>>2]|0}return b|0}function et(){var a=0,b=0;x=0;a=Da(9)|0;b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else return k[a>>2]|0;return 0}function ft(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=(c-b|0)>>>2;if((b|0)!=(c|0)){d=b;do{a=k[d>>2]|0;if(a>>>0<128){a=(et()|0)+(a<<2)|0;a=k[a>>2]|0}k[d>>2]=a;d=d+4|0}while((d|0)!=(c|0))}return b+(e<<2)|0}function gt(a,b){a=a|0;b=b|0;return b<<24>>24|0}function ht(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((b|0)!=(c|0))while(1){k[d>>2]=i[b>>0];b=b+1|0;if((b|0)==(c|0))break;else d=d+4|0}return c|0}function it(a,b,c){a=a|0;b=b|0;c=c|0;return(b>>>0<128?b&255:c)|0}function jt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=(c-b|0)>>>2;if((b|0)!=(c|0)){f=b;a=e;while(1){e=k[f>>2]|0;i[a>>0]=e>>>0<128?e&255:d;f=f+4|0;if((f|0)==(c|0))break;else a=a+1|0}}return b+(g<<2)|0}function kt(a){a=a|0;var b=0;k[a>>2]=44236;b=k[a+8>>2]|0;if((b|0)!=0?(i[a+12>>0]|0)!=0:0)nj(b);return}function lt(a){a=a|0;kt(a);mj(a);return}function mt(a,b){a=a|0;b=b|0;if(b<<24>>24>-1){b=(bt()|0)+((b&255)<<2)|0;b=k[b>>2]&255}return b|0}function nt(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=(c|0)){a=b;do{b=i[a>>0]|0;if(b<<24>>24>-1){b=(bt()|0)+(b<<24>>24<<2)|0;b=k[b>>2]&255}i[a>>0]=b;a=a+1|0}while((a|0)!=(c|0))}return c|0}function ot(a,b){a=a|0;b=b|0;if(b<<24>>24>-1){b=(et()|0)+(b<<24>>24<<2)|0;b=k[b>>2]&255}return b|0}function pt(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=(c|0)){a=b;do{b=i[a>>0]|0;if(b<<24>>24>-1){b=(et()|0)+(b<<24>>24<<2)|0;b=k[b>>2]&255}i[a>>0]=b;a=a+1|0}while((a|0)!=(c|0))}return c|0}function qt(a,b){a=a|0;b=b|0;return b|0}function rt(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((b|0)!=(c|0))while(1){i[d>>0]=i[b>>0]|0;b=b+1|0;if((b|0)==(c|0))break;else d=d+1|0}return c|0}function st(a,b,c){a=a|0;b=b|0;c=c|0;return(b<<24>>24>-1?b:c)|0}function tt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if((b|0)!=(c|0))while(1){a=i[b>>0]|0;i[e>>0]=a<<24>>24>-1?a:d;b=b+1|0;if((b|0)==(c|0))break;else e=e+1|0}return c|0}function ut(a){a=a|0;mj(a);return}function vt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;k[e>>2]=c;k[h>>2]=f;return 3}function wt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;k[e>>2]=c;k[h>>2]=f;return 3}function xt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;k[e>>2]=c;return 3}function yt(a){a=a|0;return 1}function zt(a){a=a|0;return 1}function At(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a=d-c|0;return(a>>>0>>0?a:e)|0}function Bt(a){a=a|0;return 1}function Ct(a,b){a=a|0;b=b|0;var c=0;k[a+4>>2]=b+-1;k[a>>2]=44304;x=0;b=Da(3)|0;c=x;x=0;if(c&1){c=Wa()|0;fb(c|0)}else{k[a+8>>2]=b;return}}function Dt(a){a=a|0;Gu(a);mj(a);return}function Hl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,m=0,n=0,o=0,q=0,s=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,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;ga=r;r=r+624|0;ba=ga+24|0;da=ga+16|0;ca=ga+588|0;Y=ga+576|0;aa=ga;V=ga+536|0;fa=ga+8|0;ea=ga+528|0;L=(a|0)!=0;N=V+40|0;U=N;V=V+39|0;W=fa+4|0;X=Y+12|0;Y=Y+11|0;Z=ca;_=X;$=_-Z|0;O=-2-Z|0;P=_+2|0;Q=ba+288|0;R=ca+9|0;S=R;T=ca+8|0;f=0;w=b;g=0;b=0;a:while(1){do{if((f|0)>-1)if((g|0)>(2147483647-f|0)){f=mk()|0;k[f>>2]=75;f=-1;break}else{f=g+f|0;break}}while(0);g=i[w>>0]|0;if(!(g<<24>>24)){K=245;break}else h=w;b:while(1){switch(g<<24>>24){case 37:{g=h;K=9;break b}case 0:{g=h;break b}default:{}}J=h+1|0;g=i[J>>0]|0;h=J}c:do{if((K|0)==9)while(1){K=0;if((i[g+1>>0]|0)!=37)break c;h=h+1|0;g=g+2|0;if((i[g>>0]|0)==37)K=9;else break}}while(0);y=h-w|0;if(L?(k[a>>2]&32|0)==0:0)fl(w,y,a)|0;if((h|0)!=(w|0)){w=g;g=y;continue}o=g+1|0;h=i[o>>0]|0;m=(h<<24>>24)+-48|0;if(m>>>0<10){J=(i[g+2>>0]|0)==36;o=J?g+3|0:o;h=i[o>>0]|0;u=J?m:-1;b=J?1:b}else u=-1;g=h<<24>>24;d:do{if((g&-32|0)==32){m=0;while(1){if(!(1<>24)+-32|m;o=o+1|0;h=i[o>>0]|0;g=h<<24>>24;if((g&-32|0)!=32){q=m;g=o;break}}}else{q=0;g=o}}while(0);do{if(h<<24>>24==42){m=g+1|0;h=(i[m>>0]|0)+-48|0;if(h>>>0<10?(i[g+2>>0]|0)==36:0){k[e+(h<<2)>>2]=10;b=1;g=g+3|0;h=k[d+((i[m>>0]|0)+-48<<3)>>2]|0}else{if(b){f=-1;break a}if(!L){x=q;g=m;b=0;J=0;break}b=(k[c>>2]|0)+(4-1)&~(4-1);h=k[b>>2]|0;k[c>>2]=b+4;b=0;g=m}if((h|0)<0){x=q|8192;J=0-h|0}else{x=q;J=h}}else{m=(h<<24>>24)+-48|0;if(m>>>0<10){h=0;do{h=(h*10|0)+m|0;g=g+1|0;m=(i[g>>0]|0)+-48|0}while(m>>>0<10);if((h|0)<0){f=-1;break a}else{x=q;J=h}}else{x=q;J=0}}}while(0);e:do{if((i[g>>0]|0)==46){m=g+1|0;h=i[m>>0]|0;if(h<<24>>24!=42){o=(h<<24>>24)+-48|0;if(o>>>0<10){g=m;h=0}else{g=m;o=0;break}while(1){h=(h*10|0)+o|0;g=g+1|0;o=(i[g>>0]|0)+-48|0;if(o>>>0>=10){o=h;break e}}}m=g+2|0;h=(i[m>>0]|0)+-48|0;if(h>>>0<10?(i[g+3>>0]|0)==36:0){k[e+(h<<2)>>2]=10;g=g+4|0;o=k[d+((i[m>>0]|0)+-48<<3)>>2]|0;break}if(b){f=-1;break a}if(L){g=(k[c>>2]|0)+(4-1)&~(4-1);o=k[g>>2]|0;k[c>>2]=g+4;g=m}else{g=m;o=0}}else o=-1}while(0);s=0;while(1){h=(i[g>>0]|0)+-65|0;if(h>>>0>57){f=-1;break a}m=g+1|0;h=i[56223+(s*58|0)+h>>0]|0;q=h&255;if((q+-1|0)>>>0<8){g=m;s=q}else{I=m;break}}if(!(h<<24>>24)){f=-1;break}m=(u|0)>-1;do{if(h<<24>>24==19)if(m){f=-1;break a}else K=52;else{if(m){k[e+(u<<2)>>2]=q;G=d+(u<<3)|0;H=k[G+4>>2]|0;K=aa;k[K>>2]=k[G>>2];k[K+4>>2]=H;K=52;break}if(!L){f=0;break a}Ml(aa,q,c)}}while(0);if((K|0)==52?(K=0,!L):0){w=I;g=y;continue}u=i[g>>0]|0;u=(s|0)!=0&(u&15|0)==3?u&-33:u;m=x&-65537;H=(x&8192|0)==0?x:m;f:do{switch(u|0){case 110:switch(s|0){case 0:{k[k[aa>>2]>>2]=f;w=I;g=y;continue a}case 1:{k[k[aa>>2]>>2]=f;w=I;g=y;continue a}case 2:{w=k[aa>>2]|0;k[w>>2]=f;k[w+4>>2]=((f|0)<0)<<31>>31;w=I;g=y;continue a}case 3:{j[k[aa>>2]>>1]=f;w=I;g=y;continue a}case 4:{i[k[aa>>2]>>0]=f;w=I;g=y;continue a}case 6:{k[k[aa>>2]>>2]=f;w=I;g=y;continue a}case 7:{w=k[aa>>2]|0;k[w>>2]=f;k[w+4>>2]=((f|0)<0)<<31>>31;w=I;g=y;continue a}default:{w=I;g=y;continue a}}case 112:{s=H|8;o=o>>>0>8?o:8;u=120;K=64;break}case 88:case 120:{s=H;K=64;break}case 111:{m=aa;h=k[m>>2]|0;m=k[m+4>>2]|0;if((h|0)==0&(m|0)==0)g=N;else{g=N;do{g=g+-1|0;i[g>>0]=h&7|48;h=uw(h|0,m|0,3)|0;m=M}while(!((h|0)==0&(m|0)==0))}if(!(H&8)){h=H;s=0;q=56703;K=77}else{s=U-g+1|0;h=H;o=(o|0)<(s|0)?s:o;s=0;q=56703;K=77}break}case 105:case 100:{h=aa;g=k[h>>2]|0;h=k[h+4>>2]|0;if((h|0)<0){g=rw(0,0,g|0,h|0)|0;h=M;m=aa;k[m>>2]=g;k[m+4>>2]=h;m=1;q=56703;K=76;break f}if(!(H&2048)){q=H&1;m=q;q=(q|0)==0?56703:56705;K=76}else{m=1;q=56704;K=76}break}case 117:{h=aa;g=k[h>>2]|0;h=k[h+4>>2]|0;m=0;q=56703;K=76;break}case 99:{i[V>>0]=k[aa>>2];w=V;h=1;s=0;u=56703;g=N;break}case 109:{g=mk()|0;g=nk(k[g>>2]|0)|0;K=82;break}case 115:{g=k[aa>>2]|0;g=(g|0)!=0?g:56713;K=82;break}case 67:{k[fa>>2]=k[aa>>2];k[W>>2]=0;k[aa>>2]=fa;o=-1;K=86;break}case 83:{if(!o){Ol(a,32,J,0,H);g=0;K=98}else K=86;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{n=+p[aa>>3];k[da>>2]=0;p[t>>3]=n;if((k[t+4>>2]|0)>=0)if(!(H&2048)){G=H&1;F=G;G=(G|0)==0?56721:56726}else{F=1;G=56723}else{n=-n;F=1;G=56720}p[t>>3]=n;E=k[t+4>>2]&2146435072;do{if(E>>>0<2146435072|(E|0)==2146435072&0<0){v=+Gk(n,da)*2;h=v!=0;if(h)k[da>>2]=(k[da>>2]|0)+-1;C=u|32;if((C|0)==97){w=u&32;y=(w|0)==0?G:G+9|0;x=F|2;g=12-o|0;do{if(!(o>>>0>11|(g|0)==0)){n=8;do{g=g+-1|0;n=n*16}while((g|0)!=0);if((i[y>>0]|0)==45){n=-(n+(-v-n));break}else{n=v+n-n;break}}else n=v}while(0);h=k[da>>2]|0;g=(h|0)<0?0-h|0:h;g=Nl(g,((g|0)<0)<<31>>31,X)|0;if((g|0)==(X|0)){i[Y>>0]=48;g=Y}i[g+-1>>0]=(h>>31&2)+43;s=g+-2|0;i[s>>0]=u+15;q=(o|0)<1;m=(H&8|0)==0;h=ca;while(1){G=~~n;g=h+1|0;i[h>>0]=l[56687+G>>0]|w;n=(n-+(G|0))*16;do{if((g-Z|0)==1){if(m&(q&n==0))break;i[g>>0]=46;g=h+2|0}}while(0);if(!(n!=0))break;else h=g}o=(o|0)!=0&(O+g|0)<(o|0)?P+o-s|0:$-s+g|0;m=o+x|0;Ol(a,32,J,m,H);if(!(k[a>>2]&32))fl(y,x,a)|0;Ol(a,48,J,m,H^65536);g=g-Z|0;if(!(k[a>>2]&32))fl(ca,g,a)|0;h=_-s|0;Ol(a,48,o-(g+h)|0,0,0);if(!(k[a>>2]&32))fl(s,h,a)|0;Ol(a,32,J,m,H^8192);g=(m|0)<(J|0)?J:m;break}g=(o|0)<0?6:o;if(h){h=(k[da>>2]|0)+-28|0;k[da>>2]=h;n=v*268435456}else{n=v;h=k[da>>2]|0}E=(h|0)<0?ba:Q;D=E;h=E;do{B=~~n>>>0;k[h>>2]=B;h=h+4|0;n=(n-+(B>>>0))*1e9}while(n!=0);m=h;h=k[da>>2]|0;if((h|0)>0){q=E;while(1){s=(h|0)>29?29:h;o=m+-4|0;do{if(o>>>0>>0)o=q;else{h=0;do{B=ww(k[o>>2]|0,0,s|0)|0;B=tw(B|0,M|0,h|0,0)|0;h=M;A=Fw(B|0,h|0,1e9,0)|0;k[o>>2]=A;h=Ew(B|0,h|0,1e9,0)|0;o=o+-4|0}while(o>>>0>=q>>>0);if(!h){o=q;break}o=q+-4|0;k[o>>2]=h}}while(0);while(1){if(m>>>0<=o>>>0)break;h=m+-4|0;if(!(k[h>>2]|0))m=h;else break}h=(k[da>>2]|0)-s|0;k[da>>2]=h;if((h|0)>0)q=o;else break}}else o=E;if((h|0)<0){y=((g+25|0)/9|0)+1|0;z=(C|0)==102;w=o;while(1){x=0-h|0;x=(x|0)>9?9:x;do{if(w>>>0>>0){h=(1<>>x;o=0;s=w;do{B=k[s>>2]|0;k[s>>2]=(B>>>x)+o;o=ia(B&h,q)|0;s=s+4|0}while(s>>>0>>0);h=(k[w>>2]|0)==0?w+4|0:w;if(!o){o=h;break}k[m>>2]=o;o=h;m=m+4|0}else o=(k[w>>2]|0)==0?w+4|0:w}while(0);h=z?E:o;m=(m-h>>2|0)>(y|0)?h+(y<<2)|0:m;h=(k[da>>2]|0)+x|0;k[da>>2]=h;if((h|0)>=0){w=o;break}else w=o}}else w=o;do{if(w>>>0>>0){h=(D-w>>2)*9|0;q=k[w>>2]|0;if(q>>>0<10)break;else o=10;do{o=o*10|0;h=h+1|0}while(q>>>0>=o>>>0)}else h=0}while(0);A=(C|0)==103;B=(g|0)!=0;o=g-((C|0)!=102?h:0)+((B&A)<<31>>31)|0;if((o|0)<(((m-D>>2)*9|0)+-9|0)){s=o+9216|0;z=(s|0)/9|0;o=E+(z+-1023<<2)|0;s=((s|0)%9|0)+1|0;if((s|0)<9){q=10;do{q=q*10|0;s=s+1|0}while((s|0)!=9)}else q=10;x=k[o>>2]|0;y=(x>>>0)%(q>>>0)|0;if((y|0)==0?(E+(z+-1022<<2)|0)==(m|0):0)q=w;else K=163;do{if((K|0)==163){K=0;v=(((x>>>0)/(q>>>0)|0)&1|0)==0?9007199254740992:9007199254740994;s=(q|0)/2|0;do{if(y>>>0>>0)n=.5;else{if((y|0)==(s|0)?(E+(z+-1022<<2)|0)==(m|0):0){n=1;break}n=1.5}}while(0);do{if(F){if((i[G>>0]|0)!=45)break;v=-v;n=-n}}while(0);s=x-y|0;k[o>>2]=s;if(!(v+n!=v)){q=w;break}C=s+q|0;k[o>>2]=C;if(C>>>0>999999999){h=w;while(1){q=o+-4|0;k[o>>2]=0;if(q>>>0>>0){h=h+-4|0;k[h>>2]=0}C=(k[q>>2]|0)+1|0;k[q>>2]=C;if(C>>>0>999999999)o=q;else{w=h;o=q;break}}}h=(D-w>>2)*9|0;s=k[w>>2]|0;if(s>>>0<10){q=w;break}else q=10;do{q=q*10|0;h=h+1|0}while(s>>>0>=q>>>0);q=w}}while(0);C=o+4|0;w=q;m=m>>>0>C>>>0?C:m}y=0-h|0;while(1){if(m>>>0<=w>>>0){z=0;C=m;break}o=m+-4|0;if(!(k[o>>2]|0))m=o;else{z=1;C=m;break}}do{if(A){g=(B&1^1)+g|0;if((g|0)>(h|0)&(h|0)>-5){u=u+-1|0;g=g+-1-h|0}else{u=u+-2|0;g=g+-1|0}m=H&8;if(m)break;do{if(z){m=k[C+-4>>2]|0;if(!m){o=9;break}if(!((m>>>0)%10|0)){q=10;o=0}else{o=0;break}do{q=q*10|0;o=o+1|0}while(((m>>>0)%(q>>>0)|0|0)==0)}else o=9}while(0);m=((C-D>>2)*9|0)+-9|0;if((u|32|0)==102){m=m-o|0;m=(m|0)<0?0:m;g=(g|0)<(m|0)?g:m;m=0;break}else{m=m+h-o|0;m=(m|0)<0?0:m;g=(g|0)<(m|0)?g:m;m=0;break}}else m=H&8}while(0);x=g|m;q=(x|0)!=0&1;s=(u|32|0)==102;if(s){h=(h|0)>0?h:0;u=0}else{o=(h|0)<0?y:h;o=Nl(o,((o|0)<0)<<31>>31,X)|0;if((_-o|0)<2)do{o=o+-1|0;i[o>>0]=48}while((_-o|0)<2);i[o+-1>>0]=(h>>31&2)+43;D=o+-2|0;i[D>>0]=u;h=_-D|0;u=D}y=F+1+g+q+h|0;Ol(a,32,J,y,H);if(!(k[a>>2]&32))fl(G,F,a)|0;Ol(a,48,J,y,H^65536);do{if(s){o=w>>>0>E>>>0?E:w;h=o;do{m=Nl(k[h>>2]|0,0,R)|0;do{if((h|0)==(o|0)){if((m|0)!=(R|0))break;i[T>>0]=48;m=T}else{if(m>>>0<=ca>>>0)break;do{m=m+-1|0;i[m>>0]=48}while(m>>>0>ca>>>0)}}while(0);if(!(k[a>>2]&32))fl(m,S-m|0,a)|0;h=h+4|0}while(h>>>0<=E>>>0);do{if(x){if(k[a>>2]&32)break;fl(56755,1,a)|0}}while(0);if((g|0)>0&h>>>0>>0){m=h;while(1){h=Nl(k[m>>2]|0,0,R)|0;if(h>>>0>ca>>>0)do{h=h+-1|0;i[h>>0]=48}while(h>>>0>ca>>>0);if(!(k[a>>2]&32))fl(h,(g|0)>9?9:g,a)|0;m=m+4|0;h=g+-9|0;if(!((g|0)>9&m>>>0>>0)){g=h;break}else g=h}}Ol(a,48,g+9|0,9,0)}else{s=z?C:w+4|0;if((g|0)>-1){q=(m|0)==0;o=w;do{h=Nl(k[o>>2]|0,0,R)|0;if((h|0)==(R|0)){i[T>>0]=48;h=T}do{if((o|0)==(w|0)){m=h+1|0;if(!(k[a>>2]&32))fl(h,1,a)|0;if(q&(g|0)<1){h=m;break}if(k[a>>2]&32){h=m;break}fl(56755,1,a)|0;h=m}else{if(h>>>0<=ca>>>0)break;do{h=h+-1|0;i[h>>0]=48}while(h>>>0>ca>>>0)}}while(0);m=S-h|0;if(!(k[a>>2]&32))fl(h,(g|0)>(m|0)?m:g,a)|0;g=g-m|0;o=o+4|0}while(o>>>0>>0&(g|0)>-1)}Ol(a,48,g+18|0,18,0);if(k[a>>2]&32)break;fl(u,_-u|0,a)|0}}while(0);Ol(a,32,J,y,H^8192);g=(y|0)<(J|0)?J:y}else{s=(u&32|0)!=0;q=n!=n|0!=0;h=q?0:F;o=h+3|0;Ol(a,32,J,o,m);g=k[a>>2]|0;if(!(g&32)){fl(G,h,a)|0;g=k[a>>2]|0}if(!(g&32))fl(q?s?56747:56751:s?56739:56743,3,a)|0;Ol(a,32,J,o,H^8192);g=(o|0)<(J|0)?J:o}}while(0);w=I;continue a}default:{m=H;h=o;s=0;u=56703;g=N}}}while(0);g:do{if((K|0)==64){m=aa;h=k[m>>2]|0;m=k[m+4>>2]|0;q=u&32;if(!((h|0)==0&(m|0)==0)){g=N;do{g=g+-1|0;i[g>>0]=l[56687+(h&15)>>0]|q;h=uw(h|0,m|0,4)|0;m=M}while(!((h|0)==0&(m|0)==0));K=aa;if((s&8|0)==0|(k[K>>2]|0)==0&(k[K+4>>2]|0)==0){h=s;s=0;q=56703;K=77}else{h=s;s=2;q=56703+(u>>4)|0;K=77}}else{g=N;h=s;s=0;q=56703;K=77}}else if((K|0)==76){g=Nl(g,h,N)|0;h=H;s=m;K=77}else if((K|0)==82){K=0;H=tl(g,0,o)|0;G=(H|0)==0;w=g;h=G?o:H-g|0;s=0;u=56703;g=G?g+o|0:H}else if((K|0)==86){K=0;h=0;g=0;q=k[aa>>2]|0;while(1){m=k[q>>2]|0;if(!m)break;g=Sk(ea,m)|0;if((g|0)<0|g>>>0>(o-h|0)>>>0)break;h=g+h|0;if(o>>>0>h>>>0)q=q+4|0;else break}if((g|0)<0){f=-1;break a}Ol(a,32,J,h,H);if(!h){g=0;K=98}else{m=0;o=k[aa>>2]|0;while(1){g=k[o>>2]|0;if(!g){g=h;K=98;break g}g=Sk(ea,g)|0;m=g+m|0;if((m|0)>(h|0)){g=h;K=98;break g}if(!(k[a>>2]&32))fl(ea,g,a)|0;if(m>>>0>=h>>>0){g=h;K=98;break}else o=o+4|0}}}}while(0);if((K|0)==98){K=0;Ol(a,32,J,g,H^8192);w=I;g=(J|0)>(g|0)?J:g;continue}if((K|0)==77){K=0;m=(o|0)>-1?h&-65537:h;h=aa;h=(k[h>>2]|0)!=0|(k[h+4>>2]|0)!=0;if((o|0)!=0|h){h=(h&1^1)+(U-g)|0;w=g;h=(o|0)>(h|0)?o:h;u=q;g=N}else{w=N;h=0;u=q;g=N}}q=g-w|0;h=(h|0)<(q|0)?q:h;o=s+h|0;g=(J|0)<(o|0)?o:J;Ol(a,32,g,o,m);if(!(k[a>>2]&32))fl(u,s,a)|0;Ol(a,48,g,o,m^65536);Ol(a,48,h,q,0);if(!(k[a>>2]&32))fl(w,q,a)|0;Ol(a,32,g,o,m^8192);w=I}h:do{if((K|0)==245)if(!a)if(b){f=1;while(1){b=k[e+(f<<2)>>2]|0;if(!b)break;Ml(d+(f<<3)|0,b,c);f=f+1|0;if((f|0)>=10){f=1;break h}}if((f|0)<10)while(1){if(k[e+(f<<2)>>2]|0){f=-1;break h}f=f+1|0;if((f|0)>=10){f=1;break}}else f=1}else f=0}while(0);r=ga;return f|0}function Il(a,b,c){a=a|0;b=b|0;c=c|0;return $k(a,b,c)|0}function Jl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+112|0;g=h;e=g;f=e+112|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(f|0));e=g+4|0;k[e>>2]=a;f=g+8|0;k[f>>2]=-1;k[g+44>>2]=a;k[g+76>>2]=-1;qk(g,0);d=+ok(g,c,1);c=(k[e>>2]|0)-(k[f>>2]|0)+(k[g+108>>2]|0)|0;if(b)k[b>>2]=(c|0)!=0?a+c|0:a;r=h;return+d}function Kl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;i=r;r=r+112|0;h=i;k[h>>2]=0;f=h+4|0;k[f>>2]=a;k[h+44>>2]=a;g=h+8|0;k[g>>2]=(a|0)<0?-1:a+2147483647|0;k[h+76>>2]=-1;qk(h,0);d=pk(h,c,1,d,e)|0;if(b)k[b>>2]=a+((k[f>>2]|0)+(k[h+108>>2]|0)-(k[g>>2]|0));r=i;return d|0}function Ll(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=a+20|0;e=k[d>>2]|0;a=(k[a+16>>2]|0)-e|0;a=a>>>0>c>>>0?c:a;vw(e|0,b|0,a|0)|0;k[d>>2]=(k[d>>2]|0)+a;return c|0}function Ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a:do{if(b>>>0<=20)do{switch(b|0){case 9:{d=(k[c>>2]|0)+(4-1)&~(4-1);b=k[d>>2]|0;k[c>>2]=d+4;k[a>>2]=b;break a}case 10:{d=(k[c>>2]|0)+(4-1)&~(4-1);b=k[d>>2]|0;k[c>>2]=d+4;d=a;k[d>>2]=b;k[d+4>>2]=((b|0)<0)<<31>>31;break a}case 11:{d=(k[c>>2]|0)+(4-1)&~(4-1);b=k[d>>2]|0;k[c>>2]=d+4;d=a;k[d>>2]=b;k[d+4>>2]=0;break a}case 12:{d=(k[c>>2]|0)+(8-1)&~(8-1);b=d;e=k[b>>2]|0;b=k[b+4>>2]|0;k[c>>2]=d+8;d=a;k[d>>2]=e;k[d+4>>2]=b;break a}case 13:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;d=(d&65535)<<16>>16;e=a;k[e>>2]=d;k[e+4>>2]=((d|0)<0)<<31>>31;break a}case 14:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;e=a;k[e>>2]=d&65535;k[e+4>>2]=0;break a}case 15:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;d=(d&255)<<24>>24;e=a;k[e>>2]=d;k[e+4>>2]=((d|0)<0)<<31>>31;break a}case 16:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;e=a;k[e>>2]=d&255;k[e+4>>2]=0;break a}case 17:{e=(k[c>>2]|0)+(8-1)&~(8-1);f=+p[e>>3];k[c>>2]=e+8;p[a>>3]=f;break a}case 18:{e=(k[c>>2]|0)+(8-1)&~(8-1);f=+p[e>>3];k[c>>2]=e+8;p[a>>3]=f;break a}default:break a}}while(0)}while(0);return}function Nl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(b>>>0>0|(b|0)==0&a>>>0>4294967295)while(1){d=Fw(a|0,b|0,10,0)|0;c=c+-1|0;i[c>>0]=d|48;d=Ew(a|0,b|0,10,0)|0;if(b>>>0>9|(b|0)==9&a>>>0>4294967295){a=d;b=M}else{a=d;break}}if(a)while(1){c=c+-1|0;i[c>>0]=(a>>>0)%10|0|48;if(a>>>0<10)break;else a=(a>>>0)/10|0}return c|0}function Ol(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=r;r=r+256|0;g=h;do{if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;sw(g|0,b|0,(e>>>0>256?256:e)|0)|0;b=k[a>>2]|0;f=(b&32|0)==0;if(e>>>0>255){d=c-d|0;do{if(f){fl(g,256,a)|0;b=k[a>>2]|0}e=e+-256|0;f=(b&32|0)==0}while(e>>>0>255);if(f)e=d&255;else break}else if(!f)break;fl(g,e,a)|0}}while(0);r=h;return}function Pl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=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;do{if(a>>>0<245){o=a>>>0<11?16:a+11&-8;a=o>>>3;h=k[10218]|0;c=h>>>a;if(c&3){a=(c&1^1)+a|0;d=a<<1;c=40912+(d<<2)|0;d=40912+(d+2<<2)|0;e=k[d>>2]|0;f=e+8|0;g=k[f>>2]|0;do{if((c|0)!=(g|0)){if(g>>>0<(k[10222]|0)>>>0)Pa();b=g+12|0;if((k[b>>2]|0)==(e|0)){k[b>>2]=c;k[d>>2]=g;break}else Pa()}else k[10218]=h&~(1<>2]=M|3;M=e+(M|4)|0;k[M>>2]=k[M>>2]|1;M=f;return M|0}g=k[10220]|0;if(o>>>0>g>>>0){if(c){d=2<>>12&16;d=d>>>i;e=d>>>5&8;d=d>>>e;f=d>>>2&4;d=d>>>f;c=d>>>1&2;d=d>>>c;a=d>>>1&1;a=(e|i|f|c|a)+(d>>>a)|0;d=a<<1;c=40912+(d<<2)|0;d=40912+(d+2<<2)|0;f=k[d>>2]|0;i=f+8|0;e=k[i>>2]|0;do{if((c|0)!=(e|0)){if(e>>>0<(k[10222]|0)>>>0)Pa();b=e+12|0;if((k[b>>2]|0)==(f|0)){k[b>>2]=c;k[d>>2]=e;j=k[10220]|0;break}else Pa()}else{k[10218]=h&~(1<>2]=o|3;h=f+o|0;k[f+(o|4)>>2]=g|1;k[f+M>>2]=g;if(j){e=k[10223]|0;c=j>>>3;b=c<<1;d=40912+(b<<2)|0;a=k[10218]|0;c=1<>2]|0;if(b>>>0<(k[10222]|0)>>>0)Pa();else{l=a;m=b}}else{k[10218]=a|c;l=40912+(b+2<<2)|0;m=d}k[l>>2]=e;k[m+12>>2]=e;k[e+8>>2]=m;k[e+12>>2]=d}k[10220]=g;k[10223]=h;M=i;return M|0}a=k[10219]|0;if(a){c=(a&0-a)+-1|0;L=c>>>12&16;c=c>>>L;K=c>>>5&8;c=c>>>K;M=c>>>2&4;c=c>>>M;a=c>>>1&2;c=c>>>a;d=c>>>1&1;d=k[41176+((K|L|M|a|d)+(c>>>d)<<2)>>2]|0;c=(k[d+4>>2]&-8)-o|0;a=d;while(1){b=k[a+16>>2]|0;if(!b){b=k[a+20>>2]|0;if(!b){i=c;break}}a=(k[b+4>>2]&-8)-o|0;M=a>>>0>>0;c=M?a:c;a=b;d=M?b:d}f=k[10222]|0;if(d>>>0>>0)Pa();h=d+o|0;if(d>>>0>=h>>>0)Pa();g=k[d+24>>2]|0;c=k[d+12>>2]|0;do{if((c|0)==(d|0)){a=d+20|0;b=k[a>>2]|0;if(!b){a=d+16|0;b=k[a>>2]|0;if(!b){n=0;break}}while(1){c=b+20|0;e=k[c>>2]|0;if(e){b=e;a=c;continue}c=b+16|0;e=k[c>>2]|0;if(!e)break;else{b=e;a=c}}if(a>>>0>>0)Pa();else{k[a>>2]=0;n=b;break}}else{e=k[d+8>>2]|0;if(e>>>0>>0)Pa();b=e+12|0;if((k[b>>2]|0)!=(d|0))Pa();a=c+8|0;if((k[a>>2]|0)==(d|0)){k[b>>2]=c;k[a>>2]=e;n=c;break}else Pa()}}while(0);do{if(g){b=k[d+28>>2]|0;a=41176+(b<<2)|0;if((d|0)==(k[a>>2]|0)){k[a>>2]=n;if(!n){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=g+16|0;if((k[b>>2]|0)==(d|0))k[b>>2]=n;else k[g+20>>2]=n;if(!n)break}a=k[10222]|0;if(n>>>0>>0)Pa();k[n+24>>2]=g;b=k[d+16>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[n+16>>2]=b;k[b+24>>2]=n;break}}while(0);b=k[d+20>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[n+20>>2]=b;k[b+24>>2]=n;break}}}while(0);if(i>>>0<16){M=i+o|0;k[d+4>>2]=M|3;M=d+(M+4)|0;k[M>>2]=k[M>>2]|1}else{k[d+4>>2]=o|3;k[d+(o|4)>>2]=i|1;k[d+(i+o)>>2]=i;b=k[10220]|0;if(b){f=k[10223]|0;c=b>>>3;b=c<<1;e=40912+(b<<2)|0;a=k[10218]|0;c=1<>2]|0;if(a>>>0<(k[10222]|0)>>>0)Pa();else{p=b;q=a}}else{k[10218]=a|c;p=40912+(b+2<<2)|0;q=e}k[p>>2]=f;k[q+12>>2]=f;k[f+8>>2]=q;k[f+12>>2]=e}k[10220]=i;k[10223]=h}M=d+8|0;return M|0}else q=o}else q=o}else if(a>>>0<=4294967231){a=a+11|0;m=a&-8;l=k[10219]|0;if(l){c=0-m|0;a=a>>>8;if(a)if(m>>>0>16777215)j=31;else{q=(a+1048320|0)>>>16&8;v=a<>>16&4;v=v<>>16&2;j=14-(p|q|j)+(v<>>15)|0;j=m>>>(j+7|0)&1|j<<1}else j=0;a=k[41176+(j<<2)>>2]|0;a:do{if(!a){e=0;a=0;v=86}else{g=c;e=0;h=m<<((j|0)==31?0:25-(j>>>1)|0);i=a;a=0;while(1){f=k[i+4>>2]&-8;c=f-m|0;if(c>>>0>>0)if((f|0)==(m|0)){f=i;a=i;v=90;break a}else a=i;else c=g;v=k[i+20>>2]|0;i=k[i+16+(h>>>31<<2)>>2]|0;e=(v|0)==0|(v|0)==(i|0)?e:v;if(!i){v=86;break}else{g=c;h=h<<1}}}}while(0);if((v|0)==86){if((e|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>n;l=a>>>5&8;a=a>>>l;p=a>>>2&4;a=a>>>p;q=a>>>1&2;a=a>>>q;e=a>>>1&1;e=k[41176+((l|n|p|q|e)+(a>>>e)<<2)>>2]|0;a=0}if(!e){h=c;i=a}else{f=e;v=90}}if((v|0)==90)while(1){v=0;q=(k[f+4>>2]&-8)-m|0;e=q>>>0>>0;c=e?q:c;a=e?f:a;e=k[f+16>>2]|0;if(e){f=e;v=90;continue}f=k[f+20>>2]|0;if(!f){h=c;i=a;break}else v=90}if((i|0)!=0?h>>>0<((k[10220]|0)-m|0)>>>0:0){e=k[10222]|0;if(i>>>0>>0)Pa();g=i+m|0;if(i>>>0>=g>>>0)Pa();f=k[i+24>>2]|0;c=k[i+12>>2]|0;do{if((c|0)==(i|0)){a=i+20|0;b=k[a>>2]|0;if(!b){a=i+16|0;b=k[a>>2]|0;if(!b){o=0;break}}while(1){c=b+20|0;d=k[c>>2]|0;if(d){b=d;a=c;continue}c=b+16|0;d=k[c>>2]|0;if(!d)break;else{b=d;a=c}}if(a>>>0>>0)Pa();else{k[a>>2]=0;o=b;break}}else{d=k[i+8>>2]|0;if(d>>>0>>0)Pa();b=d+12|0;if((k[b>>2]|0)!=(i|0))Pa();a=c+8|0;if((k[a>>2]|0)==(i|0)){k[b>>2]=c;k[a>>2]=d;o=c;break}else Pa()}}while(0);do{if(f){b=k[i+28>>2]|0;a=41176+(b<<2)|0;if((i|0)==(k[a>>2]|0)){k[a>>2]=o;if(!o){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=f+16|0;if((k[b>>2]|0)==(i|0))k[b>>2]=o;else k[f+20>>2]=o;if(!o)break}a=k[10222]|0;if(o>>>0>>0)Pa();k[o+24>>2]=f;b=k[i+16>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[o+16>>2]=b;k[b+24>>2]=o;break}}while(0);b=k[i+20>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[o+20>>2]=b;k[b+24>>2]=o;break}}}while(0);b:do{if(h>>>0>=16){k[i+4>>2]=m|3;k[i+(m|4)>>2]=h|1;k[i+(h+m)>>2]=h;b=h>>>3;if(h>>>0<256){a=b<<1;d=40912+(a<<2)|0;c=k[10218]|0;b=1<>2]|0;if(a>>>0<(k[10222]|0)>>>0)Pa();else{s=b;t=a}}else{k[10218]=c|b;s=40912+(a+2<<2)|0;t=d}k[s>>2]=g;k[t+12>>2]=g;k[i+(m+8)>>2]=t;k[i+(m+12)>>2]=d;break}b=h>>>8;if(b)if(h>>>0>16777215)d=31;else{L=(b+1048320|0)>>>16&8;M=b<>>16&4;M=M<>>16&2;d=14-(K|L|d)+(M<>>15)|0;d=h>>>(d+7|0)&1|d<<1}else d=0;b=41176+(d<<2)|0;k[i+(m+28)>>2]=d;k[i+(m+20)>>2]=0;k[i+(m+16)>>2]=0;a=k[10219]|0;c=1<>2]=g;k[i+(m+24)>>2]=b;k[i+(m+12)>>2]=g;k[i+(m+8)>>2]=g;break}b=k[b>>2]|0;c:do{if((k[b+4>>2]&-8|0)!=(h|0)){d=h<<((d|0)==31?0:25-(d>>>1)|0);while(1){a=b+16+(d>>>31<<2)|0;c=k[a>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(h|0)){y=c;break c}else{d=d<<1;b=c}}if(a>>>0<(k[10222]|0)>>>0)Pa();else{k[a>>2]=g;k[i+(m+24)>>2]=b;k[i+(m+12)>>2]=g;k[i+(m+8)>>2]=g;break b}}else y=b}while(0);b=y+8|0;a=k[b>>2]|0;M=k[10222]|0;if(a>>>0>=M>>>0&y>>>0>=M>>>0){k[a+12>>2]=g;k[b>>2]=g;k[i+(m+8)>>2]=a;k[i+(m+12)>>2]=y;k[i+(m+24)>>2]=0;break}else Pa()}else{M=h+m|0;k[i+4>>2]=M|3;M=i+(M+4)|0;k[M>>2]=k[M>>2]|1}}while(0);M=i+8|0;return M|0}else q=m}else q=m}else q=-1}while(0);c=k[10220]|0;if(c>>>0>=q>>>0){b=c-q|0;a=k[10223]|0;if(b>>>0>15){k[10223]=a+q;k[10220]=b;k[a+(q+4)>>2]=b|1;k[a+c>>2]=b;k[a+4>>2]=q|3}else{k[10220]=0;k[10223]=0;k[a+4>>2]=c|3;M=a+(c+4)|0;k[M>>2]=k[M>>2]|1}M=a+8|0;return M|0}a=k[10221]|0;if(a>>>0>q>>>0){L=a-q|0;k[10221]=L;M=k[10224]|0;k[10224]=M+q;k[M+(q+4)>>2]=L|1;k[M+4>>2]=q|3;M=M+8|0;return M|0}do{if(!(k[10336]|0)){a=hb(30)|0;if(!(a+-1&a)){k[10338]=a;k[10337]=a;k[10339]=-1;k[10340]=-1;k[10341]=0;k[10329]=0;y=(zb(0)|0)&-16^1431655768;k[10336]=y;break}else Pa()}}while(0);i=q+48|0;h=k[10338]|0;j=q+47|0;g=h+j|0;h=0-h|0;l=g&h;if(l>>>0<=q>>>0){M=0;return M|0}a=k[10328]|0;if((a|0)!=0?(t=k[10326]|0,y=t+l|0,y>>>0<=t>>>0|y>>>0>a>>>0):0){M=0;return M|0}d:do{if(!(k[10329]&4)){a=k[10224]|0;e:do{if(a){e=41320;while(1){c=k[e>>2]|0;if(c>>>0<=a>>>0?(r=e+4|0,(c+(k[r>>2]|0)|0)>>>0>a>>>0):0){f=e;a=r;break}e=k[e+8>>2]|0;if(!e){v=174;break e}}c=g-(k[10221]|0)&h;if(c>>>0<2147483647){e=bb(c|0)|0;y=(e|0)==((k[f>>2]|0)+(k[a>>2]|0)|0);a=y?c:0;if(y){if((e|0)!=(-1|0)){w=e;p=a;v=194;break d}}else v=184}else a=0}else v=174}while(0);do{if((v|0)==174){f=bb(0)|0;if((f|0)!=(-1|0)){a=f;c=k[10337]|0;e=c+-1|0;if(!(e&a))c=l;else c=l-a+(e+a&0-c)|0;a=k[10326]|0;e=a+c|0;if(c>>>0>q>>>0&c>>>0<2147483647){y=k[10328]|0;if((y|0)!=0?e>>>0<=a>>>0|e>>>0>y>>>0:0){a=0;break}e=bb(c|0)|0;y=(e|0)==(f|0);a=y?c:0;if(y){w=f;p=a;v=194;break d}else v=184}else a=0}else a=0}}while(0);f:do{if((v|0)==184){f=0-c|0;do{if(i>>>0>c>>>0&(c>>>0<2147483647&(e|0)!=(-1|0))?(u=k[10338]|0,u=j-c+u&0-u,u>>>0<2147483647):0)if((bb(u|0)|0)==(-1|0)){bb(f|0)|0;break f}else{c=u+c|0;break}}while(0);if((e|0)!=(-1|0)){w=e;p=c;v=194;break d}}}while(0);k[10329]=k[10329]|4;v=191}else{a=0;v=191}}while(0);if((((v|0)==191?l>>>0<2147483647:0)?(w=bb(l|0)|0,x=bb(0)|0,w>>>0>>0&((w|0)!=(-1|0)&(x|0)!=(-1|0))):0)?(z=x-w|0,A=z>>>0>(q+40|0)>>>0,A):0){p=A?z:a;v=194}if((v|0)==194){a=(k[10326]|0)+p|0;k[10326]=a;if(a>>>0>(k[10327]|0)>>>0)k[10327]=a;g=k[10224]|0;g:do{if(g){f=41320;do{a=k[f>>2]|0;c=f+4|0;e=k[c>>2]|0;if((w|0)==(a+e|0)){B=a;C=c;D=e;E=f;v=204;break}f=k[f+8>>2]|0}while((f|0)!=0);if(((v|0)==204?(k[E+12>>2]&8|0)==0:0)?g>>>0>>0&g>>>0>=B>>>0:0){k[C>>2]=D+p;M=(k[10221]|0)+p|0;L=g+8|0;L=(L&7|0)==0?0:0-L&7;K=M-L|0;k[10224]=g+L;k[10221]=K;k[g+(L+4)>>2]=K|1;k[g+(M+4)>>2]=40;k[10225]=k[10340];break}a=k[10222]|0;if(w>>>0>>0){k[10222]=w;a=w}c=w+p|0;f=41320;while(1){if((k[f>>2]|0)==(c|0)){e=f;c=f;v=212;break}f=k[f+8>>2]|0;if(!f){c=41320;break}}if((v|0)==212)if(!(k[c+12>>2]&8)){k[e>>2]=w;n=c+4|0;k[n>>2]=(k[n>>2]|0)+p;n=w+8|0;n=(n&7|0)==0?0:0-n&7;j=w+(p+8)|0;j=(j&7|0)==0?0:0-j&7;b=w+(j+p)|0;m=n+q|0;o=w+m|0;l=b-(w+n)-q|0;k[w+(n+4)>>2]=q|3;h:do{if((b|0)!=(g|0)){if((b|0)==(k[10223]|0)){M=(k[10220]|0)+l|0;k[10220]=M;k[10223]=o;k[w+(m+4)>>2]=M|1;k[w+(M+m)>>2]=M;break}h=p+4|0;c=k[w+(h+j)>>2]|0;if((c&3|0)==1){i=c&-8;f=c>>>3;i:do{if(c>>>0>=256){g=k[w+((j|24)+p)>>2]|0;d=k[w+(p+12+j)>>2]|0;do{if((d|0)==(b|0)){e=j|16;d=w+(h+e)|0;c=k[d>>2]|0;if(!c){d=w+(e+p)|0;c=k[d>>2]|0;if(!c){J=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;J=c;break}}else{e=k[w+((j|8)+p)>>2]|0;if(e>>>0>>0)Pa();a=e+12|0;if((k[a>>2]|0)!=(b|0))Pa();c=d+8|0;if((k[c>>2]|0)==(b|0)){k[a>>2]=d;k[c>>2]=e;J=d;break}else Pa()}}while(0);if(!g)break;a=k[w+(p+28+j)>>2]|0;c=41176+(a<<2)|0;do{if((b|0)!=(k[c>>2]|0)){if(g>>>0<(k[10222]|0)>>>0)Pa();a=g+16|0;if((k[a>>2]|0)==(b|0))k[a>>2]=J;else k[g+20>>2]=J;if(!J)break i}else{k[c>>2]=J;if(J)break;k[10219]=k[10219]&~(1<>>0>>0)Pa();k[J+24>>2]=g;b=j|16;a=k[w+(b+p)>>2]|0;do{if(a)if(a>>>0>>0)Pa();else{k[J+16>>2]=a;k[a+24>>2]=J;break}}while(0);b=k[w+(h+b)>>2]|0;if(!b)break;if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[J+20>>2]=b;k[b+24>>2]=J;break}}else{d=k[w+((j|8)+p)>>2]|0;e=k[w+(p+12+j)>>2]|0;c=40912+(f<<1<<2)|0;do{if((d|0)!=(c|0)){if(d>>>0>>0)Pa();if((k[d+12>>2]|0)==(b|0))break;Pa()}}while(0);if((e|0)==(d|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();a=e+8|0;if((k[a>>2]|0)==(b|0)){F=a;break}Pa()}}while(0);k[d+12>>2]=e;k[F>>2]=d}}while(0);b=w+((i|j)+p)|0;e=i+l|0}else e=l;b=b+4|0;k[b>>2]=k[b>>2]&-2;k[w+(m+4)>>2]=e|1;k[w+(e+m)>>2]=e;b=e>>>3;if(e>>>0<256){a=b<<1;d=40912+(a<<2)|0;c=k[10218]|0;b=1<>2]|0;if(a>>>0>=(k[10222]|0)>>>0){K=b;L=a;break}Pa()}}while(0);k[K>>2]=o;k[L+12>>2]=o;k[w+(m+8)>>2]=L;k[w+(m+12)>>2]=d;break}b=e>>>8;do{if(!b)d=0;else{if(e>>>0>16777215){d=31;break}K=(b+1048320|0)>>>16&8;L=b<>>16&4;L=L<>>16&2;d=14-(J|K|d)+(L<>>15)|0;d=e>>>(d+7|0)&1|d<<1}}while(0);b=41176+(d<<2)|0;k[w+(m+28)>>2]=d;k[w+(m+20)>>2]=0;k[w+(m+16)>>2]=0;a=k[10219]|0;c=1<>2]=o;k[w+(m+24)>>2]=b;k[w+(m+12)>>2]=o;k[w+(m+8)>>2]=o;break}b=k[b>>2]|0;j:do{if((k[b+4>>2]&-8|0)!=(e|0)){d=e<<((d|0)==31?0:25-(d>>>1)|0);while(1){a=b+16+(d>>>31<<2)|0;c=k[a>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(e|0)){M=c;break j}else{d=d<<1;b=c}}if(a>>>0<(k[10222]|0)>>>0)Pa();else{k[a>>2]=o;k[w+(m+24)>>2]=b;k[w+(m+12)>>2]=o;k[w+(m+8)>>2]=o;break h}}else M=b}while(0);b=M+8|0;a=k[b>>2]|0;L=k[10222]|0;if(a>>>0>=L>>>0&M>>>0>=L>>>0){k[a+12>>2]=o;k[b>>2]=o;k[w+(m+8)>>2]=a;k[w+(m+12)>>2]=M;k[w+(m+24)>>2]=0;break}else Pa()}else{M=(k[10221]|0)+l|0;k[10221]=M;k[10224]=o;k[w+(m+4)>>2]=M|1}}while(0);M=w+(n|8)|0;return M|0}else c=41320;while(1){a=k[c>>2]|0;if(a>>>0<=g>>>0?(b=k[c+4>>2]|0,d=a+b|0,d>>>0>g>>>0):0)break;c=k[c+8>>2]|0}e=a+(b+-39)|0;a=a+(b+-47+((e&7|0)==0?0:0-e&7))|0;e=g+16|0;a=a>>>0>>0?g:a;b=a+8|0;c=w+8|0;c=(c&7|0)==0?0:0-c&7;M=p+-40-c|0;k[10224]=w+c;k[10221]=M;k[w+(c+4)>>2]=M|1;k[w+(p+-36)>>2]=40;k[10225]=k[10340];c=a+4|0;k[c>>2]=27;k[b>>2]=k[10330];k[b+4>>2]=k[10331];k[b+8>>2]=k[10332];k[b+12>>2]=k[10333];k[10330]=w;k[10331]=p;k[10333]=0;k[10332]=b;b=a+28|0;k[b>>2]=7;if((a+32|0)>>>0>>0)do{M=b;b=b+4|0;k[b>>2]=7}while((M+8|0)>>>0>>0);if((a|0)!=(g|0)){f=a-g|0;k[c>>2]=k[c>>2]&-2;k[g+4>>2]=f|1;k[a>>2]=f;b=f>>>3;if(f>>>0<256){a=b<<1;d=40912+(a<<2)|0;c=k[10218]|0;b=1<>2]|0;if(a>>>0<(k[10222]|0)>>>0)Pa();else{G=b;H=a}}else{k[10218]=c|b;G=40912+(a+2<<2)|0;H=d}k[G>>2]=g;k[H+12>>2]=g;k[g+8>>2]=H;k[g+12>>2]=d;break}b=f>>>8;if(b)if(f>>>0>16777215)d=31;else{L=(b+1048320|0)>>>16&8;M=b<>>16&4;M=M<>>16&2;d=14-(K|L|d)+(M<>>15)|0;d=f>>>(d+7|0)&1|d<<1}else d=0;c=41176+(d<<2)|0;k[g+28>>2]=d;k[g+20>>2]=0;k[e>>2]=0;b=k[10219]|0;a=1<>2]=g;k[g+24>>2]=c;k[g+12>>2]=g;k[g+8>>2]=g;break}b=k[c>>2]|0;k:do{if((k[b+4>>2]&-8|0)!=(f|0)){d=f<<((d|0)==31?0:25-(d>>>1)|0);while(1){a=b+16+(d>>>31<<2)|0;c=k[a>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(f|0)){I=c;break k}else{d=d<<1;b=c}}if(a>>>0<(k[10222]|0)>>>0)Pa();else{k[a>>2]=g;k[g+24>>2]=b;k[g+12>>2]=g;k[g+8>>2]=g;break g}}else I=b}while(0);b=I+8|0;a=k[b>>2]|0;M=k[10222]|0;if(a>>>0>=M>>>0&I>>>0>=M>>>0){k[a+12>>2]=g;k[b>>2]=g;k[g+8>>2]=a;k[g+12>>2]=I;k[g+24>>2]=0;break}else Pa()}}else{M=k[10222]|0;if((M|0)==0|w>>>0>>0)k[10222]=w;k[10330]=w;k[10331]=p;k[10333]=0;k[10227]=k[10336];k[10226]=-1;b=0;do{M=b<<1;L=40912+(M<<2)|0;k[40912+(M+3<<2)>>2]=L;k[40912+(M+2<<2)>>2]=L;b=b+1|0}while((b|0)!=32);M=w+8|0;M=(M&7|0)==0?0:0-M&7;L=p+-40-M|0;k[10224]=w+M;k[10221]=L;k[w+(M+4)>>2]=L|1;k[w+(p+-36)>>2]=40;k[10225]=k[10340]}}while(0);b=k[10221]|0;if(b>>>0>q>>>0){L=b-q|0;k[10221]=L;M=k[10224]|0;k[10224]=M+q;k[M+(q+4)>>2]=L|1;k[M+4>>2]=q|3;M=M+8|0;return M|0}}M=mk()|0;k[M>>2]=12;M=0;return M|0}function Ql(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if(!a)return;b=a+-8|0;h=k[10222]|0;if(b>>>0>>0)Pa();c=k[a+-4>>2]|0;d=c&3;if((d|0)==1)Pa();o=c&-8;q=a+(o+-8)|0;do{if(!(c&1)){b=k[b>>2]|0;if(!d)return;i=-8-b|0;l=a+i|0;m=b+o|0;if(l>>>0>>0)Pa();if((l|0)==(k[10223]|0)){b=a+(o+-4)|0;c=k[b>>2]|0;if((c&3|0)!=3){u=l;f=m;break}k[10220]=m;k[b>>2]=c&-2;k[a+(i+4)>>2]=m|1;k[q>>2]=m;return}e=b>>>3;if(b>>>0<256){d=k[a+(i+8)>>2]|0;c=k[a+(i+12)>>2]|0;b=40912+(e<<1<<2)|0;if((d|0)!=(b|0)){if(d>>>0>>0)Pa();if((k[d+12>>2]|0)!=(l|0))Pa()}if((c|0)==(d|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();b=c+8|0;if((k[b>>2]|0)==(l|0))g=b;else Pa()}else g=c+8|0;k[d+12>>2]=c;k[g>>2]=d;u=l;f=m;break}g=k[a+(i+24)>>2]|0;d=k[a+(i+12)>>2]|0;do{if((d|0)==(l|0)){c=a+(i+20)|0;b=k[c>>2]|0;if(!b){c=a+(i+16)|0;b=k[c>>2]|0;if(!b){j=0;break}}while(1){d=b+20|0;e=k[d>>2]|0;if(e){b=e;c=d;continue}d=b+16|0;e=k[d>>2]|0;if(!e)break;else{b=e;c=d}}if(c>>>0>>0)Pa();else{k[c>>2]=0;j=b;break}}else{e=k[a+(i+8)>>2]|0;if(e>>>0>>0)Pa();b=e+12|0;if((k[b>>2]|0)!=(l|0))Pa();c=d+8|0;if((k[c>>2]|0)==(l|0)){k[b>>2]=d;k[c>>2]=e;j=d;break}else Pa()}}while(0);if(g){b=k[a+(i+28)>>2]|0;c=41176+(b<<2)|0;if((l|0)==(k[c>>2]|0)){k[c>>2]=j;if(!j){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=g+16|0;if((k[b>>2]|0)==(l|0))k[b>>2]=j;else k[g+20>>2]=j;if(!j){u=l;f=m;break}}c=k[10222]|0;if(j>>>0>>0)Pa();k[j+24>>2]=g;b=k[a+(i+16)>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[j+16>>2]=b;k[b+24>>2]=j;break}}while(0);b=k[a+(i+20)>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[j+20>>2]=b;k[b+24>>2]=j;u=l;f=m;break}else{u=l;f=m}}else{u=l;f=m}}else{u=b;f=o}}while(0);if(u>>>0>=q>>>0)Pa();b=a+(o+-4)|0;c=k[b>>2]|0;if(!(c&1))Pa();if(!(c&2)){if((q|0)==(k[10224]|0)){t=(k[10221]|0)+f|0;k[10221]=t;k[10224]=u;k[u+4>>2]=t|1;if((u|0)!=(k[10223]|0))return;k[10223]=0;k[10220]=0;return}if((q|0)==(k[10223]|0)){t=(k[10220]|0)+f|0;k[10220]=t;k[10223]=u;k[u+4>>2]=t|1;k[u+t>>2]=t;return}f=(c&-8)+f|0;e=c>>>3;do{if(c>>>0>=256){g=k[a+(o+16)>>2]|0;b=k[a+(o|4)>>2]|0;do{if((b|0)==(q|0)){c=a+(o+12)|0;b=k[c>>2]|0;if(!b){c=a+(o+8)|0;b=k[c>>2]|0;if(!b){p=0;break}}while(1){d=b+20|0;e=k[d>>2]|0;if(e){b=e;c=d;continue}d=b+16|0;e=k[d>>2]|0;if(!e)break;else{b=e;c=d}}if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[c>>2]=0;p=b;break}}else{c=k[a+o>>2]|0;if(c>>>0<(k[10222]|0)>>>0)Pa();d=c+12|0;if((k[d>>2]|0)!=(q|0))Pa();e=b+8|0;if((k[e>>2]|0)==(q|0)){k[d>>2]=b;k[e>>2]=c;p=b;break}else Pa()}}while(0);if(g){b=k[a+(o+20)>>2]|0;c=41176+(b<<2)|0;if((q|0)==(k[c>>2]|0)){k[c>>2]=p;if(!p){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=g+16|0;if((k[b>>2]|0)==(q|0))k[b>>2]=p;else k[g+20>>2]=p;if(!p)break}c=k[10222]|0;if(p>>>0>>0)Pa();k[p+24>>2]=g;b=k[a+(o+8)>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[p+16>>2]=b;k[b+24>>2]=p;break}}while(0);b=k[a+(o+12)>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[p+20>>2]=b;k[b+24>>2]=p;break}}}else{d=k[a+o>>2]|0;c=k[a+(o|4)>>2]|0;b=40912+(e<<1<<2)|0;if((d|0)!=(b|0)){if(d>>>0<(k[10222]|0)>>>0)Pa();if((k[d+12>>2]|0)!=(q|0))Pa()}if((c|0)==(d|0)){k[10218]=k[10218]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=c+8|0;if((k[b>>2]|0)==(q|0))n=b;else Pa()}else n=c+8|0;k[d+12>>2]=c;k[n>>2]=d}}while(0);k[u+4>>2]=f|1;k[u+f>>2]=f;if((u|0)==(k[10223]|0)){k[10220]=f;return}}else{k[b>>2]=c&-2;k[u+4>>2]=f|1;k[u+f>>2]=f}b=f>>>3;if(f>>>0<256){c=b<<1;e=40912+(c<<2)|0;d=k[10218]|0;b=1<>2]|0;if(c>>>0<(k[10222]|0)>>>0)Pa();else{r=b;s=c}}else{k[10218]=d|b;r=40912+(c+2<<2)|0;s=e}k[r>>2]=u;k[s+12>>2]=u;k[u+8>>2]=s;k[u+12>>2]=e;return}b=f>>>8;if(b)if(f>>>0>16777215)e=31;else{r=(b+1048320|0)>>>16&8;s=b<>>16&4;s=s<>>16&2;e=14-(q|r|e)+(s<>>15)|0;e=f>>>(e+7|0)&1|e<<1}else e=0;b=41176+(e<<2)|0;k[u+28>>2]=e;k[u+20>>2]=0;k[u+16>>2]=0;c=k[10219]|0;d=1<>2]|0;b:do{if((k[b+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(e>>>1)|0);while(1){c=b+16+(e>>>31<<2)|0;d=k[c>>2]|0;if(!d)break;if((k[d+4>>2]&-8|0)==(f|0)){t=d;break b}else{e=e<<1;b=d}}if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[c>>2]=u;k[u+24>>2]=b;k[u+12>>2]=u;k[u+8>>2]=u;break a}}else t=b}while(0);b=t+8|0;c=k[b>>2]|0;s=k[10222]|0;if(c>>>0>=s>>>0&t>>>0>=s>>>0){k[c+12>>2]=u;k[b>>2]=u;k[u+8>>2]=c;k[u+12>>2]=t;k[u+24>>2]=0;break}else Pa()}else{k[10219]=c|d;k[b>>2]=u;k[u+24>>2]=b;k[u+12>>2]=u;k[u+8>>2]=u}}while(0);u=(k[10226]|0)+-1|0;k[10226]=u;if(!u)b=41328;else return;while(1){b=k[b>>2]|0;if(!b)break;else b=b+8|0}k[10226]=-1;return}function Rl(a,b){a=a|0;b=b|0;var c=0;if(a){c=ia(b,a)|0;if((b|a)>>>0>65535)c=((c>>>0)/(a>>>0)|0|0)==(b|0)?c:-1}else c=0;b=Pl(c)|0;if(!b)return b|0;if(!(k[b+-4>>2]&3))return b|0;sw(b|0,0,c|0)|0;return b|0}function Sl(a,b){a=a|0;b=b|0;var c=0,d=0;if(!a){a=Pl(b)|0;return a|0}if(b>>>0>4294967231){a=mk()|0;k[a>>2]=12;a=0;return a|0}c=Tl(a+-8|0,b>>>0<11?16:b+11&-8)|0;if(c){a=c+8|0;return a|0}c=Pl(b)|0;if(!c){a=0;return a|0}d=k[a+-4>>2]|0;d=(d&-8)-((d&3|0)==0?8:4)|0;vw(c|0,a|0,(d>>>0>>0?d:b)|0)|0;Ql(a);a=c;return a|0}function Tl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;o=a+4|0;p=k[o>>2]|0;i=p&-8;l=a+i|0;h=k[10222]|0;c=p&3;if(!((c|0)!=1&a>>>0>=h>>>0&a>>>0>>0))Pa();d=a+(i|4)|0;e=k[d>>2]|0;if(!(e&1))Pa();if(!c){if(b>>>0<256){a=0;return a|0}if(i>>>0>=(b+4|0)>>>0?(i-b|0)>>>0<=k[10338]<<1>>>0:0)return a|0;a=0;return a|0}if(i>>>0>=b>>>0){c=i-b|0;if(c>>>0<=15)return a|0;k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=c|3;k[d>>2]=k[d>>2]|1;Ul(a+b|0,c);return a|0}if((l|0)==(k[10224]|0)){c=(k[10221]|0)+i|0;if(c>>>0<=b>>>0){a=0;return a|0}n=c-b|0;k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=n|1;k[10224]=a+b;k[10221]=n;return a|0}if((l|0)==(k[10223]|0)){d=(k[10220]|0)+i|0;if(d>>>0>>0){a=0;return a|0}c=d-b|0;if(c>>>0>15){k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=c|1;k[a+d>>2]=c;d=a+(d+4)|0 -;k[d>>2]=k[d>>2]&-2;d=a+b|0}else{k[o>>2]=p&1|d|2;d=a+(d+4)|0;k[d>>2]=k[d>>2]|1;d=0;c=0}k[10220]=c;k[10223]=d;return a|0}if(e&2){a=0;return a|0}m=(e&-8)+i|0;if(m>>>0>>0){a=0;return a|0}n=m-b|0;f=e>>>3;do{if(e>>>0>=256){g=k[a+(i+24)>>2]|0;f=k[a+(i+12)>>2]|0;do{if((f|0)==(l|0)){d=a+(i+20)|0;c=k[d>>2]|0;if(!c){d=a+(i+16)|0;c=k[d>>2]|0;if(!c){j=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;j=c;break}}else{e=k[a+(i+8)>>2]|0;if(e>>>0>>0)Pa();c=e+12|0;if((k[c>>2]|0)!=(l|0))Pa();d=f+8|0;if((k[d>>2]|0)==(l|0)){k[c>>2]=f;k[d>>2]=e;j=f;break}else Pa()}}while(0);if(g){c=k[a+(i+28)>>2]|0;d=41176+(c<<2)|0;if((l|0)==(k[d>>2]|0)){k[d>>2]=j;if(!j){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();c=g+16|0;if((k[c>>2]|0)==(l|0))k[c>>2]=j;else k[g+20>>2]=j;if(!j)break}d=k[10222]|0;if(j>>>0>>0)Pa();k[j+24>>2]=g;c=k[a+(i+16)>>2]|0;do{if(c)if(c>>>0>>0)Pa();else{k[j+16>>2]=c;k[c+24>>2]=j;break}}while(0);c=k[a+(i+20)>>2]|0;if(c)if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[j+20>>2]=c;k[c+24>>2]=j;break}}}else{e=k[a+(i+8)>>2]|0;d=k[a+(i+12)>>2]|0;c=40912+(f<<1<<2)|0;if((e|0)!=(c|0)){if(e>>>0>>0)Pa();if((k[e+12>>2]|0)!=(l|0))Pa()}if((d|0)==(e|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();c=d+8|0;if((k[c>>2]|0)==(l|0))g=c;else Pa()}else g=d+8|0;k[e+12>>2]=d;k[g>>2]=e}}while(0);if(n>>>0<16){k[o>>2]=m|p&1|2;b=a+(m|4)|0;k[b>>2]=k[b>>2]|1;return a|0}else{k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=n|3;p=a+(m|4)|0;k[p>>2]=k[p>>2]|1;Ul(a+b|0,n);return a|0}return 0}function Ul(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;q=a+b|0;c=k[a+4>>2]|0;do{if(!(c&1)){j=k[a>>2]|0;if(!(c&3))return;n=a+(0-j)|0;m=j+b|0;i=k[10222]|0;if(n>>>0>>0)Pa();if((n|0)==(k[10223]|0)){d=a+(b+4)|0;c=k[d>>2]|0;if((c&3|0)!=3){t=n;g=m;break}k[10220]=m;k[d>>2]=c&-2;k[a+(4-j)>>2]=m|1;k[q>>2]=m;return}f=j>>>3;if(j>>>0<256){e=k[a+(8-j)>>2]|0;d=k[a+(12-j)>>2]|0;c=40912+(f<<1<<2)|0;if((e|0)!=(c|0)){if(e>>>0>>0)Pa();if((k[e+12>>2]|0)!=(n|0))Pa()}if((d|0)==(e|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();c=d+8|0;if((k[c>>2]|0)==(n|0))h=c;else Pa()}else h=d+8|0;k[e+12>>2]=d;k[h>>2]=e;t=n;g=m;break}h=k[a+(24-j)>>2]|0;e=k[a+(12-j)>>2]|0;do{if((e|0)==(n|0)){e=16-j|0;d=a+(e+4)|0;c=k[d>>2]|0;if(!c){d=a+e|0;c=k[d>>2]|0;if(!c){l=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;l=c;break}}else{f=k[a+(8-j)>>2]|0;if(f>>>0>>0)Pa();c=f+12|0;if((k[c>>2]|0)!=(n|0))Pa();d=e+8|0;if((k[d>>2]|0)==(n|0)){k[c>>2]=e;k[d>>2]=f;l=e;break}else Pa()}}while(0);if(h){c=k[a+(28-j)>>2]|0;d=41176+(c<<2)|0;if((n|0)==(k[d>>2]|0)){k[d>>2]=l;if(!l){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();c=h+16|0;if((k[c>>2]|0)==(n|0))k[c>>2]=l;else k[h+20>>2]=l;if(!l){t=n;g=m;break}}e=k[10222]|0;if(l>>>0>>0)Pa();k[l+24>>2]=h;c=16-j|0;d=k[a+c>>2]|0;do{if(d)if(d>>>0>>0)Pa();else{k[l+16>>2]=d;k[d+24>>2]=l;break}}while(0);c=k[a+(c+4)>>2]|0;if(c)if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[l+20>>2]=c;k[c+24>>2]=l;t=n;g=m;break}else{t=n;g=m}}else{t=n;g=m}}else{t=a;g=b}}while(0);i=k[10222]|0;if(q>>>0>>0)Pa();c=a+(b+4)|0;d=k[c>>2]|0;if(!(d&2)){if((q|0)==(k[10224]|0)){s=(k[10221]|0)+g|0;k[10221]=s;k[10224]=t;k[t+4>>2]=s|1;if((t|0)!=(k[10223]|0))return;k[10223]=0;k[10220]=0;return}if((q|0)==(k[10223]|0)){s=(k[10220]|0)+g|0;k[10220]=s;k[10223]=t;k[t+4>>2]=s|1;k[t+s>>2]=s;return}g=(d&-8)+g|0;f=d>>>3;do{if(d>>>0>=256){h=k[a+(b+24)>>2]|0;e=k[a+(b+12)>>2]|0;do{if((e|0)==(q|0)){d=a+(b+20)|0;c=k[d>>2]|0;if(!c){d=a+(b+16)|0;c=k[d>>2]|0;if(!c){p=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;p=c;break}}else{f=k[a+(b+8)>>2]|0;if(f>>>0>>0)Pa();c=f+12|0;if((k[c>>2]|0)!=(q|0))Pa();d=e+8|0;if((k[d>>2]|0)==(q|0)){k[c>>2]=e;k[d>>2]=f;p=e;break}else Pa()}}while(0);if(h){c=k[a+(b+28)>>2]|0;d=41176+(c<<2)|0;if((q|0)==(k[d>>2]|0)){k[d>>2]=p;if(!p){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();c=h+16|0;if((k[c>>2]|0)==(q|0))k[c>>2]=p;else k[h+20>>2]=p;if(!p)break}d=k[10222]|0;if(p>>>0>>0)Pa();k[p+24>>2]=h;c=k[a+(b+16)>>2]|0;do{if(c)if(c>>>0>>0)Pa();else{k[p+16>>2]=c;k[c+24>>2]=p;break}}while(0);c=k[a+(b+20)>>2]|0;if(c)if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[p+20>>2]=c;k[c+24>>2]=p;break}}}else{e=k[a+(b+8)>>2]|0;d=k[a+(b+12)>>2]|0;c=40912+(f<<1<<2)|0;if((e|0)!=(c|0)){if(e>>>0>>0)Pa();if((k[e+12>>2]|0)!=(q|0))Pa()}if((d|0)==(e|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();c=d+8|0;if((k[c>>2]|0)==(q|0))o=c;else Pa()}else o=d+8|0;k[e+12>>2]=d;k[o>>2]=e}}while(0);k[t+4>>2]=g|1;k[t+g>>2]=g;if((t|0)==(k[10223]|0)){k[10220]=g;return}}else{k[c>>2]=d&-2;k[t+4>>2]=g|1;k[t+g>>2]=g}c=g>>>3;if(g>>>0<256){d=c<<1;f=40912+(d<<2)|0;e=k[10218]|0;c=1<>2]|0;if(d>>>0<(k[10222]|0)>>>0)Pa();else{r=c;s=d}}else{k[10218]=e|c;r=40912+(d+2<<2)|0;s=f}k[r>>2]=t;k[s+12>>2]=t;k[t+8>>2]=s;k[t+12>>2]=f;return}c=g>>>8;if(c)if(g>>>0>16777215)f=31;else{r=(c+1048320|0)>>>16&8;s=c<>>16&4;s=s<>>16&2;f=14-(q|r|f)+(s<>>15)|0;f=g>>>(f+7|0)&1|f<<1}else f=0;c=41176+(f<<2)|0;k[t+28>>2]=f;k[t+20>>2]=0;k[t+16>>2]=0;d=k[10219]|0;e=1<>2]=t;k[t+24>>2]=c;k[t+12>>2]=t;k[t+8>>2]=t;return}c=k[c>>2]|0;a:do{if((k[c+4>>2]&-8|0)!=(g|0)){f=g<<((f|0)==31?0:25-(f>>>1)|0);while(1){d=c+16+(f>>>31<<2)|0;e=k[d>>2]|0;if(!e)break;if((k[e+4>>2]&-8|0)==(g|0)){c=e;break a}else{f=f<<1;c=e}}if(d>>>0<(k[10222]|0)>>>0)Pa();k[d>>2]=t;k[t+24>>2]=c;k[t+12>>2]=t;k[t+8>>2]=t;return}}while(0);d=c+8|0;e=k[d>>2]|0;s=k[10222]|0;if(!(e>>>0>=s>>>0&c>>>0>=s>>>0))Pa();k[e+12>>2]=t;k[d>>2]=t;k[t+8>>2]=e;k[t+12>>2]=c;k[t+24>>2]=0;return}function Vl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=k[9321]|0;Zl(42048,d,42104);k[10342]=42892;k[10344]=42912;k[10343]=0;a=k[10720]|0;x=0;ra(62,41368+a|0,42048);f=x;x=0;if(f&1){f=Wa()|0;qn(41376);fb(f|0)}k[41368+(a+72)>>2]=0;k[41368+(a+76)>>2]=-1;e=k[9322]|0;_l(42152,e,42112);k[10364]=42972;k[10365]=42992;c=k[10740]|0;x=0;ra(62,41456+c|0,42152);f=x;x=0;if(f&1){f=Wa()|0;qn(41460);fb(f|0)}a=c+72|0;k[41456+a>>2]=0;b=c+76|0;k[41456+b>>2]=-1;f=k[9320]|0;_l(42200,f,42120);k[10385]=42972;k[10386]=42992;x=0;ra(62,41540+c|0,42200);g=x;x=0;if(g&1){g=Wa()|0;qn(41544);fb(g|0)}k[41540+a>>2]=0;k[41540+b>>2]=-1;g=k[41540+((k[(k[10385]|0)+-12>>2]|0)+24)>>2]|0;k[10406]=42972;k[10407]=42992;x=0;ra(62,41624+c|0,g|0);g=x;x=0;if(g&1){g=Wa()|0;qn(41628);fb(g|0)}k[41624+a>>2]=0;k[41624+b>>2]=-1;k[41368+((k[(k[10342]|0)+-12>>2]|0)+72)>>2]=41456;a=41540+((k[(k[10385]|0)+-12>>2]|0)+4)|0;k[a>>2]=k[a>>2]|8192;k[41540+((k[(k[10385]|0)+-12>>2]|0)+72)>>2]=41456;$l(42248,d,42128);k[10427]=42932;k[10429]=42952;k[10428]=0;a=k[10730]|0;x=0;ra(62,41708+a|0,42248);g=x;x=0;if(g&1){g=Wa()|0;vn(41716);fb(g|0)}k[41708+(a+72)>>2]=0;k[41708+(a+76)>>2]=-1;am(42304,e,42136);k[10449]=43012;k[10450]=43032;c=k[10750]|0;x=0;ra(62,41796+c|0,42304);g=x;x=0;if(g&1){g=Wa()|0;vn(41800);fb(g|0)}a=c+72|0;k[41796+a>>2]=0;b=c+76|0;k[41796+b>>2]=-1;am(42352,f,42144);k[10470]=43012;k[10471]=43032;x=0;ra(62,41880+c|0,42352);g=x;x=0;if(g&1){g=Wa()|0;vn(41884);fb(g|0)}k[41880+a>>2]=0;k[41880+b>>2]=-1;g=k[41880+((k[(k[10470]|0)+-12>>2]|0)+24)>>2]|0;k[10491]=43012;k[10492]=43032;x=0;ra(62,41964+c|0,g|0);g=x;x=0;if(g&1){g=Wa()|0;vn(41968);fb(g|0)}else{k[41964+a>>2]=0;k[41964+b>>2]=-1;k[41708+((k[(k[10427]|0)+-12>>2]|0)+72)>>2]=41796;g=41880+((k[(k[10470]|0)+-12>>2]|0)+4)|0;k[g>>2]=k[g>>2]|8192;k[41880+((k[(k[10470]|0)+-12>>2]|0)+72)>>2]=41796;return}}function Wl(a){a=a|0;x=0;ta(70,41456)|0;a=x;x=0;if(((!(a&1)?(x=0,ta(70,41624)|0,a=x,x=0,!(a&1)):0)?(x=0,ta(71,41796)|0,a=x,x=0,!(a&1)):0)?(x=0,ta(71,41964)|0,a=x,x=0,!(a&1)):0)return;a=Wa(0)|0;oc(a)}function Xl(){Vl(0);tb(187,56757,w|0)|0;return}function Yl(){return}function Zl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;zn(a);k[a>>2]=42600;k[a+32>>2]=b;k[a+40>>2]=c;k[a+48>>2]=-1;i[a+52>>0]=0;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;ra(23,a|0,d|0);c=x;x=0;if(c&1){f=Wa()|0;Qs(d);xn(a);fb(f|0)}else{Qs(d);r=e;return}}function _l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;zn(a);k[a>>2]=42536;k[a+32>>2]=b;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;b=Aa(37,d|0,44280)|0;f=x;x=0;if(f&1){f=Wa()|0;Qs(d);xn(a);fb(f|0)}else{Qs(d);k[a+36>>2]=b;k[a+40>>2]=c;f=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=f;r=e;return}}function $l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;On(a);k[a>>2]=42472;k[a+32>>2]=b;k[a+40>>2]=c;k[a+48>>2]=-1;i[a+52>>0]=0;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;ra(21,a|0,d|0);c=x;x=0;if(c&1){f=Wa()|0;Qs(d);Mn(a);fb(f|0)}else{Qs(d);r=e;return}}function am(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;On(a);k[a>>2]=42408;k[a+32>>2]=b;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;b=Aa(37,d|0,44288)|0;f=x;x=0;if(f&1){f=Wa()|0;Qs(d);Mn(a);fb(f|0)}else{Qs(d);k[a+36>>2]=b;k[a+40>>2]=c;f=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=f;r=e;return}}function bm(a){a=a|0;Mn(a);mj(a);return}function cm(a,b){a=a|0;b=b|0;Ob[k[(k[a>>2]|0)+24>>2]&127](a)|0;b=Ss(b,44288)|0;k[a+36>>2]=b;b=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=b;return}function dm(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j;c=a+36|0;d=a+40|0;e=h+8|0;f=h;b=a+32|0;a:while(1){a=k[c>>2]|0;a=Wb[k[(k[a>>2]|0)+20>>2]&31](a,k[d>>2]|0,h,e,g)|0;l=(k[g>>2]|0)-f|0;if((gl(h,1,l,k[b>>2]|0)|0)!=(l|0)){a=-1;break}switch(a|0){case 1:break;case 2:{a=-1;break a}default:{i=4;break a}}}if((i|0)==4)a=((dl(k[b>>2]|0)|0)!=0)<<31>>31;r=j;return a|0}function em(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:do{if(!(i[a+44>>0]|0))if((c|0)>0){d=b;b=0;while(1){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,k[d>>2]|0)|0)==-1)break a;b=b+1|0;if((b|0)<(c|0))d=d+4|0;else break}}else b=0;else b=gl(b,4,c,k[a+32>>2]|0)|0}while(0);return b|0}function fm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+32|0;o=s+16|0;c=s+8|0;n=s+4|0;m=s;p=(b|0)==-1;a:do{if(!p){k[c>>2]=b;if(i[a+44>>0]|0)if((gl(c,4,1,k[a+32>>2]|0)|0)==1){q=11;break}else{c=-1;break}k[n>>2]=o;j=c+4|0;l=a+36|0;e=a+40|0;f=o+8|0;g=o;h=a+32|0;while(1){a=k[l>>2]|0;a=ac[k[(k[a>>2]|0)+12>>2]&15](a,k[e>>2]|0,c,j,m,o,f,n)|0;if((k[m>>2]|0)==(c|0)){c=-1;break a}if((a|0)==3)break;d=(a|0)==1;if(a>>>0>=2){c=-1;break a}a=(k[n>>2]|0)-g|0;if((gl(o,1,a,k[h>>2]|0)|0)!=(a|0)){c=-1;break a}if(d)c=d?k[m>>2]|0:c;else{q=11;break a}}if((gl(c,1,1,k[h>>2]|0)|0)!=1)c=-1;else q=11}else q=11}while(0);if((q|0)==11)c=p?0:b;r=s;return c|0}function gm(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ss(b,44288)|0;c=a+36|0;k[c>>2]=d;d=Ob[k[(k[d>>2]|0)+24>>2]&127](d)|0;b=a+44|0;k[b>>2]=d;c=k[c>>2]|0;c=(Ob[k[(k[c>>2]|0)+28>>2]&127](c)|0)&1;i[a+53>>0]=c;if((k[b>>2]|0)>8)$r(56783);return}function hm(a){a=a|0;Mn(a);mj(a);return}function im(a){a=a|0;return lm(a,0)|0}function jm(a){a=a|0;return lm(a,1)|0}function km(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;j=l+16|0;h=l+8|0;d=l+4|0;e=l;f=a+52|0;c=(i[f>>0]|0)!=0;a:do{if((b|0)==-1)if(c)b=-1;else{b=k[a+48>>2]|0;i[f>>0]=(b|0)!=-1&1}else{g=a+48|0;b:do{if(c){k[d>>2]=k[g>>2];c=k[a+36>>2]|0;switch(ac[k[(k[c>>2]|0)+12>>2]&15](c,k[a+40>>2]|0,d,d+4|0,e,j,j+8|0,h)|0){case 1:case 2:{b=-1;break a}case 3:{i[j>>0]=k[g>>2];k[h>>2]=j+1;break}default:{}}c=a+32|0;while(1){d=k[h>>2]|0;if(d>>>0<=j>>>0)break b;a=d+-1|0;k[h>>2]=a;if((kl(i[a>>0]|0,k[c>>2]|0)|0)==-1){b=-1;break a}}}}while(0);k[g>>2]=b;i[f>>0]=1}}while(0);r=l;return b|0}function lm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;q=r;r=r+32|0;p=q+16|0;o=q+8|0;l=q+4|0;m=q;e=a+52|0;a:do{if(i[e>>0]|0){d=a+48|0;c=k[d>>2]|0;if(b){k[d>>2]=-1;i[e>>0]=0}}else{c=k[a+44>>2]|0;c=(c|0)>1?c:1;n=a+32|0;if((c|0)>0){e=0;do{d=hl(k[n>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[p+e>>0]=d;e=e+1|0}while((e|0)<(c|0))}b:do{if(!(i[a+53>>0]|0)){g=a+40|0;h=a+36|0;j=o+4|0;c:while(1){s=k[g>>2]|0;e=s;d=k[e>>2]|0;e=k[e+4>>2]|0;t=k[h>>2]|0;f=p+c|0;switch(ac[k[(k[t>>2]|0)+16>>2]&15](t,s,p,f,l,o,j,m)|0){case 2:{c=-1;break a}case 3:break c;case 1:break;default:break b}t=k[g>>2]|0;k[t>>2]=d;k[t+4>>2]=e;if((c|0)==8){c=-1;break a}d=hl(k[n>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[f>>0]=d;c=c+1|0}k[o>>2]=i[p>>0]}else k[o>>2]=i[p>>0]}while(0);if(b){c=k[o>>2]|0;k[a+48>>2]=c;break}while(1){if((c|0)<=0)break;c=c+-1|0;if((kl(i[p+c>>0]|0,k[n>>2]|0)|0)==-1){c=-1;break a}}c=k[o>>2]|0}}while(0);r=q;return c|0}function mm(a){a=a|0;xn(a);mj(a);return}function nm(a,b){a=a|0;b=b|0;Ob[k[(k[a>>2]|0)+24>>2]&127](a)|0;b=Ss(b,44280)|0;k[a+36>>2]=b;b=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=b;return}function om(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j;c=a+36|0;d=a+40|0;e=h+8|0;f=h;b=a+32|0;a:while(1){a=k[c>>2]|0;a=Wb[k[(k[a>>2]|0)+20>>2]&31](a,k[d>>2]|0,h,e,g)|0;l=(k[g>>2]|0)-f|0;if((gl(h,1,l,k[b>>2]|0)|0)!=(l|0)){a=-1;break}switch(a|0){case 1:break;case 2:{a=-1;break a}default:{i=4;break a}}}if((i|0)==4)a=((dl(k[b>>2]|0)|0)!=0)<<31>>31;r=j;return a|0}function pm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:do{if(!(i[a+44>>0]|0))if((c|0)>0){d=b;b=0;while(1){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,l[d>>0]|0)|0)==-1)break a;b=b+1|0;if((b|0)<(c|0))d=d+1|0;else break}}else b=0;else b=gl(b,1,c,k[a+32>>2]|0)|0}while(0);return b|0}function qm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+32|0;o=s+16|0;c=s+8|0;n=s+4|0;m=s;p=(b|0)==-1;a:do{if(!p){i[c>>0]=b;if(i[a+44>>0]|0)if((gl(c,1,1,k[a+32>>2]|0)|0)==1){q=11;break}else{c=-1;break}k[n>>2]=o;l=c+1|0;e=a+36|0;f=a+40|0;g=o+8|0;h=o;j=a+32|0;while(1){a=k[e>>2]|0;a=ac[k[(k[a>>2]|0)+12>>2]&15](a,k[f>>2]|0,c,l,m,o,g,n)|0;if((k[m>>2]|0)==(c|0)){c=-1;break a}if((a|0)==3)break;d=(a|0)==1;if(a>>>0>=2){c=-1;break a}a=(k[n>>2]|0)-h|0;if((gl(o,1,a,k[j>>2]|0)|0)!=(a|0)){c=-1;break a}if(d)c=d?k[m>>2]|0:c;else{q=11;break a}}if((gl(c,1,1,k[j>>2]|0)|0)!=1)c=-1;else q=11}else q=11}while(0);if((q|0)==11)c=p?0:b;r=s;return c|0}function rm(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ss(b,44280)|0;c=a+36|0;k[c>>2]=d;d=Ob[k[(k[d>>2]|0)+24>>2]&127](d)|0;b=a+44|0;k[b>>2]=d;c=k[c>>2]|0;c=(Ob[k[(k[c>>2]|0)+28>>2]&127](c)|0)&1;i[a+53>>0]=c;if((k[b>>2]|0)>8)$r(56783);return}function sm(a){a=a|0;xn(a);mj(a);return}function tm(a){a=a|0;return wm(a,0)|0}function um(a){a=a|0;return wm(a,1)|0}function vm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;j=l+16|0;h=l+4|0;d=l+8|0;e=l;f=a+52|0;c=(i[f>>0]|0)!=0;a:do{if((b|0)==-1)if(c)b=-1;else{b=k[a+48>>2]|0;i[f>>0]=(b|0)!=-1&1}else{g=a+48|0;b:do{if(c){i[d>>0]=k[g>>2];c=k[a+36>>2]|0;switch(ac[k[(k[c>>2]|0)+12>>2]&15](c,k[a+40>>2]|0,d,d+1|0,e,j,j+8|0,h)|0){case 1:case 2:{b=-1;break a}case 3:{i[j>>0]=k[g>>2];k[h>>2]=j+1;break}default:{}}c=a+32|0;while(1){d=k[h>>2]|0;if(d>>>0<=j>>>0)break b;a=d+-1|0;k[h>>2]=a;if((kl(i[a>>0]|0,k[c>>2]|0)|0)==-1){b=-1;break a}}}}while(0);k[g>>2]=b;i[f>>0]=1}}while(0);r=l;return b|0}function wm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;s=r;r=r+32|0;q=s+16|0;p=s+8|0;m=s+4|0;n=s;e=a+52|0;a:do{if(i[e>>0]|0){d=a+48|0;c=k[d>>2]|0;if(b){k[d>>2]=-1;i[e>>0]=0}}else{c=k[a+44>>2]|0;c=(c|0)>1?c:1;o=a+32|0;if((c|0)>0){e=0;do{d=hl(k[o>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[q+e>>0]=d;e=e+1|0}while((e|0)<(c|0))}b:do{if(!(i[a+53>>0]|0)){g=a+40|0;h=a+36|0;j=p+1|0;c:while(1){t=k[g>>2]|0;e=t;d=k[e>>2]|0;e=k[e+4>>2]|0;u=k[h>>2]|0;f=q+c|0;switch(ac[k[(k[u>>2]|0)+16>>2]&15](u,t,q,f,m,p,j,n)|0){case 2:{c=-1;break a}case 3:break c;case 1:break;default:break b}u=k[g>>2]|0;k[u>>2]=d;k[u+4>>2]=e;if((c|0)==8){c=-1;break a}d=hl(k[o>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[f>>0]=d;c=c+1|0}i[p>>0]=i[q>>0]|0}else i[p>>0]=i[q>>0]|0}while(0);if(b){c=i[p>>0]|0;k[a+48>>2]=c&255}else{while(1){if((c|0)<=0)break;c=c+-1|0;if((kl(l[q+c>>0]|0,k[o>>2]|0)|0)==-1){c=-1;break a}}c=i[p>>0]|0}c=c&255}}while(0);r=s;return c|0}function xm(a){a=a|0;return}function ym(a){a=a|0;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;return}function zm(a){a=a|0;var b=0,c=0;c=a+4|0;b=k[c>>2]|0;k[c>>2]=b+-1;if(!b){Lb[k[(k[a>>2]|0)+8>>2]&255](a);a=1}else a=0;return a|0}function Am(a,b){a=a|0;b=b|0;k[a>>2]=36868;x=0;ra(86,a+4|0,((i[b>>0]&1)==0?b+1|0:k[b+8>>2]|0)|0);a=x;x=0;if(a&1){a=Wa()|0;fb(a|0)}else return}function Bm(a,b){a=a|0;b=b|0;k[a>>2]=36868;x=0;ra(86,a+4|0,b|0);a=x;x=0;if(a&1){a=Wa()|0;fb(a|0)}else return}function Cm(a,b){a=a|0;b=b|0;var c=0,d=0;d=xl(b)|0;c=lj(d+13|0)|0;k[c>>2]=d;k[c+4>>2]=d;k[c+8>>2]=0;c=c+12|0;vw(c|0,b|0,d+1|0)|0;k[a>>2]=c;return}function Dm(a,b,c){a=a|0;b=b|0;c=c|0;k[a>>2]=c;k[a+4>>2]=b;return}function Em(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+16|0;d=e;_b[k[(k[a>>2]|0)+12>>2]&15](d,a,b);if((k[d+4>>2]|0)==(k[c+4>>2]|0))d=(k[d>>2]|0)==(k[c>>2]|0);else d=0;r=e;return d|0}function Fm(a,b,c){a=a|0;b=b|0;c=c|0;return((k[b>>2]|0)==(c|0)?(k[b+4>>2]|0)==(a|0):0)|0}function Gm(a,b,c){a=a|0;b=b|0;c=c|0;b=nk(c)|0;Qm(a,b,xl(b)|0);return}function Hm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+16|0;f=g;d=k[b>>2]|0;do{if(d){e=i[c>>0]|0;if(!(e&1))e=(e&255)>>>1;else e=k[c+4>>2]|0;if(e){Zm(c,56990)|0;d=k[b>>2]|0}b=k[b+4>>2]|0;_b[k[(k[b>>2]|0)+24>>2]&15](f,b,d);b=i[f>>0]|0;e=(b&1)==0;x=0;va(30,c|0,(e?f+1|0:k[f+8>>2]|0)|0,(e?(b&255)>>>1:k[f+4>>2]|0)|0)|0;b=x;x=0;if(b&1){g=Wa()|0;Sm(f);fb(g|0)}else{Sm(f);break}}}while(0);k[a>>2]=k[c>>2];k[a+4>>2]=k[c+4>>2];k[a+8>>2]=k[c+8>>2];k[c>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;r=g;return}function Im(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+32|0;d=e+12|0;f=e;Qm(f,c,xl(c)|0);x=0;Fa(10,d|0,b|0,f|0);c=x;x=0;do{if(!(c&1)){x=0;ra(87,a|0,d|0);c=x;x=0;if(c&1){e=Wa()|0;Sm(d);d=e;break}else{Sm(d);Sm(f);k[a>>2]=42664;c=k[b+4>>2]|0;f=a+8|0;k[f>>2]=k[b>>2];k[f+4>>2]=c;r=e;return}}else d=Wa()|0}while(0);Sm(f);fb(d|0)}function Jm(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;f=r;r=r+48|0;e=f+24|0;h=f+16|0;g=f;k[h>>2]=b;k[h+4>>2]=c;Pm(g,d);x=0;Fa(10,e|0,h|0,g|0);d=x;x=0;do{if(!(d&1)){x=0;ra(87,a|0,e|0);h=x;x=0;if(h&1){h=Wa()|0;Sm(e);e=h;break}else{Sm(e);Sm(g);k[a>>2]=42664;k[a+8>>2]=b;k[a+12>>2]=c;r=f;return}}else e=Wa()|0}while(0);Sm(g);fb(e|0)}function Km(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=r;r=r+48|0;d=e+24|0;g=e+16|0;f=e;k[g>>2]=b;k[g+4>>2]=c;Qm(f,58898,0);x=0;Fa(10,d|0,g|0,f|0);g=x;x=0;do{if(!(g&1)){x=0;ra(87,a|0,d|0);g=x;x=0;if(g&1){g=Wa()|0;Sm(d);d=g;break}else{Sm(d);Sm(f);k[a>>2]=42664;k[a+8>>2]=b;k[a+12>>2]=c;r=e;return}}else d=Wa()|0}while(0);Sm(f);fb(d|0)}function Lm(a){a=a|0;wj(a);return}function Mm(a){a=a|0;wj(a);mj(a);return}function Nm(a){a=a|0;return}function Om(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;Ab(42676)|0;if((k[a>>2]|0)==1)do{Ma(42704,42676)|0}while((k[a>>2]|0)==1);do{if(!(k[a>>2]|0)){k[a>>2]=1;x=0;ta(72,42676)|0;d=x;x=0;if((((!(d&1)?(x=0,qa(c|0,b|0),d=x,x=0,!(d&1)):0)?(x=0,ta(73,42676)|0,d=x,x=0,!(d&1)):0)?(k[a>>2]=-1,x=0,ta(72,42676)|0,d=x,x=0,!(d&1)):0)?(x=0,ta(74,42704)|0,d=x,x=0,!(d&1)):0)break;d=Wa(0)|0;cb(d|0)|0;x=0;ta(73,42676)|0;d=x;x=0;if((!(d&1)?(k[a>>2]=0,x=0,ta(72,42676)|0,d=x,x=0,!(d&1)):0)?(x=0,ta(74,42704)|0,d=x,x=0,!(d&1)):0){x=0;Ga(5);x=0}b=Wa()|0;x=0;Ga(3);d=x;x=0;if(d&1){d=Wa(0)|0;oc(d)}else fb(b|0)}else lb(42676)|0}while(0);return}function Pm(a,b){a=a|0;b=b|0;if(!(i[b>>0]&1)){k[a>>2]=k[b>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2]}else Qm(a,k[b+8>>2]|0,k[b+4>>2]|0);return}function Qm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(c>>>0>4294967279)ij(a);if(c>>>0<11){i[a>>0]=c<<1;a=a+1|0}else{e=c+16&-16;d=lj(e)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=c;a=d}vw(a|0,b|0,c|0)|0;i[a+c>>0]=0;return}function Rm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(b>>>0>4294967279)ij(a);if(b>>>0<11){i[a>>0]=b<<1;a=a+1|0}else{e=b+16&-16;d=lj(e)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=b;a=d}sw(a|0,c|0,b|0)|0;i[a+b>>0]=0;return}function Sm(a){a=a|0;if(i[a>>0]&1)mj(k[a+8>>2]|0);return}function Tm(a,b){a=a|0;b=b|0;var c=0,d=0;if((a|0)!=(b|0)){c=i[b>>0]|0;d=(c&1)==0;Vm(a,d?b+1|0:k[b+8>>2]|0,d?(c&255)>>>1:k[b+4>>2]|0)|0}return a|0}function Um(a,b){a=a|0;b=b|0;return Vm(a,b,xl(b)|0)|0}function Vm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))f=10;else{d=k[a>>2]|0;f=(d&-2)+-1|0;d=d&255}e=(d&1)==0;do{if(f>>>0>=c>>>0){if(e)d=a+1|0;else d=k[a+8>>2]|0;xw(d|0,b|0,c|0)|0;i[d+c>>0]=0;if(!(i[a>>0]&1)){i[a>>0]=c<<1;break}else{k[a+4>>2]=c;break}}else{if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;an(a,f,c-f|0,d,0,d,c,b)}}while(0);return a|0}function Wm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=i[a>>0]|0;e=(d&1)==0;if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;do{if(d>>>0>=b>>>0)if(e){i[a+1+b>>0]=0;i[a>>0]=b<<1;break}else{i[(k[a+8>>2]|0)+b>>0]=0;k[a+4>>2]=b;break}else Xm(a,b-d|0,c)|0}while(0);return}function Xm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(b){d=i[a>>0]|0;if(!(d&1))e=10;else{d=k[a>>2]|0;e=(d&-2)+-1|0;d=d&255}if(!(d&1))f=(d&255)>>>1;else f=k[a+4>>2]|0;if((e-f|0)>>>0>>0){bn(a,e,b-e+f|0,f,f,0,0);d=i[a>>0]|0}if(!(d&1))e=a+1|0;else e=k[a+8>>2]|0;sw(e+f|0,c|0,b|0)|0;d=f+b|0;if(!(i[a>>0]&1))i[a>>0]=d<<1;else k[a+4>>2]=d;i[e+d>>0]=0}return a|0}function Ym(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if(b>>>0>4294967279)ij(a);c=i[a>>0]|0;if(!(c&1))d=10;else{c=k[a>>2]|0;d=(c&-2)+-1|0;c=c&255}if(!(c&1))h=(c&255)>>>1;else h=k[a+4>>2]|0;b=h>>>0>b>>>0?h:b;if(b>>>0<11)g=10;else g=(b+16&-16)+-1|0;a:do{if((g|0)!=(d|0)){do{if((g|0)!=10){b=g+1|0;if(g>>>0<=d>>>0){x=0;b=ta(67,b|0)|0;f=x;x=0;if(f&1){a=Wa(0)|0;cb(a|0)|0;eb();break a}}else b=lj(b)|0;if(!(c&1)){d=1;e=a+1|0;f=0;break}else{d=1;e=k[a+8>>2]|0;f=1;break}}else{b=a+1|0;d=0;e=k[a+8>>2]|0;f=1}}while(0);if(!(c&1))c=(c&255)>>>1;else c=k[a+4>>2]|0;vw(b|0,e|0,c+1|0)|0;if(f)mj(e);if(d){k[a>>2]=g+1|1;k[a+4>>2]=h;k[a+8>>2]=b;break}else{i[a>>0]=h<<1;break}}}while(0);return}function Zm(a,b){a=a|0;b=b|0;return $m(a,b,xl(b)|0)|0}function _m(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=i[a>>0]|0;d=(c&1)!=0;if(d){e=(k[a>>2]&-2)+-1|0;f=k[a+4>>2]|0}else{e=10;f=(c&255)>>>1}if((f|0)==(e|0)){bn(a,e,1,e,e,0,0);if(!(i[a>>0]&1))e=7;else e=8}else if(d)e=8;else e=7;if((e|0)==7){i[a>>0]=(f<<1)+2;c=a+1|0;d=f+1|0}else if((e|0)==8){c=k[a+8>>2]|0;d=f+1|0;k[a+4>>2]=d}i[c+f>>0]=b;i[c+d>>0]=0;return}function $m(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))e=10;else{d=k[a>>2]|0;e=(d&-2)+-1|0;d=d&255}if(!(d&1))f=(d&255)>>>1;else f=k[a+4>>2]|0;if((e-f|0)>>>0>=c>>>0){if(c){if(!(d&1))e=a+1|0;else e=k[a+8>>2]|0;vw(e+f|0,b|0,c|0)|0;d=f+c|0;if(!(i[a>>0]&1))i[a>>0]=d<<1;else k[a+4>>2]=d;i[e+d>>0]=0}}else an(a,e,c-e+f|0,f,f,0,c,b);return a|0}function an(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0;if((-18-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))m=a+1|0;else m=k[a+8>>2]|0;if(b>>>0<2147483623){j=c+b|0;l=b<<1;j=j>>>0>>0?l:j;j=j>>>0<11?11:j+16&-16}else j=-17;l=lj(j)|0;if(e)vw(l|0,m|0,e|0)|0;if(g)vw(l+e|0,h|0,g|0)|0;c=d-f|0;if((c|0)!=(e|0))vw(l+(g+e)|0,m+(f+e)|0,c-e|0)|0;if((b|0)!=10)mj(m);k[a+8>>2]=l;k[a>>2]=j|1;b=c+g|0;k[a+4>>2]=b;i[l+b>>0]=0;return}function bn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0;if((-17-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))l=a+1|0;else l=k[a+8>>2]|0;if(b>>>0<2147483623){h=c+b|0;j=b<<1;h=h>>>0>>0?j:h;h=h>>>0<11?11:h+16&-16}else h=-17;j=lj(h)|0;if(e)vw(j|0,l|0,e|0)|0;c=d-f|0;if((c|0)!=(e|0))vw(j+(g+e)|0,l+(f+e)|0,c-e|0)|0;if((b|0)!=10)mj(l);k[a+8>>2]=j;k[a>>2]=h|1;return}function cn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(c>>>0>1073741807)ij(a);if(c>>>0<2){i[a>>0]=c<<1;a=a+4|0}else{e=c+4&-4;d=lj(e<<2)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=c;a=d}Al(a,b,c)|0;k[a+(c<<2)>>2]=0;return}function dn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(b>>>0>1073741807)ij(a);if(b>>>0<2){i[a>>0]=b<<1;a=a+4|0}else{e=b+4&-4;d=lj(e<<2)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=b;a=d}Cl(a,c,b)|0;k[a+(b<<2)>>2]=0;return}function en(a){a=a|0;if(i[a>>0]&1)mj(k[a+8>>2]|0);return}function fn(a,b){a=a|0;b=b|0;return gn(a,b,zl(b)|0)|0}function gn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))f=1;else{d=k[a>>2]|0;f=(d&-2)+-1|0;d=d&255}e=(d&1)==0;do{if(f>>>0>=c>>>0){if(e)d=a+4|0;else d=k[a+8>>2]|0;Bl(d,b,c)|0;k[d+(c<<2)>>2]=0;if(!(i[a>>0]&1)){i[a>>0]=c<<1;break}else{k[a+4>>2]=c;break}}else{if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;kn(a,f,c-f|0,d,0,d,c,b)}}while(0);return a|0}function hn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if(b>>>0>1073741807)ij(a);c=i[a>>0]|0;if(!(c&1))d=1;else{c=k[a>>2]|0;d=(c&-2)+-1|0;c=c&255}if(!(c&1))h=(c&255)>>>1;else h=k[a+4>>2]|0;b=h>>>0>b>>>0?h:b;if(b>>>0<2)g=1;else g=(b+4&-4)+-1|0;a:do{if((g|0)!=(d|0)){do{if((g|0)!=1){b=(g<<2)+4|0;if(g>>>0<=d>>>0){x=0;b=ta(67,b|0)|0;f=x;x=0;if(f&1){a=Wa(0)|0;cb(a|0)|0;eb();break a}}else b=lj(b)|0;if(!(c&1)){d=1;e=a+4|0;f=0;break}else{d=1;e=k[a+8>>2]|0;f=1;break}}else{b=a+4|0;d=0;e=k[a+8>>2]|0;f=1}}while(0);if(!(c&1))c=(c&255)>>>1;else c=k[a+4>>2]|0;Al(b,e,c+1|0)|0;if(f)mj(e);if(d){k[a>>2]=g+1|1;k[a+4>>2]=h;k[a+8>>2]=b;break}else{i[a>>0]=h<<1;break}}}while(0);return}function jn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=i[a>>0]|0;d=(c&1)!=0;if(d){e=(k[a>>2]&-2)+-1|0;f=k[a+4>>2]|0}else{e=1;f=(c&255)>>>1}if((f|0)==(e|0)){ln(a,e,1,e,e,0,0);if(!(i[a>>0]&1))e=7;else e=8}else if(d)e=8;else e=7;if((e|0)==7){i[a>>0]=(f<<1)+2;c=a+4|0;d=f+1|0}else if((e|0)==8){c=k[a+8>>2]|0;d=f+1|0;k[a+4>>2]=d}k[c+(f<<2)>>2]=b;k[c+(d<<2)>>2]=0;return}function kn(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0;if((1073741806-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))m=a+4|0;else m=k[a+8>>2]|0;if(b>>>0<536870887){j=c+b|0;l=b<<1;j=j>>>0>>0?l:j;j=j>>>0<2?2:j+4&-4}else j=1073741807;l=lj(j<<2)|0;if(e)Al(l,m,e)|0;if(g)Al(l+(e<<2)|0,h,g)|0;c=d-f|0;if((c|0)!=(e|0))Al(l+(g+e<<2)|0,m+(f+e<<2)|0,c-e|0)|0;if((b|0)!=1)mj(m);k[a+8>>2]=l;k[a>>2]=j|1;b=c+g|0;k[a+4>>2]=b;k[l+(b<<2)>>2]=0;return}function ln(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0;if((1073741807-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))l=a+4|0;else l=k[a+8>>2]|0;if(b>>>0<536870887){h=c+b|0;j=b<<1;h=h>>>0>>0?j:h;h=h>>>0<2?2:h+4&-4}else h=1073741807;j=lj(h<<2)|0;if(e)Al(j,l,e)|0;c=d-f|0;if((c|0)!=(e|0))Al(j+(g+e<<2)|0,l+(f+e<<2)|0,c-e|0)|0;if((b|0)!=1)mj(l);k[a+8>>2]=j;k[a>>2]=h|1;return}function mn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=b;d=c-e|0;if(d>>>0>4294967279)ij(a);if(d>>>0<11){i[a>>0]=d<<1;f=a+1|0}else{g=d+16&-16;f=lj(g)|0;k[a+8>>2]=f;k[a>>2]=g|1;k[a+4>>2]=d}a=c-e|0;if((b|0)!=(c|0)){d=f;while(1){i[d>>0]=i[b>>0]|0;b=b+1|0;if((b|0)==(c|0))break;else d=d+1|0}}i[f+a>>0]=0;return}function nn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b;d=c-f|0;e=d>>2;if(e>>>0>1073741807)ij(a);if(e>>>0<2){i[a>>0]=d>>>1;a=a+4|0}else{g=e+4&-4;d=lj(g<<2)|0;k[a+8>>2]=d;k[a>>2]=g|1;k[a+4>>2]=e;a=d}e=(c-f|0)>>>2;if((b|0)!=(c|0)){d=a;while(1){k[d>>2]=k[b>>2];b=b+4|0;if((b|0)==(c|0))break;else d=d+4|0}}k[a+(e<<2)>>2]=0;return}function on(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=r;r=r+16|0;d=c;e=(k[a+24>>2]|0)==0;k[a+16>>2]=e&1|b;if(!((e&1|b)&k[a+20>>2])){r=c;return}b=Va(16)|0;Co()|0;k[d>>2]=1;k[d+4>>2]=43112;x=0;Fa(11,b|0,57437,d|0);e=x;x=0;if(e&1){e=Wa()|0;Ua(b|0);fb(e|0)}else ub(b|0,864,112)}function pn(a){a=a|0;var b=0;k[a>>2]=43068;x=0;ra(88,a|0,0);b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else{Qs(a+28|0);Ql(k[a+32>>2]|0);Ql(k[a+36>>2]|0);Ql(k[a+48>>2]|0);Ql(k[a+60>>2]|0);return}}function qn(a){a=a|0;pn(a);return}function rn(a){a=a|0;pn(a);mj(a);return}function sn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=k[a+40>>2]|0;d=a+32|0;e=a+36|0;if(c)do{c=c+-1|0;_b[k[(k[d>>2]|0)+(c<<2)>>2]&15](b,a,k[(k[e>>2]|0)+(c<<2)>>2]|0)}while((c|0)!=0);return}function tn(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;Ps(b,a+28|0);r=c;return k[b>>2]|0}function un(a,b){a=a|0;b=b|0;var c=0;k[a+24>>2]=b;k[a+16>>2]=(b|0)==0&1;k[a+20>>2]=0;k[a+4>>2]=4098;k[a+12>>2]=0;k[a+8>>2]=6;c=a+28|0;b=a+32|0;a=b+40|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(a|0));Os(c);return}function vn(a){a=a|0;pn(a);return}function wn(a){a=a|0;pn(a);mj(a);return}function xn(a){a=a|0;k[a>>2]=42760;Qs(a+4|0);return}function yn(a){a=a|0;k[a>>2]=42760;Qs(a+4|0);mj(a);return}function zn(a){a=a|0;k[a>>2]=42760;Os(a+4|0);a=a+8|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;return}function An(a,b){a=a|0;b=b|0;return}function Bn(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function Cn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function Dn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function En(a){a=a|0;return 0}function Fn(a){a=a|0;return 0}function Gn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+12|0;g=a+16|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0<(k[g>>2]|0)>>>0){k[f>>2]=d+1;d=i[d>>0]|0}else{d=Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;if((d|0)==-1)break a;d=d&255}i[e>>0]=d;b=b+1|0;if((b|0)<(c|0))e=e+1|0;else break}}else b=0}while(0);return b|0}function Hn(a){a=a|0;return-1}function In(a){a=a|0;var b=0;if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1)a=-1;else{b=a+12|0;a=k[b>>2]|0;k[b>>2]=a+1;a=l[a>>0]|0}return a|0}function Jn(a,b){a=a|0;b=b|0;return-1}function Kn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;f=a+24|0;g=a+28|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0>=(k[g>>2]|0)>>>0){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,l[e>>0]|0)|0)==-1)break a}else{h=i[e>>0]|0;k[f>>2]=d+1;i[d>>0]=h}b=b+1|0;if((b|0)<(c|0))e=e+1|0;else break}}else b=0}while(0);return b|0}function Ln(a,b){a=a|0;b=b|0;return-1}function Mn(a){a=a|0;k[a>>2]=42824;Qs(a+4|0);return}function Nn(a){a=a|0;k[a>>2]=42824;Qs(a+4|0);mj(a);return}function On(a){a=a|0;k[a>>2]=42824;Os(a+4|0);a=a+8|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;return}function Pn(a,b){a=a|0;b=b|0;return}function Qn(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function Rn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function Sn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function Tn(a){a=a|0;return 0}function Un(a){a=a|0;return 0}function Vn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+12|0;g=a+16|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0>=(k[g>>2]|0)>>>0){d=Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;if((d|0)==-1)break a}else{k[f>>2]=d+4;d=k[d>>2]|0}k[e>>2]=d;b=b+1|0;if((b|0)<(c|0))e=e+4|0;else break}}else b=0}while(0);return b|0}function Wn(a){a=a|0;return-1}function Xn(a){a=a|0;var b=0;if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1)a=-1;else{b=a+12|0;a=k[b>>2]|0;k[b>>2]=a+4;a=k[a>>2]|0}return a|0}function Yn(a,b){a=a|0;b=b|0;return-1}function Zn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;f=a+24|0;g=a+28|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0>=(k[g>>2]|0)>>>0){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,k[e>>2]|0)|0)==-1)break a}else{h=k[e>>2]|0;k[f>>2]=d+4;k[d>>2]=h}b=b+1|0;if((b|0)<(c|0))e=e+4|0;else break}}else b=0}while(0);return b|0}function _n(a,b){a=a|0;b=b|0;return-1}function $n(a){a=a|0;pn(a+8|0);return}function ao(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+8)|0);return}function bo(a){a=a|0;pn(a+8|0);mj(a);return}function co(a){a=a|0;bo(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function eo(a){a=a|0;var b=0,c=0,d=0,e=0;d=r;r=r+16|0;c=d;a:do{if(k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0){x=0;ra(65,c|0,a|0);b=x;x=0;b:do{if(b&1)b=Wa(0)|0;else{do{if(i[c>>0]|0){b=k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;e=x;x=0;if(!(e&1)){if((b|0)!=-1)break;e=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+e|0,k[a+(e+16)>>2]|1|0);e=x;x=0;if(!(e&1))break}b=Wa(0)|0;ro(c);break b}}while(0);ro(c);break a}}while(0);cb(b|0)|0;x=0;qa(181,a+(k[(k[a>>2]|0)+-12>>2]|0)|0);e=x;x=0;if(!(e&1)){eb();break}b=Wa()|0;x=0;Ga(3);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else fb(b|0)}}while(0);r=d;return a|0}function fo(a){a=a|0;var b=0;b=a+16|0;k[b>>2]=k[b>>2]|1;if(!(k[a+20>>2]&1))return;else vb()}function go(a){a=a|0;pn(a+8|0);return}function ho(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+8)|0);return}function io(a){a=a|0;pn(a+8|0);mj(a);return}function jo(a){a=a|0;io(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function ko(a){a=a|0;var b=0,c=0,d=0,e=0;d=r;r=r+16|0;c=d;a:do{ -if(k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0){x=0;ra(89,c|0,a|0);b=x;x=0;b:do{if(b&1)b=Wa(0)|0;else{do{if(i[c>>0]|0){b=k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;e=x;x=0;if(!(e&1)){if((b|0)!=-1)break;e=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+e|0,k[a+(e+16)>>2]|1|0);e=x;x=0;if(!(e&1))break}b=Wa(0)|0;zo(c);break b}}while(0);zo(c);break a}}while(0);cb(b|0)|0;x=0;qa(181,a+(k[(k[a>>2]|0)+-12>>2]|0)|0);e=x;x=0;if(!(e&1)){eb();break}b=Wa()|0;x=0;Ga(3);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else fb(b|0)}}while(0);r=d;return a|0}function lo(a,b){a=a|0;b=b|0;return}function mo(a){a=a|0;pn(a+4|0);return}function no(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+4)|0);return}function oo(a){a=a|0;pn(a+4|0);mj(a);return}function po(a){a=a|0;oo(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function qo(a,b){a=a|0;b=b|0;var c=0;i[a>>0]=0;k[a+4>>2]=b;c=k[(k[b>>2]|0)+-12>>2]|0;if(!(k[b+(c+16)>>2]|0)){c=k[b+(c+72)>>2]|0;if(c)eo(c)|0;i[a>>0]=1}return}function ro(a){a=a|0;var b=0,c=0;a=a+4|0;c=k[a>>2]|0;b=k[(k[c>>2]|0)+-12>>2]|0;do{if((((k[c+(b+24)>>2]|0)!=0?(k[c+(b+16)>>2]|0)==0:0)?(k[c+(b+4)>>2]&8192|0)!=0:0)?!(gb()|0):0){b=k[a>>2]|0;b=k[b+((k[(k[b>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;c=x;x=0;if(!(c&1)){if((b|0)!=-1)break;b=k[a>>2]|0;c=k[(k[b>>2]|0)+-12>>2]|0;x=0;ra(66,b+c|0,k[b+(c+16)>>2]|1|0);c=x;x=0;if(!(c&1))break}c=Wa(0)|0;cb(c|0)|0;x=0;Ga(3);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}}}while(0);return}function so(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+32|0;h=o+20|0;j=o+16|0;m=o+8|0;c=o;x=0;ra(65,m|0,a|0);l=x;x=0;a:do{if(l&1){c=Wa(0)|0;d=a;e=a;n=19}else{do{if(i[m>>0]|0){l=tn(a+(k[(k[a>>2]|0)+-12>>2]|0)|0)|0;k[c>>2]=l;x=0;l=Aa(37,c|0,43392)|0;g=x;x=0;if(g&1){n=Wa(0)|0;Qs(c);c=n}else{Qs(c);e=k[(k[a>>2]|0)+-12>>2]|0;g=k[a+(e+24)>>2]|0;d=a+e|0;e=a+(e+76)|0;c=k[e>>2]|0;do{if((c|0)==-1){c=tn(d)|0;k[h>>2]=c;x=0;c=Aa(37,h|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,f=Aa(k[(k[c>>2]|0)+28>>2]|0,c|0,32)|0,p=x,x=0,!(p&1)):0){Qs(h);c=f<<24>>24;k[e>>2]=c;n=10;break}c=Wa(0)|0;Qs(h)}else n=10}while(0);if((n|0)==10){p=k[(k[l>>2]|0)+16>>2]|0;k[j>>2]=g;x=0;k[h>>2]=k[j>>2];c=Ba(p|0,l|0,h|0,d|0,c&255|0,b|0)|0;p=x;x=0;if(!(p&1)){if(c)break;p=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+p|0,k[a+(p+16)>>2]|5|0);p=x;x=0;if(!(p&1))break}c=Wa(0)|0}}ro(m);d=a;e=a;n=19;break a}}while(0);ro(m)}}while(0);do{if((n|0)==19){cb(c|0)|0;x=0;qa(181,d+(k[(k[e>>2]|0)+-12>>2]|0)|0);p=x;x=0;if(!(p&1)){eb();break}c=Wa()|0;x=0;Ga(3);p=x;x=0;if(p&1){p=Wa(0)|0;oc(p)}else fb(c|0)}}while(0);r=o;return a|0}function to(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+32|0;h=o+20|0;j=o+16|0;m=o+8|0;c=o;x=0;ra(65,m|0,a|0);l=x;x=0;a:do{if(l&1){c=Wa(0)|0;d=a;e=a;n=19}else{do{if(i[m>>0]|0){l=tn(a+(k[(k[a>>2]|0)+-12>>2]|0)|0)|0;k[c>>2]=l;x=0;l=Aa(37,c|0,43392)|0;g=x;x=0;if(g&1){n=Wa(0)|0;Qs(c);c=n}else{Qs(c);e=k[(k[a>>2]|0)+-12>>2]|0;g=k[a+(e+24)>>2]|0;d=a+e|0;e=a+(e+76)|0;c=k[e>>2]|0;do{if((c|0)==-1){c=tn(d)|0;k[h>>2]=c;x=0;c=Aa(37,h|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,f=Aa(k[(k[c>>2]|0)+28>>2]|0,c|0,32)|0,p=x,x=0,!(p&1)):0){Qs(h);c=f<<24>>24;k[e>>2]=c;n=10;break}c=Wa(0)|0;Qs(h)}else n=10}while(0);if((n|0)==10){p=k[(k[l>>2]|0)+24>>2]|0;k[j>>2]=g;x=0;k[h>>2]=k[j>>2];c=Ba(p|0,l|0,h|0,d|0,c&255|0,b|0)|0;p=x;x=0;if(!(p&1)){if(c)break;p=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+p|0,k[a+(p+16)>>2]|5|0);p=x;x=0;if(!(p&1))break}c=Wa(0)|0}}ro(m);d=a;e=a;n=19;break a}}while(0);ro(m)}}while(0);do{if((n|0)==19){cb(c|0)|0;x=0;qa(181,d+(k[(k[e>>2]|0)+-12>>2]|0)|0);p=x;x=0;if(!(p&1)){eb();break}c=Wa()|0;x=0;Ga(3);p=x;x=0;if(p&1){p=Wa(0)|0;oc(p)}else fb(c|0)}}while(0);r=o;return a|0}function uo(a){a=a|0;pn(a+4|0);return}function vo(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+4)|0);return}function wo(a){a=a|0;pn(a+4|0);mj(a);return}function xo(a){a=a|0;wo(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function yo(a,b){a=a|0;b=b|0;var c=0;i[a>>0]=0;k[a+4>>2]=b;c=k[(k[b>>2]|0)+-12>>2]|0;if(!(k[b+(c+16)>>2]|0)){c=k[b+(c+72)>>2]|0;if(c)ko(c)|0;i[a>>0]=1}return}function zo(a){a=a|0;var b=0,c=0;a=a+4|0;c=k[a>>2]|0;b=k[(k[c>>2]|0)+-12>>2]|0;do{if((((k[c+(b+24)>>2]|0)!=0?(k[c+(b+16)>>2]|0)==0:0)?(k[c+(b+4)>>2]&8192|0)!=0:0)?!(gb()|0):0){b=k[a>>2]|0;b=k[b+((k[(k[b>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;c=x;x=0;if(!(c&1)){if((b|0)!=-1)break;b=k[a>>2]|0;c=k[(k[b>>2]|0)+-12>>2]|0;x=0;ra(66,b+c|0,k[b+(c+16)>>2]|1|0);c=x;x=0;if(!(c&1))break}c=Wa(0)|0;cb(c|0)|0;x=0;Ga(3);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}}}while(0);return}function Ao(a){a=a|0;return 57453}function Bo(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)!=1&(c|0)<257)Gm(a,b,c);else Qm(a,57462,35);return}function Co(){if((i[1048]|0)==0?(Qa(1048)|0)!=0:0){k[10778]=43084;tb(72,43112,w|0)|0;Ya(1048)}return 43112}function Do(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=r;r=r+16|0;e=d+8|0;f=d;h=c;g=k[h+4>>2]|0;c=f;k[c>>2]=k[h>>2];k[c+4>>2]=g;k[e>>2]=k[f>>2];k[e+4>>2]=k[f+4>>2];Im(a,e,b);k[a>>2]=43048;r=d;return}function Eo(a){a=a|0;Lm(a);return}function Fo(a){a=a|0;Lm(a);mj(a);return}function Go(a){a=a|0;pn(a);mj(a);return}function Ho(a){a=a|0;mj(a);return}function Io(a){a=a|0;return}function Jo(a){a=a|0;return}function Ko(a){a=a|0;mj(a);return}function Lo(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;a:do{if((d|0)==(e|0))g=6;else while(1){if((b|0)==(c|0)){b=-1;break a}a=i[b>>0]|0;f=i[d>>0]|0;if(a<<24>>24>24){b=-1;break a}if(f<<24>>24>24){b=1;break a}b=b+1|0;d=d+1|0;if((d|0)==(e|0)){g=6;break}}}while(0);if((g|0)==6)b=(b|0)!=(c|0)&1;return b|0}function Mo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;mn(a,c,d);return}function No(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)==(c|0))a=0;else{a=0;do{a=(i[b>>0]|0)+(a<<4)|0;d=a&-268435456;a=(d>>>24|d)^a;b=b+1|0}while((b|0)!=(c|0))}return a|0}function Oo(a){a=a|0;return}function Po(a){a=a|0;mj(a);return}function Qo(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;a:do{if((d|0)==(e|0))g=6;else while(1){if((b|0)==(c|0)){b=-1;break a}a=k[b>>2]|0;f=k[d>>2]|0;if((a|0)<(f|0)){b=-1;break a}if((f|0)<(a|0)){b=1;break a}b=b+4|0;d=d+4|0;if((d|0)==(e|0)){g=6;break}}}while(0);if((g|0)==6)b=(b|0)!=(c|0)&1;return b|0}function Ro(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;nn(a,c,d);return}function So(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)==(c|0))a=0;else{a=0;do{a=(k[b>>2]|0)+(a<<4)|0;d=a&-268435456;a=(d>>>24|d)^a;b=b+4|0}while((b|0)!=(c|0))}return a|0}function To(a){a=a|0;return}function Uo(a){a=a|0;mj(a);return}function Vo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;q=r;r=r+64|0;o=q+56|0;g=q+52|0;m=q+48|0;h=q+44|0;j=q+40|0;l=q+36|0;n=q+32|0;s=q+8|0;p=q;a:do{if(!(k[d+4>>2]&1)){k[m>>2]=-1;s=k[(k[a>>2]|0)+16>>2]|0;k[h>>2]=k[b>>2];k[j>>2]=k[c>>2];k[g>>2]=k[h>>2];k[o>>2]=k[j>>2];g=Nb[s&63](a,g,o,d,e,m)|0;k[b>>2]=g;switch(k[m>>2]|0){case 0:{i[f>>0]=0;break a}case 1:{i[f>>0]=1;break a}default:{i[f>>0]=1;k[e>>2]=4;break a}}}else{g=tn(d)|0;k[l>>2]=g;x=0;a=Aa(37,l|0,44220)|0;m=x;x=0;do{if(!(m&1)){zm(g)|0;g=tn(d)|0;k[n>>2]=g;x=0;j=Aa(37,n|0,44360)|0;n=x;x=0;if(n&1){s=Wa()|0;zm(g)|0;g=s;break}zm(g)|0;x=0;ra(k[(k[j>>2]|0)+24>>2]|0,s|0,j|0);n=x;x=0;if(!(n&1)){h=s+12|0;x=0;ra(k[(k[j>>2]|0)+28>>2]|0,h|0,j|0);n=x;x=0;if(!(n&1)){k[p>>2]=k[c>>2];x=0;k[o>>2]=k[p>>2];g=na(7,b|0,o|0,s|0,s+24|0,a|0,e|0,1)|0;e=x;x=0;if(e&1){g=Wa()|0;Sm(s+12|0);Sm(s);break}else{i[f>>0]=(g|0)==(s|0)&1;g=k[b>>2]|0;Sm(s+12|0);Sm(s);break a}}}else h=s;g=Wa()|0;j=M;if((s|0)!=(h|0))do{h=h+-12|0;Sm(h)}while((h|0)!=(s|0))}else{s=Wa()|0;zm(g)|0;g=s}}while(0);fb(g|0)}}while(0);r=q;return g|0}function Wo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Iu(a,i,h,d,e,f)|0;r=g;return a|0}function Xo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Ju(a,i,h,d,e,f)|0;r=g;return a|0}function Yo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Ku(a,i,h,d,e,f)|0;r=g;return a|0}function Zo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Lu(a,i,h,d,e,f)|0;r=g;return a|0}function _o(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Mu(a,i,h,d,e,f)|0;r=g;return a|0}function $o(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Nu(a,i,h,d,e,f)|0;r=g;return a|0}function ap(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Ou(a,i,h,d,e,f)|0;r=g;return a|0}function bp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Pu(a,i,h,d,e,f)|0;r=g;return a|0}function cp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Qu(a,i,h,d,e,f)|0;r=g;return a|0}function dp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;C=r;r=r+240|0;w=C;q=C+208|0;E=C+32|0;a=C+28|0;D=C+16|0;v=C+12|0;t=C+48|0;u=C+8|0;s=C+4|0;k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;x=0;d=ta(68,d|0)|0;p=x;x=0;do{if(p&1)a=Wa()|0;else{k[a>>2]=d;x=0;a=Aa(37,a|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,Ea(k[(k[a>>2]|0)+32>>2]|0,a|0,57498,57524,q|0)|0,p=x,x=0,!(p&1)):0){zm(d)|0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;if(!(i[D>>0]&1))a=10;else a=(k[D>>2]&-2)+-1|0;x=0;Fa(8,D|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){o=D+8|0;p=D+1|0;d=(i[D>>0]&1)==0?p:k[o>>2]|0;k[v>>2]=d;k[u>>2]=t;k[s>>2]=0;n=D+4|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){F=29;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){F=29;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;F=19;break}}else F=19}while(0);if((F|0)==19){F=0;if(h){g=0;break}else g=0}h=i[D>>0]|0;h=(h&1)==0?(h&255)>>>1:k[n>>2]|0;if((k[v>>2]|0)==(d+h|0)){x=0;Fa(8,D|0,h<<1|0,0);m=x;x=0;if(m&1){F=29;break}if(!(i[D>>0]&1))d=10;else d=(k[D>>2]&-2)+-1|0;x=0;Fa(8,D|0,d|0,0);m=x;x=0;if(m&1){F=29;break}d=(i[D>>0]&1)==0?p:k[o>>2]|0;k[v>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;G=x;x=0;if(G&1){F=29;break}}else h=l[h>>0]|0;if(ep(h&255,16,d,v,s,0,E,t,u,q)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;G=x;x=0;if(G&1){F=29;break}else continue}else{k[j>>2]=g+1;continue}}if((F|0)==29){a=Wa()|0;break}x=0;Fa(8,D|0,(k[v>>2]|0)-d|0,0);G=x;x=0;if((!(G&1)?(y=i[D>>0]|0,z=k[o>>2]|0,x=0,A=Da(3)|0,G=x,x=0,!(G&1)):0)?(x=0,k[w>>2]=f,B=Ea(16,((y&1)==0?p:z)|0,A|0,58882,w|0)|0,G=x,x=0,!(G&1)):0){if((B|0)!=1)k[e>>2]=4;if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;G=x;x=0;if(G&1){F=30;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;G=x;x=0;if(G&1){F=30;break a}if((a|0)==-1){k[c>>2]=0;F=55;break}}if(!d)F=56}else F=55}while(0);if((F|0)==55?d:0)F=56;if((F|0)==56)k[e>>2]=k[e>>2]|2;G=k[b>>2]|0;Sm(D);Sm(E);r=C;return G|0}else F=30}else F=30}while(0);if((F|0)==30)a=Wa()|0;Sm(D);break}a=Wa()|0;zm(d)|0}}while(0);Sm(E);fb(a|0);return 0}function ep(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0;o=k[d>>2]|0;p=(o|0)==(c|0);do{if(p){m=(i[l+24>>0]|0)==a<<24>>24;if(!m?(i[l+25>>0]|0)!=a<<24>>24:0){n=5;break}k[d>>2]=c+1;i[c>>0]=m?43:45;k[e>>2]=0;m=0}else n=5}while(0);a:do{if((n|0)==5){n=i[g>>0]|0;if(a<<24>>24==f<<24>>24?(((n&1)==0?(n&255)>>>1:k[g+4>>2]|0)|0)!=0:0){m=k[j>>2]|0;if((m-h|0)>=160){m=0;break}b=k[e>>2]|0;k[j>>2]=m+4;k[m>>2]=b;k[e>>2]=0;m=0;break}g=l+26|0;m=l;while(1){if((i[m>>0]|0)==a<<24>>24)break;m=m+1|0;if((m|0)==(g|0)){m=g;break}}m=m-l|0;if((m|0)>23)m=-1;else{switch(b|0){case 10:case 8:{if((m|0)>=(b|0)){m=-1;break a}break}case 16:{if((m|0)>=22){if(p){m=-1;break a}if((o-c|0)>=3){m=-1;break a}if((i[o+-1>>0]|0)!=48){m=-1;break a}k[e>>2]=0;m=i[57498+m>>0]|0;k[d>>2]=o+1;i[o>>0]=m;m=0;break a}break}default:{}}m=i[57498+m>>0]|0;k[d>>2]=o+1;i[o>>0]=m;k[e>>2]=(k[e>>2]|0)+1;m=0}}}while(0);return m|0}function fp(){var a=0,b=0;do{if((i[1968]|0)==0?(Qa(1968)|0)!=0:0){x=0;a=va(31,2147483647,58885,0)|0;b=x;x=0;if(b&1){b=Wa()|0;Bb(1968);fb(b|0)}else{k[11196]=a;Ya(1968);break}}}while(0);return k[11196]|0}function gp(a){a=a|0;return}function hp(a){a=a|0;mj(a);return}function ip(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;q=r;r=r+64|0;o=q+56|0;g=q+52|0;m=q+48|0;h=q+44|0;j=q+40|0;l=q+36|0;n=q+32|0;s=q+8|0;p=q;a:do{if(!(k[d+4>>2]&1)){k[m>>2]=-1;s=k[(k[a>>2]|0)+16>>2]|0;k[h>>2]=k[b>>2];k[j>>2]=k[c>>2];k[g>>2]=k[h>>2];k[o>>2]=k[j>>2];g=Nb[s&63](a,g,o,d,e,m)|0;k[b>>2]=g;switch(k[m>>2]|0){case 0:{i[f>>0]=0;break a}case 1:{i[f>>0]=1;break a}default:{i[f>>0]=1;k[e>>2]=4;break a}}}else{g=tn(d)|0;k[l>>2]=g;x=0;a=Aa(37,l|0,44212)|0;m=x;x=0;do{if(!(m&1)){zm(g)|0;g=tn(d)|0;k[n>>2]=g;x=0;j=Aa(37,n|0,44368)|0;n=x;x=0;if(n&1){s=Wa()|0;zm(g)|0;g=s;break}zm(g)|0;x=0;ra(k[(k[j>>2]|0)+24>>2]|0,s|0,j|0);n=x;x=0;if(!(n&1)){h=s+12|0;x=0;ra(k[(k[j>>2]|0)+28>>2]|0,h|0,j|0);n=x;x=0;if(!(n&1)){k[p>>2]=k[c>>2];x=0;k[o>>2]=k[p>>2];g=na(8,b|0,o|0,s|0,s+24|0,a|0,e|0,1)|0;e=x;x=0;if(e&1){g=Wa()|0;en(s+12|0);en(s);break}else{i[f>>0]=(g|0)==(s|0)&1;g=k[b>>2]|0;en(s+12|0);en(s);break a}}}else h=s;g=Wa()|0;j=M;if((s|0)!=(h|0))do{h=h+-12|0;en(h)}while((h|0)!=(s|0))}else{s=Wa()|0;zm(g)|0;g=s}}while(0);fb(g|0)}}while(0);r=q;return g|0}function jp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Tu(a,i,h,d,e,f)|0;r=g;return a|0}function kp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Uu(a,i,h,d,e,f)|0;r=g;return a|0}function lp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Vu(a,i,h,d,e,f)|0;r=g;return a|0}function mp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Wu(a,i,h,d,e,f)|0;r=g;return a|0}function np(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Xu(a,i,h,d,e,f)|0;r=g;return a|0}function op(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Yu(a,i,h,d,e,f)|0;r=g;return a|0}function pp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Zu(a,i,h,d,e,f)|0;r=g;return a|0}function qp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=_u(a,i,h,d,e,f)|0;r=g;return a|0}function rp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=$u(a,i,h,d,e,f)|0;r=g;return a|0}function sp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;B=r;r=r+320|0;v=B;p=B+208|0;D=B+32|0;a=B+28|0;C=B+16|0;u=B+12|0;s=B+48|0;t=B+8|0;q=B+4|0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;x=0;d=ta(68,d|0)|0;o=x;x=0;do{if(o&1)a=Wa()|0;else{k[a>>2]=d;x=0;a=Aa(37,a|0,44212)|0;o=x;x=0;if(!(o&1)?(x=0,Ea(k[(k[a>>2]|0)+48>>2]|0,a|0,57498,57524,p|0)|0,o=x,x=0,!(o&1)):0){zm(d)|0;k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;if(!(i[C>>0]&1))a=10;else a=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,a|0,0);o=x;x=0;a:do{if(!(o&1)){n=C+8|0;o=C+1|0;a=(i[C>>0]&1)==0?o:k[n>>2]|0;k[u>>2]=a;k[t>>2]=s;k[q>>2]=0;m=C+4|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){E=30;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){E=30;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h){g=j;break}else{g=j;break b}else{k[c>>2]=0;E=20;break}}else E=20}while(0);if((E|0)==20){E=0;if(h){g=0;break}else g=0}h=i[C>>0]|0;h=(h&1)==0?(h&255)>>>1:k[m>>2]|0;if((k[u>>2]|0)==(a+h|0)){x=0;Fa(8,C|0,h<<1|0,0);l=x;x=0;if(l&1){E=30;break}if(!(i[C>>0]&1))a=10;else a=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,a|0,0);l=x;x=0;if(l&1){E=30;break}a=(i[C>>0]&1)==0?o:k[n>>2]|0;k[u>>2]=a+h}j=d+12|0;h=k[j>>2]|0;l=d+16|0;if((h|0)==(k[l>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;F=x;x=0;if(F&1){E=30;break}}else h=k[h>>2]|0;if(tp(h,16,a,u,q,0,D,s,t,p)|0)break;g=k[j>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;F=x;x=0;if(F&1){E=30;break}else{g=d;continue}}else{k[j>>2]=g+4;g=d;continue}}if((E|0)==30){a=Wa()|0;break}x=0;Fa(8,C|0,(k[u>>2]|0)-a|0,0);F=x;x=0;if((!(F&1)?(w=i[C>>0]|0,y=k[n>>2]|0,x=0,z=Da(3)|0,F=x,x=0,!(F&1)):0)?(x=0,k[v>>2]=f,A=Ea(16,((w&1)==0?o:y)|0,z|0,58882,v|0)|0,F=x,x=0,!(F&1)):0){if((A|0)!=1)k[e>>2]=4;if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;F=x;x=0;if(F&1){E=31;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;F=x;x=0;if(F&1){E=31;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{E=59;break}else{k[c>>2]=0;E=57;break}}else E=57}while(0);if((E|0)==57?d:0)E=59;if((E|0)==59)k[e>>2]=k[e>>2]|2;F=k[b>>2]|0;Sm(C);Sm(D);r=B;return F|0}else E=31}else E=31}while(0);if((E|0)==31)a=Wa()|0;Sm(C);break}a=Wa()|0;zm(d)|0}}while(0);Sm(D);fb(a|0);return 0}function tp(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0;o=k[d>>2]|0;p=(o|0)==(c|0);do{if(p){m=(k[l+96>>2]|0)==(a|0);if(!m?(k[l+100>>2]|0)!=(a|0):0){n=5;break}k[d>>2]=c+1;i[c>>0]=m?43:45;k[e>>2]=0;m=0}else n=5}while(0);a:do{if((n|0)==5){n=i[g>>0]|0;if((a|0)==(f|0)?(((n&1)==0?(n&255)>>>1:k[g+4>>2]|0)|0)!=0:0){m=k[j>>2]|0;if((m-h|0)>=160){m=0;break}b=k[e>>2]|0;k[j>>2]=m+4;k[m>>2]=b;k[e>>2]=0;m=0;break}g=l+104|0;m=l;while(1){if((k[m>>2]|0)==(a|0))break;m=m+4|0;if((m|0)==(g|0)){m=g;break}}m=m-l|0;g=m>>2;if((m|0)>92)m=-1;else{switch(b|0){case 10:case 8:{if((g|0)>=(b|0)){m=-1;break a}break}case 16:{if((m|0)>=88){if(p){m=-1;break a}if((o-c|0)>=3){m=-1;break a}if((i[o+-1>>0]|0)!=48){m=-1;break a}k[e>>2]=0;m=i[57498+g>>0]|0;k[d>>2]=o+1;i[o>>0]=m;m=0;break a}break}default:{}}m=i[57498+g>>0]|0;k[d>>2]=o+1;i[o>>0]=m;k[e>>2]=(k[e>>2]|0)+1;m=0}}}while(0);return m|0}function up(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,j=0,l=0;j=r;r=r+16|0;h=j;b=tn(b)|0;k[h>>2]=b;x=0;e=Aa(37,h|0,44220)|0;l=x;x=0;if((((!(l&1)?(x=0,Ea(k[(k[e>>2]|0)+32>>2]|0,e|0,57498,57524,c|0)|0,l=x,x=0,!(l&1)):0)?(x=0,g=Aa(37,h|0,44360)|0,l=x,x=0,!(l&1)):0)?(x=0,f=ta(k[(k[g>>2]|0)+16>>2]|0,g|0)|0,l=x,x=0,!(l&1)):0)?(i[d>>0]=f,x=0,ra(k[(k[g>>2]|0)+20>>2]|0,a|0,g|0),l=x,x=0,!(l&1)):0){zm(b)|0;r=j;return}l=Wa()|0;zm(b)|0;fb(l|0)}function vp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0;m=r;r=r+16|0;l=m;b=tn(b)|0;k[l>>2]=b;x=0;f=Aa(37,l|0,44220)|0;n=x;x=0;if(((((!(n&1)?(x=0,Ea(k[(k[f>>2]|0)+32>>2]|0,f|0,57498,57530,c|0)|0,n=x,x=0,!(n&1)):0)?(x=0,j=Aa(37,l|0,44360)|0,n=x,x=0,!(n&1)):0)?(x=0,g=ta(k[(k[j>>2]|0)+12>>2]|0,j|0)|0,n=x,x=0,!(n&1)):0)?(i[d>>0]=g,x=0,h=ta(k[(k[j>>2]|0)+16>>2]|0,j|0)|0,n=x,x=0,!(n&1)):0)?(i[e>>0]=h,x=0,ra(k[(k[j>>2]|0)+20>>2]|0,a|0,j|0),n=x,x=0,!(n&1)):0){zm(b)|0;r=m;return}n=Wa()|0;zm(b)|0;fb(n|0)}function wp(a,b,c,d,e,f,g,h,j,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;m=m|0;n=n|0;o=o|0;var p=0,q=0;a:do{if(a<<24>>24==f<<24>>24)if(i[b>>0]|0){i[b>>0]=0;c=k[e>>2]|0;k[e>>2]=c+1;i[c>>0]=46;c=i[h>>0]|0;if((((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0?(p=k[m>>2]|0,(p-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;p=0}else p=0}else p=-1;else{if(a<<24>>24==g<<24>>24?(g=i[h>>0]|0,(((g&1)==0?(g&255)>>>1:k[h+4>>2]|0)|0)!=0):0){if(!(i[b>>0]|0)){p=-1;break}p=k[m>>2]|0;if((p-j|0)>=160){p=0;break}j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;k[n>>2]=0;p=0;break}f=o+32|0;p=o;while(1){if((i[p>>0]|0)==a<<24>>24)break;p=p+1|0;if((p|0)==(f|0)){p=f;break}}f=p-o|0;if((f|0)>31)p=-1;else{g=i[57498+f>>0]|0;switch(f|0){case 24:case 25:{p=k[e>>2]|0;if((p|0)!=(d|0)?(l[p+-1>>0]&95|0)!=(l[c>>0]&127|0):0){p=-1;break a}k[e>>2]=p+1;i[p>>0]=g;p=0;break a}case 23:case 22:{i[c>>0]=80;p=k[e>>2]|0;k[e>>2]=p+1;i[p>>0]=g;p=0;break a}default:{p=g&95;if((((p|0)==(i[c>>0]|0)?(i[c>>0]=p|128,(i[b>>0]|0)!=0):0)?(i[b>>0]=0,c=i[h>>0]|0,(((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0):0)?(q=k[m>>2]|0,(q-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=q+4;k[q>>2]=j}m=k[e>>2]|0;k[e>>2]=m+1;i[m>>0]=g;if((f|0)>21){p=0;break a}k[n>>2]=(k[n>>2]|0)+1;p=0;break a}}}}}while(0);return p|0}function xp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=r;r=r+16|0;h=i;b=tn(b)|0;k[h>>2]=b;x=0;e=Aa(37,h|0,44212)|0;j=x;x=0;if((((!(j&1)?(x=0,Ea(k[(k[e>>2]|0)+48>>2]|0,e|0,57498,57524,c|0)|0,j=x,x=0,!(j&1)):0)?(x=0,g=Aa(37,h|0,44368)|0,j=x,x=0,!(j&1)):0)?(x=0,f=ta(k[(k[g>>2]|0)+16>>2]|0,g|0)|0,j=x,x=0,!(j&1)):0)?(k[d>>2]=f,x=0,ra(k[(k[g>>2]|0)+20>>2]|0,a|0,g|0),j=x,x=0,!(j&1)):0){zm(b)|0;r=i;return}j=Wa()|0;zm(b)|0;fb(j|0)}function yp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0;l=r;r=r+16|0;j=l;b=tn(b)|0;k[j>>2]=b;x=0;f=Aa(37,j|0,44212)|0;m=x;x=0;if(((((!(m&1)?(x=0,Ea(k[(k[f>>2]|0)+48>>2]|0,f|0,57498,57530,c|0)|0,m=x,x=0,!(m&1)):0)?(x=0,i=Aa(37,j|0,44368)|0,m=x,x=0,!(m&1)):0)?(x=0,g=ta(k[(k[i>>2]|0)+12>>2]|0,i|0)|0,m=x,x=0,!(m&1)):0)?(k[d>>2]=g,x=0,h=ta(k[(k[i>>2]|0)+16>>2]|0,i|0)|0,m=x,x=0,!(m&1)):0)?(k[e>>2]=h,x=0,ra(k[(k[i>>2]|0)+20>>2]|0,a|0,i|0),m=x,x=0,!(m&1)):0){zm(b)|0;r=l;return}m=Wa()|0;zm(b)|0;fb(m|0)}function zp(a,b,c,d,e,f,g,h,j,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;m=m|0;n=n|0;o=o|0;var p=0,q=0;a:do{if((a|0)==(f|0))if(i[b>>0]|0){i[b>>0]=0;c=k[e>>2]|0;k[e>>2]=c+1;i[c>>0]=46;c=i[h>>0]|0;if((((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0?(p=k[m>>2]|0,(p-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;p=0}else p=0}else p=-1;else{if((a|0)==(g|0)?(g=i[h>>0]|0,(((g&1)==0?(g&255)>>>1:k[h+4>>2]|0)|0)!=0):0){if(!(i[b>>0]|0)){p=-1;break}p=k[m>>2]|0;if((p-j|0)>=160){p=0;break}j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;k[n>>2]=0;p=0;break}f=o+128|0;p=o;while(1){if((k[p>>2]|0)==(a|0))break;p=p+4|0;if((p|0)==(f|0)){p=f;break}}f=p-o|0;p=f>>2;if((f|0)<=124){g=i[57498+p>>0]|0;switch(p|0){case 24:case 25:{p=k[e>>2]|0;if((p|0)!=(d|0)?(l[p+-1>>0]&95|0)!=(l[c>>0]&127|0):0){p=-1;break a}k[e>>2]=p+1;i[p>>0]=g;p=0;break a}case 23:case 22:{i[c>>0]=80;break}default:{p=g&95;if((((p|0)==(i[c>>0]|0)?(i[c>>0]=p|128,(i[b>>0]|0)!=0):0)?(i[b>>0]=0,c=i[h>>0]|0,(((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0):0)?(q=k[m>>2]|0,(q-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=q+4;k[q>>2]=j}}}m=k[e>>2]|0;k[e>>2]=m+1;i[m>>0]=g;if((f|0)>84)p=0;else{k[n>>2]=(k[n>>2]|0)+1;p=0}}else p=-1}}while(0);return p|0}function Ap(a){a=a|0;return}function Bp(a){a=a|0;mj(a);return}function Cp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+32|0;f=m+20|0;g=m+16|0;h=m+12|0;l=m;a:do{if(!(k[c+4>>2]&1)){l=k[(k[a>>2]|0)+24>>2]|0;k[g>>2]=k[b>>2];k[f>>2]=k[g>>2];f=Wb[l&31](a,f,c,d,e&1)|0}else{f=tn(c)|0;k[h>>2]=f;x=0;g=Aa(37,h|0,44360)|0;j=x;x=0;b:do{if(j&1){m=Wa()|0;zm(f)|0;f=m}else{zm(f)|0;f=k[g>>2]|0;if(e)Mb[k[f+24>>2]&127](l,g);else Mb[k[f+28>>2]&127](l,g);a=i[l>>0]|0;j=(a&1)==0;f=l+1|0;e=l+8|0;h=j?f:l+1|0;f=j?f:k[l+8>>2]|0;j=l+4|0;c=(a&1)==0;c:do{if((f|0)!=((c?h:k[e>>2]|0)+(c?(a&255)>>>1:k[j>>2]|0)|0)){d:while(1){g=i[f>>0]|0;d=k[b>>2]|0;do{if(d){c=d+24|0;a=k[c>>2]|0;if((a|0)!=(k[d+28>>2]|0)){k[c>>2]=a+1;i[a>>0]=g;break}x=0;g=Aa(k[(k[d>>2]|0)+52>>2]|0,d|0,g&255|0)|0;a=x;x=0;if(a&1)break d;if((g|0)==-1)k[b>>2]=0}}while(0);f=f+1|0;a=i[l>>0]|0;c=(a&1)==0;if((f|0)==((c?h:k[e>>2]|0)+(c?(a&255)>>>1:k[j>>2]|0)|0))break c}f=Wa()|0;Sm(l);break b}}while(0);f=k[b>>2]|0;Sm(l);break a}}while(0);fb(f|0)}}while(0);r=m;return f|0}function Dp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+64|0;f=m;o=m+56|0;p=m+44|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,1,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=md(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Ep(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if(d&2048){i[a>>0]=43;a=a+1|0}if(d&512){i[a>>0]=35;a=a+1|0}e=i[b>>0]|0;if(e<<24>>24){f=b;while(1){f=f+1|0;b=a+1|0;i[a>>0]=e;e=i[f>>0]|0;if(!(e<<24>>24)){a=b;break}else a=b}}a:do{switch(d&74|0){case 64:{i[a>>0]=111;break}case 8:if(!(d&16384)){i[a>>0]=120;break a}else{i[a>>0]=88;break a}default:if(c){i[a>>0]=100;break a}else{i[a>>0]=117;break a}}}while(0);return}function Fp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:do{switch(k[c+4>>2]&176|0){case 16:{c=i[a>>0]|0;switch(c<<24>>24){case 43:case 45:{a=a+1|0;break a}default:{}}if((b-a|0)>1&c<<24>>24==48){switch(i[a+1>>0]|0){case 88:case 120:break;default:{d=7;break a}}a=a+2|0}else d=7;break}case 32:{a=b;break}default:d=7}}while(0);return a|0}function Gp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+16|0;v=u;s=Ss(g,44220)|0;l=Ss(g,44360)|0;Mb[k[(k[l>>2]|0)+20>>2]&127](v,l);p=i[v>>0]|0;q=v+4|0;a:do{if(!(((p&1)==0?(p&255)>>>1:k[q>>2]|0)|0)){x=0;Ea(k[(k[s>>2]|0)+32>>2]|0,s|0,a|0,c|0,d|0)|0;t=x;x=0;if(t&1)t=5;else{g=d+(c-a)|0;k[f>>2]=g;t=29}}else{k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,g|0)|0;p=x;x=0;if(p&1){t=5;break a}j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=g;j=a+1|0;break}default:j=a}b:do{if((c-j|0)>1?(i[j>>0]|0)==48:0){g=j+1|0;switch(i[g>>0]|0){case 88:case 120:break;default:break b}x=0;h=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,48)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+1;i[p>>0]=h;x=0;g=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,i[g>>0]|0)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+1;i[p>>0]=g;j=j+2|0}}while(0);if((j|0)!=(c|0)?(m=c+-1|0,j>>>0>>0):0){h=j;g=m;do{p=i[h>>0]|0;i[h>>0]=i[g>>0]|0;i[g>>0]=p;h=h+1|0;g=g+-1|0}while(h>>>0>>0)}x=0;m=ta(k[(k[l>>2]|0)+16>>2]|0,l|0)|0;p=x;x=0;if(!(p&1)){n=v+8|0;o=v+1|0;c:do{if(j>>>0>>0){g=0;h=0;p=j;while(1){l=i[((i[v>>0]&1)==0?o:k[n>>2]|0)+h>>0]|0;if(l<<24>>24!=0&(g|0)==(l<<24>>24|0)){g=k[f>>2]|0;k[f>>2]=g+1;i[g>>0]=m;g=i[v>>0]|0;l=0;h=(h>>>0<(((g&1)==0?(g&255)>>>1:k[q>>2]|0)+-1|0)>>>0&1)+h|0}else l=g;x=0;g=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,i[p>>0]|0)|0;w=x;x=0;if(w&1)break;w=k[f>>2]|0;k[f>>2]=w+1;i[w>>0]=g;p=p+1|0;if(p>>>0>=c>>>0)break c;else g=l+1|0}g=Wa()|0;break a}}while(0);h=a;g=d+(j-h)|0;a=k[f>>2]|0;if((g|0)==(a|0)){a=h;t=29}else{a=a+-1|0;if(g>>>0>>0)do{w=i[g>>0]|0;i[g>>0]=i[a>>0]|0;i[a>>0]=w;g=g+1|0;a=a+-1|0}while(g>>>0>>0);a=h;g=k[f>>2]|0;t=29}}else t=5}}while(0);if((t|0)==5)g=Wa()|0;else if((t|0)==29){k[e>>2]=(b|0)==(c|0)?g:d+(b-a)|0;Sm(v);r=u;return}Sm(v);fb(g|0)}function Hp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+96|0;g=m+8|0;a=m;o=m+74|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,1,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,22,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=md(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Ip(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+64|0;f=m;o=m+56|0;p=m+44|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,0,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=md(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Jp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+112|0;g=m+8|0;a=m;o=m+75|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,0,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,23,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=md(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Kp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+176|0;t=z+84|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+88|0;s=z+80|0;h=z+118|0;y=z+76|0;w=z+72|0;u=z+68|0;v=z+64|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58898,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,k[n>>2]=k[c+8>>2],p[n+8>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<1)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(2,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(39,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function Lp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;if(c&2048){i[a>>0]=43;a=a+1|0}if(c&1024){i[a>>0]=35;a=a+1|0}g=c&260;e=c>>>14;h=(g|0)==260;if(h)f=0;else{i[a>>0]=46;i[a+1>>0]=42;a=a+2|0;f=1}c=i[b>>0]|0;if(c<<24>>24){d=a;while(1){b=b+1|0;a=d+1|0;i[d>>0]=c;c=i[b>>0]|0;if(!(c<<24>>24))break;else d=a}}a:do{switch(g|0){case 4:if(!(e&1)){i[a>>0]=102;break a}else{i[a>>0]=70;break a}case 256:if(!(e&1)){i[a>>0]=101;break a}else{i[a>>0]=69;break a}default:{c=(e&1|0)!=0;if(h)if(c){i[a>>0]=65;break a}else{i[a>>0]=97;break a}else if(c){i[a>>0]=71 -;break a}else{i[a>>0]=103;break a}}}}while(0);return f|0}function Mp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0;z=r;r=r+16|0;A=z;y=Ss(g,44220)|0;v=Ss(g,44360)|0;Mb[k[(k[v>>2]|0)+20>>2]&127](A,v);k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,g|0)|0;w=x;x=0;if(w&1)u=8;else{m=k[f>>2]|0;k[f>>2]=m+1;i[m>>0]=g;m=a+1|0;u=10}break}default:{m=a;u=10}}a:do{if((u|0)==10){w=c;b:do{if((w-m|0)>1?(i[m>>0]|0)==48:0){j=m+1|0;switch(i[j>>0]|0){case 88:case 120:break;default:{u=11;break b}}x=0;g=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,48)|0;t=x;x=0;if(t&1){u=8;break a}t=k[f>>2]|0;k[f>>2]=t+1;i[t>>0]=g;m=m+2|0;x=0;g=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,i[j>>0]|0)|0;t=x;x=0;if(t&1){u=8;break a}t=k[f>>2]|0;k[f>>2]=t+1;i[t>>0]=g;if(m>>>0>>0){g=m;while(1){j=i[g>>0]|0;x=0;l=Da(3)|0;t=x;x=0;if(t&1)break;x=0;j=Aa(39,j<<24>>24|0,l|0)|0;t=x;x=0;if(t&1)break;if(!j){t=m;break b}g=g+1|0;if(g>>>0>=c>>>0){t=m;break b}}g=Wa()|0;break a}else{t=m;g=m}}else u=11}while(0);c:do{if((u|0)==11)if(m>>>0>>0){g=m;while(1){j=i[g>>0]|0;x=0;l=Da(3)|0;t=x;x=0;if(t&1)break;x=0;j=Aa(40,j<<24>>24|0,l|0)|0;t=x;x=0;if(t&1)break;if(!j){t=m;break c}g=g+1|0;if(g>>>0>=c>>>0){t=m;break c}}g=Wa()|0;break a}else{t=m;g=m}}while(0);q=i[A>>0]|0;s=A+4|0;if(((q&1)==0?(q&255)>>>1:k[s>>2]|0)|0){if((t|0)!=(g|0)?(n=g+-1|0,t>>>0>>0):0){l=t;j=n;do{q=i[l>>0]|0;i[l>>0]=i[j>>0]|0;i[j>>0]=q;l=l+1|0;j=j+-1|0}while(l>>>0>>0)}x=0;n=ta(k[(k[v>>2]|0)+16>>2]|0,v|0)|0;q=x;x=0;if(q&1){u=8;break}o=A+8|0;p=A+1|0;d:do{if(t>>>0>>0){j=0;l=0;q=t;while(1){m=i[((i[A>>0]&1)==0?p:k[o>>2]|0)+l>>0]|0;if(m<<24>>24>0&(j|0)==(m<<24>>24|0)){j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=n;j=i[A>>0]|0;m=0;l=(l>>>0<(((j&1)==0?(j&255)>>>1:k[s>>2]|0)+-1|0)>>>0&1)+l|0}else m=j;x=0;j=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,i[q>>0]|0)|0;B=x;x=0;if(B&1)break;B=k[f>>2]|0;k[f>>2]=B+1;i[B>>0]=j;q=q+1|0;if(q>>>0>=g>>>0)break d;else j=m+1|0}g=Wa()|0;break a}}while(0);j=d+(t-a)|0;l=k[f>>2]|0;if((j|0)!=(l|0)?(h=l+-1|0,j>>>0>>0):0){do{B=i[j>>0]|0;i[j>>0]=i[h>>0]|0;i[h>>0]=B;j=j+1|0;h=h+-1|0}while(j>>>0>>0);j=y}else j=y}else{x=0;Ea(k[(k[y>>2]|0)+32>>2]|0,y|0,t|0,g|0,k[f>>2]|0)|0;B=x;x=0;if(B&1){u=8;break}k[f>>2]=(k[f>>2]|0)+(g-t);j=y}e:do{if(g>>>0>>0){while(1){h=i[g>>0]|0;if(h<<24>>24==46)break;x=0;h=Aa(k[(k[j>>2]|0)+28>>2]|0,y|0,h|0)|0;B=x;x=0;if(B&1){u=4;break}B=k[f>>2]|0;k[f>>2]=B+1;i[B>>0]=h;g=g+1|0;if(g>>>0>=c>>>0)break e}if((u|0)==4){g=Wa()|0;break a}x=0;h=ta(k[(k[v>>2]|0)+12>>2]|0,v|0)|0;B=x;x=0;if(B&1){u=8;break a}B=k[f>>2]|0;k[f>>2]=B+1;i[B>>0]=h;g=g+1|0}}while(0);x=0;Ea(k[(k[y>>2]|0)+32>>2]|0,y|0,g|0,c|0,k[f>>2]|0)|0;B=x;x=0;if(B&1)u=8;else{B=(k[f>>2]|0)+(w-g)|0;k[f>>2]=B;k[e>>2]=(b|0)==(c|0)?B:d+(b-a)|0;Sm(A);r=z;return}}}while(0);if((u|0)==8)g=Wa()|0;Sm(A);fb(g|0)}function Np(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+176|0;t=z+76|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+80|0;s=z+72|0;h=z+110|0;y=z+68|0;w=z+64|0;u=z+60|0;v=z+56|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58899,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,p[n>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<1)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(2,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(39,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function Op(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+80|0;j=o;a=o+70|0;m=o+12|0;n=o+32|0;h=o+8|0;l=o+4|0;i[a>>0]=i[58901]|0;i[a+1>>0]=i[58902]|0;i[a+2>>0]=i[58903]|0;i[a+3>>0]=i[58904]|0;i[a+4>>0]=i[58905]|0;i[a+5>>0]=i[58906]|0;f=fp()|0;k[j>>2]=e;a=av(m,20,f,a,j)|0;e=m+a|0;f=Fp(m,e,c)|0;g=tn(c)|0;k[h>>2]=g;x=0;h=Aa(37,h|0,44220)|0;p=x;x=0;if(p&1){p=Wa()|0;zm(g)|0;fb(p|0)}else{zm(g)|0;Zb[k[(k[h>>2]|0)+32>>2]&31](h,m,e,n)|0;p=n+a|0;k[l>>2]=k[b>>2];k[j>>2]=k[l>>2];p=md(j,n,(f|0)==(e|0)?p:n+(f-m)|0,p,c,d)|0;r=o;return p|0}return 0}function Pp(a){a=a|0;return}function Qp(a){a=a|0;mj(a);return}function Rp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;f=l+20|0;g=l+16|0;h=l+12|0;j=l;a:do{if(!(k[c+4>>2]&1)){j=k[(k[a>>2]|0)+24>>2]|0;k[g>>2]=k[b>>2];k[f>>2]=k[g>>2];f=Wb[j&31](a,f,c,d,e&1)|0}else{f=tn(c)|0;k[h>>2]=f;x=0;g=Aa(37,h|0,44368)|0;h=x;x=0;b:do{if(h&1){l=Wa()|0;zm(f)|0;f=l}else{zm(f)|0;f=k[g>>2]|0;if(e)Mb[k[f+24>>2]&127](j,g);else Mb[k[f+28>>2]&127](j,g);a=i[j>>0]|0;c=(a&1)==0;f=j+4|0;e=j+8|0;h=c?f:j+4|0;f=c?f:k[j+8>>2]|0;c=(a&1)==0;c:do{if((f|0)!=((c?h:k[e>>2]|0)+((c?(a&255)>>>1:k[h>>2]|0)<<2)|0)){while(1){g=k[f>>2]|0;d=k[b>>2]|0;if(d){c=d+24|0;a=k[c>>2]|0;if((a|0)==(k[d+28>>2]|0)){x=0;g=Aa(k[(k[d>>2]|0)+52>>2]|0,d|0,g|0)|0;a=x;x=0;if(a&1)break}else{k[c>>2]=a+4;k[a>>2]=g}if((g|0)==-1)k[b>>2]=0}f=f+4|0;a=i[j>>0]|0;c=(a&1)==0;if((f|0)==((c?h:k[e>>2]|0)+((c?(a&255)>>>1:k[h>>2]|0)<<2)|0))break c}f=Wa()|0;en(j);break b}}while(0);f=k[b>>2]|0;en(j);break a}}while(0);fb(f|0)}}while(0);r=l;return f|0}function Sp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+128|0;f=m;o=m+116|0;p=m+104|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,1,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=cv(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Tp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+16|0;v=u;s=Ss(g,44212)|0;l=Ss(g,44368)|0;Mb[k[(k[l>>2]|0)+20>>2]&127](v,l);p=i[v>>0]|0;q=v+4|0;a:do{if(!(((p&1)==0?(p&255)>>>1:k[q>>2]|0)|0)){x=0;Ea(k[(k[s>>2]|0)+48>>2]|0,s|0,a|0,c|0,d|0)|0;t=x;x=0;if(t&1)t=5;else{g=d+(c-a<<2)|0;k[f>>2]=g;t=28}}else{k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,g|0)|0;p=x;x=0;if(p&1){t=5;break a}j=k[f>>2]|0;k[f>>2]=j+4;k[j>>2]=g;j=a+1|0;break}default:j=a}b:do{if((c-j|0)>1?(i[j>>0]|0)==48:0){g=j+1|0;switch(i[g>>0]|0){case 88:case 120:break;default:{p=j;break b}}x=0;h=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,48)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+4;k[p>>2]=h;x=0;g=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,i[g>>0]|0)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+4;k[p>>2]=g;p=j+2|0}else p=j}while(0);if((p|0)!=(c|0)?(m=c+-1|0,p>>>0>>0):0){h=p;g=m;do{o=i[h>>0]|0;i[h>>0]=i[g>>0]|0;i[g>>0]=o;h=h+1|0;g=g+-1|0}while(h>>>0>>0)}x=0;l=ta(k[(k[l>>2]|0)+16>>2]|0,l|0)|0;o=x;x=0;if(!(o&1)){m=v+8|0;n=v+1|0;c:do{if(p>>>0>>0){g=0;h=0;o=p;while(1){j=i[((i[v>>0]&1)==0?n:k[m>>2]|0)+h>>0]|0;if(j<<24>>24!=0&(g|0)==(j<<24>>24|0)){g=k[f>>2]|0;k[f>>2]=g+4;k[g>>2]=l;g=i[v>>0]|0;j=0;h=(h>>>0<(((g&1)==0?(g&255)>>>1:k[q>>2]|0)+-1|0)>>>0&1)+h|0}else j=g;x=0;g=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,i[o>>0]|0)|0;w=x;x=0;if(w&1)break;w=k[f>>2]|0;k[f>>2]=w+4;k[w>>2]=g;o=o+1|0;if(o>>>0>=c>>>0)break c;else g=j+1|0}g=Wa()|0;break a}}while(0);j=a;g=d+(p-j<<2)|0;h=k[f>>2]|0;if((g|0)!=(h|0)){a=h+-4|0;if(g>>>0>>0){do{w=k[g>>2]|0;k[g>>2]=k[a>>2];k[a>>2]=w;g=g+4|0;a=a+-4|0}while(g>>>0>>0);a=j;g=h;t=28}else{a=j;g=h;t=28}}else{a=j;t=28}}else t=5}}while(0);if((t|0)==5)g=Wa()|0;else if((t|0)==28){k[e>>2]=(b|0)==(c|0)?g:d+(b-a<<2)|0;Sm(v);r=u;return}Sm(v);fb(g|0)}function Up(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+224|0;g=m+8|0;a=m;o=m+196|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,1,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,22,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=cv(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Et(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;t=r;r=r+16|0;q=t;o=t+8|0;a:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(k[j>>2]|0))break a;j=j+4|0;if((j|0)==(d|0)){j=d;break}}}}while(0);k[h>>2]=f;k[e>>2]=c;m=g;p=a+8|0;b:do{if(!((f|0)==(g|0)|(c|0)==(d|0))){a=f;l=j;c:while(1){v=b;f=k[v+4>>2]|0;j=q;k[j>>2]=k[v>>2];k[j+4>>2]=f;j=Ak(k[p>>2]|0)|0;x=0;f=Ba(21,a|0,e|0,l-c>>2|0,m-a|0,b|0)|0;v=x;x=0;if(v&1){u=9;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=8;break}switch(f|0){case 0:{n=1;break b}case-1:{j=a;u=14;break c}default:{}}j=(k[h>>2]|0)+f|0;k[h>>2]=j;if((j|0)==(g|0)){u=27;break}if((l|0)==(d|0)){c=k[e>>2]|0;a=j;j=d}else{j=Ak(k[p>>2]|0)|0;x=0;c=va(34,o|0,0,b|0)|0;v=x;x=0;if(v&1){u=35;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=34;break}if((c|0)==-1){n=2;break b}if(c>>>0>(m-(k[h>>2]|0)|0)>>>0){n=1;break b}if(c){j=o;while(1){l=i[j>>0]|0;v=k[h>>2]|0;k[h>>2]=v+1;i[v>>0]=l;c=c+-1|0;if(!c)break;else j=j+1|0}}c=(k[e>>2]|0)+4|0;k[e>>2]=c;d:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(k[j>>2]|0))break d;j=j+4|0;if((j|0)==(d|0)){j=d;break}}}}while(0);a=k[h>>2]|0}if((a|0)==(g|0)|(c|0)==(d|0)){u=47;break b}else l=j}if((u|0)==8){v=Wa(0)|0;oc(v)}else if((u|0)==9){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}else if((u|0)==14){k[h>>2]=j;e:do{if((c|0)!=(k[e>>2]|0)){while(1){v=k[c>>2]|0;a=Ak(k[p>>2]|0)|0;x=0;j=va(34,j|0,v|0,q|0)|0;v=x;x=0;if(v&1){s=a;break}if((a|0)!=0?(x=0,ta(75,a|0)|0,v=x,x=0,v&1):0){u=18;break}if((j|0)==-1)break e;j=(k[h>>2]|0)+j|0;k[h>>2]=j;c=c+4|0;if((c|0)==(k[e>>2]|0))break e}if((u|0)==18){v=Wa(0)|0;oc(v)}c=Wa()|0;if((s|0)!=0?(x=0,ta(75,s|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}}while(0);k[e>>2]=c;n=2;break}else if((u|0)==27){c=k[e>>2]|0;u=47;break}else if((u|0)==34){v=Wa(0)|0;oc(v)}else if((u|0)==35){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}}else u=47}while(0);if((u|0)==47)n=(c|0)!=(d|0)&1;r=t;return n|0}function Ft(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;t=r;r=r+16|0;s=t;a:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(i[j>>0]|0))break a;j=j+1|0;if((j|0)==(d|0)){j=d;break}}}}while(0);k[h>>2]=f;k[e>>2]=c;n=g;p=a+8|0;b:do{if(!((f|0)==(g|0)|(c|0)==(d|0))){a=f;m=j;c:while(1){l=b;j=k[l+4>>2]|0;f=s;k[f>>2]=k[l>>2];k[f+4>>2]=j;f=m;j=Ak(k[p>>2]|0)|0;x=0;l=Ba(22,a|0,e|0,f-c|0,n-a>>2|0,b|0)|0;v=x;x=0;if(v&1){u=9;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=8;break}switch(l|0){case 0:{o=2;break b}case-1:{j=a;u=14;break c}default:{}}a=(k[h>>2]|0)+(l<<2)|0;k[h>>2]=a;if((a|0)==(g|0)){u=31;break}c=k[e>>2]|0;if((m|0)==(d|0))j=d;else{j=Ak(k[p>>2]|0)|0;x=0;c=Ea(20,a|0,c|0,1,b|0)|0;v=x;x=0;if(v&1){u=38;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=37;break}if(c){o=2;break b}k[h>>2]=(k[h>>2]|0)+4;c=(k[e>>2]|0)+1|0;k[e>>2]=c;d:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(i[j>>0]|0))break d;j=j+1|0;if((j|0)==(d|0)){j=d;break}}}}while(0);a=k[h>>2]|0}if((a|0)==(g|0)|(c|0)==(d|0)){u=47;break b}else m=j}if((u|0)==8){v=Wa(0)|0;oc(v)}else if((u|0)==9){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}else if((u|0)==14){k[h>>2]=j;e:do{if((c|0)!=(k[e>>2]|0)){a=j;f:while(1){j=Ak(k[p>>2]|0)|0;x=0;a=Ea(20,a|0,c|0,f-c|0,s|0)|0;v=x;x=0;if(v&1){u=19;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=18;break}switch(a|0){case-1:{u=25;break f}case-2:{u=26;break f}case 0:{c=c+1|0;break}default:c=c+a|0}a=(k[h>>2]|0)+4|0;k[h>>2]=a;if((c|0)==(k[e>>2]|0)){q=c;break e}}if((u|0)==18){v=Wa(0)|0;oc(v)}else if((u|0)==19){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}else if((u|0)==25){k[e>>2]=c;o=2;break b}else if((u|0)==26){k[e>>2]=c;o=1;break b}}else q=c}while(0);k[e>>2]=q;o=(q|0)!=(d|0)&1;break}else if((u|0)==31){c=k[e>>2]|0;u=47;break}else if((u|0)==37){v=Wa(0)|0;oc(v)}else if((u|0)==38){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}}else u=47}while(0);if((u|0)==47)o=(c|0)!=(d|0)&1;r=t;return o|0}function Gt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=r;r=r+16|0;f=g;k[e>>2]=c;c=Ak(k[a+8>>2]|0)|0;x=0;a=va(34,f|0,0,b|0)|0;b=x;x=0;if(b&1){f=Wa()|0;if((c|0)!=0?(x=0,ta(75,c|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}fb(f|0)}if((c|0)!=0?(x=0,ta(75,c|0)|0,b=x,x=0,b&1):0){b=Wa(0)|0;oc(b)}switch(a|0){case 0:case-1:{f=2;break}default:{a=a+-1|0;if(a>>>0<=(d-(k[e>>2]|0)|0)>>>0)if(!a)f=0;else while(1){b=i[f>>0]|0;d=k[e>>2]|0;k[e>>2]=d+1;i[d>>0]=b;a=a+-1|0;if(!a){f=0;break}else f=f+1|0}else f=1}}r=g;return f|0}function Ht(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=a+8|0;x=0;c=ta(75,k[b>>2]|0)|0;d=x;x=0;do{if(d&1)e=16;else{x=0;d=va(35,0,0,4)|0;a=x;x=0;if(a&1){a=Wa(0)|0;if(!c)break;x=0;ta(75,c|0)|0;g=x;x=0;if(!(g&1))break;g=Wa(0)|0;oc(g)}if((c|0)!=0?(x=0,ta(75,c|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}if(!d){a=k[b>>2]|0;if(a){x=0;a=ta(75,a|0)|0;g=x;x=0;if(g&1){e=16;break}if((a|0)!=0?(x=0,ta(75,a|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}else f=0}else f=1}else f=-1;return f|0}}while(0);if((e|0)==16)a=Wa(0)|0;oc(a);return 0}function It(a){a=a|0;return 0}function Jt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;j=d;i=a+8|0;a:do{if((c|0)==(d|0)|(e|0)==0)a=0;else{a=0;h=0;while(1){g=Ak(k[i>>2]|0)|0;x=0;f=va(36,c|0,j-c|0,b|0)|0;n=x;x=0;if(n&1){m=g;break}if((g|0)!=0?(x=0,ta(75,g|0)|0,n=x,x=0,n&1):0){l=5;break}switch(f|0){case-2:case-1:break a;case 0:{c=c+1|0;f=1;break}default:c=c+f|0}a=f+a|0;h=h+1|0;if((c|0)==(d|0)|h>>>0>=e>>>0)break a}if((l|0)==5){n=Wa(0)|0;oc(n)}a=Wa()|0;if((m|0)!=0?(x=0,ta(75,m|0)|0,n=x,x=0,n&1):0){n=Wa(0)|0;oc(n)}fb(a|0)}}while(0);return a|0}function Kt(a){a=a|0;var b=0,c=0;a=k[a+8>>2]|0;if(a){x=0;a=ta(75,a|0)|0;c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}if((a|0)!=0?(x=0,ta(75,a|0)|0,c=x,x=0,c&1):0){c=Wa(0)|0;oc(c)}else b=4}else b=1;return b|0}function Lt(a){a=a|0;mj(a);return}function Mt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Rv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Nt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Sv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Ot(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;k[e>>2]=c;return 3}function Pt(a){a=a|0;return 0}function Qt(a){a=a|0;return 0}function Rt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Tv(c,d,e,1114111,0)|0}function St(a){a=a|0;return 4}function Tt(a){a=a|0;mj(a);return}function Ut(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Uv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Vt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Vv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Wt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;k[e>>2]=c;return 3}function Xt(a){a=a|0;return 0}function Yt(a){a=a|0;return 0}function Zt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Wv(c,d,e,1114111,0)|0}function _t(a){a=a|0;return 4}function $t(a){a=a|0;mj(a);return}function au(a){a=a|0;mj(a);return}function bu(a,b){a=a|0;b=b|0;k[a+4>>2]=b+-1;k[a>>2]=44384;i[a+8>>0]=46;i[a+9>>0]=44;a=a+12|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function cu(a,b){a=a|0;b=b|0;k[a+4>>2]=b+-1;k[a>>2]=44424;k[a+8>>2]=46;k[a+12>>2]=44;a=a+16|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function du(a){a=a|0;k[a>>2]=44384;Sm(a+12|0);return}function eu(a){a=a|0;du(a);mj(a);return}function fu(a){a=a|0;k[a>>2]=44424;Sm(a+16|0);return}function gu(a){a=a|0;fu(a);mj(a);return}function hu(a){a=a|0;return i[a+8>>0]|0}function iu(a){a=a|0;return k[a+8>>2]|0}function ju(a){a=a|0;return i[a+9>>0]|0}function ku(a){a=a|0;return k[a+12>>2]|0}function lu(a,b){a=a|0;b=b|0;Pm(a,b+12|0);return}function mu(a,b){a=a|0;b=b|0;Pm(a,b+16|0);return}function nu(a,b){a=a|0;b=b|0;Qm(a,59024,4);return}function ou(a,b){a=a|0;b=b|0;cn(a,44996,zl(44996)|0);return}function pu(a,b){a=a|0;b=b|0;Qm(a,59029,5);return}function qu(a,b){a=a|0;b=b|0;cn(a,45016,zl(45016)|0);return}function ru(a){a=a|0;switch(k[a+4>>2]&74|0){case 64:{a=8;break}case 8:{a=16;break}case 0:{a=0;break}default:a=10}return a|0}function su(a){a=a|0;do{if((i[2464]|0)==0?(Qa(2464)|0)!=0:0){if((i[2472]|0)==0?(Qa(2472)|0)!=0:0){a=45040;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=45208);tb(193,0,w|0)|0;Ya(2472)}x=0;Aa(41,45040,59035)|0;a=x;x=0;if(((((((((((((!(a&1)?(x=0,Aa(41,45052,59042)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45064,59049)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45076,59057)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45088,59067)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45100,59076)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45112,59083)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45124,59092)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45136,59096)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45148,59100)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45160,59104)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45172,59108)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45184,59112)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45196,59116)|0,a=x,x=0,!(a&1)):0){k[11302]=45040;Ya(2464);break}a=Wa()|0;Bb(2464);fb(a|0)}}while(0);return k[11302]|0}function tu(a){a=a|0;do{if((i[2480]|0)==0?(Qa(2480)|0)!=0:0){if((i[2488]|0)==0?(Qa(2488)|0)!=0:0){a=45212;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=45380);tb(194,0,w|0)|0;Ya(2488)}x=0;Aa(42,45212,45380)|0;a=x;x=0;if(((((((((((((!(a&1)?(x=0,Aa(42,45224,45408)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45236,45436)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45248,45468)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45260,45508)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45272,45544)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45284,45572)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45296,45608)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45308,45624)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45320,45640)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45332,45656)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45344,45672)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45356,45688)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45368,45704)|0,a=x,x=0,!(a&1)):0){k[11430]=45212;Ya(2480);break}a=Wa()|0;Bb(2480);fb(a|0)}}while(0);return k[11430]|0}function uu(a){a=a|0;a:do{if((i[2496]|0)==0?(Qa(2496)|0)!=0:0){if((i[2504]|0)==0?(Qa(2504)|0)!=0:0){a=45724;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=46012);tb(195,0,w|0)|0;Ya(2504)}x=0;Aa(41,45724,59120)|0;a=x;x=0;do{if((((((((((((((!(a&1)?(x=0,Aa(41,45736,59128)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45748,59137)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45760,59143)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45772,59149)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45784,59153)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45796,59158)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45808,59163)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45820,59170)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45832,59180)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45844,59188)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45856,59197)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45868,59206)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45880,59210)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45892,59214)|0,a=x,x=0,!(a&1)):0){x=0;Aa(41,45904,59218)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45916,59149)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45928,59222)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45940,59226)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45952,59230)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45964,59234)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45976,59238)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45988,59242)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,46e3,59246)|0;a=x;x=0;if(a&1)break;k[11503]=45724;Ya(2496);break a}}while(0);a=Wa()|0;Bb(2496);fb(a|0)}}while(0);return k[11503]|0}function vu(a){a=a|0;a:do{if((i[2512]|0)==0?(Qa(2512)|0)!=0:0){if((i[2520]|0)==0?(Qa(2520)|0)!=0:0){a=46016;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=46304);tb(196,0,w|0)|0;Ya(2520)}x=0;Aa(42,46016,46304)|0;a=x;x=0;do{if((((((((((((((!(a&1)?(x=0,Aa(42,46028,46336)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46040,46372)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46052,46396)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46064,46420)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46076,46436)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46088,46456)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46100,46476)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46112,46504)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46124,46544)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46136,46576)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46148,46612)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46160,46648)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46172,46664)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46184,46680)|0,a=x,x=0,!(a&1)):0){x=0;Aa(42,46196,46696)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46208,46420)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46220,46712)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46232,46728)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46244,46744)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46256,46760)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46268,46776)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46280,46792)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46292,46808)|0;a=x;x=0;if(a&1)break;k[11706]=46016;Ya(2512);break a}}while(0);a=Wa()|0;Bb(2512);fb(a|0)}}while(0);return k[11706]|0}function wu(a){a=a|0;do{if((i[2528]|0)==0?(Qa(2528)|0)!=0:0){if((i[2536]|0)==0?(Qa(2536)|0)!=0:0){a=46828;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=47116);tb(197,0,w|0)|0;Ya(2536)}x=0;Aa(41,46828,59250)|0;a=x;x=0;if(!(a&1)?(x=0,Aa(41,46840,59253)|0,a=x,x=0,!(a&1)):0){k[11779]=46828;Ya(2528);break}a=Wa()|0;Bb(2528);fb(a|0)}}while(0);return k[11779]|0}function xu(a){a=a|0;do{if((i[2544]|0)==0?(Qa(2544)|0)!=0:0){if((i[2552]|0)==0?(Qa(2552)|0)!=0:0){a=47120;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=47408);tb(198,0,w|0)|0;Ya(2552)}x=0;Aa(42,47120,47408)|0;a=x;x=0;if(!(a&1)?(x=0,Aa(42,47132,47420)|0,a=x,x=0,!(a&1)):0){k[11858]=47120;Ya(2544);break}a=Wa()|0;Bb(2544);fb(a|0)}}while(0);return k[11858]|0}function yu(a){a=a|0;do{if((i[2560]|0)==0?(Qa(2560)|0)!=0:0){x=0;Fa(5,47436,59256,8);a=x;x=0;if(a&1){a=Wa()|0;Bb(2560);fb(a|0)}else{tb(199,47436,w|0)|0;Ya(2560);break}}}while(0);return 47436}function zu(a){a=a|0;var b=0;do{if((i[2568]|0)==0?(Qa(2568)|0)!=0:0){x=0;a=ta(76,47448)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47484,47448,a|0),b=x,x=0,!(b&1)):0){tb(200,47484,w|0)|0;Ya(2568);break}b=Wa()|0;Bb(2568);fb(b|0)}}while(0);return 47484}function Au(a){a=a|0;do{if((i[2576]|0)==0?(Qa(2576)|0)!=0:0){x=0;Fa(5,47496,59265,8);a=x;x=0;if(a&1){a=Wa()|0;Bb(2576);fb(a|0)}else{tb(199,47496,w|0)|0;Ya(2576);break}}}while(0);return 47496}function Bu(a){a=a|0;var b=0;do{if((i[2584]|0)==0?(Qa(2584)|0)!=0:0){x=0;a=ta(76,47508)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47544,47508,a|0),b=x,x=0,!(b&1)):0){tb(200,47544,w|0)|0;Ya(2584);break}b=Wa()|0;Bb(2584);fb(b|0)}}while(0);return 47544}function Cu(a){a=a|0;do{if((i[2592]|0)==0?(Qa(2592)|0)!=0:0){x=0;Fa(5,47556,59274,20);a=x;x=0;if(a&1){a=Wa()|0;Bb(2592);fb(a|0)}else{tb(199,47556,w|0)|0;Ya(2592);break}}}while(0);return 47556}function Du(a){a=a|0;var b=0;do{if((i[2600]|0)==0?(Qa(2600)|0)!=0:0){x=0;a=ta(76,47568)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47652,47568,a|0),b=x,x=0,!(b&1)):0){tb(200,47652,w|0)|0;Ya(2600);break}b=Wa()|0;Bb(2600);fb(b|0)}}while(0);return 47652}function Eu(a){a=a|0;do{if((i[2608]|0)==0?(Qa(2608)|0)!=0:0){x=0;Fa(5,47664,59295,11);a=x;x=0;if(a&1){a=Wa()|0;Bb(2608);fb(a|0)}else{tb(199,47664,w|0)|0;Ya(2608);break}}}while(0);return 47664}function Fu(a){a=a|0;var b=0;do{if((i[2616]|0)==0?(Qa(2616)|0)!=0:0){x=0;a=ta(76,47676)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47724,47676,a|0),b=x,x=0,!(b&1)):0){tb(200,47724,w|0)|0;Ya(2616);break}b=Wa()|0;Bb(2616);fb(b|0)}}while(0);return 47724}function Gu(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=44304;a=a+8|0;b=k[a>>2]|0;x=0;c=Da(3)|0;d=x;x=0;do{if(!(d&1)){if((b|0)!=(c|0)?(x=0,qa(188,k[a>>2]|0),d=x,x=0,d&1):0)break;return}}while(0);d=Wa(0)|0;oc(d)}function Hu(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+112|0;j=z;n=(d-c|0)/12|0;do{if(n>>>0>100){j=Pl(n)|0;if((j|0)==0?(x=0,Ga(6),y=x,x=0,y&1):0){h=0;q=6;break}h=j;q=11}else{h=0;q=11}}while(0);a:do{if((q|0)==11){if((c|0)==(d|0))m=0;else{q=c;o=0;p=j;while(1){m=i[q>>0]|0;if(!(m&1))m=(m&255)>>>1;else m=k[q+4>>2]|0;if(!m){i[p>>0]=2;m=o+1|0;n=n+-1|0}else{i[p>>0]=1;m=o}q=q+12|0;if((q|0)==(d|0))break;else{o=m;p=p+1|0}}}w=(c|0)==(d|0);y=(c|0)==(d|0);v=0;s=m;b:while(1){m=k[a>>2]|0;do{if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;u=x;x=0;if(u&1){q=5;break b}if((m|0)==-1){k[a>>2]=0;m=0;break}else{m=k[a>>2]|0;break}}}else m=0}while(0);q=(m|0)==0;o=k[b>>2]|0;if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;m=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;u=x;x=0;if(u&1){q=5;break}if((m|0)==-1){k[b>>2]=0;o=0}}}else o=0;p=(o|0)==0;m=k[a>>2]|0;if(!((n|0)!=0&(q^p))){q=64;break}o=k[m+12>>2]|0;if((o|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;u=x;x=0;if(u&1){q=5;break}}else m=l[o>>0]|0;m=m&255;if(!g){x=0;m=Aa(k[(k[e>>2]|0)+12>>2]|0,e|0,m|0)|0;u=x;x=0;if(u&1){q=5;break}}u=v+1|0;if(w){m=0;q=s}else{p=0;t=c;q=s;s=j;while(1){do{if((i[s>>0]|0)==1){if(!(i[t>>0]&1))o=t+1|0;else o=k[t+8>>2]|0;o=i[o+v>>0]|0;if(!g){x=0;o=Aa(k[(k[e>>2]|0)+12>>2]|0,e|0,o|0)|0;A=x;x=0;if(A&1){q=4;break b}}if(m<<24>>24!=o<<24>>24){i[s>>0]=0;o=p;n=n+-1|0;break}o=i[t>>0]|0;if(!(o&1))o=(o&255)>>>1;else o=k[t+4>>2]|0;if((o|0)==(u|0)){i[s>>0]=2;o=1;q=q+1|0;n=n+-1|0}else o=1}else o=p}while(0);t=t+12|0;if((t|0)==(d|0)){m=o;break}else{p=o;s=s+1|0}}}if(!m){v=u;s=q;continue}m=k[a>>2]|0;o=m+12|0;p=k[o>>2]|0;if((p|0)==(k[m+16>>2]|0)){x=0;ta(k[(k[m>>2]|0)+40>>2]|0,m|0)|0;A=x;x=0;if(A&1){q=5;break}}else k[o>>2]=p+1;if((q+n|0)>>>0<2|y){v=u;s=q;continue}else{m=c;p=q;q=j}while(1){if((i[q>>0]|0)==2){o=i[m>>0]|0;if(!(o&1))o=(o&255)>>>1;else o=k[m+4>>2]|0;if((o|0)!=(u|0)){i[q>>0]=0;p=p+-1|0}}m=m+12|0;if((m|0)==(d|0)){v=u;s=p;continue b}else q=q+1|0}}if((q|0)==4){c=Wa()|0;break}else if((q|0)==5){c=Wa()|0;break}else if((q|0)==64){do{if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;A=x;x=0;if(A&1){q=6;break a}if((m|0)==-1){k[a>>2]=0;m=0;break}else{m=k[a>>2]|0;break}}}else m=0}while(0);n=(m|0)==0;do{if(!p){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;m=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;A=x;x=0;if(A&1){q=6;break a}if((m|0)==-1){k[b>>2]=0;q=76;break}}if(!n)q=77}else q=76}while(0);if((q|0)==76?n:0)q=77;if((q|0)==77)k[f>>2]=k[f>>2]|2;c:do{if((c|0)==(d|0))q=81;else while(1){if((i[j>>0]|0)==2)break c;c=c+12|0;if((c|0)==(d|0)){q=81;break}else j=j+1|0}}while(0);if((q|0)==81){k[f>>2]=k[f>>2]|4;c=d}if(h)Ql(h);r=z;return c|0}}}while(0);if((q|0)==6)c=Wa()|0;if(h)Ql(h);fb(c|0);return 0}function Iu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(h){g=0;break}else g=0}h=i[B>>0]|0;h=(h&1)==0?(h&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+h|0)){x=0;Fa(8,B|0,h<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else h=l[h>>0]|0;if(ep(h&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(21,d|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){k[f>>2]=d;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Ju(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;g=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(g)break;else break b;x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(g)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(g){h=0;break}else h=0}g=i[B>>0]|0;g=(g&1)==0?(g&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+g|0)){x=0;Fa(8,B|0,g<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+g}j=a+12|0;g=k[j>>2]|0;m=a+16|0;if((g|0)==(k[m>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else g=l[g>>0]|0;if(ep(g&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(22,d|0,k[u>>2]|0,e|0,t|0)|0;g=M;E=x;x=0;if(!(E&1)){E=f;k[E>>2]=d;k[E+4>>2]=g;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Ku(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;B=r;r=r+240|0;t=B+202|0;g=B+200|0;D=B+24|0;C=B+12|0;v=B+8|0;z=B+40|0;A=B+4|0;w=B;u=ru(d)|0;up(D,d,t,g) -;k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;if(!(i[C>>0]&1))a=10;else a=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,a|0,0);s=x;x=0;a:do{if(!(s&1)){p=C+8|0;q=C+1|0;d=(i[C>>0]&1)==0?q:k[p>>2]|0;k[v>>2]=d;k[A>>2]=z;k[w>>2]=0;s=C+4|0;o=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){E=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;m=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;n=x;x=0;if(n&1){E=24;break b}if((m|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;E=16;break}}else E=16}while(0);if((E|0)==16){E=0;if(h){g=0;break}else g=0}h=i[C>>0]|0;h=(h&1)==0?(h&255)>>>1:k[s>>2]|0;if((k[v>>2]|0)==(d+h|0)){x=0;Fa(8,C|0,h<<1|0,0);n=x;x=0;if(n&1){E=24;break}if(!(i[C>>0]&1))d=10;else d=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,d|0,0);n=x;x=0;if(n&1){E=24;break}d=(i[C>>0]&1)==0?q:k[p>>2]|0;k[v>>2]=d+h}m=a+12|0;h=k[m>>2]|0;n=a+16|0;if((h|0)==(k[n>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;F=x;x=0;if(F&1){E=24;break}}else h=l[h>>0]|0;if(ep(h&255,u,d,v,w,o,D,z,A,t)|0)break;g=k[m>>2]|0;if((g|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;F=x;x=0;if(F&1){E=24;break}else continue}else{k[m>>2]=g+1;continue}}if((E|0)==24){a=Wa()|0;break}F=i[D>>0]|0;if((((F&1)==0?(F&255)>>>1:k[D+4>>2]|0)|0)!=0?(y=k[A>>2]|0,(y-z|0)<160):0){F=k[w>>2]|0;k[A>>2]=y+4;k[y>>2]=F}x=0;d=Ea(23,d|0,k[v>>2]|0,e|0,u|0)|0;F=x;x=0;if(!(F&1)){j[f>>1]=d;cs(D,z,k[A>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;F=x;x=0;if(F&1){E=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;F=x;x=0;if(F&1){E=25;break a}if((a|0)==-1){k[c>>2]=0;E=49;break}}if(!d)E=50}else E=49}while(0);if((E|0)==49?d:0)E=50;if((E|0)==50)k[e>>2]=k[e>>2]|2;F=k[b>>2]|0;Sm(C);Sm(D);r=B;return F|0}else E=25}else E=25}while(0);if((E|0)==25)a=Wa()|0;Sm(C);Sm(D);fb(a|0);return 0}function Lu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(h){g=0;break}else g=0}h=i[B>>0]|0;h=(h&1)==0?(h&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+h|0)){x=0;Fa(8,B|0,h<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else h=l[h>>0]|0;if(ep(h&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(24,d|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){k[f>>2]=d;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Mu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(h){g=0;break}else g=0}h=i[B>>0]|0;h=(h&1)==0?(h&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+h|0)){x=0;Fa(8,B|0,h<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else h=l[h>>0]|0;if(ep(h&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(25,d|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){k[f>>2]=d;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Nu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;g=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(g)break;else break b;x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(g)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(g){h=0;break}else h=0}g=i[B>>0]|0;g=(g&1)==0?(g&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+g|0)){x=0;Fa(8,B|0,g<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+g}j=a+12|0;g=k[j>>2]|0;m=a+16|0;if((g|0)==(k[m>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else g=l[g>>0]|0;if(ep(g&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(26,d|0,k[u>>2]|0,e|0,t|0)|0;g=M;E=x;x=0;if(!(E&1)){E=f;k[E>>2]=d;k[E+4>>2]=g;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Ou(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=r;r=r+240|0;v=E+208|0;h=E+203|0;j=E+202|0;G=E+24|0;F=E+12|0;y=E+8|0;C=E+40|0;D=E+4|0;z=E;A=E+201|0;w=E+200|0;vp(G,d,v,h,j);k[F>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;if(!(i[F>>0]&1))a=10;else a=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,a|0,0);u=x;x=0;a:do{if(!(u&1)){s=F+8|0;t=F+1|0;d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d;k[D>>2]=C;k[z>>2]=0;i[A>>0]=1;i[w>>0]=69;u=F+4|0;q=i[h>>0]|0;p=i[j>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){H=24;break}if((h|0)==-1){k[b>>2]=0;a=0}}}else a=0;j=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(j)break;else break b;x=0;m=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;n=x;x=0;if(n&1){H=24;break b}if((m|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;H=16;break}}else H=16}while(0);if((H|0)==16){H=0;if(j){h=0;break}else h=0}j=i[F>>0]|0;j=(j&1)==0?(j&255)>>>1:k[u>>2]|0;if((k[y>>2]|0)==(d+j|0)){x=0;Fa(8,F|0,j<<1|0,0);n=x;x=0;if(n&1){H=24;break}if(!(i[F>>0]&1))d=10;else d=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,d|0,0);n=x;x=0;if(n&1){H=24;break}d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d+j}m=a+12|0;j=k[m>>2]|0;n=a+16|0;if((j|0)==(k[n>>2]|0)){x=0;j=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}}else j=l[j>>0]|0;if(wp(j&255,A,w,d,y,q,p,G,C,D,z,v)|0)break;h=k[m>>2]|0;if((h|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}else continue}else{k[m>>2]=h+1;continue}}if((H|0)==24){a=Wa()|0;break}I=i[G>>0]|0;if(!((i[A>>0]|0)==0?1:(((I&1)==0?(I&255)>>>1:k[G+4>>2]|0)|0)==0)?(B=k[D>>2]|0,(B-C|0)<160):0){I=k[z>>2]|0;k[D>>2]=B+4;k[B>>2]=I}x=0;g=+Ca(1,d|0,k[y>>2]|0,e|0);I=x;x=0;if(!(I&1)){o[f>>2]=g;cs(G,C,k[D>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;I=x;x=0;if(I&1){H=25;break a}if((a|0)==-1){k[c>>2]=0;H=49;break}}if(!d)H=50}else H=49}while(0);if((H|0)==49?d:0)H=50;if((H|0)==50)k[e>>2]=k[e>>2]|2;I=k[b>>2]|0;Sm(F);Sm(G);r=E;return I|0}else H=25}else H=25}while(0);if((H|0)==25)a=Wa()|0;Sm(F);Sm(G);fb(a|0);return 0}function Pu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=r;r=r+240|0;v=E+208|0;h=E+203|0;j=E+202|0;G=E+24|0;F=E+12|0;y=E+8|0;C=E+40|0;D=E+4|0;z=E;A=E+201|0;w=E+200|0;vp(G,d,v,h,j);k[F>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;if(!(i[F>>0]&1))a=10;else a=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,a|0,0);u=x;x=0;a:do{if(!(u&1)){s=F+8|0;t=F+1|0;d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d;k[D>>2]=C;k[z>>2]=0;i[A>>0]=1;i[w>>0]=69;u=F+4|0;q=i[h>>0]|0;o=i[j>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){H=24;break}if((h|0)==-1){k[b>>2]=0;a=0}}}else a=0;j=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(j)break;else break b;x=0;m=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;n=x;x=0;if(n&1){H=24;break b}if((m|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;H=16;break}}else H=16}while(0);if((H|0)==16){H=0;if(j){h=0;break}else h=0}j=i[F>>0]|0;j=(j&1)==0?(j&255)>>>1:k[u>>2]|0;if((k[y>>2]|0)==(d+j|0)){x=0;Fa(8,F|0,j<<1|0,0);n=x;x=0;if(n&1){H=24;break}if(!(i[F>>0]&1))d=10;else d=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,d|0,0);n=x;x=0;if(n&1){H=24;break}d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d+j}m=a+12|0;j=k[m>>2]|0;n=a+16|0;if((j|0)==(k[n>>2]|0)){x=0;j=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}}else j=l[j>>0]|0;if(wp(j&255,A,w,d,y,q,o,G,C,D,z,v)|0)break;h=k[m>>2]|0;if((h|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}else continue}else{k[m>>2]=h+1;continue}}if((H|0)==24){a=Wa()|0;break}I=i[G>>0]|0;if(!((i[A>>0]|0)==0?1:(((I&1)==0?(I&255)>>>1:k[G+4>>2]|0)|0)==0)?(B=k[D>>2]|0,(B-C|0)<160):0){I=k[z>>2]|0;k[D>>2]=B+4;k[B>>2]=I}x=0;g=+Ca(2,d|0,k[y>>2]|0,e|0);I=x;x=0;if(!(I&1)){p[f>>3]=g;cs(G,C,k[D>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;I=x;x=0;if(I&1){H=25;break a}if((a|0)==-1){k[c>>2]=0;H=49;break}}if(!d)H=50}else H=49}while(0);if((H|0)==49?d:0)H=50;if((H|0)==50)k[e>>2]=k[e>>2]|2;I=k[b>>2]|0;Sm(F);Sm(G);r=E;return I|0}else H=25}else H=25}while(0);if((H|0)==25)a=Wa()|0;Sm(F);Sm(G);fb(a|0);return 0}function Qu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=r;r=r+240|0;v=E+208|0;h=E+203|0;j=E+202|0;G=E+24|0;F=E+12|0;y=E+8|0;C=E+40|0;D=E+4|0;z=E;A=E+201|0;w=E+200|0;vp(G,d,v,h,j);k[F>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;if(!(i[F>>0]&1))a=10;else a=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,a|0,0);u=x;x=0;a:do{if(!(u&1)){s=F+8|0;t=F+1|0;d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d;k[D>>2]=C;k[z>>2]=0;i[A>>0]=1;i[w>>0]=69;u=F+4|0;q=i[h>>0]|0;o=i[j>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){H=24;break}if((h|0)==-1){k[b>>2]=0;a=0}}}else a=0;j=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(j)break;else break b;x=0;m=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;n=x;x=0;if(n&1){H=24;break b}if((m|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;H=16;break}}else H=16}while(0);if((H|0)==16){H=0;if(j){h=0;break}else h=0}j=i[F>>0]|0;j=(j&1)==0?(j&255)>>>1:k[u>>2]|0;if((k[y>>2]|0)==(d+j|0)){x=0;Fa(8,F|0,j<<1|0,0);n=x;x=0;if(n&1){H=24;break}if(!(i[F>>0]&1))d=10;else d=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,d|0,0);n=x;x=0;if(n&1){H=24;break}d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d+j}m=a+12|0;j=k[m>>2]|0;n=a+16|0;if((j|0)==(k[n>>2]|0)){x=0;j=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}}else j=l[j>>0]|0;if(wp(j&255,A,w,d,y,q,o,G,C,D,z,v)|0)break;h=k[m>>2]|0;if((h|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}else continue}else{k[m>>2]=h+1;continue}}if((H|0)==24){a=Wa()|0;break}I=i[G>>0]|0;if(!((i[A>>0]|0)==0?1:(((I&1)==0?(I&255)>>>1:k[G+4>>2]|0)|0)==0)?(B=k[D>>2]|0,(B-C|0)<160):0){I=k[z>>2]|0;k[D>>2]=B+4;k[B>>2]=I}x=0;g=+Ca(3,d|0,k[y>>2]|0,e|0);I=x;x=0;if(!(I&1)){p[f>>3]=g;cs(G,C,k[D>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;I=x;x=0;if(I&1){H=25;break a}if((a|0)==-1){k[c>>2]=0;H=49;break}}if(!d)H=50}else H=49}while(0);if((H|0)==49?d:0)H=50;if((H|0)==50)k[e>>2]=k[e>>2]|2;I=k[b>>2]|0;Sm(F);Sm(G);r=E;return I|0}else H=25}else H=25}while(0);if((H|0)==25)a=Wa()|0;Sm(F);Sm(G);fb(a|0);return 0}function Ru(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;d=Ak(b)|0;b=pl(a,c,f)|0;if((d|0)!=0?(x=0,ta(75,d|0)|0,f=x,x=0,f&1):0){f=Wa(0)|0;oc(f)}r=e;return b|0}function Su(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;y=r;r=r+112|0;j=y;m=(d-c|0)/12|0;do{if(m>>>0>100){j=Pl(m)|0;if((j|0)==0?(x=0,Ga(6),w=x,x=0,w&1):0){h=0;o=6;break}h=j;o=11}else{h=0;o=11}}while(0);a:do{if((o|0)==11){if((c|0)==(d|0))l=0;else{p=c;n=0;o=j;while(1){l=i[p>>0]|0;if(!(l&1))l=(l&255)>>>1;else l=k[p+4>>2]|0;if(!l){i[o>>0]=2;l=n+1|0;m=m+-1|0}else{i[o>>0]=1;l=n}p=p+12|0;if((p|0)==(d|0))break;else{n=l;o=o+1|0}}}v=(c|0)==(d|0);w=(c|0)==(d|0);u=0;q=m;b:while(1){m=k[a>>2]|0;do{if(m){n=k[m+12>>2]|0;if((n|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;t=x;x=0;if(t&1){o=5;break b}}else m=k[n>>2]|0;if((m|0)==-1){k[a>>2]=0;p=1;break}else{p=(k[a>>2]|0)==0;break}}else p=1}while(0);n=k[b>>2]|0;if(n){m=k[n+12>>2]|0;if((m|0)==(k[n+16>>2]|0)){x=0;m=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;t=x;x=0;if(t&1){o=5;break}}else m=k[m>>2]|0;if((m|0)==-1){k[b>>2]=0;n=0;o=1}else o=0}else{n=0;o=1}m=k[a>>2]|0;if(!((q|0)!=0&(p^o))){o=66;break}n=k[m+12>>2]|0;if((n|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;t=x;x=0;if(t&1){o=5;break}}else m=k[n>>2]|0;if(!g){x=0;m=Aa(k[(k[e>>2]|0)+28>>2]|0,e|0,m|0)|0;t=x;x=0;if(t&1){o=5;break}}t=u+1|0;if(v){m=0;p=q}else{p=0;s=c;o=q;q=j;while(1){do{if((i[q>>0]|0)==1){if(!(i[s>>0]&1))n=s+4|0;else n=k[s+8>>2]|0;n=k[n+(u<<2)>>2]|0;if(!g){x=0;n=Aa(k[(k[e>>2]|0)+28>>2]|0,e|0,n|0)|0;z=x;x=0;if(z&1){o=4;break b}}if((m|0)!=(n|0)){i[q>>0]=0;n=p;o=o+-1|0;break}n=i[s>>0]|0;if(!(n&1))n=(n&255)>>>1;else n=k[s+4>>2]|0;if((n|0)==(t|0)){i[q>>0]=2;n=1;l=l+1|0;o=o+-1|0}else n=1}else n=p}while(0);s=s+12|0;if((s|0)==(d|0)){m=n;p=o;break}else{p=n;q=q+1|0}}}if(!m){u=t;q=p;continue}m=k[a>>2]|0;n=m+12|0;o=k[n>>2]|0;if((o|0)==(k[m+16>>2]|0)){x=0;ta(k[(k[m>>2]|0)+40>>2]|0,m|0)|0;z=x;x=0;if(z&1){o=5;break}}else k[n>>2]=o+4;if((l+p|0)>>>0<2|w){u=t;q=p;continue}else{m=c;o=j}while(1){if((i[o>>0]|0)==2){n=i[m>>0]|0;if(!(n&1))n=(n&255)>>>1;else n=k[m+4>>2]|0;if((n|0)!=(t|0)){i[o>>0]=0;l=l+-1|0}}m=m+12|0;if((m|0)==(d|0)){u=t;q=p;continue b}else o=o+1|0}}if((o|0)==4){c=Wa()|0;break}else if((o|0)==5){c=Wa()|0;break}else if((o|0)==66){do{if(m){l=k[m+12>>2]|0;if((l|0)==(k[m+16>>2]|0)){x=0;l=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;z=x;x=0;if(z&1){o=6;break a}}else l=k[l>>2]|0;if((l|0)==-1){k[a>>2]=0;m=1;break}else{m=(k[a>>2]|0)==0;break}}else m=1}while(0);do{if(n){l=k[n+12>>2]|0;if((l|0)==(k[n+16>>2]|0)){x=0;l=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;z=x;x=0;if(z&1){o=6;break a}}else l=k[l>>2]|0;if((l|0)!=-1)if(m)break;else{o=81;break}else{k[b>>2]=0;o=79;break}}else o=79}while(0);if((o|0)==79?m:0)o=81;if((o|0)==81)k[f>>2]=k[f>>2]|2;c:do{if((c|0)==(d|0))o=85;else while(1){if((i[j>>0]|0)==2)break c;c=c+12|0;if((c|0)==(d|0)){o=85;break}else j=j+1|0}}while(0);if((o|0)==85){k[f>>2]=k[f>>2]|4;c=d}if(h)Ql(h);r=y;return c|0}}}while(0);if((o|0)==6)c=Wa()|0;if(h)Ql(h);fb(c|0);return 0}function Tu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){C=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=j;break b}else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(h){g=0;break}else j=0}g=i[A>>0]|0;g=(g&1)==0?(g&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+g|0)){x=0;Fa(8,A|0,g<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+g}h=d+12|0;g=k[h>>2]|0;l=d+16|0;if((g|0)==(k[l>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}}else g=k[g>>2]|0;if(tp(g,s,a,t,u,m,B,w,y,q)|0){g=j;break}g=k[h>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(21,a|0,k[t>>2]|0,e|0,s|0)|0;D=x;x=0;if(!(D&1)){k[f>>2]=a;cs(B,w,k[y>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Uu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;g=0;j=1}else j=0}else{g=0;j=1}h=k[c>>2]|0;do{if(h){d=k[h+12>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;d=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;l=x;x=0;if(l&1){C=25;break b}}else d=k[d>>2]|0;if((d|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(j){h=0;break}else h=0}d=i[A>>0]|0;d=(d&1)==0?(d&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+d|0)){x=0;Fa(8,A|0,d<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+d}j=g+12|0;d=k[j>>2]|0;l=g+16|0;if((d|0)==(k[l>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}}else d=k[d>>2]|0;if(tp(d,s,a,t,u,m,B,w,y,q)|0)break;d=k[j>>2]|0;if((d|0)==(k[l>>2]|0)){x=0;ta(k[(k[g>>2]|0)+40>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}else continue}else{k[j>>2]=d+4;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(22,a|0,k[t>>2]|0,e|0,s|0)|0;d=M;D=x;x=0;if(!(D&1)){D=f;k[D>>2]=a;k[D+4>>2]=d;cs(B,w,k[y>>2]|0,e);if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Vu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+320|0;s=A+208|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;xp(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;a=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=a;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}l=k[c>>2]|0;do{if(l){g=k[l+12>>2]|0;if((g|0)==(k[l+16>>2]|0)){x=0;g=ta(k[(k[l>>2]|0)+36>>2]|0,l|0)|0;m=x;x=0;if(m&1){D=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=l;break b}else{k[c>>2]=0;D=17;break}}else D=17}while(0);if((D|0)==17){D=0;if(h){g=0;break}else l=0}g=i[B>>0]|0;g=(g&1)==0?(g&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(a+g|0)){x=0;Fa(8,B|0,g<<1|0,0);m=x;x=0;if(m&1){D=25;break}if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);m=x;x=0;if(m&1){D=25;break}a=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=a+g}h=d+12|0;g=k[h>>2]|0;m=d+16|0;if((g|0)==(k[m>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;E=x;x=0;if(E&1){D=25;break}}else g=k[g>>2]|0;if(tp(g,t,a,u,v,n,C,y,z,s)|0){g=l;break}g=k[h>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;E=x;x=0;if(E&1){D=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((D|0)==25){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;a=Ea(23,a|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){j[f>>1]=a;cs(C,y,k[z>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;E=x;x=0;if(E&1){D=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{D=53;break}else{k[c>>2]=0;D=51;break}}else D=51}while(0);if((D|0)==51?d:0)D=53;if((D|0)==53)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=26}else D=26}while(0);if((D|0)==26)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Wu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){C=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=j;break b}else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(h){g=0;break}else j=0}g=i[A>>0]|0;g=(g&1)==0?(g&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+g|0)){x=0;Fa(8,A|0,g<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+g}h=d+12|0;g=k[h>>2]|0;l=d+16|0;if((g|0)==(k[l>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}}else g=k[g>>2]|0;if(tp(g,s,a,t,u,m,B,w,y,q)|0){g=j;break}g=k[h>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(24,a|0,k[t>>2]|0,e|0,s|0)|0;D=x;x=0;if(!(D&1)){k[f>>2]=a;cs(B,w,k[y>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Xu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){C=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=j;break b}else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(h){g=0;break}else j=0}g=i[A>>0]|0;g=(g&1)==0?(g&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+g|0)){x=0;Fa(8,A|0,g<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+g}h=d+12|0;g=k[h>>2]|0;l=d+16|0;if((g|0)==(k[l>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}}else g=k[g>>2]|0;if(tp(g,s,a,t,u,m,B,w,y,q)|0){g=j;break}g=k[h>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(25,a|0,k[t>>2]|0,e|0,s|0)|0;D=x;x=0;if(!(D&1)){k[f>>2]=a;cs(B,w,k[y>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Yu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;g=0;j=1}else j=0}else{g=0;j=1}h=k[c>>2]|0;do{if(h){d=k[h+12>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;d=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;l=x;x=0;if(l&1){C=25;break b}}else d=k[d>>2]|0;if((d|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(j){h=0;break}else h=0}d=i[A>>0]|0;d=(d&1)==0?(d&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+d|0)){x=0;Fa(8,A|0,d<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+d}j=g+12|0;d=k[j>>2]|0;l=g+16|0;if((d|0)==(k[l>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}}else d=k[d>>2]|0;if(tp(d,s,a,t,u,m,B,w,y,q)|0)break;d=k[j>>2]|0;if((d|0)==(k[l>>2]|0)){x=0;ta(k[(k[g>>2]|0)+40>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}else continue}else{k[j>>2]=d+4;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0 -;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(26,a|0,k[t>>2]|0,e|0,s|0)|0;d=M;D=x;x=0;if(!(D&1)){D=f;k[D>>2]=a;k[D+4>>2]=d;cs(B,w,k[y>>2]|0,e);if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Zu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;D=r;r=r+352|0;u=D+208|0;h=D+40|0;j=D+36|0;F=D+24|0;E=D+12|0;w=D+8|0;B=D+48|0;C=D+4|0;y=D;z=D+337|0;v=D+336|0;yp(F,d,u,h,j);k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);t=x;x=0;a:do{if(!(t&1)){q=E+8|0;s=E+1|0;a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a;k[C>>2]=B;k[y>>2]=0;i[z>>0]=1;i[v>>0]=69;t=E+4|0;p=k[h>>2]|0;n=k[j>>2]|0;d=k[b>>2]|0;b:while(1){if(d){h=k[d+12>>2]|0;if((h|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;m=x;x=0;if(m&1){G=25;break}}else h=k[h>>2]|0;if((h|0)==-1){k[b>>2]=0;d=0;l=1}else l=0}else{d=0;l=1}h=k[c>>2]|0;do{if(h){j=k[h+12>>2]|0;if((j|0)==(k[h+16>>2]|0)){x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){G=25;break b}}else j=k[j>>2]|0;if((j|0)!=-1)if(l)break;else break b;else{k[c>>2]=0;G=17;break}}else G=17}while(0);if((G|0)==17){G=0;if(l){h=0;break}else h=0}j=i[E>>0]|0;j=(j&1)==0?(j&255)>>>1:k[t>>2]|0;if((k[w>>2]|0)==(a+j|0)){x=0;Fa(8,E|0,j<<1|0,0);m=x;x=0;if(m&1){G=25;break}if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);m=x;x=0;if(m&1){G=25;break}a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a+j}l=d+12|0;j=k[l>>2]|0;m=d+16|0;if((j|0)==(k[m>>2]|0)){x=0;j=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}}else j=k[j>>2]|0;if(zp(j,z,v,a,w,p,n,F,B,C,y,u)|0)break;h=k[l>>2]|0;if((h|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}else continue}else{k[l>>2]=h+4;continue}}if((G|0)==25){a=Wa()|0;break}H=i[F>>0]|0;if(!((i[z>>0]|0)==0?1:(((H&1)==0?(H&255)>>>1:k[F+4>>2]|0)|0)==0)?(A=k[C>>2]|0,(A-B|0)<160):0){H=k[y>>2]|0;k[C>>2]=A+4;k[A>>2]=H}x=0;g=+Ca(1,a|0,k[w>>2]|0,e|0);H=x;x=0;if(!(H&1)){o[f>>2]=g;cs(F,B,k[C>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;H=x;x=0;if(H&1){G=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{G=53;break}else{k[c>>2]=0;G=51;break}}else G=51}while(0);if((G|0)==51?d:0)G=53;if((G|0)==53)k[e>>2]=k[e>>2]|2;H=k[b>>2]|0;Sm(E);Sm(F);r=D;return H|0}else G=26}else G=26}while(0);if((G|0)==26)a=Wa()|0;Sm(E);Sm(F);fb(a|0);return 0}function _u(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;D=r;r=r+352|0;u=D+208|0;h=D+40|0;j=D+36|0;F=D+24|0;E=D+12|0;w=D+8|0;B=D+48|0;C=D+4|0;y=D;z=D+337|0;v=D+336|0;yp(F,d,u,h,j);k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);t=x;x=0;a:do{if(!(t&1)){q=E+8|0;s=E+1|0;a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a;k[C>>2]=B;k[y>>2]=0;i[z>>0]=1;i[v>>0]=69;t=E+4|0;o=k[h>>2]|0;n=k[j>>2]|0;d=k[b>>2]|0;b:while(1){if(d){h=k[d+12>>2]|0;if((h|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;m=x;x=0;if(m&1){G=25;break}}else h=k[h>>2]|0;if((h|0)==-1){k[b>>2]=0;d=0;l=1}else l=0}else{d=0;l=1}h=k[c>>2]|0;do{if(h){j=k[h+12>>2]|0;if((j|0)==(k[h+16>>2]|0)){x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){G=25;break b}}else j=k[j>>2]|0;if((j|0)!=-1)if(l)break;else break b;else{k[c>>2]=0;G=17;break}}else G=17}while(0);if((G|0)==17){G=0;if(l){h=0;break}else h=0}j=i[E>>0]|0;j=(j&1)==0?(j&255)>>>1:k[t>>2]|0;if((k[w>>2]|0)==(a+j|0)){x=0;Fa(8,E|0,j<<1|0,0);m=x;x=0;if(m&1){G=25;break}if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);m=x;x=0;if(m&1){G=25;break}a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a+j}l=d+12|0;j=k[l>>2]|0;m=d+16|0;if((j|0)==(k[m>>2]|0)){x=0;j=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}}else j=k[j>>2]|0;if(zp(j,z,v,a,w,o,n,F,B,C,y,u)|0)break;h=k[l>>2]|0;if((h|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}else continue}else{k[l>>2]=h+4;continue}}if((G|0)==25){a=Wa()|0;break}H=i[F>>0]|0;if(!((i[z>>0]|0)==0?1:(((H&1)==0?(H&255)>>>1:k[F+4>>2]|0)|0)==0)?(A=k[C>>2]|0,(A-B|0)<160):0){H=k[y>>2]|0;k[C>>2]=A+4;k[A>>2]=H}x=0;g=+Ca(2,a|0,k[w>>2]|0,e|0);H=x;x=0;if(!(H&1)){p[f>>3]=g;cs(F,B,k[C>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;H=x;x=0;if(H&1){G=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{G=53;break}else{k[c>>2]=0;G=51;break}}else G=51}while(0);if((G|0)==51?d:0)G=53;if((G|0)==53)k[e>>2]=k[e>>2]|2;H=k[b>>2]|0;Sm(E);Sm(F);r=D;return H|0}else G=26}else G=26}while(0);if((G|0)==26)a=Wa()|0;Sm(E);Sm(F);fb(a|0);return 0}function $u(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;D=r;r=r+352|0;u=D+208|0;h=D+40|0;j=D+36|0;F=D+24|0;E=D+12|0;w=D+8|0;B=D+48|0;C=D+4|0;y=D;z=D+337|0;v=D+336|0;yp(F,d,u,h,j);k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);t=x;x=0;a:do{if(!(t&1)){q=E+8|0;s=E+1|0;a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a;k[C>>2]=B;k[y>>2]=0;i[z>>0]=1;i[v>>0]=69;t=E+4|0;o=k[h>>2]|0;n=k[j>>2]|0;d=k[b>>2]|0;b:while(1){if(d){h=k[d+12>>2]|0;if((h|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;m=x;x=0;if(m&1){G=25;break}}else h=k[h>>2]|0;if((h|0)==-1){k[b>>2]=0;d=0;l=1}else l=0}else{d=0;l=1}h=k[c>>2]|0;do{if(h){j=k[h+12>>2]|0;if((j|0)==(k[h+16>>2]|0)){x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){G=25;break b}}else j=k[j>>2]|0;if((j|0)!=-1)if(l)break;else break b;else{k[c>>2]=0;G=17;break}}else G=17}while(0);if((G|0)==17){G=0;if(l){h=0;break}else h=0}j=i[E>>0]|0;j=(j&1)==0?(j&255)>>>1:k[t>>2]|0;if((k[w>>2]|0)==(a+j|0)){x=0;Fa(8,E|0,j<<1|0,0);m=x;x=0;if(m&1){G=25;break}if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);m=x;x=0;if(m&1){G=25;break}a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a+j}l=d+12|0;j=k[l>>2]|0;m=d+16|0;if((j|0)==(k[m>>2]|0)){x=0;j=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}}else j=k[j>>2]|0;if(zp(j,z,v,a,w,o,n,F,B,C,y,u)|0)break;h=k[l>>2]|0;if((h|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}else continue}else{k[l>>2]=h+4;continue}}if((G|0)==25){a=Wa()|0;break}H=i[F>>0]|0;if(!((i[z>>0]|0)==0?1:(((H&1)==0?(H&255)>>>1:k[F+4>>2]|0)|0)==0)?(A=k[C>>2]|0,(A-B|0)<160):0){H=k[y>>2]|0;k[C>>2]=A+4;k[A>>2]=H}x=0;g=+Ca(3,a|0,k[w>>2]|0,e|0);H=x;x=0;if(!(H&1)){p[f>>3]=g;cs(F,B,k[C>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;H=x;x=0;if(H&1){G=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{G=53;break}else{k[c>>2]=0;G=51;break}}else G=51}while(0);if((G|0)==51?d:0)G=53;if((G|0)==53)k[e>>2]=k[e>>2]|2;H=k[b>>2]|0;Sm(E);Sm(F);r=D;return H|0}else G=26}else G=26}while(0);if((G|0)==26)a=Wa()|0;Sm(E);Sm(F);fb(a|0);return 0}function av(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;f=r;r=r+16|0;g=f;k[g>>2]=e;e=Ak(c)|0;c=ol(a,b,d,g)|0;if((e|0)!=0?(x=0,ta(75,e|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}r=f;return c|0}function bv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;d=Ak(b)|0;x=0;b=va(37,a|0,c|0,f|0)|0;a=x;x=0;if(a&1){b=Wa()|0;if((d|0)!=0?(x=0,ta(75,d|0)|0,f=x,x=0,f&1):0){f=Wa(0)|0;oc(f)}fb(b|0)}else{if((d|0)!=0?(x=0,ta(75,d|0)|0,f=x,x=0,f&1):0){f=Wa(0)|0;oc(f)}r=e;return b|0}return 0}function cv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0;n=r;r=r+16|0;m=n;g=k[a>>2]|0;a:do{if(!g)g=0;else{o=b;j=d-o>>2;l=e+12|0;h=k[l>>2]|0;j=(h|0)>(j|0)?h-j|0:0;h=c;o=h-o|0;e=o>>2;if((o|0)>0?(Qb[k[(k[g>>2]|0)+48>>2]&63](g,b,e)|0)!=(e|0):0){k[a>>2]=0;g=0;break}do{if((j|0)>0){dn(m,j,f);x=0;e=va(k[(k[g>>2]|0)+48>>2]|0,g|0,((i[m>>0]&1)==0?m+4|0:k[m+8>>2]|0)|0,j|0)|0;o=x;x=0;if(o&1){o=Wa()|0;en(m);fb(o|0)}if((e|0)==(j|0)){en(m);break}else{k[a>>2]=0;en(m);g=0;break a}}}while(0);o=d-h|0;d=o>>2;if((o|0)>0?(Qb[k[(k[g>>2]|0)+48>>2]&63](g,c,d)|0)!=(d|0):0){k[a>>2]=0;g=0;break}k[l>>2]=0}}while(0);r=n;return g|0}function dv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,m=0,n=0,o=0,p=0,q=0,r=0;f=k[a>>2]|0;do{if(f){if((k[f+12>>2]|0)==(k[f+16>>2]|0))if((Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0)==-1){k[a>>2]=0;f=0;break}else{f=k[a>>2]|0;break}}else f=0}while(0);g=(f|0)==0;f=k[b>>2]|0;do{if(f){if((k[f+12>>2]|0)==(k[f+16>>2]|0)?(Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0)==-1:0){k[b>>2]=0;r=11;break}if(g)r=13;else r=12}else r=11}while(0);if((r|0)==11)if(g)r=12;else{f=0;r=13}a:do{if((r|0)==12){k[c>>2]=k[c>>2]|6;f=0}else if((r|0)==13){g=k[a>>2]|0;h=k[g+12>>2]|0;if((h|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=l[h>>0]|0;h=g&255;if(h<<24>>24>-1?(q=d+8|0,(j[(k[q>>2]|0)+(g<<24>>24<<1)>>1]&2048)!=0):0){m=(Qb[k[(k[d>>2]|0)+36>>2]&63](d,h,0)|0)<<24>>24;g=k[a>>2]|0;h=g+12|0;i=k[h>>2]|0;if((i|0)==(k[g+16>>2]|0)){Ob[k[(k[g>>2]|0)+40>>2]&127](g)|0;o=e;n=f;e=f;f=m}else{k[h>>2]=i+1;o=e;n=f;e=f;f=m}while(1){f=f+-48|0;p=o+-1|0;g=k[a>>2]|0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0))if((Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0)==-1){k[a>>2]=0;g=0;break}else{g=k[a>>2]|0;break}}else g=0}while(0);i=(g|0)==0;if(e)if((k[e+12>>2]|0)==(k[e+16>>2]|0))if((Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0)==-1){k[b>>2]=0;h=0;e=0}else{h=n;e=n}else h=n;else{h=n;e=0}g=k[a>>2]|0;if(!((o|0)>1&(i^(e|0)==0)))break;i=k[g+12>>2]|0;if((i|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=l[i>>0]|0;i=g&255;if(i<<24>>24<=-1)break a;if(!(j[(k[q>>2]|0)+(g<<24>>24<<1)>>1]&2048))break a;f=((Qb[k[(k[d>>2]|0)+36>>2]&63](d,i,0)|0)<<24>>24)+(f*10|0)|0;g=k[a>>2]|0;i=g+12|0;m=k[i>>2]|0;if((m|0)==(k[g+16>>2]|0)){Ob[k[(k[g>>2]|0)+40>>2]&127](g)|0;o=p;n=h;continue}else{k[i>>2]=m+1;o=p;n=h;continue}}do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0))if((Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0)==-1){k[a>>2]=0;g=0;break}else{g=k[a>>2]|0;break}}else g=0}while(0);g=(g|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)?(Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0)==-1:0){k[b>>2]=0;r=50;break}if(g)break a}else r=50}while(0);if((r|0)==50?!g:0)break;k[c>>2]=k[c>>2]|2;break}k[c>>2]=k[c>>2]|4;f=0}}while(0);return f|0}function ev(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;f=k[a>>2]|0;do{if(f){g=k[f+12>>2]|0;if((g|0)==(k[f+16>>2]|0))f=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else f=k[g>>2]|0;if((f|0)==-1){k[a>>2]=0;h=1;break}else{h=(k[a>>2]|0)==0;break}}else h=1}while(0);g=k[b>>2]|0;do{if(g){f=k[g+12>>2]|0;if((f|0)==(k[g+16>>2]|0))f=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else f=k[f>>2]|0;if((f|0)!=-1)if(h){o=17;break}else{o=16;break}else{k[b>>2]=0;o=14;break}}else o=14}while(0);if((o|0)==14)if(h)o=16;else{g=0;o=17}a:do{if((o|0)==16){k[c>>2]=k[c>>2]|6;f=0}else if((o|0)==17){f=k[a>>2]|0;h=k[f+12>>2]|0;if((h|0)==(k[f+16>>2]|0))f=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else f=k[h>>2]|0;if(!(Qb[k[(k[d>>2]|0)+12>>2]&63](d,2048,f)|0)){k[c>>2]=k[c>>2]|4;f=0;break}f=(Qb[k[(k[d>>2]|0)+52>>2]&63](d,f,0)|0)<<24>>24;h=k[a>>2]|0;i=h+12|0;j=k[i>>2]|0;if((j|0)==(k[h+16>>2]|0)){Ob[k[(k[h>>2]|0)+40>>2]&127](h)|0;m=e;l=g;i=g}else{k[i>>2]=j+4;m=e;l=g;i=g}while(1){f=f+-48|0;n=m+-1|0;g=k[a>>2]|0;do{if(g){h=k[g+12>>2]|0;if((h|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=k[h>>2]|0;if((g|0)==-1){k[a>>2]=0;j=1;break}else{j=(k[a>>2]|0)==0;break}}else j=1}while(0);do{if(i){g=k[i+12>>2]|0;if((g|0)==(k[i+16>>2]|0))g=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else g=k[g>>2]|0;if((g|0)==-1){k[b>>2]=0;i=0;e=0;g=1;break}else{i=l;e=l;g=(l|0)==0;break}}else{i=l;e=0;g=1}}while(0);h=k[a>>2]|0;if(!((m|0)>1&(j^g)))break;g=k[h+12>>2]|0;if((g|0)==(k[h+16>>2]|0))g=Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0;else g=k[g>>2]|0;if(!(Qb[k[(k[d>>2]|0)+12>>2]&63](d,2048,g)|0))break a;f=((Qb[k[(k[d>>2]|0)+52>>2]&63](d,g,0)|0)<<24>>24)+(f*10|0)|0;g=k[a>>2]|0;h=g+12|0;j=k[h>>2]|0;if((j|0)==(k[g+16>>2]|0)){Ob[k[(k[g>>2]|0)+40>>2]&127](g)|0;m=n;l=i;i=e;continue}else{k[h>>2]=j+4;m=n;l=i;i=e;continue}}do{if(h){g=k[h+12>>2]|0;if((g|0)==(k[h+16>>2]|0))g=Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0;else g=k[g>>2]|0;if((g|0)==-1){k[a>>2]=0;h=1;break}else{h=(k[a>>2]|0)==0;break}}else h=1}while(0);do{if(i){g=k[i+12>>2]|0;if((g|0)==(k[i+16>>2]|0))g=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else g=k[g>>2]|0;if((g|0)!=-1)if(h)break a;else break;else{k[b>>2]=0;o=60;break}}else o=60}while(0);if((o|0)==60?!h:0)break;k[c>>2]=k[c>>2]|2}}while(0);return f|0}function fv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;d=(k[f>>2]|0)!=189;h=k[a>>2]|0;g=h;e=(k[c>>2]|0)-g|0;e=e>>>0<2147483647?e<<1:-1;g=(k[b>>2]|0)-g|0;h=Sl(d?h:0,e)|0;if(!h)ak();do{if(!d){d=k[a>>2]|0;k[a>>2]=h;if(d){x=0;qa(k[f>>2]|0,d|0);h=x;x=0;if(h&1){h=Wa(0)|0;oc(h)}else{i=k[a>>2]|0;break}}else i=h}else{k[a>>2]=h;i=h}}while(0);k[f>>2]=201;k[b>>2]=i+g;k[c>>2]=(k[a>>2]|0)+e;return}function gv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;d=(k[f>>2]|0)!=189;h=k[a>>2]|0;g=h;e=(k[c>>2]|0)-g|0;e=e>>>0<2147483647?e<<1:-1;g=(k[b>>2]|0)-g>>2;h=Sl(d?h:0,e)|0;if(!h)ak();do{if(!d){d=k[a>>2]|0;k[a>>2]=h;if(d){x=0;qa(k[f>>2]|0,d|0);h=x;x=0;if(h&1){h=Wa(0)|0;oc(h)}else{i=k[a>>2]|0;break}}else i=h}else{k[a>>2]=h;i=h}}while(0);k[f>>2]=201;k[b>>2]=i+(g<<2);k[c>>2]=(k[a>>2]|0)+(e>>>2<<2);return}function hv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;f=b;d=i[a>>0]|0;if(!(d&1)){e=10;j=(d&255)>>>1}else{d=k[a>>2]|0;e=(d&-2)+-1|0;j=k[a+4>>2]|0;d=d&255}h=c-f|0;do{if((c|0)!=(b|0)){if((e-j|0)>>>0>>0){bn(a,e,j+h-e|0,j,j,0,0);d=i[a>>0]|0}if(!(d&1))g=a+1|0;else g=k[a+8>>2]|0;f=c+(j-f)|0;if((b|0)!=(c|0)){d=b;e=g+j|0;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(c|0))break;else e=e+1|0}}i[g+f>>0]=0;d=j+h|0;if(!(i[a>>0]&1)){i[a>>0]=d<<1;break}else{k[a+4>>2]=d;break}}}while(0);return a|0}function iv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;d=(k[f>>2]|0)!=189;h=k[a>>2]|0;g=h;e=(k[c>>2]|0)-g|0;e=e>>>0<2147483647?e<<1:-1;g=(k[b>>2]|0)-g>>2;h=Sl(d?h:0,e)|0;if(!h)ak();do{if(!d){d=k[a>>2]|0;k[a>>2]=h;if(d){x=0;qa(k[f>>2]|0,d|0);h=x;x=0;if(h&1){h=Wa(0)|0;oc(h)}else{i=k[a>>2]|0;break}}else i=h}else{k[a>>2]=h;i=h}}while(0);k[f>>2]=201;k[b>>2]=i+(g<<2);k[c>>2]=(k[a>>2]|0)+(e>>>2<<2);return}function jv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;f=b;d=i[a>>0]|0;if(!(d&1)){e=1;j=(d&255)>>>1}else{d=k[a>>2]|0;e=(d&-2)+-1|0;j=k[a+4>>2]|0;d=d&255}h=c-f>>2;do{if(h){if((e-j|0)>>>0>>0){ln(a,e,j+h-e|0,j,j,0,0);d=i[a>>0]|0}if(!(d&1))g=a+4|0;else g=k[a+8>>2]|0;f=j+((c-f|0)>>>2)|0;if((b|0)!=(c|0)){d=b;e=g+(j<<2)|0;while(1){k[e>>2]=k[d>>2];d=d+4|0;if((d|0)==(c|0))break;else e=e+4|0}}k[g+(f<<2)>>2]=0;d=j+h|0;if(!(i[a>>0]&1)){i[a>>0]=d<<1;break}else{k[a+4>>2]=d;break}}}while(0);return a|0}function kv(a,b){a=a|0;b=b|0;var c=0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;i[a+128>>0]=0;do{if(b){x=0;ra(125,a|0,b|0);c=x;x=0;if(c&1){c=Wa()|0;Nv(a);fb(c|0)}else{cw(a,b);break}}}while(0);return}function lv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43148)|0);return}function mv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43188)|0);return}function nv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44220)|0);return}function ov(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44212)|0);return}function pv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44280)|0);return}function qv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44288)|0);return}function rv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44344)|0);return}function sv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44352)|0);return}function tv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44360)|0);return}function uv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44368)|0);return}function vv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43260)|0);return}function wv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43332)|0);return}function xv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43392)|0);return}function yv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43452)|0);return}function zv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43764)|0);return}function Av(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43828)|0);return}function Bv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43892)|0);return}function Cv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43956)|0);return}function Dv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43992)|0);return}function Ev(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44028)|0);return}function Fv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44064)|0);return}function Gv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44100)|0);return}function Hv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43544)|0);return}function Iv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43636)|0);return}function Jv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43668)|0);return}function Kv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43700)|0);return}function Lv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44140)|0);return}function Mv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44180)|0);return}function Nv(a){a=a|0;var b=0,c=0,d=0;c=k[a>>2]|0;do{if(c){d=a+4|0;b=k[d>>2]|0;if((b|0)!=(c|0)){do{b=b+-4|0}while((b|0)!=(c|0));k[d>>2]=b}if((a+16|0)==(c|0)){i[a+128>>0]=0;break}else{mj(c);break}}}while(0);return}function Ov(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;g=a+4|0;c=k[g>>2]|0;d=k[a>>2]|0;e=c-d>>2;if(e>>>0>=b>>>0){if(e>>>0>b>>>0?(f=d+(b<<2)|0,(c|0)!=(f|0)):0){do{c=c+-4|0}while((c|0)!=(f|0));k[g>>2]=c}}else bw(a,b-e|0);return}function Pv(a,b){a=a|0;b=b|0;var c=0;c=k[a+8>>2]|0;if((k[a+12>>2]|0)-c>>2>>>0>b>>>0)c=(k[c+(b<<2)>>2]|0)!=0;else c=0;return c|0}function Qv(a){a=a|0;var b=0,c=0;c=a+4|0;b=k[c>>2]|0;c=k[c+4>>2]|0;a=(k[a>>2]|0)+(c>>1)|0;if(c&1)b=k[(k[a>>2]|0)+b>>2]|0;Lb[b&255](a);return}function Rv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var l=0,n=0;k[c>>2]=a;k[f>>2]=d;if(h&2)if((e-d|0)<3)a=1;else{k[f>>2]=d+1;i[d>>0]=-17;l=k[f>>2]|0;k[f>>2]=l+1;i[l>>0]=-69;l=k[f>>2]|0;k[f>>2]=l+1;i[l>>0]=-65;l=4}else l=4;a:do{if((l|0)==4){n=b;a=k[c>>2]|0;if(a>>>0>>0)while(1){h=j[a>>1]|0;l=h&65535;if(l>>>0>g>>>0){a=2;break a}do{if((h&65535)<128){a=k[f>>2]|0;if((e-a|0)<1){a=1;break a}k[f>>2]=a+1;i[a>>0]=h}else{if((h&65535)<2048){a=k[f>>2]|0;if((e-a|0)<2){a=1;break a}k[f>>2]=a+1;i[a>>0]=l>>>6|192;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l&63|128;break}if((h&65535)<55296){a=k[f>>2]|0;if((e-a|0)<3){a=1;break a}k[f>>2]=a+1;i[a>>0]=l>>>12|224;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l>>>6&63|128;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l&63|128;break}if((h&65535)>=56320){if((h&65535)<57344){a=2;break a}a=k[f>>2]|0;if((e-a|0)<3){a=1;break a}k[f>>2]=a+1;i[a>>0]=l>>>12|224;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l>>>6&63|128;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l&63|128;break}if((n-a|0)<4){a=1;break a}a=a+2|0;h=m[a>>1]|0;if((h&64512|0)!=56320){a=2;break a}if((e-(k[f>>2]|0)|0)<4){a=1;break a}d=l&960;if(((d<<10)+65536|l<<10&64512|h&1023)>>>0>g>>>0){a=2;break a}k[c>>2]=a;a=(d>>>6)+1|0;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=a>>>2|240;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l>>>2&15|a<<4&48|128;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l<<4&48|h>>>6&15|128;l=k[f>>2]|0;k[f>>2]=l+1;i[l>>0]=h&63|128}}while(0);a=(k[c>>2]|0)+2|0;k[c>>2]=a;if(a>>>0>=b>>>0){a=0;break}}else a=0}}while(0);return a|0}function Sv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var m=0,n=0,o=0,p=0,q=0,r=0;k[c>>2]=a;k[f>>2]=d;if(h&4){a=k[c>>2]|0;h=b;if((((h-a|0)>2?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)?(i[a+2>>0]|0)==-65:0){k[c>>2]=a+3;m=k[f>>2]|0}else m=d}else{m=d;h=b}q=e;d=k[c>>2]|0;a=d>>>0>>0;a:do{if(a&m>>>0>>0)while(1){a=i[d>>0]|0;o=a&255;if(o>>>0>g>>>0){a=2;break a}do{if(a<<24>>24>-1){j[m>>1]=a&255;k[c>>2]=d+1}else{if((a&255)<194){a=2;break a}if((a&255)<224){if((h-d|0)<2){a=1;break a}a=l[d+1>>0]|0;if((a&192|0)!=128){a=2;break a}a=a&63|o<<6&1984;if(a>>>0>g>>>0){a=2;break a}j[m>>1]=a;k[c>>2]=d+2;break}if((a&255)<240){if((h-d|0)<3){a=1;break a}n=i[d+1>>0]|0;a=i[d+2>>0]|0;switch(o|0){case 224:{if((n&-32)<<24>>24!=-96){a=2;break a}break}case 237:{if((n&-32)<<24>>24!=-128){a=2;break a}break}default:if((n&-64)<<24>>24!=-128){a=2;break a}}a=a&255;if((a&192|0)!=128){a=2;break a}a=(n&255)<<6&4032|o<<12|a&63;if((a&65535)>>>0>g>>>0){a=2;break a}j[m>>1]=a;k[c>>2]=d+3;break}if((a&255)>=245){a=2;break a}if((h-d|0)<4){a=1;break a}n=i[d+1>>0]|0;a=i[d+2>>0]|0;d=i[d+3>>0]|0;switch(o|0){case 240:{if((n+112&255)>=48){a=2;break a}break}case 244:{if((n&-16)<<24>>24!=-128){a=2;break a}break}default:if((n&-64)<<24>>24!=-128){a=2;break a}}p=a&255;if((p&192|0)!=128){a=2;break a}a=d&255;if((a&192|0)!=128){a=2;break a}if((q-m|0)<4){a=1;break a}o=o&7;d=n&255;n=p<<6;a=a&63;if((d<<12&258048|o<<18|n&4032|a)>>>0>g>>>0){a=2;break a}j[m>>1]=d<<2&60|p>>>4&3|((d>>>4&3|o<<2)<<6)+16320|55296;p=m+2|0;k[f>>2]=p;j[p>>1]=a|n&960|56320;k[c>>2]=(k[c>>2]|0)+4}}while(0);m=(k[f>>2]|0)+2|0;k[f>>2]=m;d=k[c>>2]|0;a=d>>>0>>0;if(!(a&m>>>0>>0)){r=39;break}}else r=39}while(0);if((r|0)==39)a=a&1;return a|0}function Tv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,m=0,n=0;n=b;if((((e&4|0)!=0?(n-a|0)>2:0)?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)e=(i[a+2>>0]|0)==-65?a+3|0:a;else e=a;a:do{if((c|0)!=0&e>>>0>>0){m=e;f=0;b:while(1){e=i[m>>0]|0;k=e&255;if(k>>>0>d>>>0){e=m;f=42;break a}do{if(e<<24>>24>-1)e=m+1|0;else{if((e&255)<194){e=m;f=42;break a}if((e&255)<224){if((n-m|0)<2){e=m;f=42;break a}e=l[m+1>>0]|0;if((e&192|0)!=128){e=m;f=42;break a}if((e&63|k<<6&1984)>>>0>d>>>0){e=m;f=42;break a}e=m+2|0;break}if((e&255)<240){e=m;if((n-e|0)<3){e=m;f=42;break a}h=i[m+1>>0]|0;g=i[m+2>>0]|0;switch(k|0){case 224:{if((h&-32)<<24>>24!=-96){f=20;break b}break}case 237:{if((h&-32)<<24>>24!=-128){f=22;break b}break}default:if((h&-64)<<24>>24!=-128){f=24;break b}}e=g&255;if((e&192|0)!=128){e=m;f=42;break a}if(((h&255)<<6&4032|k<<12&61440|e&63)>>>0>d>>>0){e=m;f=42;break a}e=m+3|0;break}if((e&255)>=245){e=m;f=42;break a}e=m;if((c-f|0)>>>0<2|(n-e|0)<4){e=m;f=42;break a}j=i[m+1>>0]|0;g=i[m+2>>0]|0;h=i[m+3>>0]|0;switch(k|0){case 240:{if((j+112&255)>=48){f=32;break b}break}case 244:{if((j&-16)<<24>>24!=-128){f=34;break b}break}default:if((j&-64)<<24>>24!=-128){f=36;break b}}g=g&255;if((g&192|0)!=128){e=m;f=42;break a}e=h&255;if((e&192|0)!=128){e=m;f=42;break a}if(((j&255)<<12&258048|k<<18&1835008|g<<6&4032|e&63)>>>0>d>>>0){e=m;f=42;break a}e=m+4|0;f=f+1|0}}while(0);f=f+1|0;if(!(f>>>0>>0&e>>>0>>0)){f=42;break a}else m=e}if((f|0)==20){e=e-a|0;break}else if((f|0)==22){e=e-a|0;break}else if((f|0)==24){e=e-a|0;break}else if((f|0)==32){e=e-a|0;break}else if((f|0)==34){e=e-a|0;break}else if((f|0)==36){e=e-a|0;break}}else f=42}while(0);if((f|0)==42)e=e-a|0;return e|0}function Uv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0;k[c>>2]=a;k[f>>2]=d;l=e;if(h&2)if((l-d|0)<3)a=1;else{k[f>>2]=d+1;i[d>>0]=-17;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=-69;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=-65;j=4}else j=4;a:do{if((j|0)==4){a=k[c>>2]|0;if(a>>>0>>0)while(1){h=k[a>>2]|0;if(h>>>0>g>>>0|(h&-2048|0)==55296){a=2;break a}do{if(h>>>0>=128){if(h>>>0<2048){a=k[f>>2]|0;if((l-a|0)<2){a=1;break a}k[f>>2]=a+1;i[a>>0]=h>>>6|192;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h&63|128;break}a=k[f>>2]|0;e=l-a|0;if(h>>>0<65536){if((e|0)<3){a=1;break a}k[f>>2]=a+1;i[a>>0]=h>>>12|224;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h>>>6&63|128;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h&63|128;break}else{if((e|0)<4){a=1;break a}k[f>>2]=a+1;i[a>>0]=h>>>18|240;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h>>>12&63|128;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h>>>6&63|128;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h&63|128;break}}else{a=k[f>>2]|0;if((l-a|0)<1){a=1;break a}k[f>>2]=a+1;i[a>>0]=h}}while(0);a=(k[c>>2]|0)+4|0;k[c>>2]=a;if(a>>>0>=b>>>0){a=0;break}}else a=0}}while(0);return a|0}function Vv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,m=0,n=0,o=0,p=0,q=0;k[c>>2]=a;k[f>>2]=d;if(h&4){a=k[c>>2]|0;h=b;if((((h-a|0)>2?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)?(i[a+2>>0]|0)==-65:0){k[c>>2]=a+3;d=k[f>>2]|0;p=h}else p=h}else p=b;h=k[c>>2]|0;a=h>>>0>>0;a:do{if(a&d>>>0>>0)while(1){a=i[h>>0]|0;o=a&255;do{if(a<<24>>24>-1){if(o>>>0>g>>>0){a=2;break a}k[d>>2]=o;k[c>>2]=h+1}else{if((a&255)<194){a=2;break a}if((a&255)<224){if((p-h|0)<2){a=1;break a}a=l[h+1>>0]|0;if((a&192|0)!=128){a=2;break a}a=a&63|o<<6&1984;if(a>>>0>g>>>0){a=2;break a}k[d>>2]=a;k[c>>2]=h+2;break}if((a&255)<240){if((p-h|0)<3){a=1;break a}j=i[h+1>>0]|0;a=i[h+2>>0]|0;switch(o|0){case 224:{if((j&-32)<<24>>24!=-96){a=2;break a}break}case 237:{if((j&-32)<<24>>24!=-128){a=2;break a}break}default:if((j&-64)<<24>>24!=-128){a=2;break a}}a=a&255;if((a&192|0)!=128){a=2;break a}a=(j&255)<<6&4032|o<<12&61440|a&63;if(a>>>0>g>>>0){a=2;break a}k[d>>2]=a;k[c>>2]=h+3;break}if((a&255)>=245){a=2;break a}if((p-h|0)<4){a=1;break a}n=i[h+1>>0]|0;a=i[h+2>>0]|0;j=i[h+3>>0]|0;switch(o|0){case 240:{if((n+112&255)>=48){a=2;break a}break}case 244:{if((n&-16)<<24>>24!=-128){a=2;break a}break}default:if((n&-64)<<24>>24!=-128){a=2;break a}}m=a&255;if((m&192|0)!=128){a=2;break a}a=j&255;if((a&192|0)!=128){a=2;break a}a=(n&255)<<12&258048|o<<18&1835008|m<<6&4032|a&63;if(a>>>0>g>>>0){a=2;break a}k[d>>2]=a;k[c>>2]=h+4}}while(0);d=(k[f>>2]|0)+4|0;k[f>>2]=d;h=k[c>>2]|0;a=h>>>0>>0;if(!(a&d>>>0>>0)){q=38;break}}else q=38}while(0);if((q|0)==38)a=a&1;return a|0}function Wv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,m=0,n=0;n=b;if((((e&4|0)!=0?(n-a|0)>2:0)?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)e=(i[a+2>>0]|0)==-65?a+3|0:a;else e=a;a:do{if((c|0)!=0&e>>>0>>0){k=e;m=0;b:while(1){e=i[k>>0]|0;j=e&255;do{if(e<<24>>24>-1){if(j>>>0>d>>>0){e=k;f=42;break a}e=k+1|0}else{if((e&255)<194){e=k;f=42;break a}if((e&255)<224){if((n-k|0)<2){e=k;f=42;break a}e=l[k+1>>0]|0;if((e&192|0)!=128){e=k;f=42;break a}if((e&63|j<<6&1984)>>>0>d>>>0){e=k;f=42;break a}e=k+2|0;break}if((e&255)<240){e=k;if((n-e|0)<3){e=k;f=42;break a}g=i[k+1>>0]|0;f=i[k+2>>0]|0;switch(j|0){case 224:{if((g&-32)<<24>>24!=-96){f=20;break b}break}case 237:{if((g&-32)<<24>>24!=-128){f=22;break b}break}default:if((g&-64)<<24>>24!=-128){f=24;break b}}e=f&255;if((e&192|0)!=128){e=k;f=42;break a}if(((g&255)<<6&4032|j<<12&61440|e&63)>>>0>d>>>0){e=k;f=42;break a}e=k+3|0;break}if((e&255)>=245){e=k;f=42;break a}e=k;if((n-e|0)<4){e=k;f=42;break a}h=i[k+1>>0]|0;f=i[k+2>>0]|0;g=i[k+3>>0]|0;switch(j|0){case 240:{if((h+112&255)>=48){f=32;break b}break}case 244:{if((h&-16)<<24>>24!=-128){f=34;break b}break}default:if((h&-64)<<24>>24!=-128){f=36;break b}}f=f&255;if((f&192|0)!=128){e=k;f=42;break a}e=g&255;if((e&192|0)!=128){e=k;f=42;break a}if(((h&255)<<12&258048|j<<18&1835008|f<<6&4032|e&63)>>>0>d>>>0){e=k;f=42;break a}e=k+4|0}}while(0);m=m+1|0;if(!(m>>>0>>0&e>>>0>>0)){f=42;break a}else k=e}if((f|0)==20){e=e-a|0;break}else if((f|0)==22){e=e-a|0;break}else if((f|0)==24){e=e-a|0;break}else if((f|0)==32){e=e-a|0;break}else if((f|0)==34){e=e-a|0;break}else if((f|0)==36){e=e-a|0;break}}else f=42}while(0);if((f|0)==42)e=e-a|0;return e|0}function Xv(a){a=a|0;Sm(45196);Sm(45184);Sm(45172);Sm(45160);Sm(45148);Sm(45136);Sm(45124);Sm(45112);Sm(45100);Sm(45088);Sm(45076);Sm(45064);Sm(45052);Sm(45040);return}function Yv(a){a=a|0;en(45368);en(45356);en(45344);en(45332);en(45320);en(45308);en(45296);en(45284);en(45272);en(45260);en(45248);en(45236);en(45224);en(45212);return}function Zv(a){a=a|0;Sm(46e3);Sm(45988);Sm(45976);Sm(45964);Sm(45952);Sm(45940);Sm(45928);Sm(45916);Sm(45904);Sm(45892);Sm(45880);Sm(45868);Sm(45856);Sm(45844);Sm(45832);Sm(45820);Sm(45808);Sm(45796);Sm(45784);Sm(45772);Sm(45760);Sm(45748);Sm(45736);Sm(45724);return}function _v(a){a=a|0;en(46292);en(46280);en(46268);en(46256);en(46244);en(46232);en(46220);en(46208);en(46196);en(46184);en(46172);en(46160);en(46148);en(46136);en(46124);en(46112);en(46100);en(46088);en(46076);en(46064);en(46052);en(46040);en(46028);en(46016);return}function $v(a){a=a|0;Sm(47104);Sm(47092);Sm(47080);Sm(47068);Sm(47056);Sm(47044);Sm(47032);Sm(47020);Sm(47008);Sm(46996);Sm(46984);Sm(46972);Sm(46960);Sm(46948);Sm(46936);Sm(46924);Sm(46912);Sm(46900);Sm(46888);Sm(46876);Sm(46864);Sm(46852);Sm(46840);Sm(46828);return}function aw(a){a=a|0;en(47396);en(47384);en(47372);en(47360);en(47348);en(47336);en(47324);en(47312);en(47300);en(47288);en(47276);en(47264);en(47252);en(47240);en(47228);en(47216);en(47204);en(47192);en(47180);en(47168);en(47156);en(47144);en(47132);en(47120);return}function bw(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=r;r=r+32|0;h=i;f=k[a+8>>2]|0;c=k[a+4>>2]|0;if(f-c>>2>>>0>>0){d=k[a>>2]|0;g=c-d>>2;e=g+b|0;if(e>>>0>1073741823)jj(a);c=f-d|0;if(c>>2>>>0<536870911){c=c>>1;c=c>>>0>>0?e:c}else c=1073741823;dw(h,c,g,a+16|0);g=h+8|0;f=k[g>>2]|0;sw(f|0,0,b<<2|0)|0;k[g>>2]=f+(b<<2);ew(a,h);fw(h)}else cw(a,b);r=i;return}function cw(a,b){a=a|0;b=b|0;var c=0;c=a+4|0;a=b;b=k[c>>2]|0;do{k[b>>2]=0;b=(k[c>>2]|0)+4|0;k[c>>2]=b;a=a+-1|0}while((a|0)!=0);return}function dw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;k[a+12>>2]=0;k[a+16>>2]=d;do{if(b){e=d+112|0;if(b>>>0<29&(i[e>>0]|0)==0){i[e>>0]=1;break}else{d=lj(b<<2)|0;break}}else d=0}while(0);k[a>>2]=d;c=d+(c<<2)|0;k[a+8>>2]=c;k[a+4>>2]=c;k[a+12>>2]=d+(b<<2);return}function ew(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;d=k[a>>2]|0;f=a+4|0;c=b+4|0;e=(k[f>>2]|0)-d|0;g=(k[c>>2]|0)+(0-(e>>2)<<2)|0;k[c>>2]=g;vw(g|0,d|0,e|0)|0;e=k[a>>2]|0;k[a>>2]=k[c>>2];k[c>>2]=e;e=b+8|0;d=k[f>>2]|0;k[f>>2]=k[e>>2];k[e>>2]=d;e=a+8|0;a=b+12|0;d=k[e>>2]|0;k[e>>2]=k[a>>2];k[a>>2]=d;k[b>>2]=k[c>>2];return}function fw(a){a=a|0;var b=0,c=0,d=0;c=k[a+4>>2]|0;d=a+8|0;b=k[d>>2]|0;if((b|0)!=(c|0)){do{b=b+-4|0}while((b|0)!=(c|0));k[d>>2]=b}c=k[a>>2]|0;do{if(c){b=k[a+16>>2]|0;if((b|0)==(c|0)){i[b+112>>0]=0;break}else{mj(c);break}}}while(0);return}function gw(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>1073741823)jj(a);c=a+128|0;if(b>>>0<29&(i[c>>0]|0)==0){i[c>>0]=1;c=a+16|0}else c=lj(b<<2)|0;k[a+4>>2]=c;k[a>>2]=c;k[a+8>>2]=c+(b<<2);return}function hw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;g=h;do{if((a|0)!=(b|0)){e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;d=+ql(a,g,fp()|0);a=k[e>>2]|0;if(!a)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0;break}if((a|0)==34)k[c>>2]=4}else{k[c>>2]=4;d=0}}while(0);r=h;return+d}function iw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;g=h;do{if((a|0)!=(b|0)){e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;d=+ql(a,g,fp()|0);a=k[e>>2]|0;if(!a)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0;break}if((a|0)==34)k[c>>2]=4}else{k[c>>2]=4;d=0}}while(0);r=h;return+d}function jw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;g=h;do{if((a|0)==(b|0)){k[c>>2]=4;d=0}else{e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;d=+ql(a,g,fp()|0);a=k[e>>2]|0;if(!a)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0;break}if((a|0)==34)k[c>>2]=4}}while(0);r=h;return+d}function kw(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;h=r;r=r+16|0;g=h;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;d=0;a=0;break}e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;a=fk(a,g,d,fp()|0)|0;d=k[e>>2]|0;if(!d)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0;a=0;break}if((d|0)==34){k[c>>2]=4;d=-1;a=-1}else d=M}else{k[c>>2]=4;d=0;a=0}}while(0);M=d;r=h;return a|0}function lw(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,j=0;j=r;r=r+16|0;h=j;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;a=0;break}f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=fk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}if(d>>>0>0|(d|0)==0&a>>>0>4294967295|(e|0)==34){k[c>>2]=4;a=-1;break}else break}else{k[c>>2]=4;a=0}}while(0);r=j;return a|0}function mw(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,j=0;j=r;r=r+16|0;h=j;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;a=0;break}f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=fk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0 -;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}if(d>>>0>0|(d|0)==0&a>>>0>4294967295|(e|0)==34){k[c>>2]=4;a=-1;break}else break}else{k[c>>2]=4;a=0}}while(0);r=j;return a|0}function nw(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,j=0;j=r;r=r+16|0;h=j;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;a=0;break}f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=fk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}if(d>>>0>0|(d|0)==0&a>>>0>65535|(e|0)==34){k[c>>2]=4;a=-1;break}else{a=a&65535;break}}else{k[c>>2]=4;a=0}}while(0);r=j;return a|0}function ow(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;i=r;r=r+16|0;h=i;do{if((a|0)!=(b|0)){f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=gk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;d=0;a=0;break}if((e|0)==34){k[c>>2]=4;h=(d|0)>0|(d|0)==0&a>>>0>0;M=h?2147483647:-2147483648;r=i;return(h?-1:0)|0}}else{k[c>>2]=4;d=0;a=0}}while(0);M=d;r=i;return a|0}function pw(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;i=r;r=r+16|0;h=i;a:do{if((a|0)==(b|0)){k[c>>2]=4;a=0}else{f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=gk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}do{if((e|0)==34){k[c>>2]=4;if((d|0)>0|(d|0)==0&a>>>0>0){a=2147483647;break a}}else{if((d|0)<-1|(d|0)==-1&a>>>0<2147483648){k[c>>2]=4;break}if((d|0)>0|(d|0)==0&a>>>0>2147483647){k[c>>2]=4;a=2147483647;break a}else break a}}while(0);a=-2147483648}}while(0);r=i;return a|0}function qw(){}function rw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return(M=d,a-c>>>0|0)|0}function sw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=a+c|0;if((c|0)>=20){b=b&255;f=a&3;g=b|b<<8|b<<16|b<<24;e=d&~3;if(f){f=a+4-f|0;while((a|0)<(f|0)){i[a>>0]=b;a=a+1|0}}while((a|0)<(e|0)){k[a>>2]=g;a=a+4|0}}while((a|0)<(d|0)){i[a>>0]=b;a=a+1|0}return a-c|0}function tw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return(M=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function uw(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){M=b>>>c;return a>>>c|(b&(1<>>c-32|0}function vw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)>=4096)return db(a|0,b|0,c|0)|0;d=a|0;if((a&3)==(b&3)){while(a&3){if(!c)return d|0;i[a>>0]=i[b>>0]|0;a=a+1|0;b=b+1|0;c=c-1|0}while((c|0)>=4){k[a>>2]=k[b>>2];a=a+4|0;b=b+4|0;c=c-4|0}}while((c|0)>0){i[a>>0]=i[b>>0]|0;a=a+1|0;b=b+1|0;c=c-1|0}return d|0}function ww(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){M=b<>>32-c;return a<0){a=a-1|0;b=b-1|0;c=c-1|0;i[a>>0]=i[b>>0]|0}a=d}else vw(a,b,c)|0;return a|0}function yw(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){M=b>>c;return a>>>c|(b&(1<>c-32|0}function zw(a){a=a|0;var b=0;b=i[v+(a&255)>>0]|0;if((b|0)<8)return b|0;b=i[v+(a>>8&255)>>0]|0;if((b|0)<8)return b+8|0;b=i[v+(a>>16&255)>>0]|0;if((b|0)<8)return b+16|0;return(i[v+(a>>>24)>>0]|0)+24|0}function Aw(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=ia(e,f)|0;d=a>>>16;a=(c>>>16)+(ia(e,d)|0)|0;e=b>>>16;b=ia(e,f)|0;return(M=(a>>>16)+(ia(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Bw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=rw(j^a,i^b,j,i)|0;g=M;a=f^j;b=e^i;return rw((Gw(h,g,rw(f^c,e^d,f,e)|0,M,0)|0)^a,M^b,a,b)|0}function Cw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=r;r=r+16|0;h=e|0;g=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;j=d>>31|((d|0)<0?-1:0)<<1;i=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;a=rw(g^a,f^b,g,f)|0;b=M;Gw(a,b,rw(j^c,i^d,j,i)|0,M,h)|0;d=rw(k[h>>2]^g,k[h+4>>2]^f,g,f)|0;c=M;r=e;return(M=c,d)|0}function Dw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Aw(e,f)|0;a=M;return(M=(ia(b,f)|0)+(ia(d,e)|0)+a|a&0,c|0|0)|0}function Ew(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Gw(a,b,c,d,0)|0}function Fw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=r;r=r+16|0;e=f|0;Gw(a,b,c,d,e)|0;r=f;return(M=k[e+4>>2]|0,k[e>>2]|0)|0}function Gw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;l=a;i=b;j=i;g=c;n=d;h=n;if(!j){f=(e|0)!=0;if(!h){if(f){k[e>>2]=(l>>>0)%(g>>>0);k[e+4>>2]=0}n=0;e=(l>>>0)/(g>>>0)>>>0;return(M=n,e)|0}else{if(!f){n=0;e=0;return(M=n,e)|0}k[e>>2]=a|0;k[e+4>>2]=b&0;n=0;e=0;return(M=n,e)|0}}f=(h|0)==0;do{if(g){if(!f){f=(ka(h|0)|0)-(ka(j|0)|0)|0;if(f>>>0<=31){m=f+1|0;h=31-f|0;b=f-31>>31;g=m;a=l>>>(m>>>0)&b|j<>>(m>>>0)&b;f=0;h=l<>2]=a|0;k[e+4>>2]=i|b&0;n=0;e=0;return(M=n,e)|0}f=g-1|0;if(f&g){h=(ka(g|0)|0)+33-(ka(j|0)|0)|0;p=64-h|0;m=32-h|0;i=m>>31;o=h-32|0;b=o>>31;g=h;a=m-1>>31&j>>>(o>>>0)|(j<>>(h>>>0))&b;b=b&j>>>(h>>>0);f=l<>>(o>>>0))&i|l<>31;break}if(e){k[e>>2]=f&l;k[e+4>>2]=0}if((g|0)==1){o=i|b&0;p=a|0|0;return(M=o,p)|0}else{p=zw(g|0)|0;o=j>>>(p>>>0)|0;p=j<<32-p|l>>>(p>>>0)|0;return(M=o,p)|0}}else{if(f){if(e){k[e>>2]=(j>>>0)%(g>>>0);k[e+4>>2]=0}o=0;p=(j>>>0)/(g>>>0)>>>0;return(M=o,p)|0}if(!l){if(e){k[e>>2]=0;k[e+4>>2]=(j>>>0)%(h>>>0)}o=0;p=(j>>>0)/(h>>>0)>>>0;return(M=o,p)|0}f=h-1|0;if(!(f&h)){if(e){k[e>>2]=a|0;k[e+4>>2]=f&j|b&0}o=0;p=j>>>((zw(h|0)|0)>>>0);return(M=o,p)|0}f=(ka(h|0)|0)-(ka(j|0)|0)|0;if(f>>>0<=30){b=f+1|0;h=31-f|0;g=b;a=j<>>(b>>>0);b=j>>>(b>>>0);f=0;h=l<>2]=a|0;k[e+4>>2]=i|b&0;o=0;p=0;return(M=o,p)|0}}while(0);if(!g){j=h;i=0;h=0}else{m=c|0|0;l=n|d&0;j=tw(m|0,l|0,-1,-1)|0;c=M;i=h;h=0;do{d=i;i=f>>>31|i<<1;f=h|f<<1;d=a<<1|d>>>31|0;n=a>>>31|b<<1|0;rw(j,c,d,n)|0;p=M;o=p>>31|((p|0)<0?-1:0)<<1;h=o&1;a=rw(d,n,o&m,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l)|0;b=M;g=g-1|0}while((g|0)!=0);j=i;i=0}g=0;if(e){k[e>>2]=a;k[e+4>>2]=b}o=(f|0)>>>31|(j|g)<<1|(g<<1|f>>>31)&0|i;p=(f<<1|0>>>31)&-2|h;return(M=o,p)|0}function Hw(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ib[a&15](b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Iw(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Jb[a&15](b|0,c|0,d|0,e|0,f|0)}function Jw(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;return Kb[a&3](b|0,c|0,d|0,e|0,f|0,+g)|0}function Kw(a,b){a=a|0;b=b|0;Lb[a&255](b|0)}function Lw(a,b,c){a=a|0;b=b|0;c=c|0;Mb[a&127](b|0,c|0)}function Mw(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Nb[a&63](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Nw(a,b){a=a|0;b=b|0;return Ob[a&127](b|0)|0}function Ow(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Pb[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function Pw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Qb[a&63](b|0,c|0,d|0)|0}function Qw(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;Rb[a&3](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)}function Rw(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Sb[a&15](b|0,c|0,d|0,e|0,f|0,g|0)}function Sw(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;Tb[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function Tw(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;Ub[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function Uw(a,b,c){a=a|0;b=b|0;c=c|0;return Vb[a&63](b|0,c|0)|0}function Vw(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Wb[a&31](b|0,c|0,d|0,e|0,f|0)|0}function Ww(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return+Xb[a&3](b|0,c|0,d|0)}function Xw(a){a=a|0;return Yb[a&15]()|0}function Yw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Zb[a&31](b|0,c|0,d|0,e|0)|0}function Zw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;_b[a&15](b|0,c|0,d|0)}function _w(a){a=a|0;$b[a&7]()}function $w(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;return ac[a&15](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)|0}function ax(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return bc[a&7](b|0,c|0,d|0,e|0,+f)|0}function bx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;cc[a&63](b|0,c|0,d|0,e|0)}function cx(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;la(0);return 0}function dx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;la(1)}function ex(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;la(2);return 0}function fx(a){a=a|0;la(3)}function gx(a,b){a=a|0;b=b|0;la(4)}function hx(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;la(5);return 0}function ix(a){a=a|0;la(6);return 0}function jx(a){a=a|0;return lb(a|0)|0}function kx(a){a=a|0;return Ab(a|0)|0}function lx(a){a=a|0;return qb(a|0)|0}function mx(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;la(7);return 0}function nx(a,b,c){a=a|0;b=b|0;c=c|0;la(8);return 0}function ox(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;la(9)}function px(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;la(10)}function qx(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;la(11)}function rx(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;la(12)}function sx(a,b){a=a|0;b=b|0;la(13);return 0}function tx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;la(14);return 0}function ux(a,b,c){a=a|0;b=b|0;c=c|0;la(15);return 0}function vx(){la(16);return 0}function wx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;la(17);return 0}function xx(a,b,c){a=a|0;b=b|0;c=c|0;la(18)}function yx(a,b,c){a=a|0;b=b|0;c=c|0;ub(a|0,b|0,c|0)}function zx(){la(19)}function Ax(){yb()}function Bx(){eb()}function Cx(){vb()}function Dx(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;la(20);return 0}function Ex(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;la(21);return 0}function Fx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;la(22)}function ni(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8900]|0;k[a+4580>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+256;g=a+160|0;e=a+156|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function oi(a){a=a|0;var b=0,c=0;k[a>>2]=35660;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function pi(a){a=a|0;var b=0,c=0;k[a>>2]=35660;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function qi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function ri(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;zi(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function si(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);ti(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function ti(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;h=a+172|0;y=(k[h>>2]|0)+4|0;if((k[a+28>>2]|0)==1)j=k[a+20>>2]|0;else j=1;b=ia(j<<1,y)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))w=6;if((w|0)==6?(x=0,c=ta(67,b|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[D>>2]|0)+1|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!j)w=19;else{if(!(j>>>0>1073741823?(x=0,qa(178,z|0),v=x,x=0,v&1):0))w=17;if((w|0)==17?(d=j<<2,x=0,e=ta(67,d|0)|0,v=x,x=0,!(v&1)):0){k[z>>2]=e;w=e+(j<<2)|0;k[z+8>>2]=w;sw(e|0,0,d|0)|0;k[B>>2]=w;w=19;break}c=Wa()|0;b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((w|0)==19){l=a+8|0;b=k[l>>2]|0;b:do{if((b|0)>0){m=a+4596|0;n=ia(j,y)|0;o=n+1|0;p=a+4600|0;q=a+160|0;s=a+168|0;t=a+164|0;u=a+156|0;v=a+88|0;g=a+4592|0;if((j|0)>0)f=0;else{f=0;while(1){e=k[C>>2]|0;c=e+1|0;k[m>>2]=c;d=e+o|0;k[p>>2]=d;if(!(f&1))c=o;else{k[m>>2]=d;k[p>>2]=c;c=1}j=k[q>>2]|0;if((j|0)<=(f|0)?(f|0)<((k[s>>2]|0)+j|0):0){j=k[v>>2]|0;x=0;Ja(k[(k[j>>2]|0)+8>>2]|0,j|0,e+(c+((k[u>>2]|0)-n))|0,k[t>>2]|0,y|0);j=x;x=0;if(j&1)break;b=k[l>>2]|0}f=f+1|0;if((f|0)>=(b|0)){w=50;break b}}c=Wa()|0;break}c:while(1){c=k[C>>2]|0;b=c+1|0;k[m>>2]=b;c=c+o|0;k[p>>2]=c;if(f&1){k[m>>2]=c;k[p>>2]=b;b=c}e=k[z>>2]|0;c=b;d=0;do{k[g>>2]=k[e+(d<<2)>>2];w=k[h>>2]|0;i[c+w>>0]=i[c+(w+-1)>>0]|0;i[(k[p>>2]|0)+-1>>0]=i[k[m>>2]>>0]|0;x=0;ra(83,a|0,0);w=x;x=0;if(w&1){w=38;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[g>>2];c=(k[m>>2]|0)+y|0;k[m>>2]=c;b=k[p>>2]|0;k[p>>2]=b+y;d=d+1|0}while((d|0)<(j|0));w=k[q>>2]|0;if(((w|0)<=(f|0)?(f|0)<((k[s>>2]|0)+w|0):0)?(w=k[v>>2]|0,x=0,Ja(k[(k[w>>2]|0)+8>>2]|0,w|0,b+(y+((k[u>>2]|0)-n))|0,k[t>>2]|0,y|0),w=x,x=0,w&1):0){w=30;break}f=f+1|0;if((f|0)>=(k[l>>2]|0)){w=50;break b}}if((w|0)==30){c=Wa()|0;break}else if((w|0)==38){c=Wa()|0;break}}else w=50}while(0);do{if((w|0)==50){x=0;qa(183,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);r=A;return}}while(0);b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}function ui(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;p=a+4596|0;c=k[p>>2]|0;t=a+172|0;b=k[t>>2]|0;if((b|0)<=0)return;q=a+4600|0;r=a+4604|0;s=a+4592|0;h=c;f=l[c+-1>>0]|0;c=l[c>>0]|0;o=0;while(1){m=k[q>>2]|0;g=i[m+(o+-1)>>0]|0;n=g&255;e=o+1|0;d=l[h+e>>0]|0;j=k[r>>2]|0;h=c-f|0;f=f-n|0;j=((((i[j+(d-c)>>0]|0)*9|0)+(i[j+h>>0]|0)|0)*9|0)+(i[j+f>>0]|0)|0;m=m+o|0;if(!j){b=wi(a,g,m,b-o|0)|0;c=b+o|0;if((c|0)!=(k[t>>2]|0)){n=xi(a,n,l[(k[p>>2]|0)+c>>0]|0)|0;i[(k[q>>2]|0)+c>>0]=n;n=k[s>>2]|0;k[s>>2]=(n|0)<1?0:n+-1|0;b=b+1|0}e=b+o|0;d=k[p>>2]|0;c=l[d+(e+-1)>>0]|0;d=l[d+e>>0]|0}else{b=c-n>>31;if((b^f|0)<0)b=c;else b=n+((b^h|0)<0?0:h)|0;n=vi(a,j,l[m>>0]|0,b,0)|0;i[(k[q>>2]|0)+o>>0]=n}b=k[t>>2]|0;if((b|0)<=(e|0))break;h=k[p>>2]|0;f=c;c=d;o=e}return}function vi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&255;return a|0}a=c&~(e>>31);a=a&255;return a|0}function wi(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;sw(c|0,b|0,e|0)|0;return e|0}function xi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b-c|0;g=a+128|0;d=a+136|0;if((((f|0)>-1?f:0-f|0)|0)>(k[d>>2]|0)){b=ia(yi(a,a+4568|0)|0,c-b>>31|1)|0;e=k[d>>2]|0;f=e<<1|1;b=(ia(b,f)|0)+c|0;if((b|0)>=(0-e|0)){d=k[g>>2]|0;if((d+e|0)<(b|0))b=b-(ia(k[a+132>>2]|0,f)|0)|0}else{b=(ia(k[a+132>>2]|0,f)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&255;return a|0}a=d&~(b>>31);a=a&255;return a|0}else{c=yi(a,a+4580|0)|0;f=k[d>>2]|0;e=f<<1|1;b=(ia(e,c)|0)+b|0;if((b|0)>=(0-f|0)){d=k[g>>2]|0;if((d+f|0)<(b|0))b=b-(ia(k[a+132>>2]|0,e)|0)|0}else{b=(ia(k[a+132>>2]|0,e)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&255;return a|0}a=d&~(b>>31);a=a&255;return a|0}return 0}function yi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function zi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Ai(a){a=a|0;mj(a);return}function Bi(a){a=a|0;return 50767}function Ci(a,b,c){a=a|0;b=b|0;c=c|0;Qm(a,50754,12);return}function Di(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,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;q=r;r=r+16|0;s=q;k[s>>2]=0;t=s+4|0;k[t>>2]=0;k[s+8>>2]=0;o=s+8|0;x=0;e=ta(67,1)|0;n=x;x=0;a:do{if((!(n&1)?(n=e+1|0,i[e>>0]=c,k[s>>2]=e,k[t>>2]=n,k[o>>2]=n,x=0,ra(84,s|0,b&65535|0),n=x,x=0,!(n&1)):0)?(x=0,ra(84,s|0,a&65535|0),n=x,x=0,!(n&1)):0){l=d&255;e=k[t>>2]|0;c=k[o>>2]|0;if(e>>>0>=c>>>0){b=k[s>>2]|0;a=b;g=e-a+1|0;if((g|0)<0){x=0;qa(178,s|0);n=x;x=0;if(n&1){p=52;break}a=k[s>>2]|0;c=k[o>>2]|0;b=a}j=b;e=c-j|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;c=k[t>>2]|0;h=c-j|0;if(!e){e=0;g=0}else p=12}else{h=k[t>>2]|0;e=2147483647;c=h;h=h-j|0;p=12}if((p|0)==12){x=0;g=ta(67,e|0)|0;n=x;x=0;if(n&1){p=52;break}}i[g+h>>0]=l;m=c-j|0;n=g+(h-m)|0;vw(n|0,b|0,m|0)|0;k[s>>2]=n;k[t>>2]=g+(h+1);k[o>>2]=g+e;if(a)mj(a)}else{i[e>>0]=l;k[t>>2]=(k[t>>2]|0)+1}b:do{if((d|0)>0){n=0;while(1){n=n+1|0;m=n&255;e=k[t>>2]|0;b=k[o>>2]|0;if(e>>>0>=b>>>0){a=k[s>>2]|0;c=a;g=e-c+1|0;if((g|0)<0){x=0;qa(178,s|0);l=x;x=0;if(l&1)break;a=k[s>>2]|0;c=a;b=k[o>>2]|0}l=a;e=b-l|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;b=k[t>>2]|0;h=b-l|0;if(!e){j=0;g=0}else p=25}else{h=k[t>>2]|0;e=2147483647;b=h;h=h-l|0;p=25}if((p|0)==25){p=0;x=0;g=ta(67,e|0)|0;j=x;x=0;if(j&1)break;else j=e}i[g+h>>0]=m;e=g+(h+1)|0;l=b-l|0;m=g+(h-l)|0;vw(m|0,a|0,l|0)|0;k[s>>2]=m;k[t>>2]=e;k[o>>2]=g+j;if(c){mj(c);e=k[t>>2]|0}}else{i[e>>0]=m;e=(k[t>>2]|0)+1|0;k[t>>2]=e}c=k[o>>2]|0;if(e>>>0>=c>>>0){b=k[s>>2]|0;a=b;g=e-a+1|0;if((g|0)<0){x=0;qa(178,s|0);m=x;x=0;if(m&1)break;a=k[s>>2]|0;c=k[o>>2]|0;b=a}l=b;e=c-l|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;g=k[t>>2]|0;h=g-l|0;if(!e){j=0;c=0}else p=36}else{h=k[t>>2]|0;e=2147483647;g=h;h=h-l|0;p=36}if((p|0)==36){p=0;x=0;c=ta(67,e|0)|0;m=x;x=0;if(m&1)break;else j=e}i[c+h>>0]=17;e=c+(h+1)|0;l=g-l|0;m=c+(h-l)|0;vw(m|0,b|0,l|0)|0;k[s>>2]=m;k[t>>2]=e;k[o>>2]=c+j;if(a){mj(a);e=k[t>>2]|0}}else{i[e>>0]=17;e=(k[t>>2]|0)+1|0;k[t>>2]=e}c=k[o>>2]|0;if(e>>>0>=c>>>0){b=k[s>>2]|0;a=b;g=e-a+1|0;if((g|0)<0){x=0;qa(178,s|0);m=x;x=0;if(m&1)break;a=k[s>>2]|0;c=k[o>>2]|0;b=a}j=b;e=c-j|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;c=k[t>>2]|0;h=c-j|0;if(!e){e=0;g=0}else p=48}else{h=k[t>>2]|0;e=2147483647;c=h;h=h-j|0;p=48}if((p|0)==48){p=0;x=0;g=ta(67,e|0)|0;m=x;x=0;if(m&1)break}i[g+h>>0]=0;l=c-j|0;m=g+(h-l)|0;vw(m|0,b|0,l|0)|0;k[s>>2]=m;k[t>>2]=g+(h+1);k[o>>2]=g+e;if(a)mj(a)}else{i[e>>0]=0;k[t>>2]=(k[t>>2]|0)+1}if((n|0)>=(d|0))break b}f=Wa()|0;break a}}while(0);x=0;h=ta(67,20)|0;d=x;x=0;if(!(d&1)){k[h>>2]=36800;i[h+4>>0]=-9;a=h+8|0;k[a>>2]=0;g=h+12|0;k[g>>2]=0;c=h+16|0;k[c>>2]=0;e=k[t>>2]|0;d=k[s>>2]|0;b=e-d|0;do{if((e|0)!=(d|0)){if(!((b|0)<0?(x=0,qa(178,a|0),d=x,x=0,d&1):0))p=62;if((p|0)==62?(x=0,f=ta(67,b|0)|0,d=x,x=0,!(d&1)):0){k[g>>2]=f;k[a>>2]=f;k[c>>2]=f+b;e=k[s>>2]|0;c=k[t>>2]|0;if((e|0)==(c|0))break;do{i[f>>0]=i[e>>0]|0;f=(k[g>>2]|0)+1|0;k[g>>2]=f;e=e+1|0}while((e|0)!=(c|0));e=k[s>>2]|0;break}f=Wa()|0;e=k[a>>2]|0;if(e){if((k[g>>2]|0)!=(e|0))k[g>>2]=e;mj(e)}mj(h);break a}}while(0);if(!e){r=q;return h|0}if((k[t>>2]|0)!=(e|0))k[t>>2]=e;mj(e);r=q;return h|0}else p=52}else p=52}while(0);if((p|0)==52)f=Wa()|0;e=k[s>>2]|0;if(!e)fb(f|0);if((k[t>>2]|0)!=(e|0))k[t>>2]=e;mj(e);fb(f|0);return 0}function Ei(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;p=t+28|0;v=t+16|0;s=t+4|0;q=t;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;n=lj(5)|0;k[v>>2]=n;o=v+8|0;k[o>>2]=n+5;i[n>>0]=74;i[n+1>>0]=70;i[n+2>>0]=73;i[n+3>>0]=70;i[n+4>>0]=0;k[w>>2]=n+5;x=0;ra(84,v|0,k[a>>2]&65535|0);n=x;x=0;a:do{if(!(n&1)){l=k[a+4>>2]&255;b=k[w>>2]|0;d=k[o>>2]|0;if(b>>>0>=d>>>0){e=k[v>>2]|0;f=e;g=b-f+1|0;if((g|0)<0){x=0;qa(178,v|0);n=x;x=0;if(n&1){u=43;break}f=k[v>>2]|0;d=k[o>>2]|0;e=f}j=e;b=d-j|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?g:b;d=k[w>>2]|0;h=d-j|0;if(!b){b=0;g=0}else u=10}else{h=k[w>>2]|0;b=2147483647;d=h;h=h-j|0;u=10}if((u|0)==10){x=0;g=ta(67,b|0)|0;n=x;x=0;if(n&1){u=43;break}}i[g+h>>0]=l;m=d-j|0;n=g+(h-m)|0;vw(n|0,e|0,m|0)|0;k[v>>2]=n;k[w>>2]=g+(h+1);k[o>>2]=g+b;if(f)mj(f)}else{i[b>>0]=l;k[w>>2]=(k[w>>2]|0)+1}x=0;ra(84,v|0,k[a+8>>2]&65535|0);n=x;x=0;if(!(n&1)?(x=0,ra(84,v|0,k[a+12>>2]&65535|0),n=x,x=0,!(n&1)):0){n=a+16|0;m=k[n>>2]&255;b=k[w>>2]|0;e=k[o>>2]|0;if(b>>>0>=e>>>0){f=k[v>>2]|0;d=f;g=b-d+1|0;if((g|0)<0){x=0;qa(178,v|0);l=x;x=0;if(l&1){u=43;break}f=k[v>>2]|0;d=f;e=k[o>>2]|0}l=f;b=e-l|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?g:b;g=k[w>>2]|0;h=g-l|0;if(!b){j=0;e=0}else u=23}else{h=k[w>>2]|0;b=2147483647;g=h;h=h-l|0;u=23}if((u|0)==23){x=0;e=ta(67,b|0)|0;j=x;x=0;if(j&1){u=43;break}else j=b}i[e+h>>0]=m;b=e+(h+1)|0;l=g-l|0;m=e+(h-l)|0;vw(m|0,f|0,l|0)|0;k[v>>2]=m;k[w>>2]=b;k[o>>2]=e+j;if(d){mj(d);b=k[w>>2]|0}}else{i[b>>0]=m;b=(k[w>>2]|0)+1|0;k[w>>2]=b}m=a+20|0;l=k[m>>2]&255;d=k[o>>2]|0;if(b>>>0>=d>>>0){e=k[v>>2]|0;f=e;g=b-f+1|0;if((g|0)<0){x=0;qa(178,v|0);j=x;x=0;if(j&1){u=43;break}f=k[v>>2]|0;d=k[o>>2]|0;e=f}j=e;b=d-j|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?g:b;d=k[w>>2]|0;h=d-j|0;if(!b){b=0;g=0}else u=34}else{h=k[w>>2]|0;b=2147483647;d=h;h=h-j|0;u=34}if((u|0)==34){x=0;g=ta(67,b|0)|0;y=x;x=0;if(y&1){u=43;break}}i[g+h>>0]=l;l=d-j|0;y=g+(h-l)|0;vw(y|0,e|0,l|0)|0;k[v>>2]=y;k[w>>2]=g+(h+1);k[o>>2]=g+b;if(f)mj(f)}else{i[b>>0]=l;k[w>>2]=(k[w>>2]|0)+1}b=k[n>>2]|0;do{if((b|0)>0){if(!(k[a+24>>2]|0)){k[q>>2]=k[w>>2];y=0+(ia(b*3|0,k[m>>2]|0)|0)|0;x=0;k[p>>2]=k[q>>2];Ea(15,v|0,p|0,0,y|0)|0;y=x;x=0;if(y&1){u=43;break a}else break}d=Va(16)|0;x=0;Fa(5,s|0,50792,57);y=x;x=0;if(!(y&1)){x=0;b=Da(1)|0;y=x;x=0;if(!(y&1)?(x=0,Ja(36,d|0,1,b|0,s|0),y=x,x=0,!(y&1)):0){x=0;Fa(6,d|0,824,96);x=0;c=0}else c=1;b=Wa()|0;Sm(s);if(!c){c=b;break a}}else b=Wa()|0;Ua(d|0);c=b;break a}}while(0);x=0;h=ta(67,20)|0;y=x;x=0;if(!(y&1)){k[h>>2]=36800;i[h+4>>0]=-32;f=h+8|0;k[f>>2]=0;g=h+12|0;k[g>>2]=0;d=h+16|0;k[d>>2]=0;b=k[w>>2]|0;y=k[v>>2]|0;e=b-y|0;do{if((b|0)!=(y|0)){if(!((e|0)<0?(x=0,qa(178,f|0),y=x,x=0,y&1):0))u=53;if((u|0)==53?(x=0,c=ta(67,e|0)|0,y=x,x=0,!(y&1)):0){k[g>>2]=c;k[f>>2]=c;k[d>>2]=c+e;b=k[v>>2]|0;d=k[w>>2]|0;if((b|0)==(d|0))break;do{i[c>>0]=i[b>>0]|0;c=(k[g>>2]|0)+1|0;k[g>>2]=c;b=b+1|0}while((b|0)!=(d|0));b=k[v>>2]|0;break}b=Wa()|0;c=k[f>>2]|0;if(c){if((k[g>>2]|0)!=(c|0))k[g>>2]=c;mj(c)}mj(h);u=44;break a}}while(0);if(!b){r=t;return h|0}if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);r=t;return h|0}else u=43}else u=43}else u=43}while(0);if((u|0)==43){b=Wa()|0;u=44}if((u|0)==44)c=b;b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0);return 0}function Fi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;h=r;r=r+16|0;l=h;k[l>>2]=0;m=l+4|0;k[m>>2]=0;k[l+8>>2]=0;x=0;b=ta(67,1)|0;g=x;x=0;a:do{if((((((!(g&1)?(g=b+1|0,i[b>>0]=1,k[l>>2]=b,k[m>>2]=g,k[l+8>>2]=g,x=0,ra(84,l|0,k[a>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+4>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+8>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+12>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+16>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,j=ta(67,20)|0,g=x,x=0,!(g&1)):0){ -k[j>>2]=36800;i[j+4>>0]=-8;e=j+8|0;k[e>>2]=0;g=j+12|0;k[g>>2]=0;a=j+16|0;k[a>>2]=0;b=k[m>>2]|0;n=k[l>>2]|0;d=b-n|0;do{if((b|0)!=(n|0)){if(!((d|0)<0?(x=0,qa(178,e|0),n=x,x=0,n&1):0))f=11;if((f|0)==11?(x=0,c=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[g>>2]=c;k[e>>2]=c;k[a>>2]=c+d;b=k[l>>2]|0;a=k[m>>2]|0;if((b|0)==(a|0))break;do{i[c>>0]=i[b>>0]|0;c=(k[g>>2]|0)+1|0;k[g>>2]=c;b=b+1|0}while((b|0)!=(a|0));b=k[l>>2]|0;break}c=Wa()|0;b=k[e>>2]|0;if(b){if((k[g>>2]|0)!=(b|0))k[g>>2]=b;mj(b)}mj(j);break a}}while(0);if(!b){r=h;return j|0}if((k[m>>2]|0)!=(b|0))k[m>>2]=b;mj(b);r=h;return j|0}else f=25}while(0);if((f|0)==25)c=Wa()|0;b=k[l>>2]|0;if(!b)fb(c|0);if((k[m>>2]|0)!=(b|0))k[m>>2]=b;mj(b);fb(c|0);return 0}function Gi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=lj(5)|0;i[f>>0]=109;i[f+1>>0]=114;i[f+2>>0]=102;i[f+3>>0]=120;i[f+4>>0]=a;x=0;e=ta(67,20)|0;d=x;x=0;if(d&1){e=Wa()|0;mj(f);fb(e|0)}k[e>>2]=36800;i[e+4>>0]=-24;a=e+8|0;k[a>>2]=0;b=e+12|0;k[b>>2]=0;c=e+16|0;k[c>>2]=0;x=0;d=ta(67,5)|0;g=x;x=0;if(!(g&1)){k[b>>2]=d;k[a>>2]=d;k[c>>2]=d+5;i[d>>0]=109;g=(k[b>>2]|0)+1|0;k[b>>2]=g;d=f+1|0;i[g>>0]=i[d>>0]|0;g=(k[b>>2]|0)+1|0;k[b>>2]=g;d=d+1|0;i[g>>0]=i[d>>0]|0;g=(k[b>>2]|0)+1|0;k[b>>2]=g;d=d+1|0;i[g>>0]=i[d>>0]|0;g=(k[b>>2]|0)+1|0;k[b>>2]=g;i[g>>0]=i[d+1>>0]|0;k[b>>2]=(k[b>>2]|0)+1;mj(f);return e|0}g=Wa()|0;mj(e);mj(f);fb(g|0);return 0}function Hi(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,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+16|0;v=u;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;s=v+8|0;x=0;e=ta(67,1)|0;q=x;x=0;a:do{if(!(q&1)){h=e+1|0;q=h;i[e>>0]=b;k[v>>2]=e;k[w>>2]=q;k[s>>2]=q;if((b|0)>0){g=h;q=0;do{p=q+a&255;if(g>>>0>=h>>>0){e=k[v>>2]|0;j=e;g=g-j+1|0;if((g|0)<0){x=0;qa(178,v|0);o=x;x=0;if(o&1){t=28;break}j=k[v>>2]|0;h=k[s>>2]|0;o=j}else o=e;n=o;e=h-n|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;h=k[w>>2]|0;l=h-n|0;if(!e){m=0;g=0}else t=13}else{l=k[w>>2]|0;e=2147483647;h=l;l=l-n|0;t=13}if((t|0)==13){t=0;x=0;g=ta(67,e|0)|0;m=x;x=0;if(m&1){t=28;break}else m=e}i[g+l>>0]=p;e=g+(l+1)|0;n=h-n|0;p=g+(l-n)|0;vw(p|0,o|0,n|0)|0;k[v>>2]=p;k[w>>2]=e;k[s>>2]=g+m;if(j){mj(j);e=k[w>>2]|0}}else{i[g>>0]=p;e=(k[w>>2]|0)+1|0;k[w>>2]=e}h=k[s>>2]|0;if(e>>>0>=h>>>0){j=k[v>>2]|0;g=j;l=e-g+1|0;if((l|0)<0){x=0;qa(178,v|0);p=x;x=0;if(p&1){t=28;break}j=k[v>>2]|0;g=j;h=k[s>>2]|0}n=j;e=h-n|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?l:e;l=k[w>>2]|0;h=l-n|0;if(!e){e=0;m=0}else t=24}else{h=k[w>>2]|0;e=2147483647;l=h;h=h-n|0;t=24}if((t|0)==24){t=0;x=0;m=ta(67,e|0)|0;p=x;x=0;if(p&1){t=28;break}}i[m+h>>0]=0;o=l-n|0;p=m+(h-o)|0;vw(p|0,j|0,o|0)|0;k[v>>2]=p;k[w>>2]=m+(h+1);k[s>>2]=m+e;if(g)mj(g)}else{i[e>>0]=0;k[w>>2]=(k[w>>2]|0)+1}q=q+1|0;g=k[w>>2]|0;h=k[s>>2]|0}while((q|0)<(b|0));if((t|0)==28){f=Wa()|0;break}e=c&255;if(g>>>0>>0){i[g>>0]=e;g=(k[w>>2]|0)+1|0;k[w>>2]=g}else t=37}else{g=h;e=c&255;t=37}if((t|0)==37){j=k[v>>2]|0;l=j;m=g-l+1|0;if((m|0)<0){x=0;qa(178,v|0);c=x;x=0;if(c&1){t=29;break}l=k[v>>2]|0;h=k[s>>2]|0;j=l}p=j;g=h-p|0;if(g>>>0<1073741823){g=g<<1;g=g>>>0>>0?m:g;m=k[w>>2]|0;n=m-p|0;if(!g){o=0;h=0}else t=43}else{n=k[w>>2]|0;g=2147483647;m=n;n=n-p|0;t=43}if((t|0)==43){x=0;h=ta(67,g|0)|0;c=x;x=0;if(c&1){t=29;break}else o=g}i[h+n>>0]=e;g=h+(n+1)|0;a=m-p|0;c=h+(n-a)|0;vw(c|0,j|0,a|0)|0;k[v>>2]=c;k[w>>2]=g;k[s>>2]=h+o;if(l){mj(l);g=k[w>>2]|0}}p=d&255;e=k[s>>2]|0;if(g>>>0>=e>>>0){h=k[v>>2]|0;j=h;g=g-j+1|0;if((g|0)<0){x=0;qa(178,v|0);d=x;x=0;if(d&1){t=29;break}j=k[v>>2]|0;e=k[s>>2]|0;h=j}o=h;e=e-o|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;l=k[w>>2]|0;m=l-o|0;if(!e){n=0;g=0}else t=54}else{m=k[w>>2]|0;e=2147483647;l=m;m=m-o|0;t=54}if((t|0)==54){x=0;g=ta(67,e|0)|0;d=x;x=0;if(d&1){t=29;break}else n=e}i[g+m>>0]=p;e=g+(m+1)|0;c=l-o|0;d=g+(m-c)|0;vw(d|0,h|0,c|0)|0;k[v>>2]=d;k[w>>2]=e;k[s>>2]=g+n;if(j){mj(j);e=k[w>>2]|0}}else{i[g>>0]=p;e=(k[w>>2]|0)+1|0;k[w>>2]=e}g=k[s>>2]|0;if(e>>>0>=g>>>0){h=k[v>>2]|0;j=h;l=e-j+1|0;if((l|0)<0){x=0;qa(178,v|0);d=x;x=0;if(d&1){t=29;break}j=k[v>>2]|0;g=k[s>>2]|0;h=j}n=h;e=g-n|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?l:e;g=k[w>>2]|0;m=g-n|0;if(!e){e=0;l=0}else t=65}else{m=k[w>>2]|0;e=2147483647;g=m;m=m-n|0;t=65}if((t|0)==65){x=0;l=ta(67,e|0)|0;d=x;x=0;if(d&1){t=29;break}}i[l+m>>0]=0;c=g-n|0;d=l+(m-c)|0;vw(d|0,h|0,c|0)|0;k[v>>2]=d;k[w>>2]=l+(m+1);k[s>>2]=l+e;if(j)mj(j)}else{i[e>>0]=0;k[w>>2]=(k[w>>2]|0)+1}x=0;m=ta(67,20)|0;s=x;x=0;if(!(s&1)){k[m>>2]=36800;i[m+4>>0]=-38;j=m+8|0;k[j>>2]=0;l=m+12|0;k[l>>2]=0;g=m+16|0;k[g>>2]=0;e=k[w>>2]|0;s=k[v>>2]|0;h=e-s|0;do{if((e|0)!=(s|0)){if(!((h|0)<0?(x=0,qa(178,j|0),s=x,x=0,s&1):0))t=72;if((t|0)==72?(x=0,f=ta(67,h|0)|0,s=x,x=0,!(s&1)):0){k[l>>2]=f;k[j>>2]=f;k[g>>2]=f+h;e=k[v>>2]|0;g=k[w>>2]|0;if((e|0)==(g|0))break;do{i[f>>0]=i[e>>0]|0;f=(k[l>>2]|0)+1|0;k[l>>2]=f;e=e+1|0}while((e|0)!=(g|0));e=k[v>>2]|0;break}f=Wa()|0;e=k[j>>2]|0;if(e){if((k[l>>2]|0)!=(e|0))k[l>>2]=e;mj(e)}mj(m);break a}}while(0);if(!e){r=u;return m|0}if((k[w>>2]|0)!=(e|0))k[w>>2]=e;mj(e);r=u;return m|0}else t=29}else t=29}while(0);if((t|0)==29)f=Wa()|0;e=k[v>>2]|0;if(!e)fb(f|0);if((k[w>>2]|0)!=(e|0))k[w>>2]=e;mj(e);fb(f|0);return 0}function Ii(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=(b&65535)>>>8&255;o=a+4|0;c=k[o>>2]|0;p=a+8|0;d=k[p>>2]|0;if(c>>>0>=d>>>0){e=k[a>>2]|0;f=e;g=c-f+1|0;if((g|0)<0){jj(a);f=k[a>>2]|0;d=k[p>>2]|0;e=f}m=e;c=d-m|0;if(c>>>0<1073741823){c=c<<1;c=c>>>0>>0?g:c;g=k[o>>2]|0;d=g-m|0;if(!c){l=0;j=0;h=d;c=g}else q=8}else{d=k[o>>2]|0;c=2147483647;g=d;d=d-m|0;q=8}if((q|0)==8){l=c;j=lj(c)|0;h=d;c=g}i[j+h>>0]=n;d=j+(h+1)|0;m=c-m|0;n=j+(h-m)|0;vw(n|0,e|0,m|0)|0;k[a>>2]=n;k[o>>2]=d;k[p>>2]=j+l;if(f){mj(f);d=k[o>>2]|0}}else{i[c>>0]=n;d=(k[o>>2]|0)+1|0;k[o>>2]=d}m=b&255;c=k[p>>2]|0;if(d>>>0>>0){i[d>>0]=m;k[o>>2]=(k[o>>2]|0)+1;return}e=k[a>>2]|0;f=e;d=d-f+1|0;if((d|0)<0){jj(a);f=k[a>>2]|0;c=k[p>>2]|0;e=f}l=e;c=c-l|0;if(c>>>0<1073741823){c=c<<1;c=c>>>0>>0?d:c;g=k[o>>2]|0;d=g-l|0;if(!c){j=0;h=0;c=g}else q=18}else{d=k[o>>2]|0;c=2147483647;g=d;d=d-l|0;q=18}if((q|0)==18){j=c;h=lj(c)|0;c=g}i[h+d>>0]=m;b=c-l|0;q=h+(d-b)|0;vw(q|0,e|0,b|0)|0;k[a>>2]=q;k[o>>2]=h+(d+1);k[p>>2]=h+j;if(!f)return;mj(f);return}function Ji(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,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=k[a>>2]|0;q=k[b>>2]|0;p=q;j=e;n=c;l=d-n|0;if((l|0)<=0){r=q;return r|0}o=a+8|0;b=k[o>>2]|0;r=a+4|0;m=k[r>>2]|0;f=m;if((l|0)<=(b-f|0)){h=f-p|0;if((l|0)>(h|0)){g=c+h|0;if((g|0)==(d|0))b=m;else{f=g;b=m;do{i[b>>0]=i[f>>0]|0;b=(k[r>>2]|0)+1|0;k[r>>2]=b;f=f+1|0}while((f|0)!=(d|0))}if((h|0)>0)h=b;else{r=q;return r|0}}else{h=m;g=d}e=h-(e+(l-j+p))|0;b=q+e|0;if(b>>>0>>0){f=h;do{i[f>>0]=i[b>>0]|0;b=b+1|0;f=(k[r>>2]|0)+1|0;k[r>>2]=f}while((b|0)!=(m|0))}xw(h+(0-e)|0,q|0,e|0)|0;xw(q|0,c|0,g-n|0)|0;r=q;return r|0}f=f-j+l|0;if((f|0)<0){jj(a);b=k[o>>2]|0;e=k[a>>2]|0}g=e;b=b-g|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?f:b;f=p-g|0;if(!b){g=0;l=0}else h=15}else{b=2147483647;f=p-g|0;h=15}if((h|0)==15){g=b;l=lj(b)|0}j=l+f|0;b=j;h=l+g|0;if((c|0)!=(d|0)){e=c;g=j;do{i[g>>0]=i[e>>0]|0;g=b+1|0;b=g;e=e+1|0}while((e|0)!=(d|0));e=k[a>>2]|0}c=p-e|0;d=l+(f-c)|0;vw(d|0,e|0,c|0)|0;p=(k[r>>2]|0)-p|0;c=b;vw(c|0,q|0,p|0)|0;b=k[a>>2]|0;k[a>>2]=d;k[r>>2]=c+p;k[o>>2]=h;if(!b){r=j;return r|0}mj(b);r=j;return r|0}function Ki(a){a=a|0;var b=0;k[a>>2]=36800;b=k[a+8>>2]|0;if(!b)return;a=a+12|0;if((k[a>>2]|0)!=(b|0))k[a>>2]=b;mj(b);return}function Li(a){a=a|0;var b=0,c=0;k[a>>2]=36800;b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function Mi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;Ni(b,-1);Ni(b,i[a+4>>0]|0);e=a+12|0;d=a+8|0;a=(k[e>>2]|0)-(k[d>>2]|0)+2|0;Ni(b,(a&65535)>>>8&255);Ni(b,a&255);a=k[d>>2]|0;if((k[e>>2]|0)==(a|0))return;else c=0;do{Ni(b,i[a+c>>0]|0);c=c+1|0;a=k[d>>2]|0}while(c>>>0<((k[e>>2]|0)-a|0)>>>0);return}function Ni(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;e=k[a+4>>2]|0;if(e){c=e+24|0;d=k[c>>2]|0;if((d|0)==(k[e+28>>2]|0)){Vb[k[(k[e>>2]|0)+52>>2]&63](e,b&255)|0;return}else{k[c>>2]=d+1;i[d>>0]=b;return}}c=a+16|0;d=k[c>>2]|0;if(d>>>0<(k[a+12>>2]|0)>>>0){k[c>>2]=d+1;i[(k[a+8>>2]|0)+d>>0]=b;return}c=Va(16)|0;x=0;d=Da(1)|0;b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}x=0;Fa(7,c|0,4,d|0);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}function Oi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;e=(b|0)<4095?(b+128|0)/256|0:16;f=(c*3|0)+2+e|0;d=c+1|0;f=(f|0)<(d|0)|(f|0)>(b|0)?d:f;k[a+4>>2]=f;d=(e<<2|3)+(c*5|0)|0;d=(d|0)>(b|0)|(d|0)<(f|0)?f:d;k[a+8>>2]=d;c=(c*7|0)+4+(e*17|0)|0;k[a+12>>2]=(c|0)>(b|0)|(c|0)<(d|0)?d:c;k[a>>2]=b;k[a+16>>2]=64;return}function Pi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;l=r;r=r+128|0;h=l+100|0;d=l+16|0;c=l+112|0;j=l+4|0;m=l;e=d;f=a+20|0;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));k[d+16>>2]=k[a+4>>2];f=zc(c,d,a+56|0)|0;c=k[(k[f>>2]|0)+16>>2]|0;a=a+8|0;x=0;k[h>>2]=k[a>>2];k[h+4>>2]=k[a+4>>2];k[h+8>>2]=k[a+8>>2];c=Aa(c|0,f|0,h|0)|0;a=x;x=0;do{if(a&1)c=Wa()|0;else{e=b+4|0;k[j>>2]=k[e>>2];k[j+4>>2]=k[e+4>>2];k[j+8>>2]=k[e+8>>2];e=b+16|0;a=k[e>>2]|0;h=j+8|0;k[h>>2]=(k[h>>2]|0)-a;h=j+4|0;k[h>>2]=(k[h>>2]|0)+a;h=k[(k[f>>2]|0)+12>>2]|0;k[m>>2]=c;x=0;c=Ea(h|0,f|0,m|0,j|0,((i[b>>0]|0)==0?0:(k[b+8>>2]|0)+a|0)|0)|0;j=x;x=0;if(j&1){c=Wa()|0;d=k[m>>2]|0;k[m>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}d=k[m>>2]|0;k[m>>2]=0;if(d)Lb[k[(k[d>>2]|0)+4>>2]&255](d);if(!(k[b+4>>2]|0))k[e>>2]=(k[e>>2]|0)+c;if(!f){r=l;return}Lb[k[(k[f>>2]|0)+4>>2]&255](f);r=l;return}}while(0);if(!f)fb(c|0);Lb[k[(k[f>>2]|0)+4>>2]&255](f);fb(c|0)}function Qi(a,b){a=a|0;b=b|0;k[a>>2]=k[b>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];i[a+12>>0]=0;b=a+16|0;a=b+100|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function Ri(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+32|0;t=u+4|0;o=u+16|0;v=u;Si(a);p=a+16|0;e=k[a+24>>2]|0;a:do{if((e+-2|0)>>>0<=14){q=a+40|0;c=k[q>>2]|0;if(c>>>0>2)c=5;else{s=a+32|0;f=k[s>>2]|0;switch(f|0){case 0:{c=1;break a}case 4:{if((c|0)==2){c=2;break a}break}case 3:break;default:if(c){c=2;break a}}n=a+100|0;c=a+108|0;d=k[c>>2]|0;if((d|0)<1){d=k[p>>2]|0;k[c>>2]=d;c=k[a+20>>2]|0;k[a+112>>2]=c}else c=k[a+112>>2]|0;j=Dw(c|0,((c|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;h=(e+7|0)/8|0;h=Dw(j|0,M|0,h|0,((h|0)<0)<<31>>31|0)|0;j=b+4|0;c=k[j>>2]|0;g=b+8|0;if((c|0)!=0?(l=k[g>>2]|0,m=Dw(f|0,((f|0)<0)<<31>>31|0,h|0,M|0)|0,e=M,0<(e|0)|0==(e|0)&l>>>0>>0):0){c=Va(16)|0;x=0;d=Da(1)|0;v=x;x=0;if(!(v&1)?(x=0,Fa(7,c|0,3,d|0),v=x,x=0,!(v&1)):0)ub(c|0,824,96);v=Wa()|0;Ua(c|0);fb(v|0)}l=a+52|0;m=a+12|0;if((f|0)>0)f=0;else{r=u;return}while(1){Ti(a,(f|0)==0);d=xc(o,p,l)|0;e=k[(k[d>>2]|0)+8>>2]|0;x=0;k[t>>2]=k[b>>2];k[t+4>>2]=k[b+4>>2];k[t+8>>2]=k[b+8>>2];e=Aa(e|0,d|0,t|0)|0;w=x;x=0;if(w&1){e=32;break}w=k[(k[d>>2]|0)+16>>2]|0;k[v>>2]=e;x=0;oa(w|0,d|0,v|0,n|0,a|0,(i[m>>0]|0)!=0|0);w=x;x=0;if(w&1){e=30;break}e=k[v>>2]|0;k[v>>2]=0;if(e)Lb[k[(k[e>>2]|0)+4>>2]&255](e);if(!c)c=0;else{c=c+h|0;k[j>>2]=c;k[g>>2]=(k[g>>2]|0)-h}e=(k[q>>2]|0)==0;f=(e&1)+f|0;if(d)Lb[k[(k[d>>2]|0)+4>>2]&255](d);if(!e){e=34;break}if((f|0)>=(k[s>>2]|0)){e=34;break}}if((e|0)==30){c=Wa()|0;e=k[v>>2]|0;k[v>>2]=0;if(e)Lb[k[(k[e>>2]|0)+4>>2]&255](e)}else if((e|0)==32){c=Wa()|0;if(!d){w=c;fb(w|0)}}else if((e|0)==34){r=u;return}Lb[k[(k[d>>2]|0)+4>>2]&255](d);w=c;fb(w|0)}}else c=2}while(0);d=Va(16)|0;x=0;e=Da(1)|0;w=x;x=0;if(!(w&1)?(x=0,Fa(7,d|0,c|0,e|0),w=x,x=0,!(w&1)):0)ub(d|0,824,96);w=Wa()|0;Ua(d|0);fb(w|0)}function Si(a){a=a|0;var b=0,c=0,d=0,e=0;if((Wi(a)|0)<<24>>24!=-40){b=Va(16)|0;x=0;c=Da(1)|0;e=x;x=0;if(!(e&1)?(x=0,Fa(7,b|0,5,c|0),e=x,x=0,!(e&1)):0)ub(b|0,824,96);e=Wa()|0;Ua(b|0);fb(e|0)}b=Wi(a)|0;if(b<<24>>24==-38)return;while(1){d=((Vi(a)|0)&255)<<8;d=d|(Vi(a)|0)&255;b=Xi(a,b)|0;c=-2-b+d|0;if((c|0)<0)break;if((c|0)>0){b=d+-2-b|0;c=0;do{Vi(a)|0;c=c+1|0}while((c|0)!=(b|0))}b=Wi(a)|0;if(b<<24>>24==-38){e=8;break}}if((e|0)==8)return;b=Va(16)|0;x=0;c=Da(1)|0;e=x;x=0;if(!(e&1)?(x=0,Fa(7,b|0,5,c|0),e=x,x=0,!(e&1)):0)ub(b|0,824,96);e=Wa()|0;Ua(b|0);fb(e|0)}function Ti(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;if(!b){if((Vi(a)|0)<<24>>24!=-1){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,12,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}if((Vi(a)|0)<<24>>24!=-38){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,5,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}}Vi(a)|0;Vi(a)|0;c=Vi(a)|0;d=c&255;do{if(c<<24>>24==1){Vi(a)|0;c=0;e=20}else{if((d|0)==(k[a+32>>2]|0)){b=Vi(a)|0;if(!(c<<24>>24))break;else{c=0;e=20;break}}b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,2,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}}while(0);if((e|0)==20)while(1){Vi(a)|0;c=c+1|0;b=Vi(a)|0;if((c|0)==(d|0))break;else e=20}k[a+36>>2]=b&255;e=Vi(a)|0;c=a+40|0;k[c>>2]=e&255;if((e&255)>=3){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,5,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}if((Vi(a)|0)<<24>>24){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,5,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}d=a+28|0;if(k[d>>2]|0)return;b=k[a+108>>2]|0;if(!b)b=k[a+16>>2]|0;if(!(k[c>>2]|0))c=1;else c=k[a+32>>2]|0;e=ia(c,b)|0;a=ia(e,((k[a+24>>2]|0)+7|0)/8|0)|0;k[d>>2]=a;return}function Ui(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((c|0)<=0)return;n=b+4|0;o=b+8|0;q=0;do{p=Vi(a)|0;d=k[n>>2]|0;e=k[o>>2]|0;if(d>>>0>=e>>>0){f=k[b>>2]|0;g=f;h=d-g+1|0;if((h|0)<0){jj(b);g=k[b>>2]|0;e=k[o>>2]|0;f=g}m=f;d=e-m|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?h:d;h=k[n>>2]|0;e=h-m|0;if(!d){l=0;j=0;d=h}else r=10}else{e=k[n>>2]|0;d=2147483647;h=e;e=e-m|0;r=10}if((r|0)==10){r=0;l=d;j=lj(d)|0;d=h}i[j+e>>0]=p;m=d-m|0;p=j+(e-m)|0;vw(p|0,f|0,m|0)|0;k[b>>2]=p;k[n>>2]=j+(e+1);k[o>>2]=j+l;if(g)mj(g)}else{i[d>>0]=p;k[n>>2]=(k[n>>2]|0)+1}q=q+1|0}while((q|0)!=(c|0));return}function Vi(a){a=a|0;var b=0,c=0,d=0,e=0;c=k[a>>2]|0;if(c){a=c+12|0;b=k[a>>2]|0;if((b|0)==(k[c+16>>2]|0))a=Ob[k[(k[c>>2]|0)+40>>2]&127](c)|0;else{k[a>>2]=b+1;a=l[b>>0]|0}e=a&255;return e|0}d=a+8|0;e=k[d>>2]|0;if(e){a=a+4|0;b=k[a>>2]|0;c=i[b>>0]|0;if(!b){e=c;return e|0}k[a>>2]=b+1;k[d>>2]=e+-1;e=c;return e|0}a=Va(16)|0;x=0;b=Da(1)|0;e=x;x=0;if(e&1){e=Wa()|0;Ua(a|0);fb(e|0)}x=0;Fa(7,a|0,4,b|0);e=x;x=0;if(e&1){e=Wa()|0;Ua(a|0);fb(e|0)}else ub(a|0,824,96);return 0}function Wi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=r;r=r+176|0;b=c+152|0;i=c+16|0;g=c;h=Vi(a)|0;d=h&255;if(h<<24>>24==-1){do{b=Vi(a)|0}while(b<<24>>24==-1);r=c;return b|0}h=i+56|0;f=i+4|0;k[i>>2]=36160;k[h>>2]=36180;x=0;ra(62,i+56|0,f|0);e=x;x=0;if(e&1){i=Wa()|0;qn(h);fb(i|0)}k[i+128>>2]=0;k[i+132>>2]=-1;k[i>>2]=36200;k[i+56>>2]=36220;x=0;qa(180,f|0);e=x;x=0;do{if(e&1)b=Wa()|0;else{k[f>>2]=36236;e=i+36|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[i+52>>2]=16;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;x=0;ra(63,f|0,b|0);c=x;x=0;if(c&1){i=Wa()|0;Sm(b);Sm(e);xn(f);b=i;break}Sm(b);k[i+((k[(k[i>>2]|0)+-12>>2]|0)+76)>>2]=48;x=0;b=va(28,i|0,50907,62)|0;c=x;x=0;if(!(c&1)?(c=b+((k[(k[b>>2]|0)+-12>>2]|0)+4)|0,k[c>>2]=k[c>>2]&-75|8,c=b+((k[(k[b>>2]|0)+-12>>2]|0)+4)|0,k[c>>2]=k[c>>2]|16384,k[b+((k[(k[b>>2]|0)+-12>>2]|0)+12)>>2]=2,x=0,Aa(38,b|0,d|0)|0,d=x,x=0,!(d&1)):0){c=Va(16)|0;x=0;ra(64,g|0,f|0);d=x;x=0;if(!(d&1)){x=0;b=Da(1)|0;d=x;x=0;if(!(d&1)?(x=0,Ja(36,c|0,12,b|0,g|0),d=x,x=0,!(d&1)):0){x=0;Fa(6,c|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(g);if(!a){g=b;k[i>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}else b=Wa()|0;Ua(c|0);g=b;k[i>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}g=Wa()|0;k[i>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}while(0);i=b;qn(h);fb(i|0);return 0}function Xi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;c=r;r=r+320|0;h=c+300|0;l=c+152|0;i=c+288|0;m=c+16|0;j=c;switch(b<<24>>24){case-9:{n=(Vi(a)|0)&255;k[a+24>>2]=n;n=((Vi(a)|0)&255)<<8|(Vi(a)|0)&255;m=((Vi(a)|0)&255)<<8|(Vi(a)|0)&255;k[a+16>>2]=m;k[a+20>>2]=n;n=(Vi(a)|0)&255;k[a+32>>2]=n;n=6;r=c;return n|0}case-8:{n=Yi(a)|0;r=c;return n|0}case-24:{n=Zi(a)|0;r=c;return n|0}case-53:case-54:case-55:case-57:case-58:case-59:case-61:case-62:case-63:case-64:{g=l+56|0;e=l+4|0;k[l>>2]=36160;k[g>>2]=36180;x=0;ra(62,l+56|0,e|0);m=x;x=0;if(m&1){n=Wa()|0;qn(g);fb(n|0)}k[l+128>>2]=0;k[l+132>>2]=-1;k[l>>2]=36200;k[l+56>>2]=36220;x=0;qa(180,e|0);m=x;x=0;do{if(m&1)a=Wa()|0;else{k[e>>2]=36236;f=l+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[l+52>>2]=16;k[h>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;x=0;ra(63,e|0,h|0);m=x;x=0;if(m&1){a=Wa()|0;Sm(h);Sm(f);xn(e);break}Sm(h);x=0;a=va(28,l|0,50970,26)|0;m=x;x=0;do{if((!(m&1)?(x=0,d=Aa(38,a|0,b&255|0)|0,m=x,x=0,!(m&1)):0)?(x=0,va(28,d|0,50997,18)|0,m=x,x=0,!(m&1)):0){d=Va(16)|0;x=0;ra(64,i|0,e|0);m=x;x=0;if(!(m&1)){x=0;a=Da(1)|0;m=x;x=0;if(!(m&1)?(x=0,Ja(36,d|0,10,a|0,i|0),m=x,x=0,!(m&1)):0){x=0;Fa(6,d|0,824,96);x=0;c=0}else c=1;a=Wa()|0;Sm(i);if(!c)break}else a=Wa()|0;Ua(d|0)}else n=20}while(0);if((n|0)==20)a=Wa()|0;k[l>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);n=a;fb(n|0)}}while(0);n=a;qn(g);fb(n|0)}case-25:case-32:case-2:{n=0;r=c;return n|0}default:{i=m+56|0;f=m+4|0;k[m>>2]=36160;k[i>>2]=36180;x=0;ra(62,m+56|0,f|0);l=x;x=0;if(l&1){n=Wa()|0;qn(i);fb(n|0)}k[m+128>>2]=0;k[m+132>>2]=-1;k[m>>2]=36200;k[m+56>>2]=36220;x=0;qa(180,f|0);l=x;x=0;do{if(l&1)a=Wa()|0;else{k[f>>2]=36236;g=m+36|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[m+52>>2]=16;k[h>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;x=0;ra(63,f|0,h|0);l=x;x=0;if(l&1){a=Wa()|0;Sm(h);Sm(g);xn(f);break}Sm(h);x=0;a=va(28,m|0,51016,20)|0;l=x;x=0;do{if((!(l&1)?(x=0,e=Aa(38,a|0,b&255|0)|0,l=x,x=0,!(l&1)):0)?(x=0,va(28,e|0,51037,13)|0,l=x,x=0,!(l&1)):0){d=Va(16)|0;x=0;ra(64,j|0,f|0);l=x;x=0;if(!(l&1)){x=0;a=Da(1)|0;l=x;x=0;if(!(l&1)?(x=0,Ja(36,d|0,11,a|0,j|0),l=x,x=0,!(l&1)):0){x=0;Fa(6,d|0,824,96);x=0;c=0}else c=1;a=Wa()|0;Sm(j);if(!c)break}else a=Wa()|0;Ua(d|0)}else n=40}while(0);if((n|0)==40)a=Wa()|0;k[m>>2]=36200;k[i>>2]=36220;k[f>>2]=36236;Sm(g);xn(f);qn(i);n=a;fb(n|0)}}while(0);n=a;qn(i);fb(n|0)}}return 0}function Yi(a){a=a|0;var b=0;if((Vi(a)|0)<<24>>24!=1){a=1;return a|0}b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+52>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+56>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+60>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+64>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+68>>2]=b;a=11;return a|0}function Zi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=r;r=r+16|0;e=c;k[e>>2]=0;f=e+4|0;k[f>>2]=0;k[e+8>>2]=0;x=0;Fa(9,a|0,e|0,4);b=x;x=0;a:do{if(b&1)d=3;else{b=k[e>>2]|0;b:do{if(!(yl(b,51051,4)|0)){x=0;b=ta(69,a|0)|0;g=x;x=0;if(g&1){d=3;break a}b=b&255;switch(b|0){case 3:case 2:case 1:case 0:{k[a+44>>2]=b;a=5;b=k[e>>2]|0;break b}case 5:case 4:{b=Va(16)|0;x=0;a=Da(1)|0;g=x;x=0;if(!(g&1)?(x=0,Fa(7,b|0,7,a|0),g=x,x=0,!(g&1)):0){x=0;Fa(6,b|0,824,96);x=0;d=3;break a}a=Wa()|0;Ua(b|0);break a}default:{b=Va(16)|0;x=0;a=Da(1)|0;g=x;x=0;if(!(g&1)?(x=0,Fa(7,b|0,5,a|0),g=x,x=0,!(g&1)):0){x=0;Fa(6,b|0,824,96);x=0;d=3;break a}a=Wa()|0;Ua(b|0);break a}}}else a=4}while(0);if(!b){r=c;return a|0}if((k[f>>2]|0)!=(b|0))k[f>>2]=b;mj(b);r=c;return a|0}}while(0);if((d|0)==3)a=Wa()|0;b=k[e>>2]|0;if(!b)fb(a|0);if((k[f>>2]|0)!=(b|0))k[f>>2]=b;mj(b);fb(a|0);return 0}function _i(a){a=a|0;var b=0,c=0,d=0;d=k[(k[a>>2]|0)+-12>>2]|0;k[a+d>>2]=36200;b=a+(d+56)|0;k[b>>2]=36220;c=a+(d+4)|0;k[c>>2]=36236;Sm(a+(d+36)|0);xn(c);qn(b);return}function $i(a){a=a|0;return}function aj(a){a=a|0;mj(a);return}function bj(a){a=a|0;i[a>>0]=0;a=a+4|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;k[a+24>>2]=0;k[a+28>>2]=0;return}function cj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;e=r;r=r+16|0;f=e;b=Gi(b)|0;k[f>>2]=b;c=a+28|0;d=k[c>>2]|0;if(d>>>0<(k[a+32>>2]|0)>>>0){k[d>>2]=b;k[c>>2]=d+4;k[f>>2]=0;r=e;return}x=0;ra(57,a+24|0,f|0);a=x;x=0;if(a&1){b=Wa()|0;c=k[f>>2]|0;k[f>>2]=0;if(!c)fb(b|0);Lb[k[(k[c>>2]|0)+4>>2]&255](c);fb(b|0)}else{b=k[f>>2]|0;k[f>>2]=0;if(!b){r=e;return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);r=e;return}}function dj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;d=a+4|0;k[d>>2]=k[b>>2];k[d+4>>2]=k[b+4>>2];k[d+8>>2]=k[b+8>>2];Ni(a,-1);Ni(a,-40);d=a+28|0;e=a+24|0;b=k[e>>2]|0;if((k[d>>2]|0)==(b|0)){Ni(a,-1);Ni(a,-39);a=a+16|0;a=k[a>>2]|0;return a|0}else c=0;do{f=k[b+(c<<2)>>2]|0;Mb[k[(k[f>>2]|0)+8>>2]&127](f,a);c=c+1|0;b=k[e>>2]|0}while(c>>>0<(k[d>>2]|0)-b>>2>>>0);Ni(a,-1);Ni(a,-39);f=a+16|0;f=k[f>>2]|0;return f|0}function ej(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;m=r;r=r+48|0;h=m+32|0;e=m+12|0;i=m+8|0;l=m+4|0;n=m;d=c+36|0;do{if(((((k[d>>2]|0)==0?(k[c+40>>2]|0)==0:0)?(k[c+44>>2]|0)==0:0)?(k[c+48>>2]|0)==0:0)?(k[c+52>>2]|0)==0:0){d=k[c+8>>2]|0;if((d|0)<=12){f=a+28|0;g=a+32|0;break}Oi(e,(1<>2]|0);d=Fi(e)|0;k[i>>2]=d;f=a+28|0;e=k[f>>2]|0;g=a+32|0;if(e>>>0<(k[g>>2]|0)>>>0){k[e>>2]=d;k[f>>2]=e+4;k[i>>2]=0;break}x=0;ra(57,a+24|0,i|0);h=x;x=0;if(!(h&1)){d=k[i>>2]|0;k[i>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}c=Wa()|0;d=k[i>>2]|0;k[i>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}else j=6}while(0);do{if((j|0)==6){d=Fi(d)|0;k[h>>2]=d;f=a+28|0;e=k[f>>2]|0;g=a+32|0;if(e>>>0<(k[g>>2]|0)>>>0){k[e>>2]=d;k[f>>2]=e+4;k[h>>2]=0;break}x=0;ra(57,a+24|0,h|0);j=x;x=0;if(!(j&1)){d=k[h>>2]|0;k[h>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}c=Wa()|0;d=k[h>>2]|0;k[h>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}}while(0);d=a+20|0;e=(k[d>>2]|0)+1|0;k[d>>2]=e;d=k[c+24>>2]|0;h=(d|0)==0?1:k[c+16>>2]|0;d=Hi(e,h,k[c+20>>2]|0,d)|0;k[l>>2]=d;e=k[f>>2]|0;do{if(e>>>0<(k[g>>2]|0)>>>0){k[e>>2]=d;k[f>>2]=e+4;k[l>>2]=0}else{x=0;ra(57,a+24|0,l|0);j=x;x=0;if(!(j&1)){d=k[l>>2]|0;k[l>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}c=Wa()|0;d=k[l>>2]|0;k[l>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}}while(0);i=lj(104)|0;k[i>>2]=36820;k[i+4>>2]=h;e=i+8|0;k[e>>2]=k[b>>2];k[e+4>>2]=k[b+4>>2];k[e+8>>2]=k[b+8>>2];e=i+20|0;d=e+84|0;do{k[e>>2]=k[c>>2];e=e+4|0;c=c+4|0}while((e|0)<(d|0));k[n>>2]=i;c=k[f>>2]|0;if(c>>>0<(k[g>>2]|0)>>>0){k[c>>2]=i;k[f>>2]=c+4;k[n>>2]=0;r=m;return}x=0;ra(57,a+24|0,n|0);a=x;x=0;if(a&1){c=Wa()|0;d=k[n>>2]|0;k[n>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}else{c=k[n>>2]|0;k[n>>2]=0;if(!c){r=m;return}Lb[k[(k[c>>2]|0)+4>>2]&255](c);r=m;return}}function fj(a,b,c,d,e,f,g,h,j,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,s=0,t=0,u=0;p=r;r=r+96|0;o=p;n=sc(a,b,o,0)|0;if(n){e=n;r=p;return e|0}i[o+32>>0]=0;s=k[o+8>>2]|0;u=k[o>>2]|0;t=k[o+4>>2]|0;n=ia(t,u)|0;q=k[o+16>>2]|0;n=ia(ia(n,(s|0)<9?1:2)|0,q)|0;k[d>>2]=n;n=Pl(n)|0;k[c>>2]=n;k[e>>2]=u;k[f>>2]=t;k[g>>2]=s;k[h>>2]=k[o+12>>2];k[j>>2]=q;k[l>>2]=k[o+20>>2];k[m>>2]=k[o+24>>2];e=tc(n,k[d>>2]|0,a,b,0,0)|0;r=p;return e|0}function gj(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,l=0,m=0,n=0;m=r;r=r+96|0;j=m+4|0;g=m;l=j;n=l+84|0;do{k[l>>2]=0;l=l+4|0}while((l|0)<(n|0));k[j+16>>2]=f;k[j+8>>2]=e;k[j>>2]=c;k[j+4>>2]=d;c=Pl(b)|0;k[h>>2]=c;k[g>>2]=0;c=rc(h,b,g,a,b,j,0)|0;k[i>>2]=k[g>>2];r=m;return c|0}function hj(a,b){a=a|0;b=b|0;var c=0;c=r;r=r+16|0;k[c>>2]=b;b=k[9320]|0;ml(b,a,c)|0;el(10,b)|0;Pa()}function ij(a){a=a|0;Ta(51337,51366,1164,51442)}function jj(a){a=a|0;Ta(51463,51486,303,51442)}function kj(){var a=0,b=0;a=r;r=r+16|0;if(!(mb(37024,4)|0)){b=ib(k[9255]|0)|0;r=a;return b|0}else hj(51562,a);return 0}function lj(a){a=a|0;var b=0;b=(a|0)==0?1:a;a=Pl(b)|0;a:do{if(!a){while(1){a=uj()|0;if(!a)break;$b[a&7]();a=Pl(b)|0;if(a)break a}b=Va(4)|0;k[b>>2]=36844;ub(b|0,592,78)}}while(0);return a|0}function mj(a){a=a|0;Ql(a);return}function nj(a){a=a|0;mj(a);return}function oj(a){a=a|0;k[a>>2]=36844;return}function pj(a){a=a|0;return}function qj(a){a=a|0;mj(a);return}function rj(a){a=a|0;return 51611}function sj(a){a=a|0;var b=0;b=r;r=r+16|0;x=0;Ga(a|0);a=x;x=0;if(!(a&1)){x=0;ra(85,51626,b|0);x=0}a=Wa(0)|0;cb(a|0)|0;x=0;ra(85,51666,b+8|0);x=0;a=Wa(0)|0;x=0;Ga(3);b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else oc(a)}function tj(){var a=0,b=0,c=0;x=0;a=Da(2)|0;c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}if(((a|0)!=0?(b=k[a>>2]|0,(b|0)!=0):0)?(c=b+48|0,(k[c>>2]&-256|0)==1126902528?(k[c+4>>2]|0)==1129074247:0):0)sj(k[b+12>>2]|0);c=k[9208]|0;k[9208]=c+0;sj(c)}function uj(){var a=0;a=k[9214]|0;k[9214]=a+0;return a|0}function vj(a){a=a|0;return}function wj(a){a=a|0;k[a>>2]=36868;dk(a+4|0);return}function xj(a){a=a|0;wj(a);mj(a);return}function yj(a){a=a|0;return k[a+4>>2]|0}function zj(a){a=a|0;return}function Aj(a){a=a|0;k[a>>2]=36888;return}function Bj(a){a=a|0;return}function Cj(a){a=a|0;mj(a);return}function Dj(a){a=a|0;return 51716}function Ej(a){a=a|0;return}function Fj(a){a=a|0;return}function Gj(a){a=a|0;return}function Hj(a){a=a|0;mj(a);return}function Ij(a){a=a|0;mj(a);return}function Jj(a){a=a|0;mj(a);return}function Kj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+64|0;f=g;if((a|0)!=(b|0))if((b|0)!=0?(e=Qj(b,656,672,0)|0,(e|0)!=0):0){b=f;d=b+56|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(d|0));k[f>>2]=e;k[f+8>>2]=a;k[f+12>>2]=-1;k[f+48>>2]=1;cc[k[(k[e>>2]|0)+28>>2]&63](e,f,k[c>>2]|0,1);if((k[f+24>>2]|0)==1){k[c>>2]=k[f+16>>2];b=1}else b=0}else b=0;else b=1;r=g;return b|0}function Lj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;a=b+16|0;e=k[a>>2]|0;do{if(e){if((e|0)!=(c|0)){d=b+36|0;k[d>>2]=(k[d>>2]|0)+1;k[b+24>>2]=2;i[b+54>>0]=1;break}a=b+24|0;if((k[a>>2]|0)==2)k[a>>2]=d}else{k[a>>2]=c;k[b+24>>2]=d;k[b+36>>2]=1}}while(0);return}function Mj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)==(k[b+8>>2]|0))Lj(0,b,c,d);return}function Nj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)==(k[b+8>>2]|0))Lj(0,b,c,d);else{a=k[a+8>>2]|0;cc[k[(k[a>>2]|0)+28>>2]&63](a,b,c,d)}return}function Oj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=k[a+4>>2]|0;e=f>>8;if(f&1)e=k[(k[c>>2]|0)+e>>2]|0;a=k[a>>2]|0;cc[k[(k[a>>2]|0)+28>>2]&63](a,b,c+e|0,(f&2|0)!=0?d:2);return}function Pj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do{if((a|0)!=(k[b+8>>2]|0)){f=k[a+12>>2]|0;e=a+16+(f<<3)|0;Oj(a+16|0,b,c,d);if((f|0)>1){f=b+54|0;a=a+24|0;do{Oj(a,b,c,d);if(i[f>>0]|0)break a;a=a+8|0}while(a>>>0>>0)}}else Lj(0,b,c,d)}while(0);return}function Qj(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,l=0,m=0,n=0,o=0,p=0,q=0;q=r;r=r+64|0;p=q;o=k[a>>2]|0;n=a+(k[o+-8>>2]|0)|0;o=k[o+-4>>2]|0;k[p>>2]=c;k[p+4>>2]=a;k[p+8>>2]=b;k[p+12>>2]=d;d=p+16|0;a=p+20|0;b=p+24|0;e=p+28|0;f=p+32|0;g=p+40|0;h=(o|0)==(c|0);l=d;m=l+36|0;do{k[l>>2]=0;l=l+4|0}while((l|0)<(m|0));j[d+36>>1]=0;i[d+38>>0]=0;a:do{if(h){k[p+48>>2]=1;Sb[k[(k[c>>2]|0)+20>>2]&15](c,p,n,n,1,0);d=(k[b>>2]|0)==1?n:0}else{Jb[k[(k[o>>2]|0)+24>>2]&15](o,p,n,1,0);switch(k[p+36>>2]|0){case 0:{d=(k[g>>2]|0)==1&(k[e>>2]|0)==1&(k[f>>2]|0)==1?k[a>>2]|0:0;break a}case 1:break;default:{d=0;break a}}if((k[b>>2]|0)!=1?!((k[g>>2]|0)==0&(k[e>>2]|0)==1&(k[f>>2]|0)==1):0){d=0;break}d=k[d>>2]|0}}while(0);r=q;return d|0}function Rj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;i[b+53>>0]=1;do{if((k[b+4>>2]|0)==(d|0)){i[b+52>>0]=1;d=b+16|0;a=k[d>>2]|0;if(!a){k[d>>2]=c;k[b+24>>2]=e;k[b+36>>2]=1;if(!((e|0)==1?(k[b+48>>2]|0)==1:0))break;i[b+54>>0]=1;break}if((a|0)!=(c|0)){e=b+36|0;k[e>>2]=(k[e>>2]|0)+1;i[b+54>>0]=1;break}a=b+24|0;d=k[a>>2]|0;if((d|0)==2){k[a>>2]=e;d=e}if((d|0)==1?(k[b+48>>2]|0)==1:0)i[b+54>>0]=1}}while(0);return}function Sj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;a:do{if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(f=b+28|0,(k[f>>2]|0)!=1):0)k[f>>2]=d}else{if((a|0)!=(k[b>>2]|0)){q=k[a+12>>2]|0;h=a+16+(q<<3)|0;Uj(a+16|0,b,c,d,e);f=a+24|0;if((q|0)<=1)break;g=k[a+8>>2]|0;if((g&2|0)==0?(j=b+36|0,(k[j>>2]|0)!=1):0){if(!(g&1)){g=b+54|0;while(1){if(i[g>>0]|0)break a;if((k[j>>2]|0)==1)break a;Uj(f,b,c,d,e);f=f+8|0;if(f>>>0>=h>>>0)break a}}g=b+24|0;a=b+54|0;while(1){if(i[a>>0]|0)break a;if((k[j>>2]|0)==1?(k[g>>2]|0)==1:0)break a;Uj(f,b,c,d,e);f=f+8|0;if(f>>>0>=h>>>0)break a}}g=b+54|0;while(1){if(i[g>>0]|0)break a;Uj(f,b,c,d,e);f=f+8|0;if(f>>>0>=h>>>0)break a}}if((k[b+16>>2]|0)!=(c|0)?(p=b+20|0,(k[p>>2]|0)!=(c|0)):0){k[b+32>>2]=d;m=b+44|0;if((k[m>>2]|0)==4)break;g=k[a+12>>2]|0;h=a+16+(g<<3)|0;j=b+52|0;d=b+53|0;n=b+54|0;l=a+8|0;o=b+24|0;b:do{if((g|0)>0){g=0;f=0;a=a+16|0;while(1){i[j>>0]=0;i[d>>0]=0;Tj(a,b,c,c,1,e);if(i[n>>0]|0){q=20;break b}do{if(i[d>>0]|0){if(!(i[j>>0]|0))if(!(k[l>>2]&1)){f=1;q=20;break b}else{f=1;break}if((k[o>>2]|0)==1)break b;if(!(k[l>>2]&2))break b;else{g=1;f=1}}}while(0);a=a+8|0;if(a>>>0>=h>>>0){q=20;break}}}else{g=0;f=0;q=20}}while(0);do{if((q|0)==20){if((!g?(k[p>>2]=c,c=b+40|0,k[c>>2]=(k[c>>2]|0)+1,(k[b+36>>2]|0)==1):0)?(k[o>>2]|0)==2:0){i[n>>0]=1;if(f)break}else q=24;if((q|0)==24?f:0)break;k[m>>2]=4;break a}}while(0);k[m>>2]=3;break}if((d|0)==1)k[b+32>>2]=1}}while(0);return}function Tj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;h=k[a+4>>2]|0;g=h>>8;if(h&1)g=k[(k[d>>2]|0)+g>>2]|0;a=k[a>>2]|0;Sb[k[(k[a>>2]|0)+20>>2]&15](a,b,c,d+g|0,(h&2|0)!=0?e:2,f);return}function Uj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=k[a+4>>2]|0;f=g>>8;if(g&1)f=k[(k[c>>2]|0)+f>>2]|0;a=k[a>>2]|0;Jb[k[(k[a>>2]|0)+24>>2]&15](a,b,c+f|0,(g&2|0)!=0?d:2,e);return}function Vj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;a:do{if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(f=b+28|0,(k[f>>2]|0)!=1):0)k[f>>2]=d}else{if((a|0)!=(k[b>>2]|0)){h=k[a+8>>2]|0;Jb[k[(k[h>>2]|0)+24>>2]&15](h,b,c,d,e);break}if((k[b+16>>2]|0)!=(c|0)?(g=b+20|0,(k[g>>2]|0)!=(c|0)):0){k[b+32>>2]=d;d=b+44|0;if((k[d>>2]|0)==4)break;f=b+52|0;i[f>>0]=0;j=b+53|0;i[j>>0]=0;a=k[a+8>>2]|0;Sb[k[(k[a>>2]|0)+20>>2]&15](a,b,c,c,1,e);if(i[j>>0]|0){if(!(i[f>>0]|0)){f=1;h=13}}else{f=0;h=13}do{if((h|0)==13){k[g>>2]=c;j=b+40|0;k[j>>2]=(k[j>>2]|0)+1;if((k[b+36>>2]|0)==1?(k[b+24>>2]|0)==2:0){i[b+54>>0]=1;if(f)break}else h=16;if((h|0)==16?f:0)break;k[d>>2]=4;break a}}while(0);k[d>>2]=3;break}if((d|0)==1)k[b+32>>2]=1}}while(0);return}function Wj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;do{if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(g=b+28|0,(k[g>>2]|0)!=1):0)k[g>>2]=d}else if((a|0)==(k[b>>2]|0)){if((k[b+16>>2]|0)!=(c|0)?(f=b+20|0,(k[f>>2]|0)!=(c|0)):0){k[b+32>>2]=d;k[f>>2]=c;e=b+40|0;k[e>>2]=(k[e>>2]|0)+1;if((k[b+36>>2]|0)==1?(k[b+24>>2]|0)==2:0)i[b+54>>0]=1;k[b+44>>2]=4;break}if((d|0)==1)k[b+32>>2]=1}}while(0);return}function Xj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;if((a|0)==(k[b+8>>2]|0))Rj(0,b,c,d,e);else{m=b+52|0;n=i[m>>0]|0;o=b+53|0;p=i[o>>0]|0;l=k[a+12>>2]|0;g=a+16+(l<<3)|0;i[m>>0]=0;i[o>>0]=0;Tj(a+16|0,b,c,d,e,f);a:do{if((l|0)>1){h=b+24|0;j=a+8|0;l=b+54|0;a=a+24|0;do{if(i[l>>0]|0)break a;if(!(i[m>>0]|0)){if((i[o>>0]|0)!=0?(k[j>>2]&1|0)==0:0)break a}else{if((k[h>>2]|0)==1)break a;if(!(k[j>>2]&2))break a}i[m>>0]=0;i[o>>0]=0;Tj(a,b,c,d,e,f);a=a+8|0}while(a>>>0>>0)}}while(0);i[m>>0]=n;i[o>>0]=p}return}function Yj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((a|0)==(k[b+8>>2]|0))Rj(0,b,c,d,e);else{a=k[a+8>>2]|0;Sb[k[(k[a>>2]|0)+20>>2]&15](a,b,c,d,e,f)}return}function Zj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((a|0)==(k[b+8>>2]|0))Rj(0,b,c,d,e);return}function _j(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+16|0;d=e;k[d>>2]=k[c>>2];a=Qb[k[(k[a>>2]|0)+16>>2]&63](a,b,d)|0;if(a)k[c>>2]=k[d>>2];r=e;return a&1|0}function $j(a){a=a|0;if(!a)a=0;else a=(Qj(a,656,704,0)|0)!=0;return a&1|0}function ak(){var a=0;a=Va(4)|0;oj(a);ub(a|0,592,78)}function bk(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+48|0;g=e+32|0;c=e+24|0;h=e+16|0;f=e;e=e+36|0;a=kj()|0;if((a|0)!=0?(d=k[a>>2]|0,(d|0)!=0):0){a=d+48|0;b=k[a>>2]|0;a=k[a+4>>2]|0;if(!((b&-256|0)==1126902528&(a|0)==1129074247)){k[c>>2]=k[9257];hj(51919,c)}if((b|0)==1126902529&(a|0)==1129074247)a=k[d+44>>2]|0;else a=d+80|0;k[e>>2]=a;d=k[d>>2]|0;a=k[d+4>>2]|0;if(Qb[k[(k[608>>2]|0)+16>>2]&63](608,d,e)|0){h=k[e>>2]|0;e=k[9257]|0;h=Ob[k[(k[h>>2]|0)+8>>2]&127](h)|0;k[f>>2]=e;k[f+4>>2]=a;k[f+8>>2]=h;hj(51833,f)}else{k[h>>2]=k[9257];k[h+4>>2]=a;hj(51878,h)}}hj(51957,g)}function ck(){var a=0;a=r;r=r+16|0;if(!(Oa(37020,184)|0)){r=a;return}else hj(51730,a)}function dk(a){a=a|0;var b=0,c=0;c=(k[a>>2]|0)+-4|0;b=k[c>>2]|0;k[c>>2]=b+-1 -;if((b+-1|0)<0)mj((k[a>>2]|0)+-12|0);return}function ek(a){a=a|0;var b=0;b=r;r=r+16|0;Ql(a);if(!(sb(k[9255]|0,0)|0)){r=b;return}else hj(51780,b)}function fk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=rl(a,b,c)|0;return a|0}function gk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=sl(a,b,c)|0;return a|0}function hk(){return 37296}function ik(){return 37300}function jk(){return 37304}function kk(a){a=a|0;return((a|0)==32|(a+-9|0)>>>0<5)&1|0}function lk(a){a=a|0;if((a+-48|0)>>>0<10)a=1;else a=((a|32)+-97|0)>>>0<6;return a&1|0}function mk(){var a=0;if(!(k[9258]|0))a=37308;else{a=(kb()|0)+60|0;a=k[a>>2]|0}return a|0}function nk(a){a=a|0;var b=0,c=0;b=0;while(1){if((l[51978+b>>0]|0)==(a|0)){c=2;break}b=b+1|0;if((b|0)==87){b=87;a=52066;c=5;break}}if((c|0)==2)if(!b)a=52066;else{a=52066;c=5}if((c|0)==5)while(1){c=a;while(1){a=c+1|0;if(!(i[c>>0]|0))break;else c=a}b=b+-1|0;if(!b)break;else c=5}return a|0}function ok(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;K=r;r=r+512|0;G=K;switch(b|0){case 0:{J=24;I=-149;y=4;break}case 1:{J=53;I=-1074;y=4;break}case 2:{J=53;I=-1074;y=4;break}default:d=0}a:do{if((y|0)==4){D=a+4|0;A=a+100|0;do{b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0}while((kk(b)|0)!=0);b:do{switch(b|0){case 43:case 45:{e=1-(((b|0)==45&1)<<1)|0;b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;H=e;break b}else{b=rk(a)|0;H=e;break b}}default:H=1}}while(0);e=b;b=0;do{if((e|32|0)!=(i[53870+b>>0]|0))break;do{if(b>>>0<7){e=k[D>>2]|0;if(e>>>0<(k[A>>2]|0)>>>0){k[D>>2]=e+1;e=l[e>>0]|0;break}else{e=rk(a)|0;break}}}while(0);b=b+1|0}while(b>>>0<8);c:do{switch(b|0){case 8:break;case 3:{y=23;break}default:{g=(c|0)!=0;if(g&b>>>0>3)if((b|0)==8)break c;else{y=23;break c}d:do{if(!b){b=0;do{if((e|32|0)!=(i[56747+b>>0]|0))break d;do{if(b>>>0<2){e=k[D>>2]|0;if(e>>>0<(k[A>>2]|0)>>>0){k[D>>2]=e+1;e=l[e>>0]|0;break}else{e=rk(a)|0;break}}}while(0);b=b+1|0}while(b>>>0<3)}}while(0);switch(b|0){case 3:{b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==40)b=1;else{if(!(k[A>>2]|0)){d=B;break a}k[D>>2]=(k[D>>2]|0)+-1;d=B;break a}while(1){e=k[D>>2]|0;if(e>>>0<(k[A>>2]|0)>>>0){k[D>>2]=e+1;e=l[e>>0]|0}else e=rk(a)|0;if(!((e+-48|0)>>>0<10|(e+-65|0)>>>0<26)?!((e|0)==95|(e+-97|0)>>>0<26):0)break;b=b+1|0}if((e|0)==41){d=B;break a}e=(k[A>>2]|0)==0;if(!e)k[D>>2]=(k[D>>2]|0)+-1;if(!g){J=mk()|0;k[J>>2]=22;qk(a,0);d=0;break a}if(!b){d=B;break a}while(1){b=b+-1|0;if(!e)k[D>>2]=(k[D>>2]|0)+-1;if(!b){d=B;break a}}}case 0:{do{if((e|0)==48){b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|32|0)!=120){if(!(k[A>>2]|0)){b=48;break}k[D>>2]=(k[D>>2]|0)+-1;b=48;break}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;g=0}else{b=rk(a)|0;g=0}e:while(1){switch(b|0){case 46:{y=74;break e}case 48:break;default:{w=0;h=0;v=0;e=0;m=g;n=0;u=0;j=1;g=0;d=0;break e}}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;g=1;continue}else{b=rk(a)|0;g=1;continue}}if((y|0)==74){b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==48){g=0;e=0;do{b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;g=tw(g|0,e|0,-1,-1)|0;e=M}while((b|0)==48);w=0;h=0;v=g;m=1;n=1;u=0;j=1;g=0;d=0}else{w=0;h=0;v=0;e=0;m=g;n=1;u=0;j=1;g=0;d=0}}while(1){s=b+-48|0;o=b|32;if(s>>>0>=10){t=(b|0)==46;if(!(t|(o+-97|0)>>>0<6)){o=v;s=w;break}if(t)if(!n){t=h;e=w;s=w;n=1;o=u;f=j}else{o=v;s=w;b=46;break}else y=86}else y=86;if((y|0)==86){y=0;b=(b|0)>57?o+-87|0:s;do{if(!((w|0)<0|(w|0)==0&h>>>0<8)){if((w|0)<0|(w|0)==0&h>>>0<14){q=j*.0625;o=u;f=q;d=d+q*+(b|0);break}if((u|0)!=0|(b|0)==0){o=u;f=j}else{o=1;f=j;d=d+j*.5}}else{o=u;f=j;g=b+(g<<4)|0}}while(0);h=tw(h|0,w|0,1,0)|0;t=v;s=M;m=1}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;w=s;v=t;b=l[b>>0]|0;u=o;j=f;continue}else{w=s;v=t;b=rk(a)|0;u=o;j=f;continue}}if(!m){b=(k[A>>2]|0)==0;if(!b)k[D>>2]=(k[D>>2]|0)+-1;if(c){if(!b?(x=k[D>>2]|0,k[D>>2]=x+-1,(n|0)!=0):0)k[D>>2]=x+-2}else qk(a,0);d=+(H|0)*0;break a}m=(n|0)==0;n=m?h:o;m=m?s:e;if((s|0)<0|(s|0)==0&h>>>0<8){e=s;do{g=g<<4;h=tw(h|0,e|0,1,0)|0;e=M}while((e|0)<0|(e|0)==0&h>>>0<8)}if((b|32|0)==112){e=Dl(a,c)|0;b=M;if((e|0)==0&(b|0)==-2147483648){if(!c){qk(a,0);d=0;break a}if(!(k[A>>2]|0)){e=0;b=0}else{k[D>>2]=(k[D>>2]|0)+-1;e=0;b=0}}}else if(!(k[A>>2]|0)){e=0;b=0}else{k[D>>2]=(k[D>>2]|0)+-1;e=0;b=0}G=ww(n|0,m|0,2)|0;G=tw(G|0,M|0,-32,-1)|0;b=tw(G|0,M|0,e|0,b|0)|0;e=M;if(!g){d=+(H|0)*0;break a}if((e|0)>0|(e|0)==0&b>>>0>(0-I|0)>>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*1.7976931348623157e308*1.7976931348623157e308;break a}G=I+-106|0;F=((G|0)<0)<<31>>31;if((e|0)<(F|0)|(e|0)==(F|0)&b>>>0>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*2.2250738585072014e-308*2.2250738585072014e-308;break a}if((g|0)>-1){do{F=!(d>=.5);G=F&1|g<<1;g=G^1;d=d+(F?d:d+-1);b=tw(b|0,e|0,-1,-1)|0;e=M}while((G|0)>-1);h=b;j=d}else{h=b;j=d}b=rw(32,0,I|0,((I|0)<0)<<31>>31|0)|0;b=tw(h|0,e|0,b|0,M|0)|0;I=M;if(0>(I|0)|0==(I|0)&J>>>0>b>>>0)if((b|0)<0){b=0;y=127}else y=125;else{b=J;y=125}if((y|0)==125)if((b|0)<53)y=127;else{e=b;f=+(H|0);d=0}if((y|0)==127){d=+(H|0);e=b;f=d;d=+Ck(+Hk(1,84-b|0),d)}J=(g&1|0)==0&(j!=0&(e|0)<32);d=f*(J?0:j)+(d+f*+(((J&1)+g|0)>>>0))-d;if(!(d!=0)){J=mk()|0;k[J>>2]=34}d=+Ik(d,h);break a}else b=e}while(0);E=I+J|0;F=0-E|0;g=0;f:while(1){switch(b|0){case 46:{y=138;break f}case 48:break;default:{e=0;o=0;n=0;break f}}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;g=1;continue}else{b=rk(a)|0;g=1;continue}}if((y|0)==138){b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==48){e=0;b=0;while(1){e=tw(e|0,b|0,-1,-1)|0;g=M;b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==48)b=g;else{o=g;g=1;n=1;break}}}else{e=0;o=0;n=1}}k[G>>2]=0;m=b+-48|0;h=(b|0)==46;g:do{if(h|m>>>0<10){z=G+496|0;w=0;t=0;u=h;y=o;s=g;x=n;g=0;h=0;n=0;h:while(1){do{if(u)if(!x){e=w;o=t;x=1}else{o=y;b=w;m=t;break h}else{u=tw(w|0,t|0,1,0)|0;t=M;v=(b|0)!=48;if((h|0)>=125){if(!v){o=y;w=u;break}k[z>>2]=k[z>>2]|1;o=y;w=u;break}o=G+(h<<2)|0;if(g)m=b+-48+((k[o>>2]|0)*10|0)|0;k[o>>2]=m;g=g+1|0;m=(g|0)==9;o=y;w=u;s=1;g=m?0:g;h=(m&1)+h|0;n=v?u:n}}while(0);b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;m=b+-48|0;u=(b|0)==46;if(!(u|m>>>0<10)){m=x;y=161;break g}else y=o}s=(s|0)!=0;y=169}else{w=0;t=0;s=g;m=n;g=0;h=0;n=0;y=161}}while(0);do{if((y|0)==161){z=(m|0)==0;e=z?w:e;o=z?t:o;s=(s|0)!=0;if(!((b|32|0)==101&s))if((b|0)>-1){b=w;m=t;y=169;break}else{b=w;m=t;y=171;break}m=Dl(a,c)|0;b=M;if((m|0)==0&(b|0)==-2147483648){if(!c){qk(a,0);d=0;break}if(!(k[A>>2]|0)){m=0;b=0}else{k[D>>2]=(k[D>>2]|0)+-1;m=0;b=0}}e=tw(m|0,b|0,e|0,o|0)|0;s=w;o=M;m=t;y=173}}while(0);if((y|0)==169)if(k[A>>2]|0){k[D>>2]=(k[D>>2]|0)+-1;if(s){s=b;y=173}else y=172}else y=171;if((y|0)==171)if(s){s=b;y=173}else y=172;do{if((y|0)==172){J=mk()|0;k[J>>2]=22;qk(a,0);d=0}else if((y|0)==173){b=k[G>>2]|0;if(!b){d=+(H|0)*0;break}if(((m|0)<0|(m|0)==0&s>>>0<10)&((e|0)==(s|0)&(o|0)==(m|0))?J>>>0>30|(b>>>J|0)==0:0){d=+(H|0)*+(b>>>0);break}a=(I|0)/-2|0;D=((a|0)<0)<<31>>31;if((o|0)>(D|0)|(o|0)==(D|0)&e>>>0>a>>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*1.7976931348623157e308*1.7976931348623157e308;break}a=I+-106|0;D=((a|0)<0)<<31>>31;if((o|0)<(D|0)|(o|0)==(D|0)&e>>>0>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if(g){if((g|0)<9){m=G+(h<<2)|0;b=k[m>>2]|0;do{b=b*10|0;g=g+1|0}while((g|0)!=9);k[m>>2]=b}h=h+1|0}if((n|0)<9?(n|0)<=(e|0)&(e|0)<18:0){if((e|0)==9){d=+(H|0)*+((k[G>>2]|0)>>>0);break}if((e|0)<9){d=+(H|0)*+((k[G>>2]|0)>>>0)/+(k[37312+(8-e<<2)>>2]|0);break}a=J+27+(ia(e,-3)|0)|0;b=k[G>>2]|0;if((a|0)>30|(b>>>a|0)==0){d=+(H|0)*+(b>>>0)*+(k[37312+(e+-10<<2)>>2]|0);break}}b=(e|0)%9|0;if(!b){g=0;b=0}else{s=(e|0)>-1?b:b+9|0;m=k[37312+(8-s<<2)>>2]|0;if(h){n=1e9/(m|0)|0;g=0;b=0;o=0;do{A=G+(o<<2)|0;D=k[A>>2]|0;a=((D>>>0)/(m>>>0)|0)+b|0;k[A>>2]=a;b=ia((D>>>0)%(m>>>0)|0,n)|0;a=(o|0)==(g|0)&(a|0)==0;o=o+1|0;e=a?e+-9|0:e;g=a?o&127:g}while((o|0)!=(h|0));if(b){k[G+(h<<2)>>2]=b;h=h+1|0}}else{g=0;h=0}b=0;e=9-s+e|0}i:while(1){t=(e|0)<18;u=(e|0)==18;v=G+(g<<2)|0;do{if(!t){if(!u)break i;if((k[v>>2]|0)>>>0>=9007199){e=18;break i}}m=0;n=h+127|0;while(1){s=n&127;o=G+(s<<2)|0;n=ww(k[o>>2]|0,0,29)|0;n=tw(n|0,M|0,m|0,0)|0;m=M;if(m>>>0>0|(m|0)==0&n>>>0>1e9){a=Ew(n|0,m|0,1e9,0)|0;n=Fw(n|0,m|0,1e9,0)|0;m=a}else m=0;k[o>>2]=n;a=(s|0)==(g|0);h=(s|0)!=(h+127&127|0)|a?h:(n|0)==0?s:h;if(a)break;else n=s+-1|0}b=b+-29|0}while((m|0)==0);g=g+127&127;if((g|0)==(h|0)){a=h+127&127;h=G+((h+126&127)<<2)|0;k[h>>2]=k[h>>2]|k[G+(a<<2)>>2];h=a}k[G+(g<<2)>>2]=m;e=e+9|0}j:while(1){w=h+1&127;v=G+((h+127&127)<<2)|0;while(1){t=(e|0)==18;u=(e|0)>27?9:1;s=t^1;while(1){n=g&127;o=(n|0)==(h|0);do{if(!o){m=k[G+(n<<2)>>2]|0;if(m>>>0<9007199){y=219;break}if(m>>>0>9007199)break;m=g+1&127;if((m|0)==(h|0)){y=219;break}m=k[G+(m<<2)>>2]|0;if(m>>>0<254740991){y=219;break}if(!(m>>>0>254740991|s)){e=n;break j}}else y=219}while(0);if((y|0)==219?(y=0,t):0){y=220;break j}b=b+u|0;if((g|0)==(h|0))g=h;else break}s=(1<>>u;n=g;m=0;o=g;while(1){D=G+(o<<2)|0;a=k[D>>2]|0;g=(a>>>u)+m|0;k[D>>2]=g;m=ia(a&s,t)|0;g=(o|0)==(n|0)&(g|0)==0;o=o+1&127;e=g?e+-9|0:e;g=g?o:n;if((o|0)==(h|0))break;else n=g}if(!m)continue;if((w|0)!=(g|0))break;k[v>>2]=k[v>>2]|1}k[G+(h<<2)>>2]=m;h=w}if((y|0)==220)if(o){k[G+(w+-1<<2)>>2]=0;e=h;h=w}else e=n;d=+((k[G+(e<<2)>>2]|0)>>>0);e=g+1&127;if((e|0)==(h|0)){h=g+2&127;k[G+(h+-1<<2)>>2]=0}q=+(H|0);f=q*(d*1e9+ +((k[G+(e<<2)>>2]|0)>>>0));t=b+53|0;o=t-I|0;s=(o|0)<(J|0);e=s&1;n=s?(o|0)<0?0:o:J;if((n|0)<53){L=+Ck(+Hk(1,105-n|0),f);j=+Ek(f,+Hk(1,53-n|0));p=L;d=j;j=L+(f-j)}else{p=0;d=0;j=f}m=g+2&127;do{if((m|0)==(h|0))f=d;else{m=k[G+(m<<2)>>2]|0;do{if(m>>>0>=5e8){if(m>>>0>5e8){d=q*.75+d;break}if((g+3&127|0)==(h|0)){d=q*.5+d;break}else{d=q*.75+d;break}}else{if((m|0)==0?(g+3&127|0)==(h|0):0)break;d=q*.25+d}}while(0);if((53-n|0)<=1){f=d;break}if(+Ek(d,1)!=0){f=d;break}f=d+1}}while(0);d=j+f-p;do{if((t&2147483647|0)>(-2-E|0)){if(+X(+d)>=9007199254740992){e=s&(n|0)==(o|0)?0:e;b=b+1|0;d=d*.5}if((b+50|0)<=(F|0)?!(f!=0&(e|0)!=0):0)break;J=mk()|0;k[J>>2]=34}}while(0);d=+Ik(d,b)}}while(0);break a}default:{if(k[A>>2]|0)k[D>>2]=(k[D>>2]|0)+-1;J=mk()|0;k[J>>2]=22;qk(a,0);d=0;break a}}}}}while(0);if((y|0)==23){e=(k[A>>2]|0)==0;if(!e)k[D>>2]=(k[D>>2]|0)+-1;if((c|0)!=0&b>>>0>3)do{if(!e)k[D>>2]=(k[D>>2]|0)+-1;b=b+-1|0}while(b>>>0>3)}d=+(H|0)*C}}while(0);r=K;return+d}function pk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;a:do{if(b>>>0>36){e=mk()|0;k[e>>2]=22;e=0;d=0}else{r=a+4|0;q=a+100|0;do{f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0}while((kk(f)|0)!=0);b:do{switch(f|0){case 43:case 45:{g=((f|0)==45)<<31>>31;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0;p=g;break b}else{f=rk(a)|0;p=g;break b}}default:p=0}}while(0);g=(b|0)==0;do{if((b&-17|0)==0&(f|0)==48){f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;if((f|32|0)!=120)if(g){b=8;n=46;break}else{n=32;break}b=k[r>>2]|0;if(b>>>0<(k[q>>2]|0)>>>0){k[r>>2]=b+1;f=l[b>>0]|0}else f=rk(a)|0;if((l[53879+(f+1)>>0]|0)>15){d=(k[q>>2]|0)==0;if(!d)k[r>>2]=(k[r>>2]|0)+-1;if(!c){qk(a,0);e=0;d=0;break a}if(d){e=0;d=0;break a}k[r>>2]=(k[r>>2]|0)+-1;e=0;d=0;break a}else{b=16;n=46}}else{b=g?10:b;if((l[53879+(f+1)>>0]|0)>>>0>>0)n=32;else{if(k[q>>2]|0)k[r>>2]=(k[r>>2]|0)+-1;qk(a,0);e=mk()|0;k[e>>2]=22;e=0;d=0;break a}}}while(0);if((n|0)==32)if((b|0)==10){b=f+-48|0;if(b>>>0<10){f=0;while(1){g=(f*10|0)+b|0;b=k[r>>2]|0;if(b>>>0<(k[q>>2]|0)>>>0){k[r>>2]=b+1;f=l[b>>0]|0}else f=rk(a)|0;b=f+-48|0;if(!(b>>>0<10&g>>>0<429496729)){b=g;break}else f=g}g=0}else{b=0;g=0}c=f+-48|0;if(c>>>0<10){while(1){h=Dw(b|0,g|0,10,0)|0;j=M;m=((c|0)<0)<<31>>31;o=~m;if(j>>>0>o>>>0|(j|0)==(o|0)&h>>>0>~c>>>0){h=b;break}b=tw(h|0,j|0,c|0,m|0)|0;g=M;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;c=f+-48|0;if(!(c>>>0<10&(g>>>0<429496729|(g|0)==429496729&b>>>0<2576980378))){h=b;break}}if(c>>>0>9){f=h;b=p}else{b=10;n=72}}else{f=b;b=p}}else n=46;c:do{if((n|0)==46){if(!(b+-1&b)){n=i[54136+((b*23|0)>>>5&7)>>0]|0;g=i[53879+(f+1)>>0]|0;c=g&255;if(c>>>0>>0){f=0;while(1){h=c|f<>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;c=g&255;if(!(h>>>0<134217728&c>>>0>>0))break;else f=h}c=0}else{c=0;h=0}j=uw(-1,-1,n|0)|0;m=M;if((g&255)>>>0>=b>>>0|(c>>>0>m>>>0|(c|0)==(m|0)&h>>>0>j>>>0)){g=c;n=72;break}else f=c;while(1){h=ww(h|0,f|0,n|0)|0;c=M;h=g&255|h;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;if((g&255)>>>0>=b>>>0|(c>>>0>m>>>0|(c|0)==(m|0)&h>>>0>j>>>0)){g=c;n=72;break c}else f=c}}g=i[53879+(f+1)>>0]|0;c=g&255;if(c>>>0>>0){f=0;while(1){h=c+(ia(f,b)|0)|0;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;c=g&255;if(!(h>>>0<119304647&c>>>0>>0))break;else f=h}c=0}else{h=0;c=0}if((g&255)>>>0>>0){n=Ew(-1,-1,b|0,0)|0;o=M;m=c;while(1){if(m>>>0>o>>>0|(m|0)==(o|0)&h>>>0>n>>>0){g=m;n=72;break c}c=Dw(h|0,m|0,b|0,0)|0;j=M;g=g&255;if(j>>>0>4294967295|(j|0)==-1&c>>>0>~g>>>0){g=m;n=72;break c}h=tw(g|0,0,c|0,j|0)|0;c=M;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;if((g&255)>>>0>=b>>>0){g=c;n=72;break}else m=c}}else{g=c;n=72}}}while(0);if((n|0)==72)if((l[53879+(f+1)>>0]|0)>>>0>>0){do{f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0}while((l[53879+(f+1)>>0]|0)>>>0>>0);g=mk()|0;k[g>>2]=34;g=e;f=d;b=(d&1|0)==0&0==0?p:0}else{f=h;b=p}if(k[q>>2]|0)k[r>>2]=(k[r>>2]|0)+-1;if(!(g>>>0>>0|(g|0)==(e|0)&f>>>0>>0)){if(!((d&1|0)!=0|0!=0|(b|0)!=0)){r=mk()|0;k[r>>2]=34;d=tw(d|0,e|0,-1,-1)|0;e=M;break}if(g>>>0>e>>>0|(g|0)==(e|0)&f>>>0>d>>>0){r=mk()|0;k[r>>2]=34;break}}d=((b|0)<0)<<31>>31;d=rw(f^b|0,g^d|0,b|0,d|0)|0;e=M}}while(0);M=e;return d|0}function qk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;k[a+104>>2]=b;c=k[a+4>>2]|0;d=k[a+8>>2]|0;e=d-c|0;k[a+108>>2]=e;if((b|0)!=0&(e|0)>(b|0))k[a+100>>2]=c+b;else k[a+100>>2]=d;return}function rk(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=a+104|0;f=k[c>>2]|0;if((f|0)!=0?(k[a+108>>2]|0)>=(f|0):0)g=4;else{b=cl(a)|0;if((b|0)>=0){e=k[c>>2]|0;c=a+8|0;if(e){d=k[c>>2]|0;f=k[a+4>>2]|0;c=d;e=e-(k[a+108>>2]|0)+-1|0;if((c-f|0)>(e|0))k[a+100>>2]=f+e;else g=9}else{d=k[c>>2]|0;c=d;g=9}if((g|0)==9)k[a+100>>2]=c;c=k[a+4>>2]|0;if(d){a=a+108|0;k[a>>2]=d+1-c+(k[a>>2]|0)}c=c+-1|0;if((l[c>>0]|0|0)!=(b|0))i[c>>0]=b}else g=4}if((g|0)==4){k[a+100>>2]=0;b=-1}return b|0}function sk(a){a=a|0;var b=0;if(a>>>0>4294963200){b=mk()|0;k[b>>2]=0-a;a=-1}return a|0}function tk(a){a=a|0;return 0}function uk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return d|0}function vk(a,b){a=a|0;b=b|0;return-1|0}function wk(a){a=a|0;Ql(a);return}function xk(a,b){a=a|0;b=b|0;return(a+-48|0)>>>0<10|0}function yk(a,b){a=a|0;b=b|0;return lk(a)|0}function zk(a,b,c){a=a|0;b=b|0;c=c|0;if(((i[b>>0]|0)!=0?(vl(b,58885)|0)!=0:0)?(vl(b,54145)|0)!=0:0)c=0;else if(!c)c=Rl(1,4)|0;return c|0}function Ak(a){a=a|0;var b=0,c=0;b=(kb()|0)+176|0;c=k[b>>2]|0;if(a)k[b>>2]=a;return c|0}function Bk(a,b){a=+a;b=+b;var c=0,d=0;p[t>>3]=a;d=k[t>>2]|0;c=k[t+4>>2]|0;p[t>>3]=b;c=k[t+4>>2]&-2147483648|c&2147483647;k[t>>2]=d;k[t+4>>2]=c;return+ +p[t>>3]}function Ck(a,b){a=+a;b=+b;return+ +Bk(a,b)}function Dk(a,b){a=+a;b=+b;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;p[t>>3]=a;c=k[t>>2]|0;j=k[t+4>>2]|0;p[t>>3]=b;l=k[t>>2]|0;m=k[t+4>>2]|0;d=uw(c|0,j|0,52)|0;d=d&2047;h=uw(l|0,m|0,52)|0;h=h&2047;n=j&-2147483648;g=ww(l|0,m|0,1)|0;i=M;a:do{if(!((g|0)==0&(i|0)==0)?(f=m&2147483647,!(f>>>0>2146435072|(f|0)==2146435072&l>>>0>0|(d|0)==2047)):0){e=ww(c|0,j|0,1)|0;f=M;if(!(f>>>0>i>>>0|(f|0)==(i|0)&e>>>0>g>>>0))return+((e|0)==(g|0)&(f|0)==(i|0)?a*0:a);if(!d){d=ww(c|0,j|0,12)|0;e=M;if((e|0)>-1|(e|0)==-1&d>>>0>4294967295){f=d;d=0;do{d=d+-1|0;f=ww(f|0,e|0,1)|0;e=M}while((e|0)>-1|(e|0)==-1&f>>>0>4294967295)}else d=0;c=ww(c|0,j|0,1-d|0)|0;e=M}else e=j&1048575|1048576;if(!h){f=ww(l|0,m|0,12)|0;g=M;if((g|0)>-1|(g|0)==-1&f>>>0>4294967295){h=0;do{h=h+-1|0;f=ww(f|0,g|0,1)|0;g=M}while((g|0)>-1|(g|0)==-1&f>>>0>4294967295)}else h=0;l=ww(l|0,m|0,1-h|0)|0;j=M}else j=m&1048575|1048576;i=rw(c|0,e|0,l|0,j|0)|0;g=M;f=(g|0)>-1|(g|0)==-1&i>>>0>4294967295;b:do{if((d|0)>(h|0)){while(1){if(f)if((c|0)==(l|0)&(e|0)==(j|0))break;else{c=i;e=g}c=ww(c|0,e|0,1)|0;e=M;d=d+-1|0;i=rw(c|0,e|0,l|0,j|0)|0;g=M;f=(g|0)>-1|(g|0)==-1&i>>>0>4294967295;if((d|0)<=(h|0))break b}b=a*0;break a}}while(0);if(f)if((c|0)==(l|0)&(e|0)==(j|0)){b=a*0;break}else{e=g;c=i}if(e>>>0<1048576|(e|0)==1048576&c>>>0<0)do{c=ww(c|0,e|0,1)|0;e=M;d=d+-1|0}while(e>>>0<1048576|(e|0)==1048576&c>>>0<0);if((d|0)>0){m=tw(c|0,e|0,0,-1048576)|0;c=M;d=ww(d|0,0,52)|0;c=c|M;d=m|d}else{d=uw(c|0,e|0,1-d|0)|0;c=M}k[t>>2]=d;k[t+4>>2]=c|n;b=+p[t>>3]}else o=3}while(0);if((o|0)==3){b=a*b;b=b/b}return+b}function Ek(a,b){a=+a;b=+b;return+ +Dk(a,b)}function Fk(a,b){a=+a;b=b|0;var c=0,d=0,e=0;p[t>>3]=a;c=k[t>>2]|0;d=k[t+4>>2]|0;e=uw(c|0,d|0,52)|0;e=e&2047;switch(e|0){case 0:{if(a!=0){a=+Fk(a*0x10000000000000000,b);c=(k[b>>2]|0)+-64|0}else c=0;k[b>>2]=c;break}case 2047:break;default:{k[b>>2]=e+-1022;k[t>>2]=c;k[t+4>>2]=d&-2146435073|1071644672;a=+p[t>>3]}}return+a}function Gk(a,b){a=+a;b=b|0;return+ +Fk(a,b)}function Hk(a,b){a=+a;b=b|0;var c=0;if((b|0)>1023){a=a*8.98846567431158e307;c=b+-1023|0;if((c|0)>1023){c=b+-2046|0;c=(c|0)>1023?1023:c;a=a*8.98846567431158e307}}else if((b|0)<-1022){a=a*2.2250738585072014e-308;c=b+1022|0;if((c|0)<-1022){c=b+2044|0;c=(c|0)<-1022?-1022:c;a=a*2.2250738585072014e-308}}else c=b;c=ww(c+1023|0,0,52)|0;b=M;k[t>>2]=c;k[t+4>>2]=b;return+(a*+p[t>>3])}function Ik(a,b){a=+a;b=b|0;return+ +Hk(a,b)}function Jk(a,b,c){a=a|0;b=b|0;c=c|0;return Kk(0,a,b,(c|0)!=0?c:37344)|0}function Kk(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,j=0,l=0;j=r;r=r+16|0;e=j;g=(d|0)==0?37348:d;d=k[g>>2]|0;a:do{if(!b)if(!d)d=0;else h=15;else{f=(a|0)==0?e:a;if(!c)d=-2;else{if(!d){d=i[b>>0]|0;e=d&255;if(d<<24>>24>-1){k[f>>2]=e;d=d<<24>>24!=0&1;break}d=e+-194|0;if(d>>>0>50){h=15;break}d=k[37076+(d<<2)>>2]|0;e=c+-1|0;if(e){b=b+1|0;h=9}}else{e=c;h=9}b:do{if((h|0)==9){a=i[b>>0]|0;l=(a&255)>>>3;if((l+-16|l+(d>>26))>>>0>7){h=15;break a}while(1){b=b+1|0;d=(a&255)+-128|d<<6;e=e+-1|0;if((d|0)>=0)break;if(!e)break b;a=i[b>>0]|0;if((a&-64)<<24>>24!=-128){h=15;break a}}k[g>>2]=0;k[f>>2]=d;d=c-e|0;break a}}while(0);k[g>>2]=d;d=-2}}}while(0);if((h|0)==15){k[g>>2]=0;d=mk()|0;k[d>>2]=84;d=-1}r=j;return d|0}function Lk(a){a=a|0;if(!a)a=1;else a=(k[a>>2]|0)==0;return a&1|0}function Mk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;n=r;r=r+1040|0;j=n+8|0;m=n;i=k[b>>2]|0;k[m>>2]=i;l=(a|0)!=0;d=l?d:256;a=l?a:j;f=i;a:do{if((d|0)!=0&(i|0)!=0){h=d;i=f;d=0;while(1){f=c>>>2;g=f>>>0>=h>>>0;if(!(c>>>0>131|g)){f=i;break a}f=g?h:f;c=c-f|0;f=Nk(a,m,f,e)|0;if((f|0)==-1){d=c;break}o=(a|0)==(j|0);i=o?0:f;g=h-i|0;a=o?a:a+(f<<2)|0;d=f+d|0;f=k[m>>2]|0;if((h|0)!=(i|0)&(f|0)!=0){h=g;i=f}else{h=g;break a}}c=d;h=0;f=k[m>>2]|0;d=-1}else{h=d;d=0}}while(0);b:do{if((f|0)!=0?(h|0)!=0&(c|0)!=0:0){g=f;f=a;while(1){a=Kk(f,g,c,e)|0;if((a+2|0)>>>0<3)break;g=(k[m>>2]|0)+a|0;k[m>>2]=g;h=h+-1|0;d=d+1|0;if(!((h|0)!=0&(c|0)!=(a|0)))break b;else{c=c-a|0;f=f+4|0}}switch(a|0){case-1:{d=-1;break b}case 0:{k[m>>2]=0;break b}default:{k[e>>2]=0;break b}}}}while(0);if(l)k[b>>2]=k[m>>2];r=n;return d|0}function Nk(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,j=0,m=0;e=k[b>>2]|0;if((d|0)!=0?(f=k[d>>2]|0,(f|0)!=0):0)if(!a){d=c;g=e;m=16}else{k[d>>2]=0;j=a;d=c;h=f;m=37}else if(!a){d=c;m=7}else{f=a;d=c;m=6}a:while(1)if((m|0)==6){if(!d){m=26;break}else a=f;while(1){f=i[e>>0]|0;do{if(((f&255)+-1|0)>>>0<127?d>>>0>4&(e&3|0)==0:0){g=e;while(1){e=k[g>>2]|0;if((e+-16843009|e)&-2139062144){f=e;e=g;m=32;break}k[a>>2]=e&255;k[a+4>>2]=l[g+1>>0];k[a+8>>2]=l[g+2>>0];e=g+4|0;f=a+16|0;k[a+12>>2]=l[g+3>>0];d=d+-4|0;if(d>>>0>4){a=f;g=e}else{m=31;break}}if((m|0)==31){a=f;f=i[e>>0]|0;break}else if((m|0)==32){f=f&255;break}}}while(0);f=f&255;if((f+-1|0)>>>0>=127)break;e=e+1|0;k[a>>2]=f;d=d+-1|0;if(!d){m=26;break a}else a=a+4|0}f=f+-194|0;if(f>>>0>50){m=48;break}j=a;h=k[37076+(f<<2)>>2]|0;e=e+1|0;m=37;continue}else if((m|0)==7){f=i[e>>0]|0;if(((f&255)+-1|0)>>>0<127?(e&3|0)==0:0){f=k[e>>2]|0;if(!((f+-16843009|f)&-2139062144))do{e=e+4|0;d=d+-4|0;f=k[e>>2]|0}while(((f+-16843009|f)&-2139062144|0)==0);f=f&255}f=f&255;if((f+-1|0)>>>0<127){d=d+-1|0;e=e+1|0;m=7;continue}f=f+-194|0;if(f>>>0>50){m=48;break}f=k[37076+(f<<2)>>2]|0;g=e+1|0;m=16;continue}else if((m|0)==16){m=(l[g>>0]|0)>>>3;if((m+-16|m+(f>>26))>>>0>7){m=17;break}e=g+1|0;if(f&33554432){if((i[e>>0]&-64)<<24>>24!=-128){m=20;break}e=g+2|0;if(f&524288){if((i[e>>0]&-64)<<24>>24!=-128){m=23;break}e=g+3|0}}d=d+-1|0;m=7;continue}else if((m|0)==37){f=l[e>>0]|0;m=f>>>3;if((m+-16|m+(h>>26))>>>0>7){m=38;break}g=e+1|0;a=f+-128|h<<6;if((a|0)<0){f=l[g>>0]|0;if((f&192|0)!=128){m=41;break}g=e+2|0;a=f+-128|a<<6;if((a|0)<0){f=l[g>>0]|0;if((f&192|0)!=128){m=44;break}a=f+-128|a<<6;e=e+3|0}else e=g}else e=g;k[j>>2]=a;f=j+4|0;d=d+-1|0;m=6;continue}if((m|0)==17){e=g+-1|0;m=47}else if((m|0)==20){e=g+-1|0;m=47}else if((m|0)==23){e=g+-1|0;m=47}else if((m|0)==26)k[b>>2]=e;else if((m|0)==38){a=j;f=h;e=e+-1|0;m=47}else if((m|0)==41){d=j;c=e+-1|0;m=52}else if((m|0)==44){d=j;c=e+-1|0;m=52}if((m|0)==47)if(!f)m=48;else{d=a;c=e;m=52}if((m|0)==48)if(!(i[e>>0]|0)){if(a){k[a>>2]=0;k[b>>2]=0}c=c-d|0}else{d=a;c=e;m=52}if((m|0)==52){m=mk()|0;k[m>>2]=84;if(!d)c=-1;else{k[b>>2]=c;c=-1}}return c|0}function Ok(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+16|0;d=g;a:do{if(!b)d=0;else{do{if(c){f=(a|0)==0?d:a;d=i[b>>0]|0;a=d&255;if(d<<24>>24>-1){k[f>>2]=a;d=d<<24>>24!=0&1;break a}d=a+-194|0;if(d>>>0<=50){a=b+1|0;e=k[37076+(d<<2)>>2]|0;if(c>>>0<4?(e&-2147483648>>>((c*6|0)+-6|0)|0)!=0:0)break;d=l[a>>0]|0;c=d>>>3;if((c+-16|c+(e>>26))>>>0<=7){d=d+-128|e<<6;if((d|0)>=0){k[f>>2]=d;d=2;break a}a=l[b+2>>0]|0;if((a&192|0)==128){a=a+-128|d<<6;if((a|0)>=0){k[f>>2]=a;d=3;break a}d=l[b+3>>0]|0;if((d&192|0)==128){k[f>>2]=d+-128|a<<6;d=4;break a}}}}}}while(0);d=mk()|0;k[d>>2]=84;d=-1}}while(0);r=g;return d|0}function Pk(a,b,c){a=a|0;b=b|0;c=c|0;do{if(a){if(b>>>0<128){i[a>>0]=b;a=1;break}if(b>>>0<2048){i[a>>0]=b>>>6|192;i[a+1>>0]=b&63|128;a=2;break}if(b>>>0<55296|(b&-8192|0)==57344){i[a>>0]=b>>>12|224;i[a+1>>0]=b>>>6&63|128;i[a+2>>0]=b&63|128;a=3;break}if((b+-65536|0)>>>0<1048576){i[a>>0]=b>>>18|240;i[a+1>>0]=b>>>12&63|128;i[a+2>>0]=b>>>6&63|128;i[a+3>>0]=b&63|128;a=4;break}else{a=mk()|0;k[a>>2]=84;a=-1;break}}else a=1}while(0);return a|0}function Qk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;l=r;r=r+272|0;h=l+8|0;j=l;g=k[b>>2]|0;k[j>>2]=g;i=(a|0)!=0;e=i?d:256;d=i?a:h;a=g;a:do{if((e|0)!=0&(g|0)!=0){g=e;f=a;e=0;while(1){a=c>>>0>=g>>>0;if(!(a|c>>>0>32)){a=f;break a}a=a?g:c;c=c-a|0;a=Rk(d,j,a,0)|0;if((a|0)==-1){e=c;break}n=(d|0)==(h|0);m=n?0:a;f=g-m|0;d=n?d:d+a|0;e=a+e|0;a=k[j>>2]|0;if((g|0)!=(m|0)&(a|0)!=0){g=f;f=a}else{g=f;break a}}c=e;g=0;a=k[j>>2]|0;e=-1}else{g=e;e=0}}while(0);b:do{if((a|0)!=0?(g|0)!=0&(c|0)!=0:0){f=a;a=d;while(1){d=Pk(a,k[f>>2]|0,0)|0;if((d+1|0)>>>0<2)break;f=(k[j>>2]|0)+4|0;k[j>>2]=f;c=c+-1|0;e=e+1|0;if(!((g|0)!=(d|0)&(c|0)!=0))break b;else{g=g-d|0;a=a+d|0}}if(!d)k[j>>2]=0;else e=-1}}while(0);if(i)k[b>>2]=k[j>>2];r=l;return e|0}function Rk(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;h=r;r=r+16|0;g=h;a:do{if(!a){a=k[b>>2]|0;d=k[a>>2]|0;if(!d)c=0;else{c=0;do{if(d>>>0>127){d=Pk(g,d,0)|0;if((d|0)==-1){c=-1;break a}}else d=1;c=d+c|0;a=a+4|0;d=k[a>>2]|0}while((d|0)!=0)}}else{b:do{if(c>>>0>3){d=c;e=k[b>>2]|0;while(1){f=k[e>>2]|0;if((f+-1|0)>>>0>126){if(!f)break;f=Pk(a,f,0)|0;if((f|0)==-1){c=-1;break a}a=a+f|0;d=d-f|0}else{i[a>>0]=f;a=a+1|0;d=d+-1|0;e=k[b>>2]|0}e=e+4|0;k[b>>2]=e;if(d>>>0<=3)break b}i[a>>0]=0;k[b>>2]=0;c=c-d|0;break a}else d=c}while(0);if(d){e=k[b>>2]|0;while(1){f=k[e>>2]|0;if((f+-1|0)>>>0>126){if(!f){e=19;break}f=Pk(g,f,0)|0;if((f|0)==-1){c=-1;break a}if(d>>>0>>0){e=22;break}Pk(a,k[e>>2]|0,0)|0;a=a+f|0;d=d-f|0}else{i[a>>0]=f;a=a+1|0;d=d+-1|0;e=k[b>>2]|0}e=e+4|0;k[b>>2]=e;if(!d)break a}if((e|0)==19){i[a>>0]=0;k[b>>2]=0;c=c-d|0;break}else if((e|0)==22){c=c-d|0;break}}}}while(0);r=h;return c|0}function Sk(a,b){a=a|0;b=b|0;if(!a)a=0;else a=Pk(a,b,0)|0;return a|0}function Tk(a){a=a|0;return 0}function Uk(a){a=a|0;return}function Vk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;j=r;r=r+16|0;h=j;g=b&255;i[h>>0]=g;d=a+16|0;e=k[d>>2]|0;if(!e)if(!(bl(a)|0)){e=k[d>>2]|0;f=4}else c=-1;else f=4;do{if((f|0)==4){d=a+20|0;f=k[d>>2]|0;if(f>>>0>>0?(c=b&255,(c|0)!=(i[a+75>>0]|0)):0){k[d>>2]=f+1;i[f>>0]=g;break}if((Qb[k[a+36>>2]&63](a,h,1)|0)==1)c=l[h>>0]|0;else c=-1}}while(0);r=j;return c|0}function Wk(a){a=a|0;var b=0,c=0;b=r;r=r+16|0;c=b;k[c>>2]=k[a+60>>2];a=sk(wb(6,c|0)|0)|0;r=b;return a|0}function Xk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;l=r;r=r+48|0;f=l+16|0;e=l;d=l+32|0;k[d>>2]=b;g=d+4|0;j=a+48|0;m=k[j>>2]|0;k[g>>2]=c-((m|0)!=0&1);h=a+44|0;k[d+8>>2]=k[h>>2];k[d+12>>2]=m;if(!(k[9258]|0)){k[f>>2]=k[a+60>>2];k[f+4>>2]=d;k[f+8>>2]=2;d=sk(Eb(145,f|0)|0)|0}else{xb(185,a|0);k[e>>2]=k[a+60>>2];k[e+4>>2]=d;k[e+8>>2]=2;d=sk(Eb(145,e|0)|0)|0;pb(0)}if((d|0)>=1){g=k[g>>2]|0;if(d>>>0>g>>>0){f=k[h>>2]|0;e=a+4|0;k[e>>2]=f;k[a+8>>2]=f+(d-g);if(!(k[j>>2]|0))d=c;else{k[e>>2]=f+1;i[b+(c+-1)>>0]=i[f>>0]|0;d=c}}}else{k[a>>2]=k[a>>2]|d&48^16;k[a+8>>2]=0;k[a+4>>2]=0}r=l;return d|0}function Yk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+32|0;f=e;d=e+20|0;k[f>>2]=k[a+60>>2];k[f+4>>2]=0;k[f+8>>2]=b;k[f+12>>2]=d;k[f+16>>2]=c;if((sk(Db(140,f|0)|0)|0)<0){k[d>>2]=-1;a=-1}else a=k[d>>2]|0;r=e;return a|0}function Zk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;p=r;r=r+48|0;m=p+16|0;l=p;d=p+32|0;n=a+28|0;e=k[n>>2]|0;k[d>>2]=e;o=a+20|0;e=(k[o>>2]|0)-e|0;k[d+4>>2]=e;k[d+8>>2]=b;k[d+12>>2]=c;i=a+60|0;j=a+44|0;b=2;e=e+c|0;while(1){if(!(k[9258]|0)){k[m>>2]=k[i>>2];k[m+4>>2]=d;k[m+8>>2]=b;g=sk(Fb(146,m|0)|0)|0}else{xb(186,a|0);k[l>>2]=k[i>>2];k[l+4>>2]=d;k[l+8>>2]=b;g=sk(Fb(146,l|0)|0)|0;pb(0)}if((e|0)==(g|0)){e=6;break}if((g|0)<0){e=8;break}e=e-g|0;f=k[d+4>>2]|0;if(g>>>0<=f>>>0)if((b|0)==2){k[n>>2]=(k[n>>2]|0)+g;h=f;b=2}else h=f;else{h=k[j>>2]|0;k[n>>2]=h;k[o>>2]=h;h=k[d+12>>2]|0;g=g-f|0;d=d+8|0;b=b+-1|0}k[d>>2]=(k[d>>2]|0)+g;k[d+4>>2]=h-g}if((e|0)==6){m=k[j>>2]|0;k[a+16>>2]=m+(k[a+48>>2]|0);a=m;k[n>>2]=a;k[o>>2]=a}else if((e|0)==8){k[a+16>>2]=0;k[n>>2]=0;k[o>>2]=0;k[a>>2]=k[a>>2]|32;if((b|0)==2)c=0;else c=c-(k[d+4>>2]|0)|0}r=p;return c|0}function _k(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+80|0;d=e;k[a+36>>2]=8;if((k[a>>2]&64|0)==0?(k[d>>2]=k[a+60>>2],k[d+4>>2]=21505,k[d+8>>2]=e+12,(nb(54,d|0)|0)!=0):0)i[a+75>>0]=-1;d=Zk(a,b,c)|0;r=e;return d|0}function $k(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=a+84|0;f=k[d>>2]|0;g=c+256|0;e=tl(f,0,g)|0;e=(e|0)==0?g:e-f|0;c=e>>>0>>0?e:c;vw(b|0,f|0,c|0)|0;k[a+4>>2]=f+c;b=f+e|0;k[a+8>>2]=b;k[d>>2]=b;return c|0}function al(a){a=a|0;var b=0,c=0;b=a+74|0;c=i[b>>0]|0;i[b>>0]=c+255|c;b=a+20|0;c=a+44|0;if((k[b>>2]|0)>>>0>(k[c>>2]|0)>>>0)Qb[k[a+36>>2]&63](a,0,0)|0;k[a+16>>2]=0;k[a+28>>2]=0;k[b>>2]=0;b=k[a>>2]|0;if(b&20)if(!(b&4))b=-1;else{k[a>>2]=b|32;b=-1}else{b=k[c>>2]|0;k[a+8>>2]=b;k[a+4>>2]=b;b=0}return b|0}function bl(a){a=a|0;var b=0,c=0;b=a+74|0;c=i[b>>0]|0;i[b>>0]=c+255|c;b=k[a>>2]|0;if(!(b&8)){k[a+8>>2]=0;k[a+4>>2]=0;b=k[a+44>>2]|0;k[a+28>>2]=b;k[a+20>>2]=b;k[a+16>>2]=b+(k[a+48>>2]|0);b=0}else{k[a>>2]=b|32;b=-1}return b|0}function cl(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;if((k[a+8>>2]|0)==0?(al(a)|0)!=0:0)b=-1;else if((Qb[k[a+32>>2]&63](a,b,1)|0)==1)b=l[b>>0]|0;else b=-1;r=c;return b|0}function dl(a){a=a|0;var b=0,c=0;do{if(a){if((k[a+76>>2]|0)<=-1){b=Gl(a)|0;break}c=(Tk(a)|0)==0;b=Gl(a)|0;if(!c)Uk(a)}else{if(!(k[9323]|0))b=0;else b=dl(k[9323]|0)|0;Na(37060);a=k[9264]|0;if(a)do{if((k[a+76>>2]|0)>-1)c=Tk(a)|0;else c=0;if((k[a+20>>2]|0)>>>0>(k[a+28>>2]|0)>>>0)b=Gl(a)|0|b;if(c)Uk(a);a=k[a+56>>2]|0}while((a|0)!=0);ob(37060)}}while(0);return b|0}function el(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;if((k[b+76>>2]|0)>=0?(Tk(b)|0)!=0:0){if((i[b+75>>0]|0)!=(a|0)?(d=b+20|0,e=k[d>>2]|0,e>>>0<(k[b+16>>2]|0)>>>0):0){k[d>>2]=e+1;i[e>>0]=a;c=a&255}else c=Vk(b,a)|0;Uk(b)}else g=3;do{if((g|0)==3){if((i[b+75>>0]|0)!=(a|0)?(f=b+20|0,c=k[f>>2]|0,c>>>0<(k[b+16>>2]|0)>>>0):0){k[f>>2]=c+1;i[c>>0]=a;c=a&255;break}c=Vk(b,a)|0}}while(0);return c|0}function fl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=c+16|0;e=k[d>>2]|0;if(!e)if(!(bl(c)|0)){e=k[d>>2]|0;f=4}else d=0;else f=4;a:do{if((f|0)==4){g=c+20|0;f=k[g>>2]|0;if((e-f|0)>>>0>>0){d=Qb[k[c+36>>2]&63](c,a,b)|0;break}b:do{if((i[c+75>>0]|0)>-1){d=b;while(1){if(!d){e=f;d=0;break b}e=d+-1|0;if((i[a+e>>0]|0)==10)break;else d=e}if((Qb[k[c+36>>2]&63](c,a,d)|0)>>>0>>0)break a;b=b-d|0;a=a+d|0;e=k[g>>2]|0}else{e=f;d=0}}while(0);vw(e|0,a|0,b|0)|0;k[g>>2]=(k[g>>2]|0)+b;d=d+b|0}}while(0);return d|0}function gl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=ia(c,b)|0;if((k[d+76>>2]|0)>-1){f=(Tk(d)|0)==0;a=fl(a,e,d)|0;if(!f)Uk(d)}else a=fl(a,e,d)|0;if((a|0)!=(e|0))c=(a>>>0)/(b>>>0)|0;return c|0}function hl(a){a=a|0;var b=0,c=0,d=0;if((k[a+76>>2]|0)>=0?(Tk(a)|0)!=0:0){b=a+4|0;c=k[b>>2]|0;if(c>>>0<(k[a+8>>2]|0)>>>0){k[b>>2]=c+1;b=l[c>>0]|0}else b=cl(a)|0}else d=3;do{if((d|0)==3){b=a+4|0;c=k[b>>2]|0;if(c>>>0<(k[a+8>>2]|0)>>>0){k[b>>2]=c+1;b=l[c>>0]|0;break}else{b=cl(a)|0;break}}}while(0);return b|0}function il(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;d=ol(a,b,c,f)|0;r=e;return d|0}function jl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=r;r=r+16|0;e=d;k[e>>2]=c;c=pl(a,b,e)|0;r=d;return c|0}function kl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;do{if((a|0)!=-1){if((k[b+76>>2]|0)>-1)e=Tk(b)|0;else e=0;if(!((k[b+8>>2]|0)==0?(al(b)|0)!=0:0))f=6;if((f|0)==6?(c=b+4|0,d=k[c>>2]|0,d>>>0>((k[b+44>>2]|0)+-8|0)>>>0):0){f=d+-1|0;k[c>>2]=f;i[f>>0]=a;k[b>>2]=k[b>>2]&-17;if(!e)break;Uk(b);break}if(e){Uk(b);a=-1}else a=-1}else a=-1}while(0);return a|0}function ll(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;d=h;e=Pl(240)|0;do{if(e){k[d>>2]=k[c>>2];d=ol(e,240,b,d)|0;if(d>>>0<240){b=Sl(e,d+1|0)|0;k[a>>2]=(b|0)!=0?b:e;break}Ql(e);if((d|0)>=0?(g=d+1|0,f=Pl(g)|0,k[a>>2]=f,(f|0)!=0):0)d=ol(f,g,b,c)|0;else d=-1}else d=-1}while(0);r=h;return d|0}function ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+224|0;n=s+80|0;q=s+96|0;p=s;o=s+136|0;d=q;e=d+40|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));k[n>>2]=k[c>>2];if((Hl(0,b,n,p,q)|0)<0)c=-1;else{if((k[a+76>>2]|0)>-1)l=Tk(a)|0;else l=0;c=k[a>>2]|0;m=c&32;if((i[a+74>>0]|0)<1)k[a>>2]=c&-33;c=a+48|0;if(!(k[c>>2]|0)){e=a+44|0;f=k[e>>2]|0;k[e>>2]=o;g=a+28|0;k[g>>2]=o;h=a+20|0;k[h>>2]=o;k[c>>2]=80;j=a+16|0;k[j>>2]=o+80;d=Hl(a,b,n,p,q)|0;if(f){Qb[k[a+36>>2]&63](a,0,0)|0;d=(k[h>>2]|0)==0?-1:d;k[e>>2]=f;k[c>>2]=0;k[j>>2]=0;k[g>>2]=0;k[h>>2]=0}}else d=Hl(a,b,n,p,q)|0;c=k[a>>2]|0;k[a>>2]=c|m;if(l)Uk(a);c=(c&32|0)==0?d:-1}r=s;return c|0}function nl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,m=0,n=0,q=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,N=0,O=0,P=0,Q=0;P=r;r=r+304|0;G=P+16|0;I=P+8|0;H=P+33|0;J=P;y=P+32|0;if((k[a+76>>2]|0)>-1)O=Tk(a)|0;else O=0;d=i[b>>0]|0;a:do{if(d<<24>>24){K=a+4|0;L=a+100|0;F=a+108|0;z=a+8|0;A=H+10|0;B=H+33|0;C=I+4|0;D=H+46|0;E=H+94|0;f=d;d=0;g=b;s=0;e=0;b=0;b:while(1){c:do{if(!(kk(f&255)|0)){f=(i[g>>0]|0)==37;d:do{if(f){n=g+1|0;h=i[n>>0]|0;e:do{switch(h<<24>>24){case 37:break d;case 42:{x=0;h=g+2|0;break}default:{h=(h&255)+-48|0;if(h>>>0<10?(i[g+2>>0]|0)==36:0){k[G>>2]=k[c>>2];while(1){x=(k[G>>2]|0)+(4-1)&~(4-1);f=k[x>>2]|0;k[G>>2]=x+4;if(h>>>0>1)h=h+-1|0;else break}x=f;h=g+3|0;break e}h=(k[c>>2]|0)+(4-1)&~(4-1);x=k[h>>2]|0;k[c>>2]=h+4;h=n}}}while(0);f=i[h>>0]|0;g=f&255;if((g+-48|0)>>>0<10){f=0;while(1){n=(f*10|0)+-48+g|0;h=h+1|0;f=i[h>>0]|0;g=f&255;if((g+-48|0)>>>0>=10)break;else f=n}}else n=0;if(f<<24>>24==109){h=h+1|0;q=i[h>>0]|0;f=(x|0)!=0&1;e=0 -;b=0}else{q=f;f=0}g=h+1|0;switch(q&255|0){case 104:{w=(i[g>>0]|0)==104;g=w?h+2|0:g;h=w?-2:-1;break}case 108:{w=(i[g>>0]|0)==108;g=w?h+2|0:g;h=w?3:1;break}case 106:{h=3;break}case 116:case 122:{h=1;break}case 76:{h=2;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:{g=h;h=0;break}default:{N=152;break b}}q=l[g>>0]|0;t=(q&47|0)==3;q=t?q|32:q;t=t?1:h;switch(q|0){case 99:{w=s;v=(n|0)<1?1:n;break}case 91:{w=s;v=n;break}case 110:{if(!x){h=s;break c}switch(t|0){case-2:{i[x>>0]=s;h=s;break c}case-1:{j[x>>1]=s;h=s;break c}case 0:{k[x>>2]=s;h=s;break c}case 1:{k[x>>2]=s;h=s;break c}case 3:{h=x;k[h>>2]=s;k[h+4>>2]=((s|0)<0)<<31>>31;h=s;break c}default:{h=s;break c}}}default:{qk(a,0);do{h=k[K>>2]|0;if(h>>>0<(k[L>>2]|0)>>>0){k[K>>2]=h+1;h=l[h>>0]|0}else h=rk(a)|0}while((kk(h)|0)!=0);h=k[K>>2]|0;if(k[L>>2]|0){h=h+-1|0;k[K>>2]=h}w=(k[F>>2]|0)+s+h-(k[z>>2]|0)|0;v=n}}qk(a,v);h=k[K>>2]|0;n=k[L>>2]|0;if(h>>>0>>0)k[K>>2]=h+1;else{if((rk(a)|0)<0){N=152;break b}n=k[L>>2]|0}if(n)k[K>>2]=(k[K>>2]|0)+-1;f:do{switch(q|0){case 91:case 99:case 115:{u=(q|0)==99;g:do{if((q&239|0)==99){sw(H|0,-1,257)|0;i[H>>0]=0;if((q|0)==115){i[B>>0]=0;i[A>>0]=0;i[A+1>>0]=0;i[A+2>>0]=0;i[A+3>>0]=0;i[A+4>>0]=0}}else{Q=g+1|0;s=(i[Q>>0]|0)==94;h=s&1;q=s?Q:g;g=s?g+2|0:Q;sw(H|0,s&1|0,257)|0;i[H>>0]=0;switch(i[g>>0]|0){case 45:{s=(h^1)&255;i[D>>0]=s;g=q+2|0;break}case 93:{s=(h^1)&255;i[E>>0]=s;g=q+2|0;break}default:s=(h^1)&255}while(1){h=i[g>>0]|0;h:do{switch(h<<24>>24){case 0:{N=152;break b}case 93:break g;case 45:{q=g+1|0;h=i[q>>0]|0;switch(h<<24>>24){case 93:case 0:{h=45;break h}default:{}}g=i[g+-1>>0]|0;if((g&255)<(h&255)){g=g&255;do{g=g+1|0;i[H+g>>0]=s;h=i[q>>0]|0}while((g|0)<(h&255|0));g=q}else g=q;break}default:{}}}while(0);i[H+((h&255)+1)>>0]=s;g=g+1|0}}}while(0);q=u?v+1|0:31;s=(t|0)==1;t=(f|0)!=0;i:do{if(s){if(t){b=Pl(q<<2)|0;if(!b){e=0;N=152;break b}}else b=x;k[I>>2]=0;k[C>>2]=0;e=0;j:while(1){n=(b|0)==0;do{k:while(1){h=k[K>>2]|0;if(h>>>0<(k[L>>2]|0)>>>0){k[K>>2]=h+1;h=l[h>>0]|0}else h=rk(a)|0;if(!(i[H+(h+1)>>0]|0))break j;i[y>>0]=h;switch(Kk(J,y,1,I)|0){case-1:{e=0;N=152;break b}case-2:break;default:break k}}if(!n){k[b+(e<<2)>>2]=k[J>>2];e=e+1|0}}while(!(t&(e|0)==(q|0)));e=q<<1|1;h=Sl(b,e<<2)|0;if(!h){e=0;N=152;break b}Q=q;q=e;b=h;e=Q}if(!(Lk(I)|0)){e=0;N=152;break b}else{n=e;e=0}}else{if(t){e=Pl(q)|0;if(!e){e=0;b=0;N=152;break b}else h=0;while(1){do{b=k[K>>2]|0;if(b>>>0<(k[L>>2]|0)>>>0){k[K>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if(!(i[H+(b+1)>>0]|0)){n=h;b=0;break i}i[e+h>>0]=b;h=h+1|0}while((h|0)!=(q|0));b=q<<1|1;h=Sl(e,b)|0;if(!h){b=0;N=152;break b}else{Q=q;q=b;e=h;h=Q}}}if(!x){e=n;while(1){b=k[K>>2]|0;if(b>>>0>>0){k[K>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if(!(i[H+(b+1)>>0]|0)){n=0;e=0;b=0;break i}e=k[L>>2]|0}}else{e=0;while(1){b=k[K>>2]|0;if(b>>>0>>0){k[K>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if(!(i[H+(b+1)>>0]|0)){n=e;e=x;b=0;break i}i[x+e>>0]=b;n=k[L>>2]|0;e=e+1|0}}}}while(0);h=k[K>>2]|0;if(k[L>>2]|0){h=h+-1|0;k[K>>2]=h}h=h-(k[z>>2]|0)+(k[F>>2]|0)|0;if(!h)break b;if(!((h|0)==(v|0)|u^1))break b;do{if(t)if(s){k[x>>2]=b;break}else{k[x>>2]=e;break}}while(0);if(!u){if(b)k[b+(n<<2)>>2]=0;if(!e){e=0;break f}i[e+n>>0]=0}break}case 120:case 88:case 112:{h=16;N=134;break}case 111:{h=8;N=134;break}case 117:case 100:{h=10;N=134;break}case 105:{h=0;N=134;break}case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:{m=+ok(a,t,0);if((k[F>>2]|0)==((k[z>>2]|0)-(k[K>>2]|0)|0))break b;if(x)switch(t|0){case 0:{o[x>>2]=m;break f}case 1:{p[x>>3]=m;break f}case 2:{p[x>>3]=m;break f}default:break f}break}default:{}}}while(0);l:do{if((N|0)==134){N=0;h=pk(a,h,0,-1,-1)|0;if((k[F>>2]|0)==((k[z>>2]|0)-(k[K>>2]|0)|0))break b;if((x|0)!=0&(q|0)==112){k[x>>2]=h;break}if(x)switch(t|0){case-2:{i[x>>0]=h;break l}case-1:{j[x>>1]=h;break l}case 0:{k[x>>2]=h;break l}case 1:{k[x>>2]=h;break l}case 3:{Q=x;k[Q>>2]=h;k[Q+4>>2]=M;break l}default:break l}}}while(0);d=((x|0)!=0&1)+d|0;h=(k[F>>2]|0)+w+(k[K>>2]|0)-(k[z>>2]|0)|0;break c}}while(0);g=g+(f&1)|0;qk(a,0);f=k[K>>2]|0;if(f>>>0<(k[L>>2]|0)>>>0){k[K>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;if((f|0)!=(l[g>>0]|0)){N=21;break b}h=s+1|0}else{while(1){f=g+1|0;if(!(kk(l[f>>0]|0)|0))break;else g=f}qk(a,0);do{f=k[K>>2]|0;if(f>>>0<(k[L>>2]|0)>>>0){k[K>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0}while((kk(f)|0)!=0);f=k[K>>2]|0;if(k[L>>2]|0){f=f+-1|0;k[K>>2]=f}h=(k[F>>2]|0)+s+f-(k[z>>2]|0)|0}}while(0);g=g+1|0;f=i[g>>0]|0;if(!(f<<24>>24))break a;else s=h}if((N|0)==21){if(k[L>>2]|0)k[K>>2]=(k[K>>2]|0)+-1;if((d|0)!=0|(f|0)>-1)break;else{d=0;N=153}}else if((N|0)==152)if(!d){d=f;N=153}if((N|0)==153){f=d;d=-1}if(f){Ql(e);Ql(b)}}else d=0}while(0);if(O)Uk(a);r=P;return d|0}function ol(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,j=0,l=0,m=0;m=r;r=r+128|0;e=m+112|0;l=m;f=l;g=37352;h=f+112|0;do{k[f>>2]=k[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));if((b+-1|0)>>>0>2147483646)if(!b){b=1;j=4}else{b=mk()|0;k[b>>2]=75;b=-1}else{e=a;j=4}if((j|0)==4){j=-2-e|0;j=b>>>0>j>>>0?j:b;k[l+48>>2]=j;a=l+20|0;k[a>>2]=e;k[l+44>>2]=e;b=e+j|0;e=l+16|0;k[e>>2]=b;k[l+28>>2]=b;b=ml(l,c,d)|0;if(j){c=k[a>>2]|0;i[c+(((c|0)==(k[e>>2]|0))<<31>>31)>>0]=0}}r=m;return b|0}function pl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=r;r=r+112|0;d=f;e=d;g=e+112|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[d+32>>2]=29;k[d+44>>2]=a;k[d+76>>2]=-1;k[d+84>>2]=a;g=nl(d,b,c)|0;r=f;return g|0}function ql(a,b,c){a=a|0;b=b|0;c=c|0;return+ +Jl(a,b,2)}function rl(a,b,c){a=a|0;b=b|0;c=c|0;a=Kl(a,b,c,-1,-1)|0;return a|0}function sl(a,b,c){a=a|0;b=b|0;c=c|0;a=Kl(a,b,c,0,-2147483648)|0;return a|0}function tl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b&255;d=(c|0)!=0;a:do{if(d&(a&3|0)!=0){e=b&255;while(1){if((i[a>>0]|0)==e<<24>>24){g=6;break a}a=a+1|0;c=c+-1|0;d=(c|0)!=0;if(!(d&(a&3|0)!=0)){g=5;break}}}else g=5}while(0);if((g|0)==5)if(d)g=6;else c=0;b:do{if((g|0)==6){e=b&255;if((i[a>>0]|0)!=e<<24>>24){d=ia(f,16843009)|0;c:do{if(c>>>0>3)while(1){f=k[a>>2]^d;if((f&-2139062144^-2139062144)&f+-16843009)break;a=a+4|0;c=c+-4|0;if(c>>>0<=3){g=11;break c}}else g=11}while(0);if((g|0)==11)if(!c){c=0;break}while(1){if((i[a>>0]|0)==e<<24>>24)break b;a=a+1|0;c=c+-1|0;if(!c){c=0;break}}}}}while(0);return((c|0)!=0?a:0)|0}function ul(a,b){a=a|0;b=b|0;var c=0,d=0;c=b;a:do{if(!((c^a)&3)){if(c&3)do{c=i[b>>0]|0;i[a>>0]=c;if(!(c<<24>>24))break a;b=b+1|0;a=a+1|0}while((b&3|0)!=0);c=k[b>>2]|0;if(!((c&-2139062144^-2139062144)&c+-16843009)){d=a;while(1){b=b+4|0;a=d+4|0;k[d>>2]=c;c=k[b>>2]|0;if((c&-2139062144^-2139062144)&c+-16843009)break;else d=a}}d=8}else d=8}while(0);if((d|0)==8){d=i[b>>0]|0;i[a>>0]=d;if(d<<24>>24)do{b=b+1|0;a=a+1|0;d=i[b>>0]|0;i[a>>0]=d}while(d<<24>>24!=0)}return a|0}function vl(a,b){a=a|0;b=b|0;var c=0,d=0;d=i[a>>0]|0;c=i[b>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=c<<24>>24)b=d;else{do{a=a+1|0;b=b+1|0;d=i[a>>0]|0;c=i[b>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=c<<24>>24));b=d}return(b&255)-(c&255)|0}function wl(a,b){a=a|0;b=b|0;ul(a,b)|0;return a|0}function xl(a){a=a|0;var b=0,c=0,d=0;d=a;a:do{if(!(d&3))c=4;else{b=a;a=d;while(1){if(!(i[b>>0]|0))break a;b=b+1|0;a=b;if(!(a&3)){a=b;c=4;break}}}}while(0);if((c|0)==4){while(1){b=k[a>>2]|0;if(!((b&-2139062144^-2139062144)&b+-16843009))a=a+4|0;else break}if((b&255)<<24>>24)do{a=a+1|0}while((i[a>>0]|0)!=0)}return a-d|0}function yl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(!c)b=0;else{d=i[a>>0]|0;a:do{if(!(d<<24>>24))d=0;else while(1){c=c+-1|0;e=i[b>>0]|0;if(!(d<<24>>24==e<<24>>24&((c|0)!=0&e<<24>>24!=0)))break a;a=a+1|0;b=b+1|0;d=i[a>>0]|0;if(!(d<<24>>24)){d=0;break}}}while(0);b=(d&255)-(l[b>>0]|0)|0}return b|0}function zl(a){a=a|0;var b=0;b=a;while(1)if(!(k[b>>2]|0))break;else b=b+4|0;return b-a>>2|0}function Al(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(c){d=a;while(1){c=c+-1|0;k[d>>2]=k[b>>2];if(!c)break;else{b=b+4|0;d=d+4|0}}}return a|0}function Bl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=(c|0)==0;if(a-b>>2>>>0>>0){if(!d)do{c=c+-1|0;k[a+(c<<2)>>2]=k[b+(c<<2)>>2]}while((c|0)!=0)}else if(!d){d=b;b=a;while(1){c=c+-1|0;k[b>>2]=k[d>>2];if(!c)break;else{d=d+4|0;b=b+4|0}}}return a|0}function Cl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(c){d=a;while(1){c=c+-1|0;k[d>>2]=b;if(!c)break;else d=d+4|0}}return a|0}function Dl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;g=a+4|0;c=k[g>>2]|0;h=a+100|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0;switch(c|0){case 43:case 45:{d=(c|0)==45&1;c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0;if((b|0)!=0&(c+-48|0)>>>0>9?(k[h>>2]|0)!=0:0){k[g>>2]=(k[g>>2]|0)+-1;f=d}else f=d;break}default:f=0}if((c+-48|0)>>>0>9)if(!(k[h>>2]|0)){d=-2147483648;c=0}else{k[g>>2]=(k[g>>2]|0)+-1;d=-2147483648;c=0}else{d=0;do{d=c+-48+(d*10|0)|0;c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0}while((c+-48|0)>>>0<10&(d|0)<214748364);b=((d|0)<0)<<31>>31;if((c+-48|0)>>>0<10){do{b=Dw(d|0,b|0,10,0)|0;d=M;c=tw(c|0,((c|0)<0)<<31>>31|0,-48,-1)|0;d=tw(c|0,M|0,b|0,d|0)|0;b=M;c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0}while((c+-48|0)>>>0<10&((b|0)<21474836|(b|0)==21474836&d>>>0<2061584302));e=d}else e=d;if((c+-48|0)>>>0<10)do{c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0}while((c+-48|0)>>>0<10);if(k[h>>2]|0)k[g>>2]=(k[g>>2]|0)+-1;a=(f|0)!=0;c=rw(0,0,e|0,b|0)|0;d=a?M:b;c=a?c:e}M=d;return c|0}function El(a){a=a|0;if(!(k[a+68>>2]|0))Uk(a);return}function Fl(a){a=a|0;if(!(k[a+68>>2]|0))Uk(a);return}function Gl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=a+20|0;f=a+28|0;if((k[b>>2]|0)>>>0>(k[f>>2]|0)>>>0?(Qb[k[a+36>>2]&63](a,0,0)|0,(k[b>>2]|0)==0):0)b=-1;else{g=a+4|0;c=k[g>>2]|0;d=a+8|0;e=k[d>>2]|0;if(c>>>0>>0)Qb[k[a+40>>2]&63](a,c-e|0,1)|0;k[a+16>>2]=0;k[f>>2]=0;k[b>>2]=0;k[d>>2]=0;k[g>>2]=0;b=0}return b|0}var Ib=[cx,_q,cr,Yr,as,fs,hs,Hu,Su,cx,cx,cx,cx,cx,cx,cx];var Jb=[dx,si,gi,Wh,Kh,yh,mh,ah,Lg,Wj,Vj,Sj,dx,dx,dx,dx];var Kb=[ex,ls,rs,ex];var Lb=[fx,oi,pi,ci,di,Sh,Th,Gh,Hh,uh,vh,ih,jh,Yg,Zg,Hg,Ig,ug,vg,ig,jg,Yf,Zf,Mf,Nf,Af,Bf,Ie,Je,ve,we,Dc,Ec,Zd,be,_d,mo,oo,no,po,ud,vd,_i,wd,nd,od,Sc,Tc,_c,$c,fd,gd,xd,yd,Ed,Fd,Ld,Md,Sd,Td,te,ue,Re,Se,Ye,Ze,df,ef,lf,mf,Wg,Xg,Nm,Ai,Ki,Li,$i,aj,pj,qj,wj,xj,Bj,Cj,Ej,Hj,Fj,Gj,Ij,Jj,Mn,bm,hm,xn,mm,sm,Lm,Mm,yn,Nn,$n,bo,ao,co,go,io,ho,jo,uo,wo,vo,xo,Eo,Fo,pn,Go,Ho,Io,Ko,Us,Oo,Po,To,Uo,gp,hp,Ap,Bp,Pp,Qp,aq,bq,zq,Aq,Xq,Zq,ar,br,er,fr,pr,qr,Ar,Br,Lr,Mr,Wr,Xr,ds,es,js,ks,ps,qs,vs,ws,As,Bs,Is,Js,kt,lt,Gu,Dt,du,eu,fu,gu,Jo,Ts,Ws,ut,Lt,Tt,$t,au,bj,Si,jj,Cc,zn,fo,ie,Og,ek,El,Fl,Wl,wk,Zr,$r,Vs,Qv,Xv,Yv,Zv,_v,$v,aw,Sm,en,Ql,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx];var Mb=[gx,ri,fi,Vh,Jh,xh,lh,$g,Kg,wg,kg,_f,Of,Cf,Ke,xe,Fc,An,Mi,Pi,cm,gm,nm,rm,Pn,ir,jr,kr,lr,nr,or,tr,ur,vr,wr,yr,zr,Er,Fr,Gr,Hr,Jr,Kr,Pr,Qr,Rr,Sr,Ur,Vr,zs,Es,lu,nu,pu,mu,ou,qu,uc,cj,Qi,Ri,Ti,un,Mc,Oc,qo,on,_m,he,Be,tf,Gf,Sf,cg,og,Ag,Ng,ch,oh,Ah,Mh,Yh,ii,ui,Ii,hj,Cm,Am,sn,yo,Bm,Ym,jn,hn,kv,lv,mv,nv,ov,pv,Ct,qv,rv,sv,tv,uv,vv,wv,xv,yv,zv,Av,Bv,Cv,Dv,Ev,Fv,Gv,Hv,Iv,Jv,Kv,Lv,Mv,Ov,gw,gx,gx];var Nb=[hx,Vo,Wo,Xo,Yo,Zo,_o,$o,ap,bp,cp,dp,ip,jp,kp,lp,mp,np,op,pp,qp,rp,sp,Hp,Jp,Up,Wp,dq,eq,fq,hq,jq,Cq,Dq,Eq,Gq,Iq,os,us,md,cv,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx];var Ob=[ix,En,Fn,rd,In,Bi,rj,yj,Dj,Wk,dm,Un,Wn,Xn,Tn,im,jm,om,Hn,tm,um,Ao,cq,su,uu,wu,Cu,Eu,yu,Au,Bq,tu,vu,xu,Du,Fu,zu,Bu,gr,hr,mr,rr,sr,xr,Cr,Dr,Ir,Nr,Or,Tr,Ht,It,Kt,hu,ju,iu,ku,yt,zt,Bt,Pt,Qt,St,Xt,Yt,_t,Ei,lj,tn,Vi,eo,ko,jx,kx,lx,Ak,zl,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix];var Pb=[mx,_r,gs,mx];var Qb=[nx,Bn,Gn,Kn,Em,Fm,Kj,Ll,Zk,Yk,Xk,_k,Qn,Vn,em,Zn,pm,No,So,xs,Cs,nt,pt,st,Xs,ct,ft,it,Nc,Il,$m,zk,hv,jv,Pk,Ok,Jk,ll,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx];var Rb=[ox,ns,ts,ox];var Sb=[px,pd,Zj,Yj,Xj,Rn,Cn,ys,Ds,px,px,px,px,px,px,px];var Tb=[qx,Gp,Mp,Tp,Yp,qx,qx,qx];var Ub=[rx,bs,is,ms,ss,rx,rx,rx];var Vb=[sx,qi,ei,Uh,Ih,wh,kh,_g,Jg,yg,mg,ag,Qf,Ef,Me,ze,Hc,sd,td,Yn,fm,km,_n,Jn,qm,vm,Ln,mt,ot,qt,at,dt,gt,dj,yc,Ac,so,Ss,to,yk,xk,Um,fn,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx];var Wb=[tx,Lo,Qo,Cp,Dp,Ip,Op,Rp,Sp,Vp,_p,tt,Gt,Jt,jt,xt,At,Ot,Rt,Wt,Zt,Qk,Mk,tx,tx,tx,tx,tx,tx,tx,tx,tx];var Xb=[ux,jw,iw,hw];var Yb=[vx,vc,kj,fp,Ls,Ms,Ns,hk,jk,ik,vx,vx,vx,vx,vx,vx];var Zb=[wx,xg,lg,$f,Pf,Df,Le,ye,Gc,rt,Zs,_s,$s,ht,Di,Ji,Ru,bv,Nk,uk,Kk,pw,ow,nw,mw,lw,kw,wx,wx,wx,wx,wx];var _b=[xx,Dm,Ci,Bo,ej,Qm,yx,Km,Wm,Ui,Hm,Do,fv,gv,iv,cn];var $b=[zx,Ax,bk,Bx,ck,Cx,ak,zx];var ac=[Dx,lq,Kq,Et,Ft,vt,wt,Mt,Nt,Ut,Vt,Dx,Dx,Dx,Dx,Dx];var bc=[Ex,Kp,Np,Xp,Zp,Ex,Ex,Ex];var cc=[Fx,ce,de,$d,ae,qd,Uc,Vc,ad,bd,hd,id,zd,Ad,Gd,Hd,Nd,Od,Ud,Vd,Te,Ue,_e,$e,ff,gf,nf,of,Mj,Nj,Pj,Sn,Dn,Mo,Ro,nc,Jm,Ic,Jc,Kc,Lc,Pc,Qc,Rc,Ne,Oe,Pe,Qe,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx];return{_jpegls_encode:gj,___cxa_can_catch:_j,_free:Ql,_jpegls_decode:fj,___cxa_is_pointer_type:$j,_i64Add:tw,_memmove:xw,_i64Subtract:rw,_memset:sw,_malloc:Pl,_memcpy:vw,_bitshift64Lshr:uw,_bitshift64Shl:ww,__GLOBAL__I_000101:Xl,__GLOBAL__sub_I_jpegls_cpp:Bc,__GLOBAL__sub_I_iostream_cpp:Yl,runPostSets:qw,_emscripten_replace_memory:Hb,stackAlloc:dc,stackSave:ec,stackRestore:fc,establishStackSpace:gc,setThrew:hc,setTempRet0:kc,getTempRet0:lc,dynCall_iiiiiiii:Hw,dynCall_viiiii:Iw,dynCall_iiiiiid:Jw,dynCall_vi:Kw,dynCall_vii:Lw,dynCall_iiiiiii:Mw,dynCall_ii:Nw,dynCall_iiiiiiiiiiii:Ow,dynCall_iiii:Pw,dynCall_viiiiiiiiiiiiiii:Qw,dynCall_viiiiii:Rw,dynCall_viiiiiii:Sw,dynCall_viiiiiiiiii:Tw,dynCall_iii:Uw,dynCall_iiiiii:Vw,dynCall_diii:Ww,dynCall_i:Xw,dynCall_iiiii:Yw,dynCall_viii:Zw,dynCall_v:_w,dynCall_iiiiiiiii:$w,dynCall_iiiiid:ax,dynCall_viiii:bx}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _jpegls_encode=Module["_jpegls_encode"]=asm["_jpegls_encode"];var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var _free=Module["_free"]=asm["_free"];var _jpegls_decode=Module["_jpegls_decode"]=asm["_jpegls_decode"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _memmove=Module["_memmove"]=asm["_memmove"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _memset=Module["_memset"]=asm["_memset"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var __GLOBAL__sub_I_iostream_cpp=Module["__GLOBAL__sub_I_iostream_cpp"]=asm["__GLOBAL__sub_I_iostream_cpp"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var __GLOBAL__sub_I_jpegls_cpp=Module["__GLOBAL__sub_I_jpegls_cpp"]=asm["__GLOBAL__sub_I_jpegls_cpp"];var __GLOBAL__I_000101=Module["__GLOBAL__I_000101"]=asm["__GLOBAL__I_000101"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=asm["dynCall_iiiiiiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_iiiiiid=Module["dynCall_iiiiiid"]=asm["dynCall_iiiiiid"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iiiiiiiiiiii=Module["dynCall_iiiiiiiiiiii"]=asm["dynCall_iiiiiiiiiiii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiiiiiiiiiiiii=Module["dynCall_viiiiiiiiiiiiiii"]=asm["dynCall_viiiiiiiiiiiiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];var dynCall_viiiiiiiiii=Module["dynCall_viiiiiiiiii"]=asm["dynCall_viiiiiiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_diii=Module["dynCall_diii"]=asm["dynCall_diii"];var dynCall_i=Module["dynCall_i"]=asm["dynCall_i"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=asm["dynCall_iiiiiiiii"];var dynCall_iiiiid=Module["dynCall_iiiiid"]=asm["dynCall_iiiiid"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.establishStackSpace=asm["establishStackSpace"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){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;i0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["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;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach(function(decorator){output=decorator(output,what)})}throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run();return Module};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=CharLS}}).call(this)}).call(this,require("_process"),"/lib")},{_process:33,fs:5,path:32}],2:[function(require,module,exports){var ColorSpace={Unkown:0,Grayscale:1,AdobeRGB:2,RGB:3,CYMK:4};var JpegImage=function jpegImage(){"use strict";var dctZigZag=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);var dctCos1=4017;var dctSin1=799;var dctCos3=3406;var dctSin3=2276;var dctCos6=1567;var dctSin6=3784;var dctSqrt2=5793;var dctSqrt1d2=2896;function constructor(){}function buildHuffmanTable(codeLengths,values){var k=0,code=[],i,j,length=16;while(length>0&&!codeLengths[length-1])length--;code.push({children:[],index:0});var p=code[0],q;for(i=0;i0){p=code.pop()}p.index++;code.push(p);while(code.length<=i){code.push(q={children:[],index:0});p.children[p.index]=q.children;p=q}k++}if(i+10){bitsCount--;return bitsData>>bitsCount&1}bitsData=data[offset++];if(bitsData==255){var nextByte=data[offset++];if(nextByte){throw"unexpected marker: "+(bitsData<<8|nextByte).toString(16)}}bitsCount=7;return bitsData>>>7}function decodeHuffman(tree){var node=tree;var bit;while((bit=readBit())!==null){node=node[bit];if(typeof node==="number")return node;if(typeof node!=="object")throw"invalid huffman sequence"}return null}function receive(length){var n=0;while(length>0){var bit=readBit();if(bit===null)return;n=n<<1|bit;length--}return n}function receiveAndExtend(length){var n=receive(length);if(n>=1<>4;if(s===0){if(r<15)break;k+=16;continue}k+=r;var z=dctZigZag[k];component.blockData[offset+z]=receiveAndExtend(s);k++}}function decodeDCFirst(component,offset){var t=decodeHuffman(component.huffmanTableDC);var diff=t===0?0:receiveAndExtend(t)<0){eobrun--;return}var k=spectralStart,e=spectralEnd;while(k<=e){var rs=decodeHuffman(component.huffmanTableAC);var s=rs&15,r=rs>>4;if(s===0){if(r<15){eobrun=receive(r)+(1<>4;if(s===0){if(r<15){eobrun=receive(r)+(1<=65488&&marker<=65495){offset+=2}else{break}}return offset-startOffset}function quantizeAndInverse(component,blockBufferOffset,p){var qt=component.quantizationTable;var v0,v1,v2,v3,v4,v5,v6,v7,t;var i;for(i=0;i<64;i++){p[i]=component.blockData[blockBufferOffset+i]*qt[i]}for(i=0;i<8;++i){var row=8*i;if(p[1+row]===0&&p[2+row]===0&&p[3+row]===0&&p[4+row]===0&&p[5+row]===0&&p[6+row]===0&&p[7+row]===0){t=dctSqrt2*p[0+row]+512>>10;p[0+row]=t;p[1+row]=t;p[2+row]=t;p[3+row]=t;p[4+row]=t;p[5+row]=t;p[6+row]=t;p[7+row]=t;continue}v0=dctSqrt2*p[0+row]+128>>8;v1=dctSqrt2*p[4+row]+128>>8;v2=p[2+row];v3=p[6+row];v4=dctSqrt1d2*(p[1+row]-p[7+row])+128>>8;v7=dctSqrt1d2*(p[1+row]+p[7+row])+128>>8;v5=p[3+row]<<4;v6=p[5+row]<<4;t=v0-v1+1>>1;v0=v0+v1+1>>1;v1=t;t=v2*dctSin6+v3*dctCos6+128>>8;v2=v2*dctCos6-v3*dctSin6+128>>8;v3=t;t=v4-v6+1>>1;v4=v4+v6+1>>1;v6=t;t=v7+v5+1>>1;v5=v7-v5+1>>1;v7=t;t=v0-v3+1>>1;v0=v0+v3+1>>1;v3=t;t=v1-v2+1>>1;v1=v1+v2+1>>1;v2=t;t=v4*dctSin3+v7*dctCos3+2048>>12;v4=v4*dctCos3-v7*dctSin3+2048>>12;v7=t;t=v5*dctSin1+v6*dctCos1+2048>>12;v5=v5*dctCos1-v6*dctSin1+2048>>12;v6=t;p[0+row]=v0+v7;p[7+row]=v0-v7;p[1+row]=v1+v6;p[6+row]=v1-v6;p[2+row]=v2+v5;p[5+row]=v2-v5;p[3+row]=v3+v4;p[4+row]=v3-v4}for(i=0;i<8;++i){var col=i;if(p[1*8+col]===0&&p[2*8+col]===0&&p[3*8+col]===0&&p[4*8+col]===0&&p[5*8+col]===0&&p[6*8+col]===0&&p[7*8+col]===0){t=dctSqrt2*p[i+0]+8192>>14;p[0*8+col]=t;p[1*8+col]=t;p[2*8+col]=t;p[3*8+col]=t;p[4*8+col]=t;p[5*8+col]=t;p[6*8+col]=t;p[7*8+col]=t;continue}v0=dctSqrt2*p[0*8+col]+2048>>12;v1=dctSqrt2*p[4*8+col]+2048>>12;v2=p[2*8+col];v3=p[6*8+col];v4=dctSqrt1d2*(p[1*8+col]-p[7*8+col])+2048>>12;v7=dctSqrt1d2*(p[1*8+col]+p[7*8+col])+2048>>12;v5=p[3*8+col];v6=p[5*8+col];t=v0-v1+1>>1;v0=v0+v1+1>>1;v1=t;t=v2*dctSin6+v3*dctCos6+2048>>12;v2=v2*dctCos6-v3*dctSin6+2048>>12;v3=t;t=v4-v6+1>>1;v4=v4+v6+1>>1;v6=t;t=v7+v5+1>>1;v5=v7-v5+1>>1;v7=t;t=v0-v3+1>>1;v0=v0+v3+1>>1;v3=t;t=v1-v2+1>>1;v1=v1+v2+1>>1;v2=t;t=v4*dctSin3+v7*dctCos3+2048>>12;v4=v4*dctCos3-v7*dctSin3+2048>>12;v7=t;t=v5*dctSin1+v6*dctCos1+2048>>12;v5=v5*dctCos1-v6*dctSin1+2048>>12;v6=t;p[0*8+col]=v0+v7;p[7*8+col]=v0-v7;p[1*8+col]=v1+v6;p[6*8+col]=v1-v6;p[2*8+col]=v2+v5;p[5*8+col]=v2-v5;p[3*8+col]=v3+v4;p[4*8+col]=v3-v4}for(i=0;i<64;++i){var index=blockBufferOffset+i;var q=p[i];q=q<=-2056/component.bitConversion?0:q>=2024/component.bitConversion?255/component.bitConversion:q+2056/component.bitConversion>>4;component.blockData[index]=q}}function buildComponentData(frame,component){var lines=[];var blocksPerLine=component.blocksPerLine;var blocksPerColumn=component.blocksPerColumn;var samplesPerLine=blocksPerLine<<3;var computationBuffer=new Int32Array(64);var i,j,ll=0;for(var blockRow=0;blockRow=255?255:a|0}constructor.prototype={load:function load(path){var handleData=function(data){this.parse(data);if(this.onload)this.onload()}.bind(this);if(path.indexOf("data:")>-1){var offset=path.indexOf("base64,")+7;var data=atob(path.substring(offset));var arr=new Uint8Array(data.length);for(var i=data.length-1;i>=0;i--){arr[i]=data.charCodeAt(i)}handleData(data)}else{var xhr=new XMLHttpRequest;xhr.open("GET",path,true);xhr.responseType="arraybuffer";xhr.onload=function(){var data=new Uint8Array(xhr.response);handleData(data)}.bind(this);xhr.send(null)}},parse:function parse(data){function readUint16(){var value=data[offset]<<8|data[offset+1];offset+=2;return value}function readDataBlock(){var length=readUint16();var array=data.subarray(offset,offset+length-2);offset+=array.length;return array}function prepareComponents(frame){var mcusPerLine=Math.ceil(frame.samplesPerLine/8/frame.maxH);var mcusPerColumn=Math.ceil(frame.scanLines/8/frame.maxV);for(var i=0;i>4===0){for(j=0;j<64;j++){var z=dctZigZag[j];tableData[z]=data[offset++]}}else if(quantizationTableSpec>>4===1){for(j=0;j<64;j++){var zz=dctZigZag[j];tableData[zz]=readUint16()}}else throw"DQT: invalid table spec" -;quantizationTables[quantizationTableSpec&15]=tableData}break;case 65472:case 65473:case 65474:if(frame){throw"Only single frame JPEGs supported"}readUint16();frame={};frame.extended=fileMarker===65473;frame.progressive=fileMarker===65474;frame.precision=data[offset++];frame.scanLines=readUint16();frame.samplesPerLine=readUint16();frame.components=[];frame.componentIds={};var componentsCount=data[offset++],componentId;var maxH=0,maxV=0;for(i=0;i>4;var v=data[offset+1]&15;if(maxH>4===0?huffmanTablesDC:huffmanTablesAC)[huffmanTableSpec&15]=buildHuffmanTable(codeLengths,huffmanValues)}break;case 65501:readUint16();resetInterval=readUint16();break;case 65498:var scanLength=readUint16();var selectorsCount=data[offset++];var components=[],component;for(i=0;i>4];component.huffmanTableAC=huffmanTablesAC[tableSpec&15];components.push(component)}var spectralStart=data[offset++];var spectralEnd=data[offset++];var successiveApproximation=data[offset++];var processed=decodeScan(data,offset,frame,components,resetInterval,spectralStart,spectralEnd,successiveApproximation>>4,successiveApproximation&15);offset+=processed;break;default:if(data[offset-3]==255&&data[offset-2]>=192&&data[offset-2]<=254){offset-=3;break}throw"unknown JPEG marker "+fileMarker.toString(16)}fileMarker=readUint16()}this.width=frame.samplesPerLine;this.height=frame.scanLines;this.jfif=jfif;this.adobe=adobe;this.components=[];switch(frame.components.length){case 1:this.colorspace=ColorSpace.Grayscale;break;case 3:if(this.adobe)this.colorspace=ColorSpace.AdobeRGB;else this.colorspace=ColorSpace.RGB;break;case 4:this.colorspace=ColorSpace.CYMK;break;default:this.colorspace=ColorSpace.Unknown}for(var i=0;i>24&255,tbox>>16&255,tbox>>8&255,tbox&255);warn("Unsupported header type "+tbox+" ("+headerType+")");break}if(jumpDataLength){position+=dataLength}}},parseImageProperties:function JpxImage_parseImageProperties(stream){var newByte=stream.getByte();while(newByte>=0){var oldByte=newByte;newByte=stream.getByte();var code=oldByte<<8|newByte;if(code===65361){stream.skip(4);var Xsiz=stream.getInt32()>>>0;var Ysiz=stream.getInt32()>>>0;var XOsiz=stream.getInt32()>>>0;var YOsiz=stream.getInt32()>>>0;stream.skip(16);var Csiz=stream.getUint16();this.width=Xsiz-XOsiz;this.height=Ysiz-YOsiz;this.componentsCount=Csiz;this.bitsPerComponent=8;return}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function JpxImage_parseCodestream(data,start,end){var context={};try{var doNotRecover=false;var position=start;while(position+1>5;spqcds=[];while(j>3;spqcd.mu=0}else{spqcd.epsilon=data[j]>>3;spqcd.mu=(data[j]&7)<<8|data[j+1];j+=2}spqcds.push(spqcd)}qcd.SPqcds=spqcds;if(context.mainHeader){context.QCD=qcd}else{context.currentTile.QCD=qcd;context.currentTile.QCC=[]}break;case 65373:length=readUint16(data,position);var qcc={};j=position+2;var cqcc;if(context.SIZ.Csiz<257){cqcc=data[j++]}else{cqcc=readUint16(data,j);j+=2}sqcd=data[j++];switch(sqcd&31){case 0:spqcdSize=8;scalarExpounded=true;break;case 1:spqcdSize=16;scalarExpounded=false;break;case 2:spqcdSize=16;scalarExpounded=true;break;default:throw new Error("JPX Error: Invalid SQcd value "+sqcd)}qcc.noQuantization=spqcdSize===8;qcc.scalarExpounded=scalarExpounded;qcc.guardBits=sqcd>>5;spqcds=[];while(j>3;spqcd.mu=0}else{spqcd.epsilon=data[j]>>3;spqcd.mu=(data[j]&7)<<8|data[j+1];j+=2}spqcds.push(spqcd)}qcc.SPqcds=spqcds;if(context.mainHeader){context.QCC[cqcc]=qcc}else{context.currentTile.QCC[cqcc]=qcc}break;case 65362:length=readUint16(data,position);var cod={};j=position+2;var scod=data[j++];cod.entropyCoderWithCustomPrecincts=!!(scod&1);cod.sopMarkerUsed=!!(scod&2);cod.ephMarkerUsed=!!(scod&4);cod.progressionOrder=data[j++];cod.layersCount=readUint16(data,j);j+=2;cod.multipleComponentTransform=data[j++];cod.decompositionLevelsCount=data[j++];cod.xcb=(data[j++]&15)+2;cod.ycb=(data[j++]&15)+2;var blockStyle=data[j++];cod.selectiveArithmeticCodingBypass=!!(blockStyle&1);cod.resetContextProbabilities=!!(blockStyle&2);cod.terminationOnEachCodingPass=!!(blockStyle&4);cod.verticalyStripe=!!(blockStyle&8);cod.predictableTermination=!!(blockStyle&16);cod.segmentationSymbolUsed=!!(blockStyle&32);cod.reversibleTransformation=data[j++];if(cod.entropyCoderWithCustomPrecincts){var precinctsSizes=[];while(j>4})}cod.precinctsSizes=precinctsSizes}var unsupported=[];if(cod.selectiveArithmeticCodingBypass){unsupported.push("selectiveArithmeticCodingBypass")}if(cod.resetContextProbabilities){unsupported.push("resetContextProbabilities")}if(cod.terminationOnEachCodingPass){unsupported.push("terminationOnEachCodingPass")}if(cod.verticalyStripe){unsupported.push("verticalyStripe")}if(cod.predictableTermination){unsupported.push("predictableTermination")}if(unsupported.length>0){doNotRecover=true;throw new Error("JPX Error: Unsupported COD options ("+unsupported.join(", ")+")")}if(context.mainHeader){context.COD=cod}else{context.currentTile.COD=cod;context.currentTile.COC=[]}break;case 65424:length=readUint16(data,position);tile={};tile.index=readUint16(data,position+2);tile.length=readUint32(data,position+4);tile.dataEnd=tile.length+position-2;tile.partIndex=data[position+8];tile.partsCount=data[position+9];context.mainHeader=false;if(tile.partIndex===0){tile.COD=context.COD;tile.COC=context.COC.slice(0);tile.QCD=context.QCD;tile.QCC=context.QCC.slice(0)}context.currentTile=tile;break;case 65427:tile=context.currentTile;if(tile.partIndex===0){initializeTile(context,tile.index);buildPackets(context)}length=tile.dataEnd-position;parseTilePackets(context,data,position,length);break;case 65365:case 65367:case 65368:case 65380:length=readUint16(data,position);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is "+"not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+code.toString(16))}position+=length}}catch(e){if(doNotRecover||this.failOnCorruptedImage){throw e}else{warn("Trying to recover from "+e.message)}}this.tiles=transformComponents(context);this.width=context.SIZ.Xsiz-context.SIZ.XOsiz;this.height=context.SIZ.Ysiz-context.SIZ.YOsiz;this.componentsCount=context.SIZ.Csiz}};function calculateComponentDimensions(component,siz){component.x0=Math.ceil(siz.XOsiz/component.XRsiz);component.x1=Math.ceil(siz.Xsiz/component.XRsiz);component.y0=Math.ceil(siz.YOsiz/component.YRsiz);component.y1=Math.ceil(siz.Ysiz/component.YRsiz);component.width=component.x1-component.x0;component.height=component.y1-component.y0}function calculateTileGrids(context,components){var siz=context.SIZ;var tile,tiles=[];var numXtiles=Math.ceil((siz.Xsiz-siz.XTOsiz)/siz.XTsiz);var numYtiles=Math.ceil((siz.Ysiz-siz.YTOsiz)/siz.YTsiz);for(var q=0;q0?Math.min(codOrCoc.xcb,result.PPx-1):Math.min(codOrCoc.xcb,result.PPx);result.ycb_=r>0?Math.min(codOrCoc.ycb,result.PPy-1):Math.min(codOrCoc.ycb,result.PPy);return result}function buildPrecincts(context,resolution,dimensions){var precinctWidth=1<resolution.trx0?Math.ceil(resolution.trx1/precinctWidth)-Math.floor(resolution.trx0/precinctWidth):0;var numprecinctshigh=resolution.try1>resolution.try0?Math.ceil(resolution.try1/precinctHeight)-Math.floor(resolution.try0/precinctHeight):0;var numprecincts=numprecinctswide*numprecinctshigh;resolution.precinctParameters={precinctWidth:precinctWidth,precinctHeight:precinctHeight,numprecinctswide:numprecinctswide,numprecinctshigh:numprecinctshigh,numprecincts:numprecincts,precinctWidthInSubband:precinctWidthInSubband,precinctHeightInSubband:precinctHeightInSubband}}function buildCodeblocks(context,subband,dimensions){var xcb_=dimensions.xcb_;var ycb_=dimensions.ycb_;var codeblockWidth=1<>xcb_;var cby0=subband.tby0>>ycb_;var cbx1=subband.tbx1+codeblockWidth-1>>xcb_;var cby1=subband.tby1+codeblockHeight-1>>ycb_;var precinctParameters=subband.resolution.precinctParameters;var codeblocks=[];var precincts=[];var i,j,codeblock,precinctNumber;for(j=cby0;jprecinct.cbxMax){precinct.cbxMax=i}if(jprecinct.cbyMax){precinct.cbyMax=j}}else{precincts[precinctNumber]=precinct={cbxMin:i,cbyMin:j,cbxMax:i,cbyMax:j}}codeblock.precinct=precinct}}subband.codeblockParameters={codeblockWidth:xcb_,codeblockHeight:ycb_,numcodeblockwide:cbx1-cbx0+1,numcodeblockhigh:cby1-cby0+1};subband.codeblocks=codeblocks;subband.precincts=precincts}function createPacket(resolution,precinctNumber,layerNumber){var precinctCodeblocks=[];var subbands=resolution.subbands;for(var i=0,ii=subbands.length;icomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;for(;kcomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;for(;kcomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;if(p>=numprecincts){continue}for(;l=0;--r){var resolution=component.resolutions[r];var widthCurrentResolution=scale*resolution.precinctParameters.precinctWidth;var heightCurrentResolution=scale*resolution.precinctParameters.precinctHeight;minWidthCurrentComponent=Math.min(minWidthCurrentComponent,widthCurrentResolution);minHeightCurrentComponent=Math.min(minHeightCurrentComponent,heightCurrentResolution);maxNumWideCurrentComponent=Math.max(maxNumWideCurrentComponent,resolution.precinctParameters.numprecinctswide);maxNumHighCurrentComponent=Math.max(maxNumHighCurrentComponent,resolution.precinctParameters.numprecinctshigh);sizePerResolution[r]={width:widthCurrentResolution,height:heightCurrentResolution};scale<<=1}minWidth=Math.min(minWidth,minWidthCurrentComponent);minHeight=Math.min(minHeight,minHeightCurrentComponent);maxNumWide=Math.max(maxNumWide,maxNumWideCurrentComponent);maxNumHigh=Math.max(maxNumHigh,maxNumHighCurrentComponent);sizePerComponent[c]={resolutions:sizePerResolution,minWidth:minWidthCurrentComponent,minHeight:minHeightCurrentComponent,maxNumWide:maxNumWideCurrentComponent,maxNumHigh:maxNumHighCurrentComponent}}return{components:sizePerComponent,minWidth:minWidth,minHeight:minHeight,maxNumWide:maxNumWide,maxNumHigh:maxNumHigh}}function buildPackets(context){var siz=context.SIZ;var tileIndex=context.currentTile.index;var tile=context.tiles[tileIndex];var componentsCount=siz.Csiz;for(var c=0;c=data.length){throw new Error("Unexpected EOF")}var b=data[offset+position];position++;if(skipNextBit){buffer=buffer<<7|b;bufferSize+=7;skipNextBit=false}else{buffer=buffer<<8|b;bufferSize+=8}if(b===255){skipNextBit=true}}bufferSize-=count;return buffer>>>bufferSize&(1<=data.length){return}if(inclusionTree.isAboveThreshold()){break}if(inclusionTree.isKnown()){inclusionTree.nextLevel();continue}if(readBits(1)){inclusionTree.setKnown();if(inclusionTree.isLeaf()){codeblock.included=true;codeblockIncluded=firstTimeInclusion=true;break}else{inclusionTree.nextLevel()}}else{inclusionTree.incrementValue()}}}if(!codeblockIncluded){continue}if(firstTimeInclusion){zeroBitPlanesTree=precinct.zeroBitPlanesTree;zeroBitPlanesTree.reset(codeblockColumn,codeblockRow);while(true){if(position>=data.length){return}if(readBits(1)){valueReady=!zeroBitPlanesTree.nextLevel();if(valueReady){break}}else{zeroBitPlanesTree.incrementValue()}}codeblock.zeroBitPlanes=zeroBitPlanesTree.value}var codingpasses=readCodingpasses();while(readBits(1)){codeblock.Lblock++}var codingpassesLog2=log2(codingpasses);var bits=(codingpasses<1<0){var packetItem=queue.shift();codeblock=packetItem.codeblock;if(codeblock["data"]===undefined){codeblock.data=[]}codeblock.data.push({data:data,start:offset+position,end:offset+position+packetItem.dataLength,codingpasses:packetItem.codingpasses});position+=packetItem.dataLength}}catch(e){return}}return position}function copyCoefficients(coefficients,levelWidth,levelHeight,subband,delta,mb,reversible,segmentationSymbolUsed){var x0=subband.tbx0;var y0=subband.tby0;var width=subband.tbx1-subband.tbx0;var codeblocks=subband.codeblocks;var right=subband.type.charAt(0)==="H"?1:0;var bottom=subband.type.charAt(1)==="H"?levelWidth:0;for(var i=0,ii=codeblocks.length;i=mb){coefficients[pos]=n}else{coefficients[pos]=n*(1<0?1-i:0)}else{mu=spqcds[b].mu;epsilon=spqcds[b].epsilon;b++}var subband=resolution.subbands[j];var gainLog2=SubbandsGainLog2[subband.type];var delta=reversible?1:Math.pow(2,precision+gainLog2-epsilon)*(1+mu/2048);var mb=guardBits+epsilon-1;copyCoefficients(coefficients,width,height,subband,delta,mb,reversible,segmentationSymbolUsed)}subbandCoefficients.push({width:width,height:height,items:coefficients})}var result=transform.calculate(subbandCoefficients,component.tcx0,component.tcy0);return{left:component.tcx0,top:component.tcy0,width:result.width,height:result.height,items:result.items}}function transformComponents(context){var siz=context.SIZ;var components=context.components;var componentsCount=siz.Csiz;var resultImages=[];for(var i=0,ii=context.tiles.length;i=max?255:r>>shift;out[pos++]=g<=0?0:g>=max?255:g>>shift;out[pos++]=b<=0?0:b>=max?255:b>>shift}}else{for(j=0;j>2);r=g+y2;b=g+y1;out[pos++]=r<=0?0:r>=max?255:r>>shift;out[pos++]=g<=0?0:g>=max?255:g>>shift;out[pos++]=b<=0?0:b>=max?255:b>>shift}}if(fourComponents){for(j=0,pos=3;j=maxK?255:k+offset>>shift}}}else{for(c=0;c=max?255:val+offset>>shift;pos+=componentsCount}}else{var isSigned=components[c].isSigned;var items=transformedTiles[c].items;if(isSigned){for(pos=c,j=0,jj=items.length;j>=1;j>>=1;currentLevel++}currentLevel--;level=this.levels[currentLevel];level.items[level.index]=value;this.currentLevel=currentLevel;delete this.value},incrementValue:function TagTree_incrementValue(){var level=this.levels[this.currentLevel];level.items[level.index]++},nextLevel:function TagTree_nextLevel(){var currentLevel=this.currentLevel;var level=this.levels[currentLevel];var value=level.items[level.index];currentLevel--;if(currentLevel<0){this.value=value;return false}this.currentLevel=currentLevel;level=this.levels[currentLevel];level.items[level.index]=value;return true}};return TagTree}();var InclusionTree=function InclusionTreeClosure(){function InclusionTree(width,height){var levelsLength=log2(Math.max(width,height))+1;this.levels=[];for(var i=0;i>=1;j>>=1;currentLevel++}this.currentLevel=this.levels.length-1;this.minValue=this.levels[this.currentLevel].items[0];return},incrementValue:function InclusionTree_incrementValue(){var level=this.levels[this.currentLevel];level.items[level.index]=level.items[level.index]+1;if(level.items[level.index]>this.minValue){this.minValue=level.items[level.index]}},nextLevel:function InclusionTree_nextLevel(){var currentLevel=this.currentLevel;currentLevel--;if(currentLevel<0){return false}else{this.currentLevel=currentLevel;var level=this.levels[currentLevel];if(level.items[level.index]this.minValue){this.minValue=level.items[level.index]}return true}},isLeaf:function InclusionTree_isLeaf(){return this.currentLevel===0},isAboveThreshold:function InclusionTree_isAboveThreshold(){var levelindex=this.currentLevel;var level=this.levels[levelindex];return level.items[level.index]>this.currentStopValue},isKnown:function InclusionTree_isKnown(){var levelindex=this.currentLevel;var level=this.levels[levelindex];return level.status[level.index]>0},setKnown:function InclusionTree_setKnown(){var levelindex=this.currentLevel;var level=this.levels[levelindex];level.status[level.index]=1;return}};return InclusionTree}();var BitModel=function BitModelClosure(){var UNIFORM_CONTEXT=17;var RUNLENGTH_CONTEXT=18;var LLAndLHContextsLabel=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]);var HLContextLabel=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]);var HHContextLabel=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function BitModel(width,height,subband,zeroBitPlanes,mb){this.width=width;this.height=height;this.contextLabelTable=subband==="HH"?HHContextLabel:subband==="HL"?HLContextLabel:LLAndLHContextsLabel;var coefficientCount=width*height;this.neighborsSignificance=new Uint8Array(coefficientCount);this.coefficentsSign=new Uint8Array(coefficientCount);this.coefficentsMagnitude=mb>14?new Uint32Array(coefficientCount):mb>6?new Uint16Array(coefficientCount):new Uint8Array(coefficientCount);this.processingFlags=new Uint8Array(coefficientCount);var bitsDecoded=new Uint8Array(coefficientCount);if(zeroBitPlanes!==0){for(var i=0;i0;var right=column+10){i=index-width;if(left){neighborsSignificance[i-1]+=16}if(right){neighborsSignificance[i+1]+=16}neighborsSignificance[i]+=4}if(row+1=height){break}processingFlags[index]&=processedInverseMask;if(coefficentsMagnitude[index]||!neighborsSignificance[index]){continue}var contextLabel=labels[neighborsSignificance[index]];var decision=decoder.readBit(contexts,contextLabel);if(decision){var sign=this.decodeSignBit(i,j,index);coefficentsSign[index]=sign;coefficentsMagnitude[index]=1;this.setNeighborsSignificance(i,j,index);processingFlags[index]|=firstMagnitudeBitMask}bitsDecoded[index]++;processingFlags[index]|=processedMask}}}},decodeSignBit:function BitModel_decodeSignBit(row,column,index){var width=this.width,height=this.height;var coefficentsMagnitude=this.coefficentsMagnitude;var coefficentsSign=this.coefficentsSign;var contribution,sign0,sign1,significance1;var contextLabel,decoded;significance1=column>0&&coefficentsMagnitude[index-1]!==0;if(column+10&&coefficentsMagnitude[index-width]!==0;if(row+1=0){contextLabel=9+contribution;decoded=this.decoder.readBit(this.contexts,contextLabel)}else{contextLabel=9-contribution;decoded=this.decoder.readBit(this.contexts,contextLabel)^1}return decoded},runMagnitudeRefinementPass:function BitModel_runMagnitudeRefinementPass(){var decoder=this.decoder;var width=this.width,height=this.height;var coefficentsMagnitude=this.coefficentsMagnitude;var neighborsSignificance=this.neighborsSignificance;var contexts=this.contexts;var bitsDecoded=this.bitsDecoded;var processingFlags=this.processingFlags;var processedMask=1;var firstMagnitudeBitMask=2;var length=width*height;var width4=width*4;for(var index0=0,indexNext;index0>1;offset=offset|0;var j,n,current,next;var alpha=-1.586134342059924;var beta=-.052980118572961;var gamma=.882911075530934;var delta=.443506852043971;var K=1.230174104914001;var K_=1/K;j=offset-3;for(n=len+4;n--;j+=2){x[j]*=K_}j=offset-2;current=delta*x[j-1];for(n=len+3;n--;j+=2){next=delta*x[j+1];x[j]=K*x[j]-current-next;if(n--){j+=2;current=delta*x[j+1];x[j]=K*x[j]-current-next}else{break}}j=offset-1;current=gamma*x[j-1];for(n=len+2;n--;j+=2){next=gamma*x[j+1];x[j]-=current+next;if(n--){j+=2;current=gamma*x[j+1];x[j]-=current+next}else{break}}j=offset;current=beta*x[j-1];for(n=len+1;n--;j+=2){next=beta*x[j+1];x[j]-=current+next;if(n--){j+=2;current=beta*x[j+1];x[j]-=current+next}else{break}}if(len!==0){j=offset+1;current=alpha*x[j-1];for(n=len;n--;j+=2){next=alpha*x[j+1];x[j]-=current+next;if(n--){j+=2;current=alpha*x[j+1];x[j]-=current+next}else{break}}}};return IrreversibleTransform}();var ReversibleTransform=function ReversibleTransformClosure(){function ReversibleTransform(){Transform.call(this)}ReversibleTransform.prototype=Object.create(Transform.prototype);ReversibleTransform.prototype.filter=function reversibleTransformFilter(x,offset,length){var len=length>>1;offset=offset|0;var j,n;for(j=offset,n=len+1;n--;j+=2){x[j]-=x[j-1]+x[j+1]+2>>2}for(j=offset+1,n=len;n--;j+=2){x[j]+=x[j-1]+x[j+1]>>1}};return ReversibleTransform}();return JpxImage}();"use strict";var ArithmeticDecoder=function ArithmeticDecoderClosure(){var QeTable=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];function ArithmeticDecoder(data,start,end){this.data=data;this.bp=start;this.dataEnd=end;this.chigh=data[start];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}ArithmeticDecoder.prototype={byteIn:function ArithmeticDecoder_byteIn(){var data=this.data;var bp=this.bp;if(data[bp]===255){var b1=data[bp+1];if(b1>143){this.clow+=65280;this.ct=8}else{bp++;this.clow+=data[bp]<<9;this.ct=7;this.bp=bp}}else{bp++;this.clow+=bp65535){this.chigh+=this.clow>>16;this.clow&=65535}},readBit:function ArithmeticDecoder_readBit(contexts,pos){var cx_index=contexts[pos]>>1,cx_mps=contexts[pos]&1;var qeTableIcx=QeTable[cx_index];var qeIcx=qeTableIcx.qe;var d;var a=this.a-qeIcx;if(this.chigh>15&1;this.clow=this.clow<<1&65535;this.ct--}while((a&32768)===0);this.a=a;contexts[pos]=cx_index<<1|cx_mps;return d}};return ArithmeticDecoder}();"use strict";var globalScope=typeof window==="undefined"?this:window;var isWorker=typeof window==="undefined";var FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];var TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};var ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};var AnnotationType={WIDGET:1,TEXT:2,LINK:3};var StreamType={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9};var FontType={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};if(!globalScope.PDFJS){globalScope.PDFJS={}}var PDFJS=PDFJS||{};PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var OPS=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49, -setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};function info(msg){if(PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos){console.log("Info: "+msg)}}function warn(msg){if(PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings){console.log("Warning: "+msg)}}function error(msg){if(arguments.length>1){var logArguments=["Error:"];logArguments.push.apply(logArguments,arguments);console.log.apply(console,logArguments);msg=[].join.call(arguments," ")}else{console.log("Error: "+msg)}console.log(backtrace());UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);throw new Error(msg)}function backtrace(){try{throw new Error}catch(e){return e.stack?e.stack.split("\n").slice(2).join("\n"):""}}function assert(cond,msg){if(!cond){error(msg)}}var UNSUPPORTED_FEATURES=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"};var UnsupportedManager=PDFJS.UnsupportedManager=function UnsupportedManagerClosure(){var listeners=[];return{listen:function(cb){listeners.push(cb)},notify:function(featureId){warn('Unsupported feature "'+featureId+'"');for(var i=0,ii=listeners.length;i=0?i:pathLength;i=baseUrl.lastIndexOf("?",pathLength);pathLength=i>=0?i:pathLength;var prefixLength=baseUrl.lastIndexOf("/",pathLength);return baseUrl.substring(0,prefixLength+1)+url}}function isValidUrl(url,allowRelative){if(!url){return false}var protocol=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(url);if(!protocol){return allowRelative}protocol=protocol[0].toLowerCase();switch(protocol){case"http":case"https":case"ftp":case"mailto":case"tel":return true;default:return false}}PDFJS.isValidUrl=isValidUrl;function shadow(obj,prop,value){Object.defineProperty(obj,prop,{value:value,enumerable:true,configurable:true,writable:false});return value}PDFJS.shadow=shadow;var PasswordResponses=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var PasswordException=function PasswordExceptionClosure(){function PasswordException(msg,code){this.name="PasswordException";this.message=msg;this.code=code}PasswordException.prototype=new Error;PasswordException.constructor=PasswordException;return PasswordException}();PDFJS.PasswordException=PasswordException;var UnknownErrorException=function UnknownErrorExceptionClosure(){function UnknownErrorException(msg,details){this.name="UnknownErrorException";this.message=msg;this.details=details}UnknownErrorException.prototype=new Error;UnknownErrorException.constructor=UnknownErrorException;return UnknownErrorException}();PDFJS.UnknownErrorException=UnknownErrorException;var InvalidPDFException=function InvalidPDFExceptionClosure(){function InvalidPDFException(msg){this.name="InvalidPDFException";this.message=msg}InvalidPDFException.prototype=new Error;InvalidPDFException.constructor=InvalidPDFException;return InvalidPDFException}();PDFJS.InvalidPDFException=InvalidPDFException;var MissingPDFException=function MissingPDFExceptionClosure(){function MissingPDFException(msg){this.name="MissingPDFException";this.message=msg}MissingPDFException.prototype=new Error;MissingPDFException.constructor=MissingPDFException;return MissingPDFException}();PDFJS.MissingPDFException=MissingPDFException;var UnexpectedResponseException=function UnexpectedResponseExceptionClosure(){function UnexpectedResponseException(msg,status){this.name="UnexpectedResponseException";this.message=msg;this.status=status}UnexpectedResponseException.prototype=new Error;UnexpectedResponseException.constructor=UnexpectedResponseException;return UnexpectedResponseException}();PDFJS.UnexpectedResponseException=UnexpectedResponseException;var NotImplementedException=function NotImplementedExceptionClosure(){function NotImplementedException(msg){this.message=msg}NotImplementedException.prototype=new Error;NotImplementedException.prototype.name="NotImplementedException";NotImplementedException.constructor=NotImplementedException;return NotImplementedException}();var MissingDataException=function MissingDataExceptionClosure(){function MissingDataException(begin,end){this.begin=begin;this.end=end;this.message="Missing data ["+begin+", "+end+")"}MissingDataException.prototype=new Error;MissingDataException.prototype.name="MissingDataException";MissingDataException.constructor=MissingDataException;return MissingDataException}();var XRefParseException=function XRefParseExceptionClosure(){function XRefParseException(msg){this.message=msg}XRefParseException.prototype=new Error;XRefParseException.prototype.name="XRefParseException";XRefParseException.constructor=XRefParseException;return XRefParseException}();function bytesToString(bytes){assert(bytes!==null&&typeof bytes==="object"&&bytes.length!==undefined,"Invalid argument for bytesToString");var length=bytes.length;var MAX_ARGUMENT_COUNT=8192;if(length>24&255,value>>16&255,value>>8&255,value&255)}function log2(x){var n=1,i=0;while(x>n){n<<=1;i++}return i}function readInt8(data,start){return data[start]<<24>>24}function readUint16(data,offset){return data[offset]<<8|data[offset+1]}function readUint32(data,offset){return(data[offset]<<24|data[offset+1]<<16|data[offset+2]<<8|data[offset+3])>>>0}function isLittleEndian(){var buffer8=new Uint8Array(2);buffer8[0]=1;var buffer16=new Uint16Array(buffer8.buffer);return buffer16[0]===1}Object.defineProperty(PDFJS,"isLittleEndian",{configurable:true,get:function PDFJS_isLittleEndian(){return shadow(PDFJS,"isLittleEndian",isLittleEndian())}});function hasCanvasTypedArrays(){var canvas=document.createElement("canvas");canvas.width=canvas.height=1;var ctx=canvas.getContext("2d");var imageData=ctx.createImageData(1,1);return typeof imageData.data.buffer!=="undefined"}Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:true,get:function PDFJS_hasCanvasTypedArrays(){return shadow(PDFJS,"hasCanvasTypedArrays",hasCanvasTypedArrays())}});var Uint32ArrayView=function Uint32ArrayViewClosure(){function Uint32ArrayView(buffer,length){this.buffer=buffer;this.byteLength=buffer.length;this.length=length===undefined?this.byteLength>>2:length;ensureUint32ArrayViewProps(this.length)}Uint32ArrayView.prototype=Object.create(null);var uint32ArrayViewSetters=0;function createUint32ArrayProp(index){return{get:function(){var buffer=this.buffer,offset=index<<2;return(buffer[offset]|buffer[offset+1]<<8|buffer[offset+2]<<16|buffer[offset+3]<<24)>>>0},set:function(value){var buffer=this.buffer,offset=index<<2;buffer[offset]=value&255;buffer[offset+1]=value>>8&255;buffer[offset+2]=value>>16&255;buffer[offset+3]=value>>>24&255}}}function ensureUint32ArrayViewProps(length){while(uint32ArrayViewSettersrect[2]){r[0]=rect[2];r[2]=rect[0]}if(rect[1]>rect[3]){r[1]=rect[3];r[3]=rect[1]}return r};Util.intersect=function Util_intersect(rect1,rect2){function compare(a,b){return a-b}var orderedX=[rect1[0],rect1[2],rect2[0],rect2[2]].sort(compare),orderedY=[rect1[1],rect1[3],rect2[1],rect2[3]].sort(compare),result=[];rect1=Util.normalizeRect(rect1);rect2=Util.normalizeRect(rect2);if(orderedX[0]===rect1[0]&&orderedX[1]===rect2[0]||orderedX[0]===rect2[0]&&orderedX[1]===rect1[0]){result[0]=orderedX[1];result[2]=orderedX[2]}else{return false}if(orderedY[0]===rect1[1]&&orderedY[1]===rect2[1]||orderedY[0]===rect2[1]&&orderedY[1]===rect1[1]){result[1]=orderedY[1];result[3]=orderedY[2]}else{return false}return result};Util.sign=function Util_sign(num){return num<0?-1:1};Util.appendToArray=function Util_appendToArray(arr1,arr2){Array.prototype.push.apply(arr1,arr2)};Util.prependToArray=function Util_prependToArray(arr1,arr2){Array.prototype.unshift.apply(arr1,arr2)};Util.extendObj=function extendObj(obj1,obj2){for(var key in obj2){obj1[key]=obj2[key]}};Util.getInheritableProperty=function Util_getInheritableProperty(dict,name){while(dict&&!dict.has(name)){dict=dict.get("Parent")}if(!dict){return null}return dict.get(name)};Util.inherit=function Util_inherit(sub,base,prototype){sub.prototype=Object.create(base.prototype);sub.prototype.constructor=sub;for(var prop in prototype){sub.prototype[prop]=prototype[prop]}};Util.loadScript=function Util_loadScript(src,callback){var script=document.createElement("script");var loaded=false;script.setAttribute("src",src);if(callback){script.onload=function(){if(!loaded){callback()}loaded=true}}document.getElementsByTagName("head")[0].appendChild(script)};return Util}();var PageViewport=PDFJS.PageViewport=function PageViewportClosure(){function PageViewport(viewBox,scale,rotation,offsetX,offsetY,dontFlip){this.viewBox=viewBox;this.scale=scale;this.rotation=rotation;this.offsetX=offsetX;this.offsetY=offsetY;var centerX=(viewBox[2]+viewBox[0])/2;var centerY=(viewBox[3]+viewBox[1])/2;var rotateA,rotateB,rotateC,rotateD;rotation=rotation%360;rotation=rotation<0?rotation+360:rotation;switch(rotation){case 180:rotateA=-1;rotateB=0;rotateC=0;rotateD=1;break;case 90:rotateA=0;rotateB=1;rotateC=1;rotateD=0;break;case 270:rotateA=0;rotateB=-1;rotateC=-1;rotateD=0;break;default:rotateA=1;rotateB=0;rotateC=0;rotateD=-1;break}if(dontFlip){rotateC=-rotateC;rotateD=-rotateD}var offsetCanvasX,offsetCanvasY;var width,height;if(rotateA===0){offsetCanvasX=Math.abs(centerY-viewBox[1])*scale+offsetX;offsetCanvasY=Math.abs(centerX-viewBox[0])*scale+offsetY;width=Math.abs(viewBox[3]-viewBox[1])*scale;height=Math.abs(viewBox[2]-viewBox[0])*scale}else{offsetCanvasX=Math.abs(centerX-viewBox[0])*scale+offsetX;offsetCanvasY=Math.abs(centerY-viewBox[1])*scale+offsetY;width=Math.abs(viewBox[2]-viewBox[0])*scale;height=Math.abs(viewBox[3]-viewBox[1])*scale}this.transform=[rotateA*scale,rotateB*scale,rotateC*scale,rotateD*scale,offsetCanvasX-rotateA*scale*centerX-rotateC*scale*centerY,offsetCanvasY-rotateB*scale*centerX-rotateD*scale*centerY];this.width=width;this.height=height;this.fontScale=scale}PageViewport.prototype={clone:function PageViewPort_clone(args){args=args||{};var scale="scale"in args?args.scale:this.scale;var rotation="rotation"in args?args.rotation:this.rotation;return new PageViewport(this.viewBox.slice(),scale,rotation,this.offsetX,this.offsetY,args.dontFlip)},convertToViewportPoint:function PageViewport_convertToViewportPoint(x,y){return Util.applyTransform([x,y],this.transform)},convertToViewportRectangle:function PageViewport_convertToViewportRectangle(rect){var tl=Util.applyTransform([rect[0],rect[1]],this.transform);var br=Util.applyTransform([rect[2],rect[3]],this.transform);return[tl[0],tl[1],br[0],br[1]]},convertToPdfPoint:function PageViewport_convertToPdfPoint(x,y){return Util.applyInverseTransform([x,y],this.transform)}};return PageViewport}();var PDFStringTranslateTable=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToPDFString(str){var i,n=str.length,strBuf=[];if(str[0]==="þ"&&str[1]==="ÿ"){for(i=2;i0){var handler=this.handlers.shift();var nextStatus=handler.thisPromise._status;var nextValue=handler.thisPromise._value;try{if(nextStatus===STATUS_RESOLVED){if(typeof handler.onResolve==="function"){nextValue=handler.onResolve(nextValue)}}else if(typeof handler.onReject==="function"){nextValue=handler.onReject(nextValue);nextStatus=STATUS_RESOLVED;if(handler.thisPromise._unhandledRejection){this.removeUnhandeledRejection(handler.thisPromise)}}}catch(ex){nextStatus=STATUS_REJECTED;nextValue=ex}handler.nextPromise._updateStatus(nextStatus,nextValue);if(Date.now()>=timeoutAt){break}}if(this.handlers.length>0){setTimeout(this.runHandlers.bind(this),0);return}this.running=false},addUnhandledRejection:function addUnhandledRejection(promise){this.unhandledRejections.push({promise:promise,time:Date.now()});this.scheduleRejectionCheck()},removeUnhandeledRejection:function removeUnhandeledRejection(promise){promise._unhandledRejection=false;for(var i=0;iREJECTION_TIMEOUT){var unhandled=this.unhandledRejections[i].promise._value;var msg="Unhandled rejection: "+unhandled;if(unhandled.stack){msg+="\n"+unhandled.stack}warn(msg);this.unhandledRejections.splice(i);i--}}if(this.unhandledRejections.length){this.scheduleRejectionCheck()}}.bind(this),REJECTION_TIMEOUT)}};function Promise(resolver){this._status=STATUS_PENDING;this._handlers=[];try{resolver.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(e){this._reject(e)}}Promise.all=function Promise_all(promises){var resolveAll,rejectAll;var deferred=new Promise(function(resolve,reject){resolveAll=resolve;rejectAll=reject});var unresolved=promises.length;var results=[];if(unresolved===0){resolveAll(results);return deferred}function reject(reason){if(deferred._status===STATUS_REJECTED){return}results=[];rejectAll(reason)}for(var i=0,ii=promises.length;ilongest){longest=name.length}}for(i=0,ii=times.length;i>2,d2=(b1&3)<<4|b2>>4;var d3=i+1>6:64;var d4=i+2>4!==4092||current===65476){switch(current){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,jpeg.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(current>>8!==255){throw new Error("ERROR: format throw new IOException! (decode)")}}current=this.stream.get16()}if(current<65472||current>65479){throw new Error("ERROR: could not handle arithmetic code!")}this.frame.read(this.stream);current=this.stream.get16();do{while(current!==65498){switch(current){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,jpeg.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(current>>8!==255){throw new Error("ERROR: format throw new IOException! (Parser.decode)")}}current=this.stream.get16()}this.precision=this.frame.precision;this.components=this.frame.components;if(!this.numBytes){ -this.numBytes=parseInt(Math.ceil(this.precision/8))}if(this.numBytes==1){this.mask=255}else{this.mask=65535}this.scan.read(this.stream);this.numComp=this.scan.numComp;this.selection=this.scan.selection;if(this.numBytes===1){if(this.numComp===3){this.getter=this.getValueRGB;this.setter=this.setValueRGB;this.output=this.outputRGB}else{this.getter=this.getValue8;this.setter=this.setValue8;this.output=this.outputSingle}}else{this.getter=this.getValue16;this.setter=this.setValue16;this.output=this.outputSingle}switch(this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1;break}this.scanComps=this.scan.components;this.quantTables=this.quantTable.quantTables;for(i=0;i=jpeg.lossless.Decoder.RESTART_MARKER_BEGIN&¤t<=jpeg.lossless.Decoder.RESTART_MARKER_END)){break}}if(current===65500&&scanNum===1){this.readNumber();current=this.stream.get16()}}while(current!==65497&&(this.xLoc>1)};jpeg.lossless.Decoder.prototype.select6=function(compOffset){return this.getPreviousY(compOffset)+(this.getPreviousX(compOffset)-this.getPreviousXY(compOffset)>>1)};jpeg.lossless.Decoder.prototype.select7=function(compOffset){return(this.getPreviousX(compOffset)+this.getPreviousY(compOffset))/2};jpeg.lossless.Decoder.prototype.decodeRGB=function(prev,temp,index){var value,actab,dctab,qtab,ctrC,i,k,j;prev[0]=this.selector(0);prev[1]=this.selector(1);prev[2]=this.selector(2);for(ctrC=0;ctrC=65280){return value}prev[ctrC]=this.IDCT_Source[0]=prev[ctrC]+this.getn(index,value,temp,index);this.IDCT_Source[0]*=qtab[0];for(j=1;j<64;j+=1){value=this.getHuffmanValue(actab,temp,index);if(value>=65280){return value}j+=value>>4;if((value&15)===0){if(value>>4===0){break}}else{this.IDCT_Source[jpeg.lossless.Decoder.IDCT_P[j]]=this.getn(index,value&15,temp,index)*qtab[j]}}}}return 0};jpeg.lossless.Decoder.prototype.decodeSingle=function(prev,temp,index){var value,i,n,nRestart;if(this.restarting){this.restarting=false;prev[0]=1<=65280){return value}n=this.getn(prev,value,temp,index);nRestart=n>>8;if(nRestart>=jpeg.lossless.Decoder.RESTART_MARKER_BEGIN&&nRestart<=jpeg.lossless.Decoder.RESTART_MARKER_END){return nRestart}prev[0]+=n}return 0};jpeg.lossless.Decoder.prototype.getHuffmanValue=function(table,temp,index){var code,input,mask;mask=65535;if(index[0]<8){temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input}else{index[0]-=8}code=table[temp[0]>>index[0]];if((code&jpeg.lossless.Decoder.MSB)!==0){if(this.markerIndex!==0){this.markerIndex=0;return 65280|this.marker}temp[0]&=mask>>16-index[0];temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input;code=table[(code&255)*256+(temp[0]>>index[0])];index[0]+=8}index[0]+=8-(code>>8);if(index[0]<0){throw new Error("index="+index[0]+" temp="+temp[0]+" code="+code+" in HuffmanValue()")}if(index[0]>16-index[0];return code&255};jpeg.lossless.Decoder.prototype.getn=function(PRED,n,temp,index){var result,one,n_one,mask,input;one=1;n_one=-1;mask=65535;if(n===0){return 0}if(n===16){if(PRED[0]>=0){return-32768}else{return 32768}}index[0]-=n;if(index[0]>=0){if(index[0]>index[0];temp[0]&=mask>>16-index[0]}else{temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input;index[0]+=8;if(index[0]<0){if(this.markerIndex!==0){this.markerIndex=0;return(65280|this.marker)<<8}temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input;index[0]+=8}if(index[0]<0){throw new Error("index="+index[0]+" in getn()")}if(index[0]>index[0];temp[0]&=mask>>16-index[0]}if(result0){return this.getter(this.yLoc*this.xDim+this.xLoc-1,compOffset)}else if(this.yLoc>0){return this.getPreviousY(compOffset)}else{return 1<0&&this.yLoc>0){return this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,compOffset)}else{return this.getPreviousY(compOffset)}};jpeg.lossless.Decoder.prototype.getPreviousY=function(compOffset){if(this.yLoc>0){return this.getter((this.yLoc-1)*this.xDim+this.xLoc,compOffset)}else{return this.getPreviousX(compOffset)}};jpeg.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1};jpeg.lossless.Decoder.prototype.outputSingle=function(PRED){if(this.xLoc=this.xDim){this.yLoc+=1;this.xLoc=0}}};jpeg.lossless.Decoder.prototype.outputRGB=function(PRED){var offset=this.yLoc*this.xDim+this.xLoc;if(this.xLoc=this.xDim){this.yLoc+=1;this.xLoc=0}}};jpeg.lossless.Decoder.prototype.setValue8=function(index,val){this.outputData[index]=val};jpeg.lossless.Decoder.prototype.getValue8=function(index){return this.outputData[index]};var littleEndian=function(){var buffer=new ArrayBuffer(2);new DataView(buffer).setInt16(0,256,true);return new Int16Array(buffer)[0]===256}();if(littleEndian){jpeg.lossless.Decoder.prototype.setValue16=jpeg.lossless.Decoder.prototype.setValue8;jpeg.lossless.Decoder.prototype.getValue16=jpeg.lossless.Decoder.prototype.getValue8}else{jpeg.lossless.Decoder.prototype.setValue16=function(index,val){this.outputData[index]=(val&255)<<8|val>>8&255};jpeg.lossless.Decoder.prototype.getValue16=function(index){var val=this.outputData[index];return(val&255)<<8|val>>8&255}}jpeg.lossless.Decoder.prototype.setValueRGB=function(index,val,compOffset){this.outputData[index*3+compOffset]=val};jpeg.lossless.Decoder.prototype.getValueRGB=function(index,compOffset){return this.outputData[index*3+compOffset]};jpeg.lossless.Decoder.prototype.readApp=function(){var count=0,length=this.stream.get16();count+=2;while(countlength){throw new Error("ERROR: frame format error")}c=data.get8();count+=1;if(count>=length){throw new Error("ERROR: frame format error [c>=Lf]")}temp=data.get8();count+=1;if(!this.components[c]){this.components[c]=new jpeg.lossless.ComponentSpec}this.components[c].hSamp=temp>>4;this.components[c].vSamp=temp&15;this.components[c].quantTableSel=data.get8();count+=1}if(count!==length){throw new Error("ERROR: frame format error [Lf!=count]")}return 1};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.FrameHeader}},{"./component-spec.js":6,"./data-stream.js":7}],10:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.Utils=jpeg.lossless.Utils||(typeof require!=="undefined"?require("./utils.js"):null);jpeg.lossless.HuffmanTable=jpeg.lossless.HuffmanTable||function(){this.l=jpeg.lossless.Utils.createArray(4,2,16);this.th=[];this.v=jpeg.lossless.Utils.createArray(4,2,16,200);this.tc=jpeg.lossless.Utils.createArray(4,2);this.tc[0][0]=0;this.tc[1][0]=0;this.tc[2][0]=0;this.tc[3][0]=0;this.tc[0][1]=0;this.tc[1][1]=0;this.tc[2][1]=0;this.tc[3][1]=0;this.th[0]=0;this.th[1]=0;this.th[2]=0;this.th[3]=0};jpeg.lossless.HuffmanTable.MSB=2147483648;jpeg.lossless.HuffmanTable.prototype.read=function(data,HuffTab){var count=0,length,temp,t,c,i,j;length=data.get16();count+=2;while(count3){throw new Error("ERROR: Huffman table ID > 3")}c=temp>>4;if(c>2){throw new Error("ERROR: Huffman table [Table class > 2 ]")}this.th[t]=1;this.tc[t][c]=1;for(i=0;i<16;i+=1){this.l[t][c][i]=data.get8();count+=1}for(i=0;i<16;i+=1){for(j=0;jlength){throw new Error("ERROR: Huffman table format error [count>Lh]")}this.v[t][c][i][j]=data.get8();count+=1}}}if(count!==length){throw new Error("ERROR: Huffman table format error [count!=Lf]")}for(i=0;i<4;i+=1){for(j=0;j<2;j+=1){if(this.tc[i][j]!==0){this.buildHuffTable(HuffTab[i][j],this.l[i][j],this.v[i][j])}}}return 1};jpeg.lossless.HuffmanTable.prototype.buildHuffTable=function(tab,L,V){var currentTable,temp,k,i,j,n;temp=256;k=0;for(i=0;i<8;i+=1){for(j=0;j>i+1;n+=1){tab[k]=V[i][j]|i+1<<8;k+=1}}}for(i=1;k<256;i+=1,k+=1){tab[k]=i|jpeg.lossless.HuffmanTable.MSB}currentTable=1;k=0;for(i=8;i<16;i+=1){for(j=0;j>i-7;n+=1){tab[currentTable*256+k]=V[i][j]|i+1<<8;k+=1}if(k>=256){if(k>256){throw new Error("ERROR: Huffman table error(1)!")}k=0;currentTable+=1}}}};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.HuffmanTable}},{"./data-stream.js":7,"./utils.js":15}],11:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.ComponentSpec=jpeg.lossless.ComponentSpec||(typeof require!=="undefined"?require("./component-spec.js"):null);jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.Decoder=jpeg.lossless.Decoder||(typeof require!=="undefined"?require("./decoder.js"):null);jpeg.lossless.FrameHeader=jpeg.lossless.FrameHeader||(typeof require!=="undefined"?require("./frame-header.js"):null);jpeg.lossless.HuffmanTable=jpeg.lossless.HuffmanTable||(typeof require!=="undefined"?require("./huffman-table.js"):null);jpeg.lossless.QuantizationTable=jpeg.lossless.QuantizationTable||(typeof require!=="undefined"?require("./quantization-table.js"):null);jpeg.lossless.ScanComponent=jpeg.lossless.ScanComponent||(typeof require!=="undefined"?require("./scan-component.js"):null);jpeg.lossless.ScanHeader=jpeg.lossless.ScanHeader||(typeof require!=="undefined"?require("./scan-header.js"):null);jpeg.lossless.Utils=jpeg.lossless.Utils||(typeof require!=="undefined"?require("./utils.js"):null);var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg}},{"./component-spec.js":6,"./data-stream.js":7,"./decoder.js":8,"./frame-header.js":9,"./huffman-table.js":10,"./quantization-table.js":12,"./scan-component.js":13,"./scan-header.js":14,"./utils.js":15}],12:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.Utils=jpeg.lossless.Utils||(typeof require!=="undefined"?require("./utils.js"):null);jpeg.lossless.QuantizationTable=jpeg.lossless.QuantizationTable||function(){this.precision=[];this.tq=[];this.quantTables=jpeg.lossless.Utils.createArray(4,64);this.tq[0]=0;this.tq[1]=0;this.tq[2]=0;this.tq[3]=0};jpeg.lossless.QuantizationTable.enhanceQuantizationTable=function(qtab,table){var i;for(i=0;i<8;i+=1){qtab[table[0*8+i]]*=90;qtab[table[4*8+i]]*=90;qtab[table[2*8+i]]*=118;qtab[table[6*8+i]]*=49;qtab[table[5*8+i]]*=71;qtab[table[1*8+i]]*=126;qtab[table[7*8+i]]*=25;qtab[table[3*8+i]]*=106}for(i=0;i<8;i+=1){qtab[table[0+8*i]]*=90;qtab[table[4+8*i]]*=90;qtab[table[2+8*i]]*=118;qtab[table[6+8*i]]*=49;qtab[table[5+8*i]]*=71;qtab[table[1+8*i]]*=126;qtab[table[7+8*i]]*=25;qtab[table[3+8*i]]*=106}for(i=0;i<64;i+=1){qtab[i]>>=6}};jpeg.lossless.QuantizationTable.prototype.read=function(data,table){var count=0,length,temp,t,i;length=data.get16();count+=2;while(count3){throw new Error("ERROR: Quantization table ID > 3")}this.precision[t]=temp>>4;if(this.precision[t]===0){this.precision[t]=8}else if(this.precision[t]===1){this.precision[t]=16}else{throw new Error("ERROR: Quantization table precision error")}this.tq[t]=1;if(this.precision[t]===8){for(i=0;i<64;i+=1){if(count>length){throw new Error("ERROR: Quantization table format error")}this.quantTables[t][i]=data.get8();count+=1}jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t],table)}else{for(i=0;i<64;i+=1){if(count>length){throw new Error("ERROR: Quantization table format error")}this.quantTables[t][i]=data.get16();count+=2}jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t],table)}}if(count!==length){throw new Error("ERROR: Quantization table error [count!=Lq]")}return 1};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.QuantizationTable}},{"./data-stream.js":7,"./utils.js":15}],13:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.ScanComponent=jpeg.lossless.ScanComponent||function(){this.acTabSel=0;this.dcTabSel=0;this.scanCompSel=0};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.ScanComponent}},{}],14:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.ScanComponent=jpeg.lossless.ScanComponent||(typeof require!=="undefined"?require("./scan-component.js"):null);jpeg.lossless.ScanHeader=jpeg.lossless.ScanHeader||function(){this.ah=0;this.al=0;this.numComp=0;this.selection=0;this.spectralEnd=0;this.components=[]};jpeg.lossless.ScanHeader.prototype.read=function(data){var count=0,length,i,temp;length=data.get16();count+=2;this.numComp=data.get8();count+=1;for(i=0;ilength){throw new Error("ERROR: scan header format error")}this.components[i].scanCompSel=data.get8();count+=1;temp=data.get8();count+=1;this.components[i].dcTabSel=temp>>4;this.components[i].acTabSel=temp&15}this.selection=data.get8();count+=1;this.spectralEnd=data.get8();count+=1;temp=data.get8();this.ah=temp>>4;this.al=temp&15;count+=1;if(count!==length){throw new Error("ERROR: scan header format error [count!=Ns]")}return 1};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.ScanHeader}},{"./data-stream.js":7,"./scan-component.js":13}],15:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.Utils=jpeg.lossless.Utils||{};jpeg.lossless.Utils.createArray=function(length){var arr=new Array(length||0),i=length;if(arguments.length>1){var args=Array.prototype.slice.call(arguments,1);while(i--)arr[length-1-i]=jpeg.lossless.Utils.createArray.apply(this,args)}return arr};jpeg.lossless.Utils.makeCRCTable=function(){var c;var crcTable=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}crcTable[n]=c}return crcTable};jpeg.lossless.Utils.crc32=function(dataView){var uint8view=new Uint8Array(dataView.buffer);var crcTable=jpeg.lossless.Utils.crcTable||(jpeg.lossless.Utils.crcTable=jpeg.lossless.Utils.makeCRCTable());var crc=0^-1;for(var i=0;i>>8^crcTable[(crc^uint8view[i])&255]}return(crc^-1)>>>0};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.Utils}},{}],16:[function(require,module,exports){"use strict";var assign=require("./lib/utils/common").assign;var deflate=require("./lib/deflate");var inflate=require("./lib/inflate");var constants=require("./lib/zlib/constants");var pako={};assign(pako,deflate,inflate,constants);module.exports=pako},{"./lib/deflate":17,"./lib/inflate":18,"./lib/utils/common":19,"./lib/zlib/constants":22}],17:[function(require,module,exports){"use strict";var zlib_deflate=require("./zlib/deflate");var utils=require("./utils/common");var strings=require("./utils/strings");var msg=require("./zlib/messages");var ZStream=require("./zlib/zstream");var toString=Object.prototype.toString;var Z_NO_FLUSH=0;var Z_FINISH=4;var Z_OK=0;var Z_STREAM_END=1;var Z_SYNC_FLUSH=2;var Z_DEFAULT_COMPRESSION=-1;var Z_DEFAULT_STRATEGY=0;var Z_DEFLATED=8;function Deflate(options){if(!(this instanceof Deflate))return new Deflate(options);this.options=utils.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY,to:""},options||{});var opt=this.options;if(opt.raw&&opt.windowBits>0){opt.windowBits=-opt.windowBits}else if(opt.gzip&&opt.windowBits>0&&opt.windowBits<16){opt.windowBits+=16}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new ZStream;this.strm.avail_out=0;var status=zlib_deflate.deflateInit2(this.strm,opt.level,opt.method,opt.windowBits,opt.memLevel,opt.strategy);if(status!==Z_OK){throw new Error(msg[status])}if(opt.header){zlib_deflate.deflateSetHeader(this.strm,opt.header)}if(opt.dictionary){var dict;if(typeof opt.dictionary==="string"){dict=strings.string2buf(opt.dictionary)}else if(toString.call(opt.dictionary)==="[object ArrayBuffer]"){dict=new Uint8Array(opt.dictionary)}else{dict=opt.dictionary}status=zlib_deflate.deflateSetDictionary(this.strm,dict);if(status!==Z_OK){throw new Error(msg[status])}this._dict_set=true}}Deflate.prototype.push=function(data,mode){var strm=this.strm;var chunkSize=this.options.chunkSize;var status,_mode;if(this.ended){return false}_mode=mode===~~mode?mode:mode===true?Z_FINISH:Z_NO_FLUSH;if(typeof data==="string"){strm.input=strings.string2buf(data)}else if(toString.call(data)==="[object ArrayBuffer]"){strm.input=new Uint8Array(data)}else{strm.input=data}strm.next_in=0;strm.avail_in=strm.input.length;do{if(strm.avail_out===0){strm.output=new utils.Buf8(chunkSize);strm.next_out=0;strm.avail_out=chunkSize}status=zlib_deflate.deflate(strm,_mode);if(status!==Z_STREAM_END&&status!==Z_OK){this.onEnd(status);this.ended=true;return false}if(strm.avail_out===0||strm.avail_in===0&&(_mode===Z_FINISH||_mode===Z_SYNC_FLUSH)){if(this.options.to==="string"){this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output,strm.next_out)))}else{this.onData(utils.shrinkBuf(strm.output,strm.next_out))}}}while((strm.avail_in>0||strm.avail_out===0)&&status!==Z_STREAM_END);if(_mode===Z_FINISH){status=zlib_deflate.deflateEnd(this.strm);this.onEnd(status);this.ended=true;return status===Z_OK}if(_mode===Z_SYNC_FLUSH){this.onEnd(Z_OK);strm.avail_out=0;return true}return true};Deflate.prototype.onData=function(chunk){this.chunks.push(chunk)};Deflate.prototype.onEnd=function(status){if(status===Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=utils.flattenChunks(this.chunks)}}this.chunks=[];this.err=status;this.msg=this.strm.msg};function deflate(input,options){var deflator=new Deflate(options);deflator.push(input,true);if(deflator.err){throw deflator.msg||msg[deflator.err]}return deflator.result}function deflateRaw(input,options){options=options||{};options.raw=true;return deflate(input,options)}function gzip(input,options){options=options||{};options.gzip=true;return deflate(input,options)}exports.Deflate=Deflate;exports.deflate=deflate;exports.deflateRaw=deflateRaw;exports.gzip=gzip},{"./utils/common":19,"./utils/strings":20,"./zlib/deflate":24,"./zlib/messages":29,"./zlib/zstream":31}],18:[function(require,module,exports){"use strict";var zlib_inflate=require("./zlib/inflate");var utils=require("./utils/common");var strings=require("./utils/strings");var c=require("./zlib/constants");var msg=require("./zlib/messages");var ZStream=require("./zlib/zstream");var GZheader=require("./zlib/gzheader");var toString=Object.prototype.toString;function Inflate(options){if(!(this instanceof Inflate))return new Inflate(options);this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},options||{});var opt=this.options;if(opt.raw&&opt.windowBits>=0&&opt.windowBits<16){opt.windowBits=-opt.windowBits;if(opt.windowBits===0){opt.windowBits=-15}}if(opt.windowBits>=0&&opt.windowBits<16&&!(options&&options.windowBits)){opt.windowBits+=32}if(opt.windowBits>15&&opt.windowBits<48){if((opt.windowBits&15)===0){opt.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new ZStream;this.strm.avail_out=0;var status=zlib_inflate.inflateInit2(this.strm,opt.windowBits);if(status!==c.Z_OK){throw new Error(msg[status])}this.header=new GZheader;zlib_inflate.inflateGetHeader(this.strm,this.header);if(opt.dictionary){if(typeof opt.dictionary==="string"){opt.dictionary=strings.string2buf(opt.dictionary)}else if(toString.call(opt.dictionary)==="[object ArrayBuffer]"){opt.dictionary=new Uint8Array(opt.dictionary)}if(opt.raw){status=zlib_inflate.inflateSetDictionary(this.strm,opt.dictionary);if(status!==c.Z_OK){throw new Error(msg[status])}}}}Inflate.prototype.push=function(data,mode){var strm=this.strm;var chunkSize=this.options.chunkSize;var dictionary=this.options.dictionary;var status,_mode;var next_out_utf8,tail,utf8str;var allowBufError=false;if(this.ended){return false}_mode=mode===~~mode?mode:mode===true?c.Z_FINISH:c.Z_NO_FLUSH;if(typeof data==="string"){strm.input=strings.binstring2buf(data)}else if(toString.call(data)==="[object ArrayBuffer]"){strm.input=new Uint8Array(data)}else{strm.input=data}strm.next_in=0;strm.avail_in=strm.input.length;do{if(strm.avail_out===0){strm.output=new utils.Buf8(chunkSize);strm.next_out=0;strm.avail_out=chunkSize}status=zlib_inflate.inflate(strm,c.Z_NO_FLUSH);if(status===c.Z_NEED_DICT&&dictionary){status=zlib_inflate.inflateSetDictionary(this.strm,dictionary)}if(status===c.Z_BUF_ERROR&&allowBufError===true){status=c.Z_OK;allowBufError=false}if(status!==c.Z_STREAM_END&&status!==c.Z_OK){this.onEnd(status);this.ended=true;return false}if(strm.next_out){if(strm.avail_out===0||status===c.Z_STREAM_END||strm.avail_in===0&&(_mode===c.Z_FINISH||_mode===c.Z_SYNC_FLUSH)){if(this.options.to==="string"){next_out_utf8=strings.utf8border(strm.output,strm.next_out);tail=strm.next_out-next_out_utf8;utf8str=strings.buf2string(strm.output,next_out_utf8);strm.next_out=tail;strm.avail_out=chunkSize-tail;if(tail){utils.arraySet(strm.output,strm.output,next_out_utf8,tail,0)}this.onData(utf8str)}else{this.onData(utils.shrinkBuf(strm.output,strm.next_out))}}}if(strm.avail_in===0&&strm.avail_out===0){allowBufError=true}}while((strm.avail_in>0||strm.avail_out===0)&&status!==c.Z_STREAM_END);if(status===c.Z_STREAM_END){_mode=c.Z_FINISH}if(_mode===c.Z_FINISH){status=zlib_inflate.inflateEnd(this.strm);this.onEnd(status);this.ended=true;return status===c.Z_OK}if(_mode===c.Z_SYNC_FLUSH){this.onEnd(c.Z_OK);strm.avail_out=0;return true}return true};Inflate.prototype.onData=function(chunk){this.chunks.push(chunk)};Inflate.prototype.onEnd=function(status){if(status===c.Z_OK){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=utils.flattenChunks(this.chunks)}}this.chunks=[];this.err=status;this.msg=this.strm.msg};function inflate(input,options){var inflator=new Inflate(options);inflator.push(input,true);if(inflator.err){throw inflator.msg||msg[inflator.err]}return inflator.result}function inflateRaw(input,options){options=options||{};options.raw=true;return inflate(input,options)}exports.Inflate=Inflate;exports.inflate=inflate;exports.inflateRaw=inflateRaw;exports.ungzip=inflate},{"./utils/common":19,"./utils/strings":20,"./zlib/constants":22,"./zlib/gzheader":25,"./zlib/inflate":27,"./zlib/messages":29,"./zlib/zstream":31}],19:[function(require,module,exports){"use strict";var TYPED_OK=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";function _has(obj,key){return Object.prototype.hasOwnProperty.call(obj,key)}exports.assign=function(obj){var sources=Array.prototype.slice.call(arguments,1);while(sources.length){var source=sources.shift();if(!source){continue}if(typeof source!=="object"){throw new TypeError(source+"must be non-object")}for(var p in source){if(_has(source,p)){obj[p]=source[p]}}}return obj};exports.shrinkBuf=function(buf,size){if(buf.length===size){return buf}if(buf.subarray){return buf.subarray(0,size)}buf.length=size;return buf};var fnTyped={arraySet:function(dest,src,src_offs,len,dest_offs){if(src.subarray&&dest.subarray){dest.set(src.subarray(src_offs,src_offs+len),dest_offs);return}for(var i=0;i=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1}_utf8len[254]=_utf8len[254]=1;exports.string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;m_pos>>6;buf[i++]=128|c&63}else if(c<65536){buf[i++]=224|c>>>12;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}else{buf[i++]=240|c>>>18;buf[i++]=128|c>>>12&63;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}}return buf};function buf2binstring(buf,len){if(len<65534){if(buf.subarray&&STR_APPLY_UIA_OK||!buf.subarray&&STR_APPLY_OK){return String.fromCharCode.apply(null,utils.shrinkBuf(buf,len))}}var result="";for(var i=0;i4){utf16buf[out++]=65533;i+=c_len-1;continue}c&=c_len===2?31:c_len===3?15:7;while(c_len>1&&i1){utf16buf[out++]=65533;continue}if(c<65536){utf16buf[out++]=c}else{c-=65536;utf16buf[out++]=55296|c>>10&1023;utf16buf[out++]=56320|c&1023}}return buf2binstring(utf16buf,out)};exports.utf8border=function(buf,max){var pos;max=max||buf.length;if(max>buf.length){max=buf.length}pos=max-1;while(pos>=0&&(buf[pos]&192)===128){pos--}if(pos<0){return max}if(pos===0){return max}return pos+_utf8len[buf[pos]]>max?pos:max}},{"./common":19}],21:[function(require,module,exports){"use strict";function adler32(adler,buf,len,pos){ -var s1=adler&65535|0,s2=adler>>>16&65535|0,n=0;while(len!==0){n=len>2e3?2e3:len;len-=n;do{s1=s1+buf[pos++]|0;s2=s2+s1|0}while(--n);s1%=65521;s2%=65521}return s1|s2<<16|0}module.exports=adler32},{}],22:[function(require,module,exports){"use strict";module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],23:[function(require,module,exports){"use strict";function makeTable(){var c,table=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}table[n]=c}return table}var crcTable=makeTable();function crc32(crc,buf,len,pos){var t=crcTable,end=pos+len;crc^=-1;for(var i=pos;i>>8^t[(crc^buf[i])&255]}return crc^-1}module.exports=crc32},{}],24:[function(require,module,exports){"use strict";var utils=require("../utils/common");var trees=require("./trees");var adler32=require("./adler32");var crc32=require("./crc32");var msg=require("./messages");var Z_NO_FLUSH=0;var Z_PARTIAL_FLUSH=1;var Z_FULL_FLUSH=3;var Z_FINISH=4;var Z_BLOCK=5;var Z_OK=0;var Z_STREAM_END=1;var Z_STREAM_ERROR=-2;var Z_DATA_ERROR=-3;var Z_BUF_ERROR=-5;var Z_DEFAULT_COMPRESSION=-1;var Z_FILTERED=1;var Z_HUFFMAN_ONLY=2;var Z_RLE=3;var Z_FIXED=4;var Z_DEFAULT_STRATEGY=0;var Z_UNKNOWN=2;var Z_DEFLATED=8;var MAX_MEM_LEVEL=9;var MAX_WBITS=15;var DEF_MEM_LEVEL=8;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var MIN_MATCH=3;var MAX_MATCH=258;var MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1;var PRESET_DICT=32;var INIT_STATE=42;var EXTRA_STATE=69;var NAME_STATE=73;var COMMENT_STATE=91;var HCRC_STATE=103;var BUSY_STATE=113;var FINISH_STATE=666;var BS_NEED_MORE=1;var BS_BLOCK_DONE=2;var BS_FINISH_STARTED=3;var BS_FINISH_DONE=4;var OS_CODE=3;function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode}function rank(f){return(f<<1)-(f>4?9:0)}function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}function flush_pending(strm){var s=strm.state;var len=s.pending;if(len>strm.avail_out){len=strm.avail_out}if(len===0){return}utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out);strm.next_out+=len;s.pending_out+=len;strm.total_out+=len;strm.avail_out-=len;s.pending-=len;if(s.pending===0){s.pending_out=0}}function flush_block_only(s,last){trees._tr_flush_block(s,s.block_start>=0?s.block_start:-1,s.strstart-s.block_start,last);s.block_start=s.strstart;flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=b>>>8&255;s.pending_buf[s.pending++]=b&255}function read_buf(strm,buf,start,size){var len=strm.avail_in;if(len>size){len=size}if(len===0){return 0}strm.avail_in-=len;utils.arraySet(buf,strm.input,strm.next_in,len,start);if(strm.state.wrap===1){strm.adler=adler32(strm.adler,buf,len,start)}else if(strm.state.wrap===2){strm.adler=crc32(strm.adler,buf,len,start)}strm.next_in+=len;strm.total_in+=len;return len}function longest_match(s,cur_match){var chain_length=s.max_chain_length;var scan=s.strstart;var match;var len;var best_len=s.prev_length;var nice_match=s.nice_match;var limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0;var _win=s.window;var wmask=s.w_mask;var prev=s.prev;var strend=s.strstart+MAX_MATCH;var scan_end1=_win[scan+best_len-1];var scan_end=_win[scan+best_len];if(s.prev_length>=s.good_match){chain_length>>=2}if(nice_match>s.lookahead){nice_match=s.lookahead}do{match=cur_match;if(_win[match+best_len]!==scan_end||_win[match+best_len-1]!==scan_end1||_win[match]!==_win[scan]||_win[++match]!==_win[scan+1]){continue}scan+=2;match++;do{}while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&scanbest_len){s.match_start=cur_match;best_len=len;if(len>=nice_match){break}scan_end1=_win[scan+best_len-1];scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&--chain_length!==0);if(best_len<=s.lookahead){return best_len}return s.lookahead}function fill_window(s){var _w_size=s.w_size;var p,n,m,more,str;do{more=s.window_size-s.lookahead-s.strstart;if(s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0);s.match_start-=_w_size;s.strstart-=_w_size;s.block_start-=_w_size;n=s.hash_size;p=n;do{m=s.head[--p];s.head[p]=m>=_w_size?m-_w_size:0}while(--n);n=_w_size;p=n;do{m=s.prev[--p];s.prev[p]=m>=_w_size?m-_w_size:0}while(--n);more+=_w_size}if(s.strm.avail_in===0){break}n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more);s.lookahead+=n;if(s.lookahead+s.insert>=MIN_MATCH){str=s.strstart-s.insert;s.ins_h=s.window[str];s.ins_h=(s.ins_h<s.pending_buf_size-5){max_block_size=s.pending_buf_size-5}for(;;){if(s.lookahead<=1){fill_window(s);if(s.lookahead===0&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}s.strstart+=s.lookahead;s.lookahead=0;var max_start=s.block_start+max_block_size;if(s.strstart===0||s.strstart>=max_start){s.lookahead=s.strstart-max_start;s.strstart=max_start;flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.strstart>s.block_start){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_NEED_MORE}function deflate_fast(s,flush){var hash_head;var bflush;for(;;){if(s.lookahead=MIN_MATCH){s.ins_h=(s.ins_h<=MIN_MATCH){bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;if(s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do{s.strstart++;s.ins_h=(s.ins_h<=MIN_MATCH){s.ins_h=(s.ins_h<4096)){s.match_length=MIN_MATCH-1}}if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){s.ins_h=(s.ins_h<=MIN_MATCH&&s.strstart>0){scan=s.strstart-1;prev=_win[scan];if(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]){strend=s.strstart+MAX_MATCH;do{}while(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&scans.lookahead){s.match_length=s.lookahead}}}if(s.match_length>=MIN_MATCH){bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;s.strstart+=s.match_length;s.match_length=0}else{bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++}if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_huff(s,flush){var bflush;for(;;){if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE}break}}s.match_length=0;bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function Config(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length;this.max_lazy=max_lazy;this.nice_length=nice_length;this.max_chain=max_chain;this.func=func}var configuration_table;configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(s){s.window_size=2*s.w_size;zero(s.head);s.max_lazy_match=configuration_table[s.level].max_lazy;s.good_match=configuration_table[s.level].good_length;s.nice_match=configuration_table[s.level].nice_length;s.max_chain_length=configuration_table[s.level].max_chain;s.strstart=0;s.block_start=0;s.lookahead=0;s.insert=0;s.match_length=s.prev_length=MIN_MATCH-1;s.match_available=0;s.ins_h=0}function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=Z_DEFLATED;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new utils.Buf16(HEAP_SIZE*2);this.dyn_dtree=new utils.Buf16((2*D_CODES+1)*2);this.bl_tree=new utils.Buf16((2*BL_CODES+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new utils.Buf16(MAX_BITS+1);this.heap=new utils.Buf16(2*L_CODES+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new utils.Buf16(2*L_CODES+1);zero(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function deflateResetKeep(strm){var s;if(!strm||!strm.state){return err(strm,Z_STREAM_ERROR)}strm.total_in=strm.total_out=0;strm.data_type=Z_UNKNOWN;s=strm.state;s.pending=0;s.pending_out=0;if(s.wrap<0){s.wrap=-s.wrap}s.status=s.wrap?INIT_STATE:BUSY_STATE;strm.adler=s.wrap===2?0:1;s.last_flush=Z_NO_FLUSH;trees._tr_init(s);return Z_OK}function deflateReset(strm){var ret=deflateResetKeep(strm);if(ret===Z_OK){lm_init(strm.state)}return ret}function deflateSetHeader(strm,head){if(!strm||!strm.state){return Z_STREAM_ERROR}if(strm.state.wrap!==2){return Z_STREAM_ERROR}strm.state.gzhead=head;return Z_OK}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm){return Z_STREAM_ERROR}var wrap=1;if(level===Z_DEFAULT_COMPRESSION){level=6}if(windowBits<0){wrap=0;windowBits=-windowBits}else if(windowBits>15){wrap=2;windowBits-=16}if(memLevel<1||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||windowBits<8||windowBits>15||level<0||level>9||strategy<0||strategy>Z_FIXED){return err(strm,Z_STREAM_ERROR)}if(windowBits===8){windowBits=9}var s=new DeflateState;strm.state=s;s.strm=strm;s.wrap=wrap;s.gzhead=null;s.w_bits=windowBits;s.w_size=1<Z_BLOCK||flush<0){return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR}s=strm.state;if(!strm.output||!strm.input&&strm.avail_in!==0||s.status===FINISH_STATE&&flush!==Z_FINISH){return err(strm,strm.avail_out===0?Z_BUF_ERROR:Z_STREAM_ERROR)}s.strm=strm;old_flush=s.last_flush;s.last_flush=flush;if(s.status===INIT_STATE){if(s.wrap===2){strm.adler=0;put_byte(s,31);put_byte(s,139);put_byte(s,8);if(!s.gzhead){put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,OS_CODE);s.status=BUSY_STATE}else{put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));put_byte(s,s.gzhead.time&255);put_byte(s,s.gzhead.time>>8&255);put_byte(s,s.gzhead.time>>16&255);put_byte(s,s.gzhead.time>>24&255);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){put_byte(s,s.gzhead.extra.length&255);put_byte(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=EXTRA_STATE}}else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8;var level_flags=-1;if(s.strategy>=Z_HUFFMAN_ONLY||s.level<2){level_flags=0}else if(s.level<6){level_flags=1}else if(s.level===6){level_flags=2}else{level_flags=3}header|=level_flags<<6;if(s.strstart!==0){header|=PRESET_DICT}header+=31-header%31;s.status=BUSY_STATE;putShortMSB(s,header);if(s.strstart!==0){putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}strm.adler=1}}if(s.status===EXTRA_STATE){if(s.gzhead.extra){beg=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){break}}put_byte(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=NAME_STATE}}else{s.status=NAME_STATE}}if(s.status===NAME_STATE){if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.gzindex=0;s.status=COMMENT_STATE}}else{s.status=COMMENT_STATE}}if(s.status===COMMENT_STATE){if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindexbeg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.status=HCRC_STATE}}else{s.status=HCRC_STATE}}if(s.status===HCRC_STATE){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){flush_pending(strm)}if(s.pending+2<=s.pending_buf_size){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);strm.adler=0;s.status=BUSY_STATE}}else{s.status=BUSY_STATE}}if(s.pending!==0){flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}else if(strm.avail_in===0&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH){return err(strm,Z_BUF_ERROR)}if(s.status===FINISH_STATE&&strm.avail_in!==0){return err(strm,Z_BUF_ERROR)}if(strm.avail_in!==0||s.lookahead!==0||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===Z_RLE?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if(bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE){s.status=FINISH_STATE}if(bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED){if(strm.avail_out===0){s.last_flush=-1}return Z_OK}if(bstate===BS_BLOCK_DONE){if(flush===Z_PARTIAL_FLUSH){trees._tr_align(s)}else if(flush!==Z_BLOCK){trees._tr_stored_block(s,0,0,false);if(flush===Z_FULL_FLUSH){zero(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}}if(flush!==Z_FINISH){return Z_OK}if(s.wrap<=0){return Z_STREAM_END}if(s.wrap===2){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);put_byte(s,strm.adler>>16&255);put_byte(s,strm.adler>>24&255);put_byte(s,strm.total_in&255);put_byte(s,strm.total_in>>8&255);put_byte(s,strm.total_in>>16&255);put_byte(s,strm.total_in>>24&255)}else{putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}flush_pending(strm);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?Z_OK:Z_STREAM_END}function deflateEnd(strm){var status;if(!strm||!strm.state){return Z_STREAM_ERROR}status=strm.state.status;if(status!==INIT_STATE&&status!==EXTRA_STATE&&status!==NAME_STATE&&status!==COMMENT_STATE&&status!==HCRC_STATE&&status!==BUSY_STATE&&status!==FINISH_STATE){return err(strm,Z_STREAM_ERROR)}strm.state=null;return status===BUSY_STATE?err(strm,Z_DATA_ERROR):Z_OK}function deflateSetDictionary(strm,dictionary){var dictLength=dictionary.length;var s;var str,n;var wrap;var avail;var next;var input;var tmpDict;if(!strm||!strm.state){return Z_STREAM_ERROR}s=strm.state;wrap=s.wrap;if(wrap===2||wrap===1&&s.status!==INIT_STATE||s.lookahead){return Z_STREAM_ERROR}if(wrap===1){strm.adler=adler32(strm.adler,dictionary,dictLength,0)}s.wrap=0;if(dictLength>=s.w_size){if(wrap===0){zero(s.head);s.strstart=0;s.block_start=0;s.insert=0}tmpDict=new utils.Buf8(s.w_size);utils.arraySet(tmpDict,dictionary,dictLength-s.w_size,s.w_size,0);dictionary=tmpDict;dictLength=s.w_size}avail=strm.avail_in;next=strm.next_in;input=strm.input;strm.avail_in=dictLength;strm.next_in=0;strm.input=dictionary;fill_window(s);while(s.lookahead>=MIN_MATCH){str=s.strstart;n=s.lookahead-(MIN_MATCH-1);do{s.ins_h=(s.ins_h<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op===0){output[_out++]=here&65535}else if(op&16){len=here&65535;op&=15;if(op){if(bits>>=op;bits-=op}if(bits<15){hold+=input[_in++]<>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op&16){dist=here&65535;op&=15;if(bitsdmax){strm.msg="invalid distance too far back";state.mode=BAD;break top}hold>>>=op;bits-=op;op=_out-beg;if(dist>op){op=dist-op;if(op>whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break top}}from=0;from_source=s_window;if(wnext===0){from+=wsize-op;if(op2){output[_out++]=from_source[from++];output[_out++]=from_source[from++];output[_out++]=from_source[from++];len-=3}if(len){output[_out++]=from_source[from++];if(len>1){output[_out++]=from_source[from++]}}}else{from=_out-dist;do{output[_out++]=output[from++];output[_out++]=output[from++];output[_out++]=output[from++];len-=3}while(len>2);if(len){output[_out++]=output[from++];if(len>1){output[_out++]=output[from++]}}}}else if((op&64)===0){here=dcode[(here&65535)+(hold&(1<>3;_in-=len;bits-=len<<3;hold&=(1<>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function InflateState(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new utils.Buf16(320);this.work=new utils.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function inflateResetKeep(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;strm.total_in=strm.total_out=state.total=0;strm.msg="";if(state.wrap){strm.adler=state.wrap&1}state.mode=HEAD;state.last=0;state.havedict=0;state.dmax=32768;state.head=null;state.hold=0;state.bits=0;state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS);state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS);state.sane=1;state.back=-1;return Z_OK}function inflateReset(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;state.wsize=0;state.whave=0;state.wnext=0;return inflateResetKeep(strm)}function inflateReset2(strm,windowBits){var wrap;var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;if(windowBits<0){wrap=0;windowBits=-windowBits}else{wrap=(windowBits>>4)+1;if(windowBits<48){windowBits&=15}}if(windowBits&&(windowBits<8||windowBits>15)){return Z_STREAM_ERROR}if(state.window!==null&&state.wbits!==windowBits){state.window=null}state.wrap=wrap;state.wbits=windowBits;return inflateReset(strm)}function inflateInit2(strm,windowBits){var ret;var state;if(!strm){return Z_STREAM_ERROR}state=new InflateState;strm.state=state;state.window=null;ret=inflateReset2(strm,windowBits);if(ret!==Z_OK){strm.state=null}return ret}function inflateInit(strm){return inflateInit2(strm,DEF_WBITS)}var virgin=true;var lenfix,distfix;function fixedtables(state){if(virgin){var sym;lenfix=new utils.Buf32(512);distfix=new utils.Buf32(32);sym=0;while(sym<144){state.lens[sym++]=8}while(sym<256){state.lens[sym++]=9}while(sym<280){state.lens[sym++]=7}while(sym<288){state.lens[sym++]=8}inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9});sym=0;while(sym<32){state.lens[sym++]=5}inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5});virgin=false}state.lencode=lenfix;state.lenbits=9;state.distcode=distfix;state.distbits=5}function updatewindow(strm,src,end,copy){var dist;var state=strm.state;if(state.window===null){state.wsize=1<=state.wsize){utils.arraySet(state.window,src,end-state.wsize,state.wsize,0);state.wnext=0;state.whave=state.wsize}else{dist=state.wsize-state.wnext;if(dist>copy){dist=copy}utils.arraySet(state.window,src,end-copy,dist,state.wnext);copy-=dist;if(copy){utils.arraySet(state.window,src,end-copy,copy,0);state.wnext=copy;state.whave=state.wsize}else{state.wnext+=dist;if(state.wnext===state.wsize){state.wnext=0}if(state.whave>>8&255;state.check=crc32(state.check,hbuf,2,0);hold=0;bits=0;state.mode=FLAGS;break}state.flags=0;if(state.head){state.head.done=false}if(!(state.wrap&1)||(((hold&255)<<8)+(hold>>8))%31){strm.msg="incorrect header check";state.mode=BAD;break}if((hold&15)!==Z_DEFLATED){strm.msg="unknown compression method";state.mode=BAD;break}hold>>>=4;bits-=4;len=(hold&15)+8;if(state.wbits===0){state.wbits=len}else if(len>state.wbits){strm.msg="invalid window size";state.mode=BAD;break}state.dmax=1<>8&1}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=TIME;case TIME:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;hbuf[2]=hold>>>16&255;hbuf[3]=hold>>>24&255;state.check=crc32(state.check,hbuf,4,0)}hold=0;bits=0;state.mode=OS;case OS:while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>8}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=EXLEN;case EXLEN:if(state.flags&1024){while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0}else if(state.head){state.head.extra=null}state.mode=EXTRA;case EXTRA:if(state.flags&1024){copy=state.length;if(copy>have){copy=have}if(copy){if(state.head){len=state.head.extra_len-state.length;if(!state.head.extra){state.head.extra=new Array(state.head.extra_len)}utils.arraySet(state.head.extra,input,next,copy,len)}if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;state.length-=copy}if(state.length){break inf_leave}}state.length=0;state.mode=NAME;case NAME:if(state.flags&2048){if(have===0){break inf_leave}copy=0;do{len=input[next+copy++];if(state.head&&len&&state.length<65536){state.head.name+=String.fromCharCode(len)}}while(len&©>9&1;state.head.done=true}strm.adler=state.check=0;state.mode=TYPE;break;case DICTID:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=bits&7;bits-=bits&7;state.mode=CHECK;break}while(bits<3){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=1;bits-=1;switch(hold&3){case 0:state.mode=STORED;break;case 1:fixedtables(state);state.mode=LEN_;if(flush===Z_TREES){hold>>>=2;bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg="invalid block type";state.mode=BAD}hold>>>=2;bits-=2;break;case STORED:hold>>>=bits&7;bits-=bits&7;while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<>>16^65535)){strm.msg="invalid stored block lengths";state.mode=BAD;break}state.length=hold&65535;hold=0;bits=0;state.mode=COPY_;if(flush===Z_TREES){break inf_leave}case COPY_:state.mode=COPY;case COPY:copy=state.length;if(copy){if(copy>have){copy=have}if(copy>left){copy=left}if(copy===0){break inf_leave}utils.arraySet(output,input,next,copy,put);have-=copy;next+=copy;left-=copy;put+=copy;state.length-=copy;break}state.mode=TYPE;break;case TABLE:while(bits<14){if(have===0){break inf_leave}have--;hold+=input[next++]<>>=5;bits-=5;state.ndist=(hold&31)+1;hold>>>=5;bits-=5;state.ncode=(hold&15)+4;hold>>>=4;bits-=4;if(state.nlen>286||state.ndist>30){strm.msg="too many length or distance symbols";state.mode=BAD;break}state.have=0;state.mode=LENLENS;case LENLENS:while(state.have>>=3;bits-=3}while(state.have<19){state.lens[order[state.have++]]=0}state.lencode=state.lendyn;state.lenbits=7;opts={bits:state.lenbits};ret=inflate_table(CODES,state.lens,0,19,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid code lengths set";state.mode=BAD;break}state.have=0;state.mode=CODELENS;case CODELENS:while(state.have>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=here_bits;bits-=here_bits;state.lens[state.have++]=here_val}else{if(here_val===16){n=here_bits+2;while(bits>>=here_bits;bits-=here_bits;if(state.have===0){strm.msg="invalid bit length repeat";state.mode=BAD;break}len=state.lens[state.have-1];copy=3+(hold&3);hold>>>=2;bits-=2}else if(here_val===17){n=here_bits+3;while(bits>>=here_bits;bits-=here_bits;len=0;copy=3+(hold&7);hold>>>=3;bits-=3}else{n=here_bits+7;while(bits>>=here_bits;bits-=here_bits;len=0;copy=11+(hold&127);hold>>>=7;bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg="invalid bit length repeat";state.mode=BAD;break}while(copy--){state.lens[state.have++]=len}}}if(state.mode===BAD){break}if(state.lens[256]===0){strm.msg="invalid code -- missing end-of-block";state.mode=BAD;break}state.lenbits=9;opts={bits:state.lenbits};ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg="invalid literal/lengths set";state.mode=BAD;break}state.distbits=6;state.distcode=state.distdyn;opts={bits:state.distbits};ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts);state.distbits=opts.bits;if(ret){strm.msg="invalid distances set";state.mode=BAD;break}state.mode=LEN_;if(flush===Z_TREES){break inf_leave}case LEN_:state.mode=LEN;case LEN:if(have>=6&&left>=258){strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;inflate_fast(strm,_out);put=strm.next_out;output=strm.output;left=strm.avail_out;next=strm.next_in;input=strm.input;have=strm.avail_in;hold=state.hold;bits=state.bits;if(state.mode===TYPE){state.back=-1}break}state.back=0;for(;;){here=state.lencode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;state.length=here_val;if(here_op===0){state.mode=LIT;break}if(here_op&32){state.back=-1;state.mode=TYPE;break}if(here_op&64){strm.msg="invalid literal/length code";state.mode=BAD;break}state.extra=here_op&15;state.mode=LENEXT;case LENEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}state.was=state.length;state.mode=DIST;case DIST:for(;;){here=state.distcode[hold&(1<>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;if(here_op&64){strm.msg="invalid distance code";state.mode=BAD;break}state.offset=here_val;state.extra=here_op&15;state.mode=DISTEXT;case DISTEXT:if(state.extra){n=state.extra;while(bits>>=state.extra;bits-=state.extra;state.back+=state.extra}if(state.offset>state.dmax){strm.msg="invalid distance too far back";state.mode=BAD;break}state.mode=MATCH;case MATCH:if(left===0){break inf_leave}copy=_out-left;if(state.offset>copy){copy=state.offset-copy;if(copy>state.whave){if(state.sane){strm.msg="invalid distance too far back";state.mode=BAD;break}}if(copy>state.wnext){copy-=state.wnext;from=state.wsize-copy}else{from=state.wnext-copy}if(copy>state.length){copy=state.length}from_source=state.window}else{from_source=output;from=put-state.offset;copy=state.length}if(copy>left){copy=left}left-=copy;state.length-=copy;do{output[put++]=from_source[from++]}while(--copy);if(state.length===0){state.mode=LEN}break;case LIT:if(left===0){break inf_leave}output[put++]=state.length;left--;state.mode=LEN;break;case CHECK:if(state.wrap){while(bits<32){if(have===0){break inf_leave}have--;hold|=input[next++]<=1;max--){if(count[max]!==0){break}}if(root>max){root=max}if(max===0){table[table_index++]=1<<24|64<<16|0;table[table_index++]=1<<24|64<<16|0;opts.bits=1;return 0}for(min=1;min0&&(type===CODES||max!==1)){return-1}offs[1]=0;for(len=1;lenENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}for(;;){here_bits=len-drop;if(work[sym]end){here_op=extra[extra_index+work[sym]];here_val=base[base_index+work[sym]]}else{here_op=32+64;here_val=0}incr=1<>drop)+fill]=here_bits<<24|here_op<<16|here_val|0}while(fill!==0);incr=1<>=1}if(incr!==0){huff&=incr-1;huff+=incr}else{huff=0}sym++;if(--count[len]===0){if(len===max){break}len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){if(drop===0){drop=root}next+=min;curr=len-drop;left=1<ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}low=huff&mask;table[low]=root<<24|curr<<16|next-table_index|0}}if(huff!==0){table[next+huff]=len-drop<<24|64<<16|0}opts.bits=root;return 0}},{"../utils/common":19}],29:[function(require,module,exports){"use strict";module.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],30:[function(require,module,exports){"use strict";var utils=require("../utils/common");var Z_FIXED=4;var Z_BINARY=0;var Z_TEXT=1;var Z_UNKNOWN=2;function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}var STORED_BLOCK=0;var STATIC_TREES=1;var DYN_TREES=2;var MIN_MATCH=3;var MAX_MATCH=258;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var Buf_size=16;var MAX_BL_BITS=7;var END_BLOCK=256;var REP_3_6=16;var REPZ_3_10=17;var REPZ_11_138=18;var extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var DIST_CODE_LEN=512;var static_ltree=new Array((L_CODES+2)*2);zero(static_ltree);var static_dtree=new Array(D_CODES*2);zero(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero(_dist_code);var _length_code=new Array(MAX_MATCH-MIN_MATCH+1);zero(_length_code);var base_length=new Array(LENGTH_CODES);zero(base_length);var base_dist=new Array(D_CODES);zero(base_dist);function StaticTreeDesc(static_tree,extra_bits,extra_base,elems,max_length){this.static_tree=static_tree;this.extra_bits=extra_bits;this.extra_base=extra_base;this.elems=elems;this.max_length=max_length;this.has_stree=static_tree&&static_tree.length}var static_l_desc;var static_d_desc;var static_bl_desc;function TreeDesc(dyn_tree,stat_desc){this.dyn_tree=dyn_tree;this.max_code=0;this.stat_desc=stat_desc}function d_code(dist){return dist<256?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=w&255;s.pending_buf[s.pending++]=w>>>8&255}function send_bits(s,value,length){if(s.bi_valid>Buf_size-length){s.bi_buf|=value<>Buf_size-s.bi_valid;s.bi_valid+=length-Buf_size}else{s.bi_buf|=value<>>=1;res<<=1}while(--len>0);return res>>>1}function bi_flush(s){if(s.bi_valid===16){put_short(s,s.bi_buf);s.bi_buf=0;s.bi_valid=0}else if(s.bi_valid>=8){s.pending_buf[s.pending++]=s.bi_buf&255;s.bi_buf>>=8;s.bi_valid-=8}}function gen_bitlen(s,desc){var tree=desc.dyn_tree;var max_code=desc.max_code;var stree=desc.stat_desc.static_tree;var has_stree=desc.stat_desc.has_stree;var extra=desc.stat_desc.extra_bits;var base=desc.stat_desc.extra_base;var max_length=desc.stat_desc.max_length;var h;var n,m;var bits;var xbits;var f;var overflow=0;for(bits=0;bits<=MAX_BITS;bits++){s.bl_count[bits]=0}tree[s.heap[s.heap_max]*2+1]=0;for(h=s.heap_max+1;hmax_length){bits=max_length;overflow++}tree[n*2+1]=bits;if(n>max_code){continue}s.bl_count[bits]++;xbits=0;if(n>=base){xbits=extra[n-base]}f=tree[n*2];s.opt_len+=f*(bits+xbits);if(has_stree){s.static_len+=f*(stree[n*2+1]+xbits)}}if(overflow===0){return}do{bits=max_length-1;while(s.bl_count[bits]===0){bits--}s.bl_count[bits]--;s.bl_count[bits+1]+=2;s.bl_count[max_length]--;overflow-=2}while(overflow>0);for(bits=max_length;bits!==0;bits--){n=s.bl_count[bits];while(n!==0){m=s.heap[--h];if(m>max_code){continue}if(tree[m*2+1]!==bits){s.opt_len+=(bits-tree[m*2+1])*tree[m*2];tree[m*2+1]=bits}n--}}}function gen_codes(tree,max_code,bl_count){var next_code=new Array(MAX_BITS+1);var code=0;var bits;var n;for(bits=1;bits<=MAX_BITS;bits++){next_code[bits]=code=code+bl_count[bits-1]<<1}for(n=0;n<=max_code;n++){var len=tree[n*2+1];if(len===0){continue}tree[n*2]=bi_reverse(next_code[len]++,len)}}function tr_static_init(){var n;var bits;var length;var code;var dist;var bl_count=new Array(MAX_BITS+1);length=0;for(code=0;code>=7;for(;code8){put_short(s,s.bi_buf)}else if(s.bi_valid>0){s.pending_buf[s.pending++]=s.bi_buf}s.bi_buf=0;s.bi_valid=0}function copy_block(s,buf,len,header){bi_windup(s);if(header){put_short(s,len);put_short(s,~len)}utils.arraySet(s.pending_buf,s.window,buf,len,s.pending);s.pending+=len}function smaller(tree,n,m,depth){var _n2=n*2;var _m2=m*2;return tree[_n2]>1;n>=1;n--){pqdownheap(s,tree,n)}node=elems;do{n=s.heap[1];s.heap[1]=s.heap[s.heap_len--];pqdownheap(s,tree,1);m=s.heap[1];s.heap[--s.heap_max]=n;s.heap[--s.heap_max]=m;tree[node*2]=tree[n*2]+tree[m*2];s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1;tree[n*2+1]=tree[m*2+1]=node;s.heap[1]=node++;pqdownheap(s,tree,1)}while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1];gen_bitlen(s,desc);gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var n;var prevlen=-1;var curlen;var nextlen=tree[0*2+1];var count=0;var max_count=7;var min_count=4;if(nextlen===0){max_count=138;min_count=3}tree[(max_code+1)*2+1]=65535;for(n=0;n<=max_code;n++){curlen=nextlen;nextlen=tree[(n+1)*2+1];if(++count=3;max_blindex--){if(s.bl_tree[bl_order[max_blindex]*2+1]!==0){break}}s.opt_len+=3*(max_blindex+1)+5+5+4;return max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;send_bits(s,lcodes-257,5);send_bits(s,dcodes-1,5);send_bits(s,blcodes-4,4);for(rank=0;rank>>=1){if(black_mask&1&&s.dyn_ltree[n*2]!==0){return Z_BINARY}}if(s.dyn_ltree[9*2]!==0||s.dyn_ltree[10*2]!==0||s.dyn_ltree[13*2]!==0){return Z_TEXT}for(n=32;n0){if(s.strm.data_type===Z_UNKNOWN){s.strm.data_type=detect_data_type(s)}build_tree(s,s.l_desc);build_tree(s,s.d_desc);max_blindex=build_bl_tree(s);opt_lenb=s.opt_len+3+7>>>3;static_lenb=s.static_len+3+7>>>3;if(static_lenb<=opt_lenb){opt_lenb=static_lenb}}else{opt_lenb=static_lenb=stored_len+5}if(stored_len+4<=opt_lenb&&buf!==-1){_tr_stored_block(s,buf,stored_len,last)}else if(s.strategy===Z_FIXED||static_lenb===opt_lenb){send_bits(s,(STATIC_TREES<<1)+(last?1:0),3);compress_block(s,static_ltree,static_dtree)}else{send_bits(s,(DYN_TREES<<1)+(last?1:0),3);send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1);compress_block(s,s.dyn_ltree,s.dyn_dtree)}init_block(s);if(last){bi_windup(s)}}function _tr_tally(s,dist,lc){s.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&255;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&255;s.pending_buf[s.l_buf+s.last_lit]=lc&255;s.last_lit++;if(dist===0){s.dyn_ltree[lc*2]++}else{s.matches++;dist--;s.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]++;s.dyn_dtree[d_code(dist)*2]++}return s.last_lit===s.lit_bufsize-1}exports._tr_init=_tr_init;exports._tr_stored_block=_tr_stored_block;exports._tr_flush_block=_tr_flush_block;exports._tr_tally=_tr_tally;exports._tr_align=_tr_align},{"../utils/common":19}],31:[function(require,module,exports){"use strict";function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}module.exports=ZStream},{}],32:[function(require,module,exports){(function(process){(function(){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=1;--i){code=path.charCodeAt(i);if(code===47){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1)return hasRoot?"/":".";if(hasRoot&&end===1){return"/"}return path.slice(0,end)};function basename(path){if(typeof path!=="string")path=path+"";var start=0;var end=-1;var matchedSlash=true;var i;for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1)return"";return path.slice(start,end)}exports.basename=function(path,ext){var f=basename(path);if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){if(typeof path!=="string")path=path+"";var startDot=-1;var startPart=0;var end=-1;var matchedSlash=true;var preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[] -;for(var i=0;i1){for(var i=1;idaikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&absX>absY&&absX>absZ){axis=orientationX}else if(absY>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&absY>absX&&absY>absZ){axis=orientationY}else if(absZ>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&absZ>absX&&absZ>absY){axis=orientationZ}else{axis=null}return axis};daikon.Image.prototype.getCols=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_COLS[0],daikon.Tag.TAG_COLS[1]),0)};daikon.Image.prototype.getRows=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ROWS[0],daikon.Tag.TAG_ROWS[1]),0)};daikon.Image.prototype.getSeriesDescription=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_DESCRIPTION[0],daikon.Tag.TAG_SERIES_DESCRIPTION[1]),0)};daikon.Image.prototype.getSeriesInstanceUID=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_INSTANCE_UID[0],daikon.Tag.TAG_SERIES_INSTANCE_UID[1]),0)};daikon.Image.prototype.getSeriesNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_NUMBER[0],daikon.Tag.TAG_SERIES_NUMBER[1]),0)};daikon.Image.prototype.getEchoNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ECHO_NUMBER[0],daikon.Tag.TAG_ECHO_NUMBER[1]),0)};daikon.Image.prototype.getImagePosition=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_POSITION[0],daikon.Tag.TAG_IMAGE_POSITION[1]))};daikon.Image.prototype.getImageDirections=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_ORIENTATION[0],daikon.Tag.TAG_IMAGE_ORIENTATION[1]))};daikon.Image.prototype.getImagePositionSliceDir=function(sliceDir){var imagePos=daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_POSITION[0],daikon.Tag.TAG_IMAGE_POSITION[1]));if(imagePos){if(sliceDir>=0){return imagePos[sliceDir]}}return 0};daikon.Image.prototype.getModality=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_MODALITY[0],daikon.Tag.TAG_MODALITY[1]),0)};daikon.Image.prototype.getSliceLocation=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_LOCATION[0],daikon.Tag.TAG_SLICE_LOCATION[1]),0)};daikon.Image.prototype.getSliceLocationVector=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_SLICE_LOCATION_VECTOR[0],daikon.Tag.TAG_SLICE_LOCATION_VECTOR[1]))};daikon.Image.prototype.getImageNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_NUM[0],daikon.Tag.TAG_IMAGE_NUM[1]),0)};daikon.Image.prototype.getTemporalPosition=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TEMPORAL_POSITION[0],daikon.Tag.TAG_TEMPORAL_POSITION[1]),0)};daikon.Image.prototype.getTemporalNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)};daikon.Image.prototype.getSliceGap=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_GAP[0],daikon.Tag.TAG_SLICE_GAP[1]),0)};daikon.Image.prototype.getSliceThickness=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_THICKNESS[0],daikon.Tag.TAG_SLICE_THICKNESS[1]),0)};daikon.Image.prototype.getImageMax=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_MAX[0],daikon.Tag.TAG_IMAGE_MAX[1]),0)};daikon.Image.prototype.getImageMin=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_MIN[0],daikon.Tag.TAG_IMAGE_MIN[1]),0)};daikon.Image.prototype.getDataScaleSlope=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_SLOPE[0],daikon.Tag.TAG_DATA_SCALE_SLOPE[1]),0)};daikon.Image.prototype.getDataScaleIntercept=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_INTERCEPT[0],daikon.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)};daikon.Image.prototype.getDataScaleElscint=function(){var scale=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_ELSCINT[0],daikon.Tag.TAG_DATA_SCALE_ELSCINT[1]),0);if(!scale){scale=1}var bandwidth=this.getPixelBandwidth();scale=Math.sqrt(bandwidth)/(10*scale);if(scale<=0){scale=1}return scale};daikon.Image.prototype.getWindowWidth=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_WINDOW_WIDTH[0],daikon.Tag.TAG_WINDOW_WIDTH[1]),0)};daikon.Image.prototype.getWindowCenter=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_WINDOW_CENTER[0],daikon.Tag.TAG_WINDOW_CENTER[1]),0)};daikon.Image.prototype.getPixelBandwidth=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_BANDWIDTH[0],daikon.Tag.TAG_PIXEL_BANDWIDTH[1]),0)};daikon.Image.prototype.getSeriesId=function(){var des=this.getSeriesDescription();var uid=this.getSeriesInstanceUID();var num=this.getSeriesNumber();var echo=this.getEchoNumber();var orientation=this.getOrientation();var cols=this.getCols();var rows=this.getRows();var id="";if(des!==null){id+=" "+des}if(uid!==null){id+=" "+uid}if(num!==null){id+=" "+num}if(echo!==null){id+=" "+echo}if(orientation!==null){id+=" "+orientation}id+=" ("+cols+" x "+rows+")";return id};daikon.Image.prototype.getPixelSpacing=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_SPACING[0],daikon.Tag.TAG_PIXEL_SPACING[1]))};daikon.Image.prototype.getImageType=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_TYPE[0],daikon.Tag.TAG_IMAGE_TYPE[1]))};daikon.Image.prototype.getBitsStored=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_BITS_STORED[0],daikon.Tag.TAG_BITS_STORED[1]),0)};daikon.Image.prototype.getBitsAllocated=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_BITS_ALLOCATED[0],daikon.Tag.TAG_BITS_ALLOCATED[1]),0)};daikon.Image.prototype.getFrameTime=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_FRAME_TIME[0],daikon.Tag.TAG_FRAME_TIME[1]),0)};daikon.Image.prototype.getAcquisitionMatrix=function(){var mat,matPrivate,start,end,str;mat=[0,0];mat[0]=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ACQUISITION_MATRIX[0],daikon.Tag.TAG_ACQUISITION_MATRIX[1]),0);if(this.privateDataAll===null){this.privateDataAll=this.getAllInterpretedPrivateData()}if(this.privateDataAll!==null&&this.privateDataAll.length>0){start=this.privateDataAll.indexOf("AcquisitionMatrixText");if(start!==-1){end=this.privateDataAll.indexOf("\n",start);if(end!==-1){str=this.privateDataAll.substring(start,end);matPrivate=str.match(/\d+/g);if(matPrivate!==null&&matPrivate.length===2){mat[0]=matPrivate[0];mat[1]=matPrivate[1]}else if(matPrivate!==null&&matPrivate.length===1){mat[0]=matPrivate[0]}}}}if(mat[1]===0){mat[1]=mat[0]}return mat};daikon.Image.prototype.getTR=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TR,daikon.Tag.TAG_TR[1]),0)};daikon.Image.prototype.putTag=function(tag){if(this.tags[tag.id]&&this.tags[tag.id].value[0]!==tag.value[0]){return}this.tags[tag.id]=tag;this.putFlattenedTag(this.tagsFlat,tag)};daikon.Image.prototype.putFlattenedTag=function(tags,tag){var ctr;if(tag.sublist){for(ctr=0;ctrmax){max=value;maxIndex=dataCtr}}if(asObject){return{data:data,min:min,minIndex:minIndex,max:max,maxIndex:maxIndex,numCols:this.getCols(),numRows:this.getRows()}}return data};daikon.Image.prototype.convertPalette=function(){var data,reds,greens,blues,rgb,numBytes,numElements,ctr,index,rVal,gVal,bVal;data=this.tags[daikon.Tag.createId(daikon.Tag.TAG_PIXEL_DATA[0],daikon.Tag.TAG_PIXEL_DATA[1])].value;reds=this.getPalleteValues(daikon.Tag.TAG_PALETTE_RED);greens=this.getPalleteValues(daikon.Tag.TAG_PALETTE_GREEN);blues=this.getPalleteValues(daikon.Tag.TAG_PALETTE_BLUE);if(reds!==null&&reds.length>0&&greens!==null&&greens.length>0&&blues!==null&&blues.length>0&&!this.convertedPalette){rgb=new DataView(new ArrayBuffer(this.getRows()*this.getCols()*this.getNumberOfFrames()*3));numBytes=parseInt(Math.ceil(this.getBitsAllocated()/8));numElements=data.byteLength/numBytes;if(numBytes===1){for(ctr=0;ctrbiggest){biggest=Math.abs(dirCos[ctr]);bigRow=ctr}}biggest=0;for(;ctr<6;ctr+=1){if(Math.abs(dirCos[ctr])>biggest){biggest=Math.abs(dirCos[ctr]);bigCol=ctr}}switch(bigRow){case 0:orient+="X";if(bigCol===4){orient+="YZ"}else{orient+="ZY"}break;case 1:orient+="Y";if(bigCol===3){orient+="XZ"}else{orient+="ZX"}break;case 2:orient+="Z";if(bigCol===3){orient+="XY"}else{orient+="YX"}break;default:break}switch(bigRow){case 0:if(dirCos[bigRow]>0){orient+="-"}else{orient+="+"}if(bigCol===4){if(dirCos[bigCol]>0){orient+="-"}else{orient+="+"}}else{if(dirCos[bigCol]>0){orient+="+"}else{orient+="-"}}break;case 1:if(dirCos[bigRow]>0){orient+="-"}else{orient+="+"}if(bigCol===3){if(dirCos[bigCol]>0){orient+="-"}else{orient+="+"}}else{if(dirCos[bigCol]>0){orient+="+"}else{orient+="-"}}break;case 2:if(dirCos[bigRow]>0){orient+="+"}else{orient+="-"}if(dirCos[bigCol]>0){orient+="-"}else{orient+="+"}break;default:break}if(rowSpacing===0){orient+="+";orientation=orient}else{if(swapZ){switch(orient.charAt(2)){case"X":if(rowSpacing>0){orient+="-"}else{orient+="+"}break;case"Y":case"Z":if(rowSpacing>0){orient+="+"}else{orient+="-"}break;default:break}}else{switch(orient.charAt(2)){case"X":if(rowSpacing>0){orient+="+"}else{orient+="-"}break;case"Y":case"Z":if(rowSpacing>0){orient+="-"}else{orient+="+"}break;default:break}}orientation=orient}return orientation};daikon.Image.prototype.isMosaic=function(){var imageType,labeledAsMosaic=false,canReadAsMosaic,ctr,matSize;imageType=this.getImageType();if(imageType!==null){for(ctr=0;ctr0&&(matSize[0]1){dataConcat[ctr]=daikon.Utils.concatArrayBuffers2(data[ctr])}else{dataConcat[ctr]=data[ctr][0]}data[ctr]=null}return dataConcat};daikon.Image.prototype.getRLE=function(){var encapTags,numTags,ctr,data=[];encapTags=this.getEncapsulatedData();if(encapTags){numTags=encapTags.length;for(ctr=1;ctr"}}str=str.replace(/\n\s*\n/g,"\n");str=str.replace(/(?:\r\n|\r|\n)/g,"
");return str};daikon.Image.prototype.getPalleteValues=function(tagID){var valsBig,valsLittle,value,numVals,ctr,valsBigMax,valsBigMin,valsLittleMax,valsLittleMin,valsBigDiff,valsLittleDiff;valsBig=null;valsLittle=null;value=daikon.Image.getValueSafely(this.getTag(tagID[0],tagID[1]));if(value!==null){numVals=value.buffer.byteLength/2;valsBig=[];valsLittle=[];for(ctr=0;ctr255||min<0){slope=255/(max-min);intercept=min;for(ctr=0;ctr=this.metaFinishedOffset){this.needsDeflate=false;copyMeta=data.buffer.slice(0,tag.offsetEnd);copyDeflated=data.buffer.slice(tag.offsetEnd);this.inflated=daikon.Utils.concatArrayBuffers(copyMeta,pako.inflateRaw(copyDeflated));data=new DataView(this.inflated)}tag=this.getNextTag(data,tag.offsetEnd)}}catch(err){this.error=err}if(image!==null){image.littleEndian=this.littleEndian}return image};daikon.Parser.prototype.parseEncapsulated=function(data){var offset=0,tag,tags=[];this.encapsulation=true;try{tag=this.getNextTag(data,offset);while(tag!==null){if(tag.isSublistItem()){tags.push(tag)}if(daikon.Parser.verbose){console.log(tag.toString())}tag=this.getNextTag(data,tag.offsetEnd)}}catch(err){this.error=err}return tags};daikon.Parser.prototype.testForValidTag=function(data){var offset,tag=null;try{offset=this.findFirstTagOffset(data);tag=this.getNextTag(data,offset,false)}catch(err){this.error=err}return tag};daikon.Parser.prototype.getNextTag=function(data,offset,testForTag){var group=0,element,value=null,offsetStart=offset,offsetValue,length=0,little=true,vr=null,tag;if(offset>=data.byteLength){return null}if(this.metaFinished){little=this.littleEndian;group=data.getUint16(offset,little)}else{group=data.getUint16(offset,true);if(this.metaFinishedOffset!==-1&&offset>=this.metaFinishedOffset||group!==2){this.metaFinished=true;little=this.littleEndian;group=data.getUint16(offset,little)}else{little=true}}if(!this.metaFound&&group===2){this.metaFound=true}offset+=2;element=data.getUint16(offset,little);offset+=2;if(this.explicit||!this.metaFinished){vr=daikon.Utils.getStringAt(data,offset,2);if(!this.metaFound&&this.metaFinished&&daikon.Parser.VRS.indexOf(vr)===-1){vr=daikon.Dictionary.getVR(group,element);length=data.getUint32(offset,little);offset+=4;this.explicit=false}else{offset+=2;if(daikon.Parser.DATA_VRS.indexOf(vr)!==-1){offset+=2;length=data.getUint32(offset,little);offset+=4}else{length=data.getUint16(offset,little);offset+=2}}}else{vr=daikon.Dictionary.getVR(group,element);length=data.getUint32(offset,little);if(length===daikon.Parser.UNDEFINED_LENGTH){vr="SQ"}offset+=4}offsetValue=offset;var isPixelData=group===daikon.Tag.TAG_PIXEL_DATA[0]&&element===daikon.Tag.TAG_PIXEL_DATA[1];var isLookupTableData=40===group&&element>=4609&&element<4864;if(vr==="SQ"||!isLookupTableData&&!isPixelData&&!this.encapsulation&&daikon.Parser.DATA_VRS.indexOf(vr)!==-1&&vr!=="UC"){value=this.parseSublist(data,offset,length,vr!=="SQ");if(length===daikon.Parser.UNDEFINED_LENGTH){length=value[value.length-1].offsetEnd-offset}}else if(length>0&&!testForTag){if(length===daikon.Parser.UNDEFINED_LENGTH){if(isPixelData){length=data.byteLength-offset}}value=data.buffer.slice(offset,offset+length)}offset+=length;tag=new daikon.Tag(group,element,vr,value,offsetStart,offsetValue,offset,this.littleEndian);if(tag.isTransformSyntax()&&!this.transformSyntaxAlreadyExist){this.transformSyntaxAlreadyExist=true;if(tag.value[0]===daikon.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE){this.explicit=false;this.littleEndian=true}else if(tag.value[0]===daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG){this.explicit=true;this.littleEndian=false}else if(tag.value[0]===daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE){this.needsDeflate=true;this.explicit=true;this.littleEndian=true}else{this.explicit=true;this.littleEndian=true}}else if(tag.isMetaLength()){this.metaFinishedOffset=tag.value[0]+offset}return tag};daikon.Parser.prototype.parseSublist=function(data,offset,length,raw){var sublistItem,offsetEnd=offset+length,tags=[];this.level++;if(length===daikon.Parser.UNDEFINED_LENGTH){sublistItem=this.parseSublistItem(data,offset,raw);while(!sublistItem.isSequenceDelim()){tags.push(sublistItem);offset=sublistItem.offsetEnd;sublistItem=this.parseSublistItem(data,offset,raw)}tags.push(sublistItem)}else{while(offset=0&&code<128){this.readLiteral(code)}else if(code<=-1&&code>-128){this.readEncoded(code)}else if(code===-128){console.warn("RLE: unsupported code!")}}this.segmentIndex+=1};daikon.RLE.prototype.readLiteral=function(code){var ctr,length=code+1;if(this.hasValidInput()){for(ctr=0;ctr1&&images[0].getTemporalPosition()!==null;hasTemporalNumber=numFrames>1&&images[0].getTemporalNumber()!==null&&images[0].getTemporalNumber()===numFrames;if(hasTemporalPosition&&hasTemporalNumber){for(ctr=0;ctr1||this.isMosaic&&this.images[0].length>1;this.isMultiFrameVolume=false;this.isMultiFrameTimeseries=false;this.isImplicitTimeseries=false;if(this.isMultiFrame){hasFrameTime=this.images[0].getFrameTime()>0;if(this.isMosaic){this.isMultiFrameTimeseries=true}else{if(hasFrameTime){this.isMultiFrameTimeseries=true}else if(this.numberOfFramesInFile>1){this.isMultiFrameTimeseries=true;this.numberOfFrames=this.images.length}else{this.isMultiFrameVolume=true}}}if(!this.isMosaic&&this.numberOfFrames<=1){imagePos=this.images[0].getImagePosition()||[];sliceLoc=imagePos.toString();this.numberOfFrames=0;for(ctr=0;ctr1){this.isImplicitTimeseries=true}}this.sliceDir=this.images[0].getAcquiredSliceDirection();if(daikon.Series.useExplicitOrdering){orderedImages=this.images.slice()}else{orderedImages=daikon.Series.orderDicoms(this.images,this.numberOfFrames,this.sliceDir)}sliceLocationFirst=orderedImages[0].getImagePositionSliceDir(this.sliceDir);sliceLocationLast=orderedImages[orderedImages.length-1].getImagePositionSliceDir(this.sliceDir);sliceLocDiff=sliceLocationLast-sliceLocationFirst;if(daikon.Series.useExplicitOrdering){this.sliceSense=false}else if(this.isMosaic){this.sliceSense=true}else if(this.isMultiFrame){sliceLocations=orderedImages[0].getSliceLocationVector();if(sliceLocations!==null){orientation=orderedImages[0].getOrientation();if(orientation.charAt(2)==="Z"){this.sliceSense=sliceLocations[0]-sliceLocations[sliceLocations.length-1]<0}else{this.sliceSense=sliceLocations[0]-sliceLocations[sliceLocations.length-1]>0}}else{this.sliceSense=sliceLocationFirst<0?false:true}}else{if(this.sliceDir===daikon.Image.SLICE_DIRECTION_SAGITTAL||this.sliceDir===daikon.Image.SLICE_DIRECTION_CORONAL){if(sliceLocDiff>0){this.sliceSense=false}else{this.sliceSense=true}}else{if(sliceLocDiff>0){this.sliceSense=true}else{this.sliceSense=false}}}this.imagesOriginalOrder=this.images;this.images=orderedImages};daikon.Series.prototype.concatenateImageData=function(progressMeter,onFinishedImageRead){var buffer,data,length;if(this.isMosaic){data=this.getMosaicData(this.images[0],this.images[0].getPixelDataBytes())}else{data=this.images[0].getPixelDataBytes()}length=this.validatePixelDataLength(this.images[0]);this.images[0].clearPixelData();buffer=new Uint8Array(new ArrayBuffer(length*this.images.length));buffer.set(new Uint8Array(data,0,length),0);setTimeout(daikon.Utils.bind(this,function(){this.concatenateNextImageData(buffer,length,progressMeter,1,onFinishedImageRead)}),0)};daikon.Series.prototype.concatenateNextImageData=function(buffer,frameSize,progressMeter,index,onFinishedImageRead){var data,length;if(index>=this.images.length){if(progressMeter){progressMeter.drawProgress(1,"Reading DICOM Images")}onFinishedImageRead(buffer.buffer)}else{if(progressMeter){progressMeter.drawProgress(index/this.images.length,"Reading DICOM Images")}if(this.isMosaic){data=this.getMosaicData(this.images[index],this.images[index].getPixelDataBytes())}else{data=this.images[index].getPixelDataBytes()}length=this.validatePixelDataLength(this.images[index]);this.images[index].clearPixelData();buffer.set(new Uint8Array(data,0,length),frameSize*index);setTimeout(daikon.Utils.bind(this,function(){this.concatenateNextImageData(buffer,frameSize,progressMeter,index+1,onFinishedImageRead)}),0)}};daikon.Series.prototype.validatePixelDataLength=function(image){var length=image.getPixelDataBytes().byteLength,sliceLength=image.getCols()*image.getRows();if(length%sliceLength===0){return length}return sliceLength*image.getNumberOfFrames()*image.getNumberOfSamplesPerPixel()*(image.getBitsAllocated()/8)};daikon.Series.prototype.getMosaicData=function(image,data){var mosaicWidth,mosaicHeight,mosaicRows,mosaicCols,mosaicRowHeight,mosaicColWidth,numBytes,ctrS,ctrR,ctrC,numSlices,numRows,numCols,buffer,dataTyped,offset,ctr,index=0;numBytes=parseInt(this.images[0].getBitsAllocated()/8);numSlices=this.images[0].getMosaicCols()*this.images[0].getMosaicRows();numRows=parseInt(this.images[0].getRows()/this.images[0].getMosaicRows());numCols=parseInt(this.images[0].getCols()/this.images[0].getMosaicCols());mosaicWidth=this.images[0].getCols();mosaicHeight=this.images[0].getRows();mosaicRows=this.images[0].getMosaicRows();mosaicCols=this.images[0].getMosaicCols();mosaicRowHeight=parseInt(mosaicHeight/mosaicRows);mosaicColWidth=parseInt(mosaicWidth/mosaicCols);buffer=new Uint8Array(new ArrayBuffer(numSlices*numRows*numCols*numBytes));dataTyped=new Uint8Array(data);for(ctrS=0;ctrSdaikon.Siemens.CSA2_MAGIC_NUMBER.length){match=true;for(ctr=0;ctr128){return this.output}offset+=4;offset+=4;for(ctr=0;ctrthis.data.buffer.length){return-1}offset+=16;if(itemLength>0){this.output+=this.readString(offset,itemLength)+" "}return offset+itemLength};daikon.Siemens.prototype.canRead=function(group,element){return group===daikon.Siemens.GROUP_CSA&&(element===daikon.Siemens.ELEMENT_CSA1||element===daikon.Siemens.ELEMENT_CSA2)};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=daikon.Siemens}},{"./utilities.js":45}],44:[function(require,module,exports){"use strict";var daikon=daikon||{};daikon.Utils=daikon.Utils||(typeof require!=="undefined"?require("./utilities.js"):null);daikon.Dictionary=daikon.Dictionary||(typeof require!=="undefined"?require("./dictionary.js"):null);daikon.Siemens=daikon.Siemens||(typeof require!=="undefined"?require("./siemens.js"):null);daikon.Tag=daikon.Tag||function(group,element,vr,value,offsetStart,offsetValue,offsetEnd,littleEndian){this.group=group;this.element=element;this.vr=vr;this.offsetStart=offsetStart;this.offsetValue=offsetValue;this.offsetEnd=offsetEnd;this.sublist=false;this.preformatted=false;this.id=daikon.Tag.createId(group,element);if(value instanceof Array){this.value=value;this.sublist=true}else if(value!==null){var dv=new DataView(value);this.value=daikon.Tag.convertValue(vr,dv,littleEndian);if(this.value===dv&&this.isPrivateData()){this.value=daikon.Tag.convertPrivateValue(group,element,dv);this.preformatted=this.value!==dv}}else{this.value=null}};daikon.Tag.PRIVATE_DATA_READERS=[daikon.Siemens];daikon.Tag.VR_AE_MAX_LENGTH=16;daikon.Tag.VR_AS_MAX_LENGTH=4;daikon.Tag.VR_AT_MAX_LENGTH=4;daikon.Tag.VR_CS_MAX_LENGTH=16;daikon.Tag.VR_DA_MAX_LENGTH=8;daikon.Tag.VR_DS_MAX_LENGTH=16;daikon.Tag.VR_DT_MAX_LENGTH=26;daikon.Tag.VR_FL_MAX_LENGTH=4;daikon.Tag.VR_FD_MAX_LENGTH=8;daikon.Tag.VR_IS_MAX_LENGTH=12;daikon.Tag.VR_LO_MAX_LENGTH=64;daikon.Tag.VR_LT_MAX_LENGTH=10240;daikon.Tag.VR_OB_MAX_LENGTH=-1;daikon.Tag.VR_OD_MAX_LENGTH=-1;daikon.Tag.VR_OF_MAX_LENGTH=-1;daikon.Tag.VR_OW_MAX_LENGTH=-1;daikon.Tag.VR_PN_MAX_LENGTH=64*5;daikon.Tag.VR_SH_MAX_LENGTH=16;daikon.Tag.VR_SL_MAX_LENGTH=4;daikon.Tag.VR_SS_MAX_LENGTH=2;daikon.Tag.VR_ST_MAX_LENGTH=1024;daikon.Tag.VR_TM_MAX_LENGTH=16;daikon.Tag.VR_UI_MAX_LENGTH=64;daikon.Tag.VR_UL_MAX_LENGTH=4;daikon.Tag.VR_UN_MAX_LENGTH=-1;daikon.Tag.VR_US_MAX_LENGTH=2;daikon.Tag.VR_UT_MAX_LENGTH=-1;daikon.Tag.VR_UC_MAX_LENGTH=-1;daikon.Tag.TAG_TRANSFER_SYNTAX=[2,16];daikon.Tag.TAG_META_LENGTH=[2,0];daikon.Tag.TAG_SUBLIST_ITEM=[65534,57344];daikon.Tag.TAG_SUBLIST_ITEM_DELIM=[65534,57357];daikon.Tag.TAG_SUBLIST_SEQ_DELIM=[65534,57565];daikon.Tag.TAG_ROWS=[40,16];daikon.Tag.TAG_COLS=[40,17];daikon.Tag.TAG_ACQUISITION_MATRIX=[24,4880];daikon.Tag.TAG_NUMBER_OF_FRAMES=[40,8];daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS=[32,261];daikon.Tag.TAG_PIXEL_SPACING=[40,48];daikon.Tag.TAG_SLICE_THICKNESS=[24,80];daikon.Tag.TAG_SLICE_GAP=[24,136];daikon.Tag.TAG_TR=[24,128];daikon.Tag.TAG_FRAME_TIME=[24,4195];daikon.Tag.TAG_BITS_ALLOCATED=[40,256];daikon.Tag.TAG_BITS_STORED=[40,257];daikon.Tag.TAG_PIXEL_REPRESENTATION=[40,259];daikon.Tag.TAG_HIGH_BIT=[40,258];daikon.Tag.TAG_PHOTOMETRIC_INTERPRETATION=[40,4];daikon.Tag.TAG_SAMPLES_PER_PIXEL=[40,2];daikon.Tag.TAG_PLANAR_CONFIG=[40,6];daikon.Tag.TAG_PALETTE_RED=[40,4609];daikon.Tag.TAG_PALETTE_GREEN=[40,4610];daikon.Tag.TAG_PALETTE_BLUE=[40,4611];daikon.Tag.TAG_DATA_SCALE_SLOPE=[40,4179];daikon.Tag.TAG_DATA_SCALE_INTERCEPT=[40,4178];daikon.Tag.TAG_DATA_SCALE_ELSCINT=[519,4127];daikon.Tag.TAG_PIXEL_BANDWIDTH=[24,149];daikon.Tag.TAG_IMAGE_MIN=[40,262];daikon.Tag.TAG_IMAGE_MAX=[40,263];daikon.Tag.TAG_WINDOW_CENTER=[40,4176];daikon.Tag.TAG_WINDOW_WIDTH=[40,4177];daikon.Tag.TAG_PATIENT_NAME=[16,16];daikon.Tag.TAG_PATIENT_ID=[16,32];daikon.Tag.TAG_STUDY_DATE=[8,32];daikon.Tag.TAG_STUDY_TIME=[8,48];daikon.Tag.TAG_STUDY_DES=[8,4144];daikon.Tag.TAG_IMAGE_TYPE=[8,8];daikon.Tag.TAG_IMAGE_COMMENTS=[32,16384];daikon.Tag.TAG_SEQUENCE_NAME=[24,36];daikon.Tag.TAG_MODALITY=[8,96];daikon.Tag.TAG_FRAME_OF_REF_UID=[32,82];daikon.Tag.TAG_STUDY_UID=[32,13];daikon.Tag.TAG_SERIES_DESCRIPTION=[8,4158];daikon.Tag.TAG_SERIES_INSTANCE_UID=[32,14];daikon.Tag.TAG_SERIES_NUMBER=[32,17];daikon.Tag.TAG_ECHO_NUMBER=[24,134];daikon.Tag.TAG_TEMPORAL_POSITION=[32,256];daikon.Tag.TAG_IMAGE_NUM=[32,19];daikon.Tag.TAG_SLICE_LOCATION=[32,4161];daikon.Tag.TAG_IMAGE_ORIENTATION=[32,55];daikon.Tag.TAG_IMAGE_POSITION=[32,50];daikon.Tag.TAG_SLICE_LOCATION_VECTOR=[24,8197];daikon.Tag.TAG_LUT_SHAPE=[8272,32];daikon.Tag.TAG_PIXEL_DATA=[32736,16];daikon.Tag.createId=function(group,element){var groupStr=daikon.Utils.dec2hex(group),elemStr=daikon.Utils.dec2hex(element);return groupStr+elemStr};daikon.Tag.getUnsignedInteger16=function(rawData,littleEndian){var data,mul,ctr;mul=rawData.byteLength/2;data=[];for(ctr=0;ctr=4){year=parseInt(stringData[ctr].substring(0,4),10);if(stringData[ctr].length>=6){month=daikon.Utils.safeParseInt(stringData[ctr].substring(4,6))-1}if(stringData[ctr].length>=8){date=daikon.Utils.safeParseInt(stringData[ctr].substring(6,8))}if(stringData[ctr].length>=10){hours=daikon.Utils.safeParseInt(stringData[ctr].substring(8,10))}if(stringData[ctr].length>=12){minutes=daikon.Utils.safeParseInt(stringData[ctr].substring(10,12))}if(stringData[ctr].length>=14){seconds=daikon.Utils.safeParseInt(stringData[ctr].substring(12,14))}data[ctr]=new Date(year,month,date,hours,minutes,seconds)}else{data[ctr]=Date.parse(stringData[ctr])}if(!daikon.Utils.isValidDate(data[ctr])){data[ctr]=stringData[ctr]}}return data};daikon.Tag.getTimeStringValue=function(rawData,ms){var stringData=daikon.Tag.getStringValue(rawData),data=[];if(ms){var parts=null,ctr,hours=0,minutes=0,seconds=0;for(ctr=0;ctr1){minutes=daikon.Utils.safeParseInt(parts[1])}if(parts.length>2){seconds=daikon.Utils.safeParseFloat(parts[2])}}else{if(stringData[ctr].length>=2){hours=daikon.Utils.safeParseInt(stringData[ctr].substring(0,2))}if(stringData[ctr].length>=4){minutes=daikon.Utils.safeParseInt(stringData[ctr].substring(2,4))}if(stringData[ctr].length>=6){seconds=daikon.Utils.safeParseFloat(stringData[ctr].substring(4))}}data[ctr]=Math.round(hours*60*60*1e3+minutes*60*1e3+seconds*1e3)}return data}return stringData};daikon.Tag.getDoubleStringValue=function(rawData){var stringData=daikon.Tag.getStringValue(rawData),data=[],ctr;for(ctr=0;ctr]"}else{valueStr="["+this.value+"]"}}if(this.isSublistItem()){tagStr="Sequence Item"}else if(this.isSublistItemDelim()){tagStr="Sequence Item Delimiter"}else if(this.isSequenceDelim()){tagStr="Sequence Delimiter"}else if(this.isPixelData()){tagStr="Pixel Data"}else{des=daikon.Utils.convertCamcelCaseToTitleCase(daikon.Dictionary.getDescription(this.group,this.element))}if(html){return padding+""+tagStr+"   "+des+"   "+valueStr}else{return padding+" "+tagStr+" "+des+" "+valueStr}};daikon.Tag.prototype.toHTMLString=function(level){return this.toString(level,true)};daikon.Tag.prototype.isTransformSyntax=function(){return this.group===daikon.Tag.TAG_TRANSFER_SYNTAX[0]&&this.element===daikon.Tag.TAG_TRANSFER_SYNTAX[1]};daikon.Tag.prototype.isPixelData=function(){return this.group===daikon.Tag.TAG_PIXEL_DATA[0]&&this.element===daikon.Tag.TAG_PIXEL_DATA[1]};daikon.Tag.prototype.isPrivateData=function(){return(this.group&1)===1};daikon.Tag.prototype.hasInterpretedPrivateData=function(){return this.isPrivateData()&&daikon.Utils.isString(this.value)};daikon.Tag.prototype.isSublistItem=function(){return this.group===daikon.Tag.TAG_SUBLIST_ITEM[0]&&this.element===daikon.Tag.TAG_SUBLIST_ITEM[1]};daikon.Tag.prototype.isSublistItemDelim=function(){return this.group===daikon.Tag.TAG_SUBLIST_ITEM_DELIM[0]&&this.element===daikon.Tag.TAG_SUBLIST_ITEM_DELIM[1]};daikon.Tag.prototype.isSequenceDelim=function(){return this.group===daikon.Tag.TAG_SUBLIST_SEQ_DELIM[0]&&this.element===daikon.Tag.TAG_SUBLIST_SEQ_DELIM[1]};daikon.Tag.prototype.isMetaLength=function(){return this.group===daikon.Tag.TAG_META_LENGTH[0]&&this.element===daikon.Tag.TAG_META_LENGTH[1]};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=daikon.Tag}},{"./dictionary.js":35,"./siemens.js":43,"./utilities.js":45}],45:[function(require,module,exports){"use strict";var daikon=daikon||{};daikon.Utils=daikon.Utils||{};daikon.Utils.crcTable=null;daikon.Utils.MAX_VALUE=9007199254740991;daikon.Utils.MIN_VALUE=-9007199254740991;daikon.Utils.dec2hex=function(i){return(i+65536).toString(16).substr(-4).toUpperCase()};daikon.Utils.createArray=function(length){var arr=new Array(length||0),i=length;if(arguments.length>1){var args=Array.prototype.slice.call(arguments,1);while(i--)arr[length-1-i]=daikon.Utils.createArray.apply(this,args)}return arr};daikon.Utils.getStringAt=function(dataview,start,length){var str="",ctr,ch;for(ctr=0;ctr0){return parseInt(str,10)}return 0};daikon.Utils.convertCamcelCaseToTitleCase=function(str){var result=str.replace(/([A-Z][a-z])/g," $1");return daikon.Utils.trim(result.charAt(0).toUpperCase()+result.slice(1))};daikon.Utils.safeParseFloat=function(str){str=daikon.Utils.stripLeadingZeros(str);if(str.length>0){return parseFloat(str)}return 0};daikon.Utils.bytesToDouble=function(data){var sign=(data[0]&1<<7)>>7;var exponent=(data[0]&127)<<4|(data[1]&15<<4)>>4;if(exponent==0)return 0;if(exponent==2047)return sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;var mul=Math.pow(2,exponent-1023-52);var mantissa=data[7]+data[6]*Math.pow(2,8)+data[5]*Math.pow(2,8*2)+data[4]*Math.pow(2,8*3)+data[3]*Math.pow(2,8*4)+data[2]*Math.pow(2,8*5)+(data[1]&15)*Math.pow(2,8*6)+Math.pow(2,52);return Math.pow(-1,sign)*mantissa*mul};daikon.Utils.concatArrayBuffers=function(buffer1,buffer2){var tmp=new Uint8Array(buffer1.byteLength+buffer2.byteLength);tmp.set(new Uint8Array(buffer1),0);tmp.set(new Uint8Array(buffer2),buffer1.byteLength);return tmp.buffer};daikon.Utils.concatArrayBuffers2=function(buffers){var length=0,offset=0,ctr;for(ctr=0;ctr>8&65280|val>>24&255};daikon.Utils.swap16=function(val){return((val&255)<<8|val>>8&255)<<16>>16};daikon.Utils.makeCRCTable=function(){var c;var crcTable=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}crcTable[n]=c}return crcTable};daikon.Utils.crc32=function(dataView){var crcTable=daikon.Utils.crcTable||(daikon.Utils.crcTable=daikon.Utils.makeCRCTable());var crc=0^-1;for(var i=0;i>>8^crcTable[(crc^dataView.getUint8(i))&255]}return(crc^-1)>>>0};daikon.Utils.createBitMask=function(numBytes,bitsStored,unsigned){var mask=4294967295;mask>>>=(4-numBytes)*8+(numBytes*8-bitsStored);if(unsigned){if(numBytes==1){mask&=255}else if(numBytes==2){mask&=65535}else if(numBytes==4){mask&=4294967295}else if(numBytes==8){mask=4294967295}}else{mask=4294967295}return mask};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=daikon.Utils}},{}]},{},[38])(38)}); \ No newline at end of file +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.daikon=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available (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}}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_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=function(title){document.title=title}}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){eval.call(null,x)}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=function(){}}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}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,prepVararg:function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr},getAlignSize:function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)},dynCall:function(sig,ptr,args){if(args&&args.length){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=TOTAL_MEMORY){var success=enlargeMemory();if(!success){DYNAMICTOP=ret;return 0}}return ret},alignMemory:function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret},makeBigInt:function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var __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 JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret},stringToC:function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){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,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>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>2]=0}stop=ret+size;while(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>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;function UTF8ArrayToString(u8Array,idx){var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;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,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}Module["stringToUTF16"]=stringToUTF16;function lengthBytesUTF16(str){return str.length*2}Module["lengthBytesUTF16"]=lengthBytesUTF16;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,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}Module["stringToUTF32"]=stringToUTF32;function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}Module["lengthBytesUTF32"]=lengthBytesUTF32;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"}else{ret=name}paramLoop:while(i0){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 parsed=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()"}parsed=parse()}catch(e){parsed+="?"}if(parsed.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 parsed}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){if(x%4096>0){x+=4096-x%4096}return x}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(){var OLD_TOTAL_MEMORY=TOTAL_MEMORY;var LIMIT=Math.pow(2,31);if(DYNAMICTOP>=LIMIT)return false;while(TOTAL_MEMORY<=DYNAMICTOP){if(TOTAL_MEMORY=LIMIT)return false;try{if(ArrayBuffer.transfer){buffer=ArrayBuffer.transfer(buffer,TOTAL_MEMORY)}else{var oldHEAP8=HEAP8;buffer=new ArrayBuffer(TOTAL_MEMORY)}}catch(e){return false}var success=_emscripten_replace_memory(buffer);if(!success)return false;Module["buffer"]=buffer;Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer);if(!ArrayBuffer.transfer){HEAP8.set(oldHEAP8)}return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=function(buffer){return buffer.byteLength}}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var totalMemory=64*1024;while(totalMemory0){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"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i255){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>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<=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"];if(!Math["clz32"])Math["clz32"]=function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32};Math.clz32=Math["clz32"];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 Math_clz32=Math.clz32;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+59744;__ATINIT__.push({func:function(){__GLOBAL__I_000101()}},{func:function(){__GLOBAL__sub_I_jpegls_cpp()}},{func:function(){__GLOBAL__sub_I_iostream_cpp()}});allocate([0,0,0,0,0,0,0,0,84,144,0,0,31,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,237,191,0,0,48,0,0,0,0,0,0,0,44,144,0,0,41,192,0,0,84,144,0,0,55,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,115,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,192,0,0,152,3,0,0,0,0,0,0,84,144,0,0,241,192,0,0,216,3,0,0,0,0,0,0,84,144,0,0,55,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,95,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,135,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,216,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,241,193,0,0,48,0,0,0,0,0,0,0,44,144,0,0,13,194,0,0,84,144,0,0,80,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,44,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,139,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,179,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,219,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,3,195,0,0,48,0,0,0,0,0,0,0,84,144,0,0,103,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,157,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,211,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,8,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,71,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,138,196,0,0,160,1,0,0,0,0,0,0,44,144,0,0,120,196,0,0,84,144,0,0,187,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,246,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,49,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,103,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,157,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,210,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,17,198,0,0,160,1,0,0,0,0,0,0,84,144,0,0,86,198,0,0,72,3,0,0,0,0,0,0,84,144,0,0,162,198,0,0,56,2,0,0,0,0,0,0,44,144,0,0,182,198,0,0,84,144,0,0,196,198,0,0,56,2,0,0,0,0,0,0,84,144,0,0,112,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,125,199,0,0,84,144,0,0,138,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,156,199,0,0,84,144,0,0,169,199,0,0,96,2,0,0,0,0,0,0,84,144,0,0,181,199,0,0,120,2,0,0,0,0,0,0,84,144,0,0,214,199,0,0,144,2,0,0,0,0,0,0,84,144,0,0,28,200,0,0,144,2,0,0,0,0,0,0,84,144,0,0,248,199,0,0,176,2,0,0,0,0,0,0,84,144,0,0,62,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,99,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,182,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,245,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,13,222,0,0,152,3,0,0,0,0,0,0,84,144,0,0,38,222,0,0,152,3,0,0,0,0,0,0,44,144,0,0,62,222,0,0,84,144,0,0,87,222,0,0,104,2,0,0,0,0,0,0,44,144,0,0,110,222,0,0,84,144,0,0,135,222,0,0,72,3,0,0,0,0,0,0,84,144,0,0,161,222,0,0,56,3,0,0,0,0,0,0,44,144,0,0,187,222,0,0,84,144,0,0,205,222,0,0,112,3,0,0,0,0,0,0,84,144,0,0,247,222,0,0,112,3,0,0,0,0,0,0,44,144,0,0,33,223,0,0,44,144,0,0,82,223,0,0,124,144,0,0,131,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,178,223,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,124,144,0,0,225,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,16,224,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,84,144,0,0,63,224,0,0,80,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,144,0,0,187,224,0,0,48,3,0,0,0,0,0,0,124,144,0,0,209,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,124,144,0,0,227,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,5,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,40,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,75,225,0,0,144,4,0,0,0,0,0,0,84,144,0,0,109,225,0,0,144,4,0,0,0,0,0,0,124,144,0,0,144,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,178,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,200,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,220,225,0,0,32,4,0,0,0,0,0,0,124,144,0,0,240,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,84,144,0,0,2,226,0,0,32,4,0,0,0,0,0,0,84,144,0,0,23,226,0,0,32,4,0,0,0,0,0,0,124,144,0,0,44,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,80,10,0,0,0,0,0,0,124,144,0,0,112,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,104,10,0,0,0,0,0,0,124,144,0,0,180,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,128,10,0,0,0,0,0,0,124,144,0,0,248,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,152,10,0,0,0,0,0,0,124,144,0,0,60,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,184,10,0,0,0,8,0,0,124,144,0,0,129,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,192,10,0,0,0,8,0,0,124,144,0,0,198,227,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,11,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,80,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,108,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,136,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,164,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,192,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,216,10,0,0,0,0,0,0,124,144,0,0,6,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,224,10,0,0,0,0,0,0,124,144,0,0,76,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,232,10,0,0,0,0,0,0,124,144,0,0,146,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,240,10,0,0,0,0,0,0,124,144,0,0,216,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,124,144,0,0,237,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,144,0,0,73,233,0,0,44,144,0,0,50,233,0,0,124,144,0,0,28,233,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,237,232,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,215,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,124,144,0,0,168,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,44,144,0,0,149,232,0,0,44,144,0,0,115,232,0,0,44,144,0,0,81,232,0,0,44,144,0,0,60,232,0,0,44,144,0,0,39,232,0,0,44,144,0,0,14,232,0,0,44,144,0,0,245,231,0,0,44,144,0,0,220,231,0,0,44,144,0,0,195,231,0,0,44,144,0,0,171,231,0,0,44,144,0,0,190,232,0,0,44,144,0,0,3,233],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([156,143,0,0,0,0,0,0,8,2,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,248,1,0,0,3,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,232,1,0,0,5,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,7,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,200,1,0,0,9,0,0,0,10,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,184,1,0,0,11,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,168,1,0,0,13,0,0,0,14,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,144,1,0,0,15,0,0,0,16,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,128,1,0,0,17,0,0,0,18,0,0,0,9,0,0,0,1,0,0,0,9,0,0,0,0,0,0,0,112,1,0,0,19,0,0,0,20,0,0,0,10,0,0,0,2,0,0,0,10,0,0,0,0,0,0,0,96,1,0,0,21,0,0,0,22,0,0,0,11,0,0,0,3,0,0,0,11,0,0,0,0,0,0,0,80,1,0,0,23,0,0,0,24,0,0,0,12,0,0,0,4,0,0,0,12,0,0,0,0,0,0,0,64,1,0,0,25,0,0,0,26,0,0,0,13,0,0,0,5,0,0,0,13,0,0,0,0,0,0,0,240,0,0,0,27,0,0,0,28,0,0,0,14,0,0,0,6,0,0,0,14,0,0,0,0,0,0,0,224,0,0,0,29,0,0,0,30,0,0,0,15,0,0,0,7,0,0,0,15,0,0,0,0,0,0,0,16,0,0,0,31,0,0,0,32,0,0,0,16,0,0,0,8,0,0,0,16,0,0,0,0,0,0,0,200,0,0,0,33,0,0,0,34,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,184,0,0,0,33,0,0,0,35,0,0,0,3,0,0,0,4,0,0,0,56,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,200,255,255,255,200,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,56,0,0,0,0,0,0,0,104,0,0,0,40,0,0,0,41,0,0,0,200,255,255,255,200,255,255,255,104,0,0,0,42,0,0,0,43,0,0,0,0,0,0,0,88,0,0,0,44,0,0,0,45,0,0,0,17,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,17,0,0,0,3,0,0,0,18,0,0,0,104,141,0,0,64,141,0,0,84,141,0,0,124,141,0,0,0,0,0,0,32,0,0,0,46,0,0,0,47,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,56,0,0,0,48,0,0,0,49,0,0,0,8,0,0,0,9,0,0,0,0,0,0,0,72,0,0,0,50,0,0,0,51,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,120,0,0,0,52,0,0,0,53,0,0,0,12,0,0,0,13,0,0,0,0,0,0,0,136,0,0,0,54,0,0,0,55,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,152,0,0,0,56,0,0,0,57,0,0,0,16,0,0,0,17,0,0,0,0,0,0,0,168,0,0,0,58,0,0,0,59,0,0,0,18,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,216,0,0,0,60,0,0,0,61,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,62,0,0,0,63,0,0,0,20,0,0,0,21,0,0,0,0,0,0,0,16,1,0,0,64,0,0,0,65,0,0,0,22,0,0,0,23,0,0,0,0,0,0,0,32,1,0,0,66,0,0,0,67,0,0,0,24,0,0,0,25,0,0,0,0,0,0,0,48,1,0,0,68,0,0,0,69,0,0,0,26,0,0,0,27,0,0,0,0,0,0,0,160,1,0,0,70,0,0,0,71,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,24,2,0,0,72,0,0,0,73,0,0,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,40,2,0,0,74,0,0,0,75,0,0,0,18,0,0,0,0,0,0,0,64,2,0,0,76,0,0,0,77,0,0,0,19,0,0,0,2,0,0,0,0,0,0,0,80,2,0,0,78,0,0,0,79,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,80,0,0,0,81,0,0,0,7,0,0,0,0,0,0,0,128,2,0,0,82,0,0,0,83,0,0,0,8,0,0,0,0,0,0,0,160,2,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,2,0,0,0,9,0,0,0,28,0,0,0,0,0,0,0,208,2,0,0,84,0,0,0,88,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,3,0,0,0,10,0,0,0,29,0,0,0,0,0,0,0,224,2,0,0,84,0,0,0,89,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,4,0,0,0,11,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,1,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,88,146,0,0,200,146,0,0,56,147,0,0,56,147,0,0,120,187,0,0,168,155,0,0,168,149,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0,0,0,159,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,9,0,0,0,151,215,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,9,0,0,0,143,211,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+35640);allocate([1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+39844);allocate([240,2,0,0,90,0,0,0,91,0,0,0,20,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,14,0,0,0,20,0,0,0,0,0,0,0,0,3,0,0,90,0,0,0,92,0,0,0,21,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,16,0,0,0,21,0,0,0,15,0,0,0,22,0,0,0,0,0,0,0,16,3,0,0,93,0,0,0,94,0,0,0,22,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,17,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,16,0,0,0,24,0,0,0,0,0,0,0,32,3,0,0,93,0,0,0,95,0,0,0,23,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,19,0,0,0,20,0,0,0,25,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,56,3,0,0,96,0,0,0,97,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,3,0,0,93,0,0,0,98,0,0,0,17,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,160,3,0,0,90,0,0,0,99,0,0,0,24,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,15,0,0,0,22,0,0,0,8,0,0,0,0,0,0,0,168,3,0,0,100,0,0,0,101,0,0,0,248,255,255,255,248,255,255,255,168,3,0,0,102,0,0,0,103,0,0,0,8,0,0,0,0,0,0,0,192,3,0,0,104,0,0,0,105,0,0,0,248,255,255,255,248,255,255,255,192,3,0,0,106,0,0,0,107,0,0,0,4,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,252,255,255,255,252,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,4,0,0,0,0,0,0,0,240,3,0,0,108,0,0,0,109,0,0,0,252,255,255,255,252,255,255,255,240,3,0,0,110,0,0,0,111,0,0,0,0,0,0,0,96,3,0,0,112,0,0,0,113,0,0,0,7,0,0,0,0,0,0,0,112,3,0,0,114,0,0,0,115,0,0,0,0,0,0,0,8,4,0,0,72,0,0,0,116,0,0,0,21,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,117,0,0,0,118,0,0,0,119,0,0,0,1,0,0,0,33,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,5,0,0,120,0,0,0,121,0,0,0,119,0,0,0,2,0,0,0,34,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,5,0,0,122,0,0,0,123,0,0,0,119,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,5,0,0,124,0,0,0,125,0,0,0,119,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,5,0,0,126,0,0,0,127,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,23,0,0,0,5,0,0,0,24,0,0,0,1,0,0,0,2,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,5,0,0,128,0,0,0,129,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,25,0,0,0,9,0,0,0,26,0,0,0,3,0,0,0,4,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,5,0,0,130,0,0,0,131,0,0,0,119,0,0,0,22,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,1,0,0,0,248,255,255,255,224,5,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,132,0,0,0,133,0,0,0,119,0,0,0,30,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,2,0,0,0,248,255,255,255,8,6,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,6,0,0,134,0,0,0,135,0,0,0,119,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,6,0,0,136,0,0,0,137,0,0,0,119,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,6,0,0,138,0,0,0,139,0,0,0,119,0,0,0,38,0,0,0,39,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,40,0,0,0,29,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,6,0,0,140,0,0,0,141,0,0,0,119,0,0,0,41,0,0,0,42,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,43,0,0,0,35,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,6,0,0,142,0,0,0,143,0,0,0,119,0,0,0,44,0,0,0,45,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,46,0,0,0,41,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,6,0,0,144,0,0,0,145,0,0,0,119,0,0,0,47,0,0,0,48,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,49,0,0,0,47,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,6,0,0,146,0,0,0,147,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,7,0,0,148,0,0,0,149,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,7,0,0,150,0,0,0,151,0,0,0,119,0,0,0,1,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,7,0,0,152,0,0,0,153,0,0,0,119,0,0,0,2,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,7,0,0,154,0,0,0,155,0,0,0,119,0,0,0,19,0,0,0,7,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,156,0,0,0,157,0,0,0,119,0,0,0,20,0,0,0,8,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,4,0,0,158,0,0,0,159,0,0,0,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,5,0,0,160,0,0,0,161,0,0,0,119,0,0,0,27,0,0,0,21,0,0,0,28,0,0,0,22,0,0,0,29,0,0,0,9,0,0,0,23,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,4,0,0,162,0,0,0,163,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,12,0,0,0,50,0,0,0,51,0,0,0,13,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,5,0,0,164,0,0,0,165,0,0,0,119,0,0,0,53,0,0,0,54,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,0,0,0,0,80,5,0,0,166,0,0,0,167,0,0,0,119,0,0,0,55,0,0,0,56,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,0,0,0,0,32,4,0,0,168,0,0,0,169,0,0,0,119,0,0,0,0,0,0,0,48,4,0,0,168,0,0,0,170,0,0,0,119,0,0,0,24,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,30,0,0,0,25,0,0,0,31,0,0,0,26,0,0,0,32,0,0,0,13,0,0,0,27,0,0,0,14,0,0,0,0,0,0,0,80,4,0,0,168,0,0,0,171,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,15,0,0,0,57,0,0,0,58,0,0,0,16,0,0,0,59,0,0,0,0,0,0,0,112,4,0,0,168,0,0,0,172,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,17,0,0,0,60,0,0,0,61,0,0,0,18,0,0,0,62,0,0,0,0,0,0,0,144,4,0,0,168,0,0,0,173,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,176,4,0,0,168,0,0,0,174,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,192,4,0,0,168,0,0,0,175,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,37,0,0,0,89,0,0,0,45,0,0,0,37,0,0,0,109,0,0,0,45,0,0,0,37,0,0,0,100,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,114,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,102,0,0,0,97,0,0,0,108,0,0,0,115,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,110,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,114,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,117,0,0,0,114,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,114,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,99,0,0,0,104,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,105,0,0,0,108,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,101,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,121,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,117,0,0,0,115,0,0,0,116,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,116,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,111,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,77,0,0,0,0,0,0,0,80,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,97,0,0,0,32,0,0,0,37,0,0,0,98,0,0,0,32,0,0,0,37,0,0,0,100,0,0,0,32,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,32,2,32,2,32,2,32,2,32,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,96,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,213,8,213,8,213,8,213,8,213,8,213,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,4,192,4,192,4,192,4,192,4,192,4,192,8,214,8,214,8,214,8,214,8,214,8,214,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,4,192,4,192,4,192,4,192,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,119,83,116,114,101,97,109,32,111,114,32,114,97,119,68,97,116,97,32,110,101,101,100,115,32,116,111,32,114,101,102,101,114,101,110,99,101,32,116,111,32,115,111,109,101,116,104,105,110,103,0,119,105,100,116,104,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,104,101,105,103,104,116,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,98,105,116,115,112,101,114,115,97,109,112,108,101,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,50,44,32,49,54,93,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,110,101,101,100,115,32,116,111,32,98,101,32,115,101,116,32,116,111,32,97,32,118,97,108,117,101,32,111,102,32,123,78,111,110,101,44,32,83,97,109,112,108,101,44,32,76,105,110,101,125,0,99,111,109,112,111,110,101,110,116,115,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,50,53,53,93,0,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,119,105,116,104,32,116,104,101,32,111,116,104,101,114,32,112,97,114,97,109,101,116,101,114,115,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,110,111,116,32,98,101,32,115,101,116,32,116,111,32,83,97,109,112,108,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,52,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,32,111,110,108,121,32,98,101,32,115,101,116,32,116,111,32,78,111,110,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,49,0,67,111,108,111,114,32,116,114,97,110,115,102,111,114,109,97,116,105,111,110,32,0,78,111,32,109,111,114,101,32,98,121,116,101,115,32,97,118,97,105,108,97,98,108,101,32,105,110,32,105,110,112,117,116,32,98,117,102,102,101,114,44,32,115,116,105,108,108,32,110,101,101,100,101,100,105,110,103,32,0,65,110,32,111,100,100,32,110,117,109,98,101,114,32,111,102,32,98,121,116,101,115,32,40,0,41,32,99,97,110,110,111,116,32,98,101,32,115,119,97,112,112,101,100,46,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,69,0,49,49,80,114,111,99,101,115,115,76,105,110,101,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,105,110,103,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,57,98,97,115,105,99,95,111,115,116,114,105,110,103,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,116,69,69,0,50,50,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,83,116,114,101,97,109,0,50,53,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,67,111,109,112,111,110,101,110,116,0,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,104,69,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,67,104,97,114,76,83,32,101,114,114,111,114,0,99,104,97,114,108,115,0,49,53,99,104,97,114,108,115,95,99,97,116,101,103,111,114,121,0,112,97,114,97,109,115,46,88,116,104,117,109,98,110,97,105,108,32,105,115,32,62,32,48,32,98,117,116,32,112,97,114,97,109,115,46,116,104,117,109,98,110,97,105,108,32,61,61,32,110,117,108,108,95,112,116,114,0,49,55,74,112,101,103,77,97,114,107,101,114,83,101,103,109,101,110,116,0,49,49,74,112,101,103,83,101,103,109,101,110,116,0,50,48,74,112,101,103,73,109,97,103,101,68,97,116,97,83,101,103,109,101,110,116,0,69,120,112,101,99,116,101,100,32,74,80,69,71,32,77,97,114,107,101,114,32,115,116,97,114,116,32,98,121,116,101,32,48,120,70,70,32,98,117,116,32,116,104,101,32,98,121,116,101,32,118,97,108,117,101,32,119,97,115,32,48,120,0,74,80,69,71,32,101,110,99,111,100,105,110,103,32,119,105,116,104,32,109,97,114,107,101,114,32,0,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,46,0,85,110,107,110,111,119,110,32,74,80,69,71,32,109,97,114,107,101,114,32,0,32,101,110,99,111,117,110,116,101,114,101,100,46,0,109,114,102,120,0,83,116,57,98,97,100,95,97,108,108,111,99,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,49,51,114,117,110,116,105,109,101,95,101,114,114,111,114,0,83,116,57,116,121,112,101,95,105,110,102,111,0,83,116,56,98,97,100,95,99,97,115,116,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,49,95,95,118,109,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,33,34,98,97,115,105,99,95,115,116,114,105,110,103,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,115,116,114,105,110,103,0,95,95,116,104,114,111,119,95,108,101,110,103,116,104,95,101,114,114,111,114,0,33,34,118,101,99,116,111,114,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,118,101,99,116,111,114,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,116,104,114,101,119,32,97,110,32,101,120,99,101,112,116,105,111,110,0,115,116,100,58,58,98,97,100,95,99,97,115,116,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+42396);allocate([32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,80,79,83,73,88],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+52636);allocate([17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,119,69,69,0,117,110,115,117,112,112,111,114,116,101,100,32,108,111,99,97,108,101,32,102,111,114,32,115,116,97,110,100,97,114,100,32,105,110,112,117,116,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,52,95,95,115,104,97,114,101,100,95,99,111,117,110,116,69,0,78,83,116,51,95,95,49,49,50,115,121,115,116,101,109,95,101,114,114,111,114,69,0,78,83,116,51,95,95,49,49,52,101,114,114,111,114,95,99,97,116,101,103,111,114,121,69,0,78,83,116,51,95,95,49,49,50,95,95,100,111,95,109,101,115,115,97,103,101,69,0,58,32,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,55,102,97,105,108,117,114,101,69,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,57,95,95,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,69,0,105,111,115,95,98,97,115,101,58,58,99,108,101,97,114,0,105,111,115,116,114,101,97,109,0,117,110,115,112,101,99,105,102,105,101,100,32,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,65,66,67,68,69,70,120,88,43,45,112,80,105,73,110,78,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,102,97,99,101,116,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,119,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,99,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,115,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,105,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,49,54,95,95,110,97,114,114,111,119,95,116,111,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,49,55,95,95,119,105,100,101,110,95,102,114,111,109,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,119,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,95,95,105,109,112,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,99,69,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,119,69,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,119,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,49,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,49,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,99,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,119,69,69,0,37,112,0,67,0,37,0,0,0,0,0,108,0,108,108,0,0,76,0,37,112,0,0,0,0,37,72,58,37,77,58,37,83,37,109,47,37,100,47,37,121,37,89,45,37,109,45,37,100,37,73,58,37,77,58,37,83,32,37,112,37,72,58,37,77,37,72,58,37,77,58,37,83,108,111,99,97,108,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,48,49,50,51,52,53,54,55,56,57,0,37,76,102,0,109,111,110,101,121,95,103,101,116,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,0,37,46,48,76,102,0,116,114,117,101,0,102,97,108,115,101,0,83,117,110,100,97,121,0,77,111,110,100,97,121,0,84,117,101,115,100,97,121,0,87,101,100,110,101,115,100,97,121,0,84,104,117,114,115,100,97,121,0,70,114,105,100,97,121,0,83,97,116,117,114,100,97,121,0,83,117,110,0,77,111,110,0,84,117,101,0,87,101,100,0,84,104,117,0,70,114,105,0,83,97,116,0,74,97,110,117,97,114,121,0,70,101,98,114,117,97,114,121,0,77,97,114,99,104,0,65,112,114,105,108,0,77,97,121,0,74,117,110,101,0,74,117,108,121,0,65,117,103,117,115,116,0,83,101,112,116,101,109,98,101,114,0,79,99,116,111,98,101,114,0,78,111,118,101,109,98,101,114,0,68,101,99,101,109,98,101,114,0,74,97,110,0,70,101,98,0,77,97,114,0,65,112,114,0,74,117,110,0,74,117,108,0,65,117,103,0,83,101,112,0,79,99,116,0,78,111,118,0,68,101,99,0,65,77,0,80,77,0,37,109,47,37,100,47,37,121,0,37,72,58,37,77,58,37,83,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,37,73,58,37,77,58,37,83,32,37,112,0,78,83,116,51,95,95,49,49,51,109,101,115,115,97,103,101,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,95,95,116,105,109,101,95,112,117,116,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,119,69,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,99,69,69,0,78,83,116,51,95,95,49,57,116,105,109,101,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,112,117,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,103,101,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,50,99,111,100,101,99,118,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,99,116,121,112,101,95,98,97,115,101,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+56215);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]}function _atexit(func,arg){__ATEXIT__.unshift({func:func,arg:arg})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}Module["_i64Subtract"]=_i64Subtract;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 __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted},addRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++},decRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0){if(info.destructor){Runtime.dynCall("vi",info.destructor,[ptr])}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}},clearRef:function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0}};function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}EXCEPTIONS.clearRef(EXCEPTIONS.deAdjust(ptr));throw ptr}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(asm["setTempRet0"](0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(asm["setTempRet0"](0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(asm["setTempRet0"](typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(asm["setTempRet0"](throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr}Module["_memset"]=_memset;var _BDtoILow=true;var _emscripten_resume=true;function ___gxx_personality_v0(){}var _emscripten_landingpad=true;function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]);return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?Pointer_stringify(tm_zone):""};var pattern=Pointer_stringify(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){return leadingNulls(date.tm_hour<13?date.tm_hour:date.tm_hour-12,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>0&&date.tm_hour<13){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){var day=new Date(date.tm_year+1900,date.tm_mon+1,date.tm_mday,0,0,0,0);return day.getDay()||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}function _abort(){Module["abort"]()}function _free(){}Module["_free"]=_free;function ___cxa_free_exception(ptr){try{return _free(ptr)}catch(e){}}function ___cxa_end_catch(){if(___cxa_end_catch.rethrown){___cxa_end_catch.rethrown=false;return}asm["setThrew"](0);var ptr=EXCEPTIONS.caught.pop();if(ptr){EXCEPTIONS.decRef(EXCEPTIONS.deAdjust(ptr));EXCEPTIONS.last=0}}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Runtime.dynCall("v",func);_pthread_once.seen[ptr]=1}function ___lock(){}function ___unlock(){}var PTHREAD_SPECIFIC={};function _pthread_getspecific(key){return PTHREAD_SPECIFIC[key]||0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}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};function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 85:return totalMemory/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 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 79:return 0;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}var _fabs=Math_abs;var PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(key,destructor){if(key==0){return ERRNO_CODES.EINVAL}HEAP32[key>>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}var PATH=undefined;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(){setTimeout(Browser.mainLoop.runner,value)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(!window["setImmediate"]){var setImmediates=[];var emscriptenMainLoopMessageId="__emcc";function Browser_setImmediate_messageHandler(event){if(event.source===window&&event.data===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}}window.addEventListener("message",Browser_setImmediate_messageHandler,true);window["setImmediate"]=function Browser_emulated_setImmediate(func){setImmediates.push(func);window.postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){window["setImmediate"](Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){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(thisMainLoopId1&&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(thisMainLoopId0)_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,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},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=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,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;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);if(vrDevice){canvasContainer.requestFullScreen({vrDisplay:vrDevice})}else{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)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){Module["noExitRuntime"]=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){Module["noExitRuntime"]=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){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"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},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>2];return ret},getStr:function(){var ret=Pointer_stringify(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}Module["_i64Add"]=_i64Add;Module["_bitshift64Lshr"]=_bitshift64Lshr;function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}var _BDtoIHigh=true;function _pthread_cleanup_push(routine,arg){__ATEXIT__.push(function(){Runtime.dynCall("vi",routine,[arg])});_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cond_broadcast(){return 0}function ___cxa_guard_acquire(variable){if(!HEAP8[variable>>0]){HEAP8[variable>>0]=1;return 1}return 0}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!");__ATEXIT__.pop();_pthread_cleanup_push.level=__ATEXIT__.length}function ___cxa_guard_release(){}function ___cxa_begin_catch(ptr){__ZSt18uncaught_exceptionv.uncaught_exception--;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function _llvm_eh_typeid_for(type){return type}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _pthread_mutex_lock(){}var _emscripten_postinvoke=true;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){var success=self.alloc(bytes);if(!success)return-1>>>0}return ret}Module["_bitshift64Shl"]=_bitshift64Shl;function ___cxa_guard_abort(){}Module["_memmove"]=_memmove;var _emscripten_preinvoke=true;var _BItoD=true;function _pthread_cond_wait(){return 0}function ___cxa_rethrow(){___cxa_end_catch.rethrown=true;var ptr=EXCEPTIONS.caught.pop();EXCEPTIONS.last=ptr;throw ptr}function _pthread_mutex_unlock(){}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}function _pthread_self(){return 0}function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;assert(offset_high===0);FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffer)___syscall146.buffer=[];var buffer=___syscall146.buffer;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j2147483648)return false;i=new a(newBuffer);j=new b(newBuffer);k=new c(newBuffer);l=new d(newBuffer);m=new e(newBuffer);n=new f(newBuffer);o=new g(newBuffer);p=new h(newBuffer);buffer=newBuffer;return true}function dc(a){a=a|0;var b=0;b=r;r=r+a|0;r=r+15&-16;return b|0}function ec(){return r|0}function fc(a){a=a|0;r=a}function gc(a,b){a=a|0;b=b|0;r=a;s=b}function hc(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function ic(a){a=a|0;i[t>>0]=i[a>>0];i[t+1>>0]=i[a+1>>0];i[t+2>>0]=i[a+2>>0];i[t+3>>0]=i[a+3>>0]}function jc(a){a=a|0;i[t>>0]=i[a>>0];i[t+1>>0]=i[a+1>>0];i[t+2>>0]=i[a+2>>0];i[t+3>>0]=i[a+3>>0];i[t+4>>0]=i[a+4>>0];i[t+5>>0]=i[a+5>>0];i[t+6>>0]=i[a+6>>0];i[t+7>>0]=i[a+7>>0]}function kc(a){a=a|0;M=a}function lc(){return M|0}function mc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;v=r;r=r+128|0;n=v+44|0;q=v+8|0;j=v+4|0;m=v;o=c+4|0;p=c+8|0;x=0;Ja(35,k[c>>2]|0,k[o>>2]|0,k[p>>2]|0,d|0);l=x;x=0;if(!(l&1)){g=n;f=g+84|0;do{k[g>>2]=k[d>>2];g=g+4|0;d=d+4|0}while((g|0)<(f|0));d=n+12|0;if((k[d>>2]|0)==0?(h=ia(((k[n+8>>2]|0)+7|0)/8|0,k[n>>2]|0)|0,k[d>>2]=h,(k[n+24>>2]|0)!=0):0){l=ia(k[n+16>>2]|0,h)|0;k[d>>2]=l}x=0;qa(176,q|0);l=x;x=0;if(!(l&1)){d=n+56|0;do{if(k[d>>2]|0){x=0;d=ta(66,d|0)|0;l=x;x=0;if(!(l&1)){k[j>>2]=d;f=q+28|0;g=k[f>>2]|0;if(g>>>0<(k[q+32>>2]|0)>>>0){k[g>>2]=d;k[f>>2]=g+4;k[j>>2]=0;s=19;break}x=0;ra(57,q+24|0,j|0);l=x;x=0;if(l&1){f=Wa(824,0)|0;d=M;g=k[j>>2]|0;k[j>>2]=0;if(!g)break;Lb[k[(k[g>>2]|0)+4>>2]&255](g);break}else{d=k[j>>2]|0;k[j>>2]=0;if(!d){s=19;break}Lb[k[(k[d>>2]|0)+4>>2]&255](d);s=19;break}}else s=15}else s=19}while(0);a:do{if((s|0)==19){g=n+4|0;h=n+8|0;j=n+16|0;x=0;d=Ea(14,k[n>>2]|0,k[g>>2]|0,k[h>>2]|0,k[j>>2]|0)|0;l=x;x=0;if(!(l&1)){k[m>>2]=d;l=q+28|0;f=k[l>>2]|0;do{if(f>>>0>=(k[q+32>>2]|0)>>>0){x=0;ra(57,q+24|0,m|0);f=x;x=0;if(f&1){f=Wa(824,0)|0;d=M;g=k[m>>2]|0;k[m>>2]=0;if(!g)break a;Lb[k[(k[g>>2]|0)+4>>2]&255](g);break a}else{d=k[m>>2]|0;k[m>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}}else{k[f>>2]=d;k[l>>2]=f+4;k[m>>2]=0}}while(0);d=k[n+28>>2]|0;if((d|0)!=0?(x=0,ra(58,q|0,d|0),s=x,x=0,s&1):0){s=15;break}b:do{if(!(k[n+24>>2]|0)){d=ia(k[g>>2]|0,k[n>>2]|0)|0;d=ia(d,((k[h>>2]|0)+7|0)/8|0)|0;if((k[j>>2]|0)>0){g=0;while(1){x=0;Fa(4,q|0,c|0,n|0);s=x;x=0;if(s&1)break;f=k[o>>2]|0;if(f){k[o>>2]=f+d;k[p>>2]=(k[p>>2]|0)-d}g=g+1|0;if((g|0)>=(k[j>>2]|0))break b}f=Wa(824,0)|0;d=M;s=16;break a}}else{x=0;Fa(4,q|0,c|0,n|0);s=x;x=0;if(s&1){s=15;break a}}}while(0);x=0;Aa(33,q|0,a|0)|0;s=x;x=0;if(!(s&1)){k[b>>2]=k[q+16>>2];if(e)i[e>>0]=0;g=q+24|0;d=k[g>>2]|0;if(d){f=k[l>>2]|0;if((f|0)!=(d|0)){do{e=f+-4|0;k[l>>2]=e;f=k[e>>2]|0;k[e>>2]=0;if(f)Lb[k[(k[f>>2]|0)+4>>2]&255](f);f=k[l>>2]|0}while((f|0)!=(d|0));d=k[g>>2]|0}mj(d)}e=0;r=v;return e|0}else s=15}else s=15}}while(0);if((s|0)==15){f=Wa(824,0)|0;d=M;s=16}l=q+24|0;g=k[l>>2]|0;if(g){j=q+28|0;h=k[j>>2]|0;if((h|0)!=(g|0)){do{q=h+-4|0;k[j>>2]=q;h=k[q>>2]|0;k[q>>2]=0;if(h)Lb[k[(k[h>>2]|0)+4>>2]&255](h);h=k[j>>2]|0}while((h|0)!=(g|0));g=k[l>>2]|0}mj(g)}}else s=5}else s=5;if((s|0)==5){f=Wa(824,0)|0;d=M}q=(d|0)==(ab(824)|0);h=cb(f|0)|0;d=(e|0)==0;if(!q){if(!d)i[e>>0]=0;eb();e=14;r=v;return e|0}g=h+12|0;do{if(!d){d=k[g>>2]|0;x=0;f=Da(1)|0;q=x;x=0;if(!(q&1))if((d|0)==(f|0)){wl(e,Ob[k[(k[h>>2]|0)+8>>2]&127](h)|0)|0;s=60;break}else{i[e>>0]=0;s=60;break}}else s=60}while(0);if((s|0)==60?(t=k[g>>2]|0,x=0,u=Da(1)|0,e=x,x=0,!(e&1)):0){e=(t|0)==(u|0)?k[h+8>>2]|0:13;eb();r=v;return e|0}d=Wa()|0;x=0;Ga(3);v=x;x=0;if(v&1){v=Wa(0)|0;oc(v)}else fb(d|0);return 0}function nc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;j=r;r=r+112|0;f=j+96|0;i=j+84|0;l=j+72|0;m=j+60|0;n=j+48|0;o=j+36|0;p=j+24|0;q=j+12|0;s=j;h=(b|0)==0;if((a|0)==0&h){e=Va(16)|0;x=0;Fa(5,f|0,48504,52);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,f|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(f);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}g=k[d>>2]|0;if((g+-1|0)>>>0>65534){e=Va(16)|0;x=0;Fa(5,i|0,48557,41);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,i|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(i);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}f=k[d+4>>2]|0;if((f+-1|0)>>>0>65534){e=Va(16)|0;x=0;Fa(5,l|0,48599,42);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,l|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(l);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}e=k[d+8>>2]|0;if((e+-2|0)>>>0>14){e=Va(16)|0;x=0;Fa(5,m|0,48642,46);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,m|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(m);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}a=k[d+24>>2]|0;if(a>>>0>=3){e=Va(16)|0;x=0;Fa(5,n|0,48689,65);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,n|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(n);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}b=k[d+16>>2]|0;if((b+-1|0)>>>0>254){e=Va(16)|0;x=0;Fa(5,o|0,48755,44);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,o|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(o);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}if(!h?(o=ia(f,g)|0,(ia(ia(o,(e|0)>8?2:1)|0,b)|0)>>>0>c>>>0):0){e=Va(16)|0;x=0;Fa(5,p|0,48800,58);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,p|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(p);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}switch(b|0){case 4:{if((a|0)!=2){r=j;return}e=Va(16)|0;x=0;Fa(5,q|0,48859,73);s=x;x=0;if(!(s&1)){x=0;b=Da(1)|0;s=x;x=0;if(!(s&1)?(x=0,Ja(36,e|0,1,b|0,q|0),s=x,x=0,!(s&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(q);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}case 3:{r=j;return}default:{if(!a){r=j;return}e=Va(16)|0;x=0;Fa(5,s|0,48933,73);q=x;x=0;if(!(q&1)){x=0;b=Da(1)|0;q=x;x=0;if(!(q&1)?(x=0,Ja(36,e|0,1,b|0,s|0),q=x,x=0,!(q&1)):0){x=0;Fa(6,e|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(s);if(!a){s=b;fb(s|0)}}else b=Wa()|0;Ua(e|0);s=b;fb(s|0)}}}function oc(a){a=a|0;cb(a|0)|0;tj()}function pc(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,j=0,l=0,m=0;m=r;r=r+128|0;f=m+116|0;g=m;x=0;k[f>>2]=k[b>>2];k[f+4>>2]=k[b+4>>2];k[f+8>>2]=k[b+8>>2];ra(59,g|0,f|0);e=x;x=0;if(!(e&1)){if(c){e=g+16|0;b=e+84|0;do{k[e>>2]=k[c>>2];e=e+4|0;c=c+4|0}while((e|0)<(b|0))}x=0;k[f>>2]=k[a>>2];k[f+4>>2]=k[a+4>>2];k[f+8>>2]=k[a+8>>2];ra(60,g|0,f|0);g=x;x=0;if(!(g&1)){if(d)i[d>>0]=0;l=0;r=m;return l|0}}a=Wa(824,0)|0;g=M;g=(g|0)==(ab(824)|0);a=cb(a|0)|0;b=(d|0)==0;if(!g){if(!b)i[d>>0]=0;eb();l=14;r=m;return l|0}e=a+12|0;do{if(!b){b=k[e>>2]|0;x=0;c=Da(1)|0;g=x;x=0;if(!(g&1))if((b|0)==(c|0)){wl(d,Ob[k[(k[a>>2]|0)+8>>2]&127](a)|0)|0;l=10;break}else{i[d>>0]=0;l=10;break}}else l=10}while(0);if((l|0)==10?(h=k[e>>2]|0,x=0,j=Da(1)|0,l=x,x=0,!(l&1)):0){l=(h|0)==(j|0)?k[a+8>>2]|0:13;eb();r=m;return l|0}b=Wa()|0;x=0;Ga(3);m=x;x=0;if(m&1){m=Wa(0)|0;oc(m)}else fb(b|0);return 0}function qc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=r;r=r+128|0;e=j+116|0;d=j;x=0;k[e>>2]=k[a>>2];k[e+4>>2]=k[a+4>>2];k[e+8>>2]=k[a+8>>2];ra(59,d|0,e|0);e=x;x=0;if((!(e&1)?(x=0,qa(177,d|0),e=x,x=0,!(e&1)):0)?(x=0,ra(61,d|0,1),e=x,x=0,!(e&1)):0){a=d+16|0;d=b+84|0;do{k[b>>2]=k[a>>2];b=b+4|0;a=a+4|0}while((b|0)<(d|0));if(c)i[c>>0]=0;c=0;r=j;return c|0}e=Wa(824,0)|0;b=M;b=(b|0)==(ab(824)|0);e=cb(e|0)|0;a=(c|0)==0;if(!b){if(!a)i[c>>0]=0;eb();c=14;r=j;return c|0}b=e+12|0;do{if(!a){a=k[b>>2]|0;x=0;d=Da(1)|0;l=x;x=0;if(!(l&1))if((a|0)==(d|0)){wl(c,Ob[k[(k[e>>2]|0)+8>>2]&127](e)|0)|0;h=13;break}else{i[c>>0]=0;h=13;break}}else h=13}while(0);if((h|0)==13?(f=k[b>>2]|0,x=0,g=Da(1)|0,l=x,x=0,!(l&1)):0){l=(f|0)==(g|0)?k[e+8>>2]|0:13;eb();r=j;return l|0}a=Wa()|0;x=0;Ga(3);l=x;x=0;if(l&1){l=Wa(0)|0;oc(l)}else fb(a|0);return 0}function rc(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,l=0,m=0;m=r;r=r+48|0;i=m+36|0;h=m+24|0;j=m+12|0;l=m;if(!((a|0)!=0&(c|0)!=0&(d|0)!=0&(f|0)!=0)){e=1;r=m;return e|0}k[j>>2]=0;k[j+4>>2]=a;k[j+8>>2]=b;k[l>>2]=0;k[l+4>>2]=d;k[l+8>>2]=e;k[h>>2]=k[j>>2];k[h+4>>2]=k[j+4>>2];k[h+8>>2]=k[j+8>>2];k[i>>2]=k[l>>2];k[i+4>>2]=k[l+4>>2];k[i+8>>2]=k[l+8>>2];e=mc(h,c,i,f,g)|0;r=m;return e|0}function sc(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;e=r;r=r+32|0;f=e+12|0;g=e;h=g;k[h>>2]=0;k[h+4>>2]=0;k[g+4>>2]=a;k[g+8>>2]=b;k[f>>2]=k[g>>2];k[f+4>>2]=k[g+4>>2];k[f+8>>2]=k[g+8>>2];c=qc(f,c,d)|0;r=e;return c|0}function tc(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+48|0;h=g+36|0;i=g+24|0;l=g+12|0;j=g;k[l>>2]=0;k[l+4>>2]=a;k[l+8>>2]=b;k[j>>2]=0;k[j+4>>2]=c;k[j+8>>2]=d;k[i>>2]=k[l>>2];k[i+4>>2]=k[l+4>>2];k[i+8>>2]=k[l+8>>2];k[h>>2]=k[j>>2];k[h+4>>2]=k[j+4>>2];k[h+8>>2]=k[j+8>>2];d=pc(i,h,e,f)|0;r=g;return d|0}function uc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0;j=a+4|0;c=k[a>>2]|0;e=((k[j>>2]|0)-c>>2)+1|0;if(e>>>0>1073741823){jj(a);c=k[a>>2]|0}l=a+8|0;d=(k[l>>2]|0)-c|0;if(d>>2>>>0<536870911){d=d>>1;d=d>>>0>>0?e:d;c=(k[j>>2]|0)-c>>2;if(!d){f=0;g=0}else h=6}else{d=1073741823;c=(k[j>>2]|0)-c>>2;h=6}if((h|0)==6){f=d;g=lj(d<<2)|0}e=g+(c<<2)|0;d=e;i=g+(f<<2)|0;h=k[b>>2]|0;k[b>>2]=0;k[e>>2]=h;h=g+(c+1<<2)|0;g=k[a>>2]|0;c=k[j>>2]|0;if((c|0)==(g|0)){e=a;f=j}else{do{c=c+-4|0;b=k[c>>2]|0;k[c>>2]=0;k[e+-4>>2]=b;e=d+-4|0;d=e}while((c|0)!=(g|0));c=d;e=a;f=j;d=c;g=k[a>>2]|0;c=k[j>>2]|0}k[e>>2]=d;k[f>>2]=h;k[l>>2]=i;e=g;if((c|0)!=(e|0))do{c=c+-4|0;d=k[c>>2]|0;k[c>>2]=0;if(d)Lb[k[(k[d>>2]|0)+4>>2]&255](d)}while((c|0)!=(e|0));if(!g)return;mj(g);return}function vc(){if(i[8]|0)return 35648;if(!(Qa(8)|0))return 35648;tb(72,35648,w|0)|0;Ya(8);return 35648}function wc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+32|0;j=m;Oi(j,(1<>2]|0;l=f+1|0;c=l<<1;k[a>>2]=0;g=a+4|0;k[g>>2]=0;k[a+8>>2]=0;a:do{if(l){if(!((f|0)<-1?(x=0,qa(178,a|0),h=x,x=0,h&1):0))d=4;if((d|0)==4?(x=0,e=ta(67,c|0)|0,h=x,x=0,!(h&1)):0){k[g>>2]=e;k[a>>2]=e;k[a+8>>2]=e+c;b=e;while(1){i[b>>0]=0;b=(k[g>>2]|0)+1|0;k[g>>2]=b;c=c+-1|0;if(!c)break a}}c=Wa()|0;b=k[a>>2]|0;if(!b)fb(c|0);if((k[g>>2]|0)!=(b|0))k[g>>2]=b;mj(b);fb(c|0)}}while(0);b=~f;if((f|0)<(b|0)){r=m;return}g=j+12|0;h=j+8|0;f=j+4|0;e=b;do{b=k[g>>2]|0;if((e|0)>(0-b|0)){c=k[h>>2]|0;if((e|0)>(0-c|0)){d=k[f>>2]|0;if((e|0)>(0-d|0))if((e|0)>=0)if((e|0)>0)if((d|0)<=(e|0))if((c|0)>(e|0))b=2;else b=(b|0)>(e|0)?3:4;else b=1;else b=0;else b=-1;else b=-2}else b=-3}else b=-4;i[(k[a>>2]|0)+(e+l)>>0]=b;e=e+1|0}while((e|0)<(l|0));r=m;return}function xc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;p=k[c+16>>2]|0;switch(p|0){case 64:case 0:{x=0;a=Aa(34,a|0,b|0)|0;b=x;x=0;if(b&1)q=16;else d=a;break}default:{e=(1<>2])+-1|0;o=k[b+20>>2]|0;n=o<<1;n=((n+e|0)/(n|1|0)|0)+1|0;a=0;while(1)if((1<>2]|0;x=0;d=ta(67,4624)|0;m=x;x=0;if(m&1)q=16;else{f=((g|0)<8?8:g)+g<<1;h=d+4|0;l=b;m=h+84|0;do{k[h>>2]=k[l>>2];h=h+4|0;l=l+4|0}while((h|0)<(m|0));h=d+88|0;m=h+40|0;do{k[h>>2]=0;h=h+4|0}while((h|0)<(m|0));k[d>>2]=35660;k[d+128>>2]=e;k[d+132>>2]=n;k[d+136>>2]=o;k[d+140>>2]=a;k[d+144>>2]=g;k[d+148>>2]=f;k[d+152>>2]=p;a=d+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+172>>2]=k[b>>2];k[d+176>>2]=0;k[d+180>>2]=0;k[d+184>>2]=0;a=d+4568|0;e=d+188|0;do{k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;j[e+10>>1]=1;e=e+12|0}while((e|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1}}}if((q|0)==16){q=Wa()|0;fb(q|0)}if(!d)return d|0;x=0;ra(k[(k[d>>2]|0)+12>>2]|0,d|0,c|0);q=x;x=0;if(!(q&1))return d|0;a=Wa()|0;if(!d){q=a;fb(q|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);q=a;fb(q|0);return 0}function yc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0;c=(k[b+24>>2]|0)==2;if(c?(k[b+16>>2]|0)!=3:0){b=0;return b|0}n=k[b+20>>2]|0;a=k[b+8>>2]|0;a:do{if(!n){if(c){if((a|0)!=8)break;d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35688;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}switch(a|0){case 8:{d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35716;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}case 12:{d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35744;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}case 16:{d=lj(4600)|0;g=d+4|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=d+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[d>>2]=35772;a=d+132|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+148>>2]=k[b>>2];k[d+152>>2]=0;k[d+156>>2]=0;k[d+160>>2]=0;a=d+4544|0;c=d+164|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4556|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4568|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+28>>2]|0))k[d+20>>2]=1;b=d;return b|0}default:break a}}}while(0);m=(1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35800;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35660;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}}if((a|0)>=17){b=0;return b|0}f=n<<1;f=((f+m|0)/(f|1|0)|0)+1|0;if(c){a=0;while(1)if((1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35828;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));g=e+88|0;l=g+40|0;do{k[g>>2]=0;g=g+4|0}while((g|0)<(l|0));k[e>>2]=35856;k[e+128>>2]=m;k[e+132>>2]=f;k[e+136>>2]=n;k[e+140>>2]=a;k[e+144>>2]=c;k[e+148>>2]=d;k[e+152>>2]=64;a=e+156|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+172>>2]=k[b>>2];k[e+176>>2]=0;k[e+180>>2]=0;k[e+184>>2]=0;a=e+4568|0;c=e+188|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4580|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4592|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+28>>2]|0))k[e+20>>2]=1;b=e;return b|0}return 0}function zc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;p=k[c+16>>2]|0;switch(p|0){case 64:case 0:{x=0;a=Aa(35,a|0,b|0)|0;b=x;x=0;if(b&1)q=16;else d=a;break}default:{e=(1<>2])+-1|0;o=k[b+20>>2]|0;n=o<<1;n=((n+e|0)/(n|1|0)|0)+1|0;a=0;while(1)if((1<>2]|0;x=0;d=ta(67,4632)|0;m=x;x=0;if(m&1)q=16;else{f=((g|0)<8?8:g)+g<<1;k[d+4>>2]=0;h=d+8|0;l=b;m=h+84|0;do{k[h>>2]=k[l>>2];h=h+4|0;l=l+4|0}while((h|0)<(m|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;m=d+116|0;k[m>>2]=0;k[m+4>>2]=0;k[m+8>>2]=0;k[m+12>>2]=0;k[m+16>>2]=0;k[d>>2]=35884;k[d+136>>2]=e;k[d+140>>2]=n;k[d+144>>2]=o;k[d+148>>2]=a;k[d+152>>2]=g;k[d+156>>2]=f;k[d+160>>2]=p;a=d+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+180>>2]=k[b>>2];k[d+184>>2]=0;k[d+188>>2]=0;k[d+192>>2]=0;a=d+4576|0;e=d+196|0;do{k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;j[e+10>>1]=1;e=e+12|0}while((e|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1}}}if((q|0)==16){q=Wa()|0;fb(q|0)}if(!d)return d|0;x=0;ra(k[(k[d>>2]|0)+8>>2]|0,d|0,c|0);q=x;x=0;if(!(q&1))return d|0;a=Wa()|0;if(!d){q=a;fb(q|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);q=a;fb(q|0);return 0}function Ac(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,m=0,n=0;c=(k[b+24>>2]|0)==2;if(c?(k[b+16>>2]|0)!=3:0){b=0;return b|0}n=k[b+20>>2]|0;a=k[b+8>>2]|0;a:do{if(!n){if(c){if((a|0)!=8)break;d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35912;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}switch(a|0){case 8:{d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35940;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}case 12:{d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35968;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}case 16:{d=lj(4608)|0;k[d+4>>2]=0;g=d+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[d+92>>2]=0;k[d+96>>2]=0;k[d+100>>2]=32;k[d+104>>2]=0;k[d+108>>2]=0;i[d+112>>0]=0;a=d+116|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[d>>2]=35996;a=d+140|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[d+156>>2]=k[b>>2];k[d+160>>2]=0;k[d+164>>2]=0;k[d+168>>2]=0;a=d+4552|0;c=d+172|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=d+4564|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=d+4576|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[d+32>>2]|0))k[d+24>>2]=1;b=d;return b|0}default:break a}}}while(0);m=(1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=36024;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=35884;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}}if((a|0)>=17){b=0;return b|0}f=n<<1;f=((f+m|0)/(f|1|0)|0)+1|0;if(c){a=0;while(1)if((1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=36052;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}else{a=0;while(1)if((1<>2]=0;g=e+8|0;h=b;l=g+84|0;do{k[g>>2]=k[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(l|0));k[e+92>>2]=0;k[e+96>>2]=0;k[e+100>>2]=32;k[e+104>>2]=0;k[e+108>>2]=0;i[e+112>>0]=0;l=e+116|0;k[l>>2]=0;k[l+4>>2]=0;k[l+8>>2]=0;k[l+12>>2]=0;k[l+16>>2]=0;k[e>>2]=36080;k[e+136>>2]=m;k[e+140>>2]=f;k[e+144>>2]=n;k[e+148>>2]=a;k[e+152>>2]=c;k[e+156>>2]=d;k[e+160>>2]=64;a=e+164|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[e+180>>2]=k[b>>2];k[e+184>>2]=0;k[e+188>>2]=0;k[e+192>>2]=0;a=e+4576|0;c=e+196|0;do{k[c>>2]=0;k[c+4>>2]=0;j[c+8>>1]=0;j[c+10>>1]=1;c=c+12|0}while((c|0)!=(a|0));k[a>>2]=0;k[a+4>>2]=0;j[a+8>>1]=0;i[a+10>>0]=0;b=e+4588|0;k[b>>2]=0;k[b+4>>2]=0;j[b+8>>1]=0;i[b+10>>0]=0;b=e+4600|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[b+16>>2]=0;k[b+20>>2]=0;k[b+24>>2]=0;i[b+28>>0]=0;if(!(k[e+32>>2]|0))k[e+24>>2]=1;b=e;return b|0}return 0}function Bc(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0;a=2832;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=4880);sw(2832,0,2048)|0;a=0;do{g=2832+(a+128<<3)|0;k[g>>2]=0;k[g+4>>2]=1;a=a+1|0}while((a|0)!=128);a=3088;k[a>>2]=1;k[a+4>>2]=3;a=3096;k[a>>2]=1;k[a+4>>2]=3;a=3104;k[a>>2]=1;k[a+4>>2]=3;a=3112;k[a>>2]=1;k[a+4>>2]=3;a=3120;k[a>>2]=1;k[a+4>>2]=3;a=3128;k[a>>2]=1;k[a+4>>2]=3;a=3136;k[a>>2]=1;k[a+4>>2]=3;a=3144;k[a>>2]=1;k[a+4>>2]=3;a=3152;k[a>>2]=1;k[a+4>>2]=3;a=3160;k[a>>2]=1;k[a+4>>2]=3;a=3168;k[a>>2]=1;k[a+4>>2]=3;a=3176;k[a>>2]=1;k[a+4>>2]=3;a=3184;k[a>>2]=1;k[a+4>>2]=3;a=3192;k[a>>2]=1;k[a+4>>2]=3;a=3200;k[a>>2]=1;k[a+4>>2]=3;a=3208;k[a>>2]=1;k[a+4>>2]=3;a=3216;k[a>>2]=1;k[a+4>>2]=3;a=3224;k[a>>2]=1;k[a+4>>2]=3;a=3232;k[a>>2]=1;k[a+4>>2]=3;a=3240;k[a>>2]=1;k[a+4>>2]=3;a=3248;k[a>>2]=1;k[a+4>>2]=3;a=3256;k[a>>2]=1;k[a+4>>2]=3;a=3264;k[a>>2]=1;k[a+4>>2]=3;a=3272;k[a>>2]=1;k[a+4>>2]=3;a=3280;k[a>>2]=1;k[a+4>>2]=3;a=3288;k[a>>2]=1;k[a+4>>2]=3;a=3296;k[a>>2]=1;k[a+4>>2]=3;a=3304;k[a>>2]=1;k[a+4>>2]=3;a=3312;k[a>>2]=1;k[a+4>>2]=3;a=3320;k[a>>2]=1;k[a+4>>2]=3;a=3328;k[a>>2]=1;k[a+4>>2]=3;a=3336;k[a>>2]=1;k[a+4>>2]=3;a=2896;k[a>>2]=2;k[a+4>>2]=5;a=2904;k[a>>2]=2;k[a+4>>2]=5;a=2912;k[a>>2]=2;k[a+4>>2]=5;a=2920;k[a>>2]=2;k[a+4>>2]=5;a=2928;k[a>>2]=2;k[a+4>>2]=5;a=2936;k[a>>2]=2;k[a+4>>2]=5;a=2944;k[a>>2]=2;k[a+4>>2]=5;a=2952;k[a>>2]=2;k[a+4>>2]=5;a=2848;k[a>>2]=3;k[a+4>>2]=7;a=2856;k[a>>2]=3;k[a+4>>2]=7;a=0;do{g=2832+(a+64<<3)|0;k[g>>2]=-1;k[g+4>>2]=2;a=a+1|0}while((a|0)!=64);a=2960;k[a>>2]=-2;k[a+4>>2]=4;a=2968;k[a>>2]=-2;k[a+4>>2]=4;a=2976;k[a>>2]=-2;k[a+4>>2]=4;a=2984;k[a>>2]=-2;k[a+4>>2]=4;a=2992;k[a>>2]=-2;k[a+4>>2]=4;a=3e3;k[a>>2]=-2;k[a+4>>2]=4;a=3008;k[a>>2]=-2;k[a+4>>2]=4;a=3016;k[a>>2]=-2;k[a+4>>2]=4;a=3024;k[a>>2]=-2;k[a+4>>2]=4;a=3032;k[a>>2]=-2;k[a+4>>2]=4;a=3040;k[a>>2]=-2;k[a+4>>2]=4;a=3048;k[a>>2]=-2;k[a+4>>2]=4;a=3056;k[a>>2]=-2;k[a+4>>2]=4;a=3064;k[a>>2]=-2;k[a+4>>2]=4;a=3072;k[a>>2]=-2;k[a+4>>2]=4;a=3080;k[a>>2]=-2;k[a+4>>2]=4;a=2864;k[a>>2]=-3;k[a+4>>2]=6;a=2872;k[a>>2]=-3;k[a+4>>2]=6;a=2880;k[a>>2]=-3;k[a+4>>2]=6;a=2888;k[a>>2]=-3;k[a+4>>2]=6;a=2840;k[a>>2]=-4;k[a+4>>2]=8;a=4880;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=6928);sw(4880,0,2048)|0;c=2;a=0;e=0;f=0;while(1){c=c<<16>>16;b=8-c|0;d=1<>2]=e;k[g+4>>2]=c;b=b+1|0}while((b|0)<(d|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==7){b=2;e=1;f=-1;g=-1;break}else{c=(a>>1)+2|0;e=b>>16}}while(1){c=b<<16>>16;a=8-c|0;d=1<>2]=f;k[e+4>>2]=c;b=b+1|0}while((b|0)<(d|0))}a=(g<<16)+-65536|0;e=a>>31^a>>15;b=(e>>1)+2|0;if((b|0)>8){a=6928;break}else{f=a>>16;g=g+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=8976);sw(6928,0,2048)|0;e=3;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==12){e=3;b=1;d=-1;f=-1;break}else{e=(a>>2)+3|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>2)+3|0;if((e|0)>8){a=8976;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=11024);sw(8976,0,2048)|0;e=4;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==20){e=4;b=1;d=-1;f=-1;break}else{e=(a>>3)+4|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>3)+4|0;if((e|0)>8){a=11024;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=13072);sw(11024,0,2048)|0;e=5;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==32){e=5;b=1;d=-1;f=-1;break}else{e=(a>>4)+5|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>4)+5|0;if((e|0)>8){a=13072;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=15120);sw(13072,0,2048)|0;e=6;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==48){e=6;b=1;d=-1;f=-1;break}else{e=(a>>5)+6|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>5)+6|0;if((e|0)>8){a=15120;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=17168);sw(15120,0,2048)|0;e=7;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==64){e=7;b=1;d=-1;f=-1;break}else{e=(a>>6)+7|0;d=b>>16}}while(1){a=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}a=(f<<16)+-65536|0;b=a>>31^a>>15;e=(b>>6)+7|0;if((e|0)>8){a=17168;break}else{d=a>>16;f=f+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=19216);sw(17168,0,2048)|0;e=8;a=0;d=0;f=0;while(1){b=8-e|0;c=1<>2]=d;k[g+4>>2]=e;b=b+1|0}while((b|0)<(c|0))}b=(f<<16)+65536|0;a=b>>31^b>>15;f=f+1|0;if((f|0)==64){f=8;d=1;e=-1;g=-1;break}else{e=(a>>7)+8|0;d=b>>16}}while(1){a=8-f|0;c=1<>2]=e;k[d+4>>2]=f;b=b+1|0}while((b|0)<(c|0))}b=(g<<16)+-65536|0;d=b>>31^b>>15;a=d>>7;if((a|0)>0){a=19216;break}else{f=a+8|0;e=b>>16;g=g+-1|0}}do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=21264);sw(19216,0,2048)|0;a=21264;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=23312);sw(21264,0,2048)|0;a=23312;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=25360);sw(23312,0,2048)|0;a=25360;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=27408);sw(25360,0,2048)|0;a=27408;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=29456);sw(27408,0,2048)|0;a=29456;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=31504);sw(29456,0,2048)|0;a=31504;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=33552);sw(31504,0,2048)|0;a=33552;do{k[a>>2]=0;k[a+4>>2]=0;a=a+8|0}while((a|0)!=35600);sw(33552,0,2048)|0;wc(35600,8);tb(179,35600,w|0)|0;wc(35612,10);tb(179,35612,w|0)|0;wc(35624,12);tb(179,35624,w|0)|0;wc(35636,16);tb(179,35636,w|0)|0;return}function Cc(a){a=a|0;var b=0;b=k[a>>2]|0;if(!b)return;a=a+4|0;if((k[a>>2]|0)!=(b|0))k[a>>2]=b;mj(b);return}function Dc(a){a=a|0;var b=0,c=0;k[a>>2]=36080;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Ec(a){a=a|0;var b=0,c=0;k[a>>2]=36080;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Fc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;re(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function Gc(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35856;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];ge(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;ge(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Hc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ic(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36460;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Jc(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36436;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Kc(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36412;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Lc(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,j=0,l=0,m=0,n=0,o=0;k[a>>2]=36388;k[a+4>>2]=c;n=a+8|0;f=k[c>>2]|0;l=c+16|0;d=k[l>>2]|0;g=ia(d,f)|0;k[n>>2]=0;o=a+12|0;k[o>>2]=0;k[a+16>>2]=0;do{if(g){if(!((g|0)<0?(x=0,qa(178,n|0),f=x,x=0,f&1):0))m=4;if((m|0)==4?(h=g<<1,x=0,j=ta(67,h|0)|0,f=x,x=0,!(f&1)):0){k[n>>2]=j;f=j+(g<<1)|0;k[a+16>>2]=f;sw(j|0,0,h|0)|0;k[o>>2]=f;f=k[c>>2]|0;d=k[l>>2]|0;break}g=Wa()|0;e=k[n>>2]|0;d=e;if(e){f=k[o>>2]|0;if((f|0)!=(e|0))k[o>>2]=f+(~((f+-2-d|0)>>>1)<<1);mj(e)}o=g;fb(o|0)}}while(0);g=a+20|0;d=ia(f<<1,d)|0;k[g>>2]=0;h=a+24|0;k[h>>2]=0;k[a+28>>2]=0;if(!d){o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))m=13;if((m|0)==13?(x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[h>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[h>>2]|0)+1|0;k[h>>2]=e;d=d+-1|0}while((d|0)!=0);o=a+36|0;k[o>>2]=k[b>>2];k[o+4>>2]=k[b+4>>2];k[o+8>>2]=k[b+8>>2];return}f=Wa()|0;e=k[g>>2]|0;if(e){if((k[h>>2]|0)!=(e|0))k[h>>2]=e;mj(e)}e=k[n>>2]|0;if(!e){o=f;fb(o|0)}d=k[o>>2]|0;if((d|0)!=(e|0))k[o>>2]=d+(~((d+-2-e|0)>>>1)<<1);mj(e);o=f;fb(o|0)}function Mc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;g=a+32|0;Tm(g,b)|0;f=a+44|0;k[f>>2]=0;h=a+48|0;e=k[h>>2]|0;if(e&8){b=i[g>>0]|0;if(!(b&1)){b=((b&255)>>>1)+(g+1)|0;k[f>>2]=b;c=g+1|0;d=g+1|0}else{b=(k[a+40>>2]|0)+(k[a+36>>2]|0)|0;k[f>>2]=b;d=k[a+40>>2]|0;c=d}k[a+8>>2]=c;k[a+12>>2]=d;k[a+16>>2]=b}if(!(e&16))return;b=i[g>>0]|0;if(!(b&1)){e=(b&255)>>>1;k[f>>2]=g+1+e;b=10;f=e}else{e=k[a+36>>2]|0;k[f>>2]=(k[a+40>>2]|0)+e;b=(k[g>>2]&-2)+-1|0;f=e}Wm(g,b,0);b=i[g>>0]|0;if(!(b&1)){e=g+1|0;d=(b&255)>>>1;c=g+1|0}else{c=k[a+40>>2]|0;e=c;d=k[a+36>>2]|0}b=a+24|0;k[b>>2]=c;k[a+20>>2]=c;k[a+28>>2]=e+d;if(!(k[h>>2]&3))return;k[b>>2]=c+f;return}function Nc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+32|0;g=o+16|0;n=o+8|0;h=o;x=0;ra(65,n|0,a|0);l=x;x=0;a:do{if(l&1){c=Wa(0)|0;d=a;e=a}else{do{if(i[n>>0]|0){d=k[(k[a>>2]|0)+-12>>2]|0;k[h>>2]=k[a+(d+24)>>2];j=a+d|0;l=k[a+(d+4)>>2]|0;e=b+c|0;d=a+(d+76)|0;c=k[d>>2]|0;do{if((c|0)==-1){x=0;c=ta(68,j|0)|0;p=x;x=0;if(p&1)m=13;else{k[g>>2]=c;x=0;c=Aa(37,g|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,f=Aa(k[(k[c>>2]|0)+28>>2]|0,c|0,32)|0,p=x,x=0,!(p&1)):0){Qs(g);c=f<<24>>24;k[d>>2]=c;m=9;break}c=Wa(0)|0;Qs(g)}}else m=9}while(0);if((m|0)==9){x=0;k[g>>2]=k[h>>2];c=sa(39,g|0,b|0,((l&176|0)==32?e:b)|0,e|0,j|0,c&255|0)|0;p=x;x=0;if(!(p&1)){if(c)break;p=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+p|0,k[a+(p+16)>>2]|5|0);p=x;x=0;if(!(p&1))break;else m=13}else m=13}if((m|0)==13)c=Wa(0)|0;ro(n);d=a;e=a;break a}}while(0);ro(n);r=o;return a|0}}while(0);cb(c|0)|0;x=0;qa(181,d+(k[(k[e>>2]|0)+-12>>2]|0)|0);p=x;x=0;if(!(p&1)){eb();r=o;return a|0}c=Wa()|0;x=0;Ga(3);p=x;x=0;if(p&1){p=Wa(0)|0;oc(p)}else fb(c|0);return 0}function Oc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=k[b+48>>2]|0;if(c&16){c=b+44|0;d=k[c>>2]|0;e=k[b+24>>2]|0;if(d>>>0>>0)k[c>>2]=e;else e=d;d=k[b+20>>2]|0;f=e-d|0;if(f>>>0>4294967279)ij(a);if(f>>>0<11){i[a>>0]=f<<1;c=a+1|0}else{b=f+16&-16;c=lj(b)|0;k[a+8>>2]=c;k[a>>2]=b|1;k[a+4>>2]=f}if((d|0)!=(e|0)){b=c;while(1){i[b>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(e|0))break;else b=b+1|0}c=c+f|0}i[c>>0]=0;return}if(!(c&8)){k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}d=k[b+8>>2]|0;b=k[b+16>>2]|0;f=b-d|0;if(f>>>0>4294967279)ij(a);if(f>>>0<11){i[a>>0]=f<<1;c=a+1|0}else{e=f+16&-16;c=lj(e)|0;k[a+8>>2]=c;k[a>>2]=e|1;k[a+4>>2]=f}if((d|0)!=(b|0)){e=c;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(b|0))break;else e=e+1|0}c=c+f|0}i[c>>0]=0;return}function Pc(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,j=0,l=0,m=0,n=0,o=0,p=0;k[a>>2]=36364;k[a+4>>2]=c;o=a+8|0;g=k[c>>2]|0;m=c+16|0;f=k[m>>2]|0;l=ia(f,g)|0;k[o>>2]=0;p=a+12|0;k[p>>2]=0;k[a+16>>2]=0;do{if(l){if(!((l|0)<0?(x=0,qa(178,o|0),g=x,x=0,g&1):0))n=4;if((n|0)==4?(h=l<<1,x=0,j=ta(67,h|0)|0,g=x,x=0,!(g&1)):0){k[o>>2]=j;g=j+(l<<1)|0;k[a+16>>2]=g;sw(j|0,0,h|0)|0;k[p>>2]=g;g=k[c>>2]|0;f=k[m>>2]|0;break}h=Wa()|0;e=k[o>>2]|0;f=e;if(e){g=k[p>>2]|0;if((g|0)!=(e|0))k[p>>2]=g+(~((g+-2-f|0)>>>1)<<1);mj(e)}p=h;fb(p|0)}}while(0);h=a+20|0;f=ia(g<<1,f)|0;k[h>>2]=0;j=a+24|0;k[j>>2]=0;k[a+28>>2]=0;if(!f){p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}if(!((f|0)<0?(x=0,qa(178,h|0),m=x,x=0,m&1):0))n=13;if((n|0)==13?(x=0,e=ta(67,f|0)|0,n=x,x=0,!(n&1)):0){k[j>>2]=e;k[h>>2]=e;k[a+28>>2]=e+f;do{i[e>>0]=0;e=(k[j>>2]|0)+1|0;k[j>>2]=e;f=f+-1|0}while((f|0)!=0);p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}g=Wa()|0;e=k[h>>2]|0;if(e){if((k[j>>2]|0)!=(e|0))k[j>>2]=e;mj(e)}e=k[o>>2]|0;if(!e){p=g;fb(p|0)}f=k[p>>2]|0;if((f|0)!=(e|0))k[p>>2]=f+(~((f+-2-e|0)>>>1)<<1);mj(e);p=g;fb(p|0)}function Qc(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,j=0,l=0,m=0,n=0,o=0,p=0;k[a>>2]=36340;k[a+4>>2]=c;o=a+8|0;g=k[c>>2]|0;m=c+16|0;f=k[m>>2]|0;l=ia(f,g)|0;k[o>>2]=0;p=a+12|0;k[p>>2]=0;k[a+16>>2]=0;do{if(l){if(!((l|0)<0?(x=0,qa(178,o|0),g=x,x=0,g&1):0))n=4;if((n|0)==4?(h=l<<1,x=0,j=ta(67,h|0)|0,g=x,x=0,!(g&1)):0){k[o>>2]=j;g=j+(l<<1)|0;k[a+16>>2]=g;sw(j|0,0,h|0)|0;k[p>>2]=g;g=k[c>>2]|0;f=k[m>>2]|0;break}h=Wa()|0;e=k[o>>2]|0;f=e;if(e){g=k[p>>2]|0;if((g|0)!=(e|0))k[p>>2]=g+(~((g+-2-f|0)>>>1)<<1);mj(e)}p=h;fb(p|0)}}while(0);h=a+20|0;f=ia(g<<1,f)|0;k[h>>2]=0;j=a+24|0;k[j>>2]=0;k[a+28>>2]=0;if(!f){p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}if(!((f|0)<0?(x=0,qa(178,h|0),m=x,x=0,m&1):0))n=13;if((n|0)==13?(x=0,e=ta(67,f|0)|0,n=x,x=0,!(n&1)):0){k[j>>2]=e;k[h>>2]=e;k[a+28>>2]=e+f;do{i[e>>0]=0;e=(k[j>>2]|0)+1|0;k[j>>2]=e;f=f+-1|0}while((f|0)!=0);p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}g=Wa()|0;e=k[h>>2]|0;if(e){if((k[j>>2]|0)!=(e|0))k[j>>2]=e;mj(e)}e=k[o>>2]|0;if(!e){p=g;fb(p|0)}f=k[p>>2]|0;if((f|0)!=(e|0))k[p>>2]=f+(~((f+-2-e|0)>>>1)<<1);mj(e);p=g;fb(p|0)}function Rc(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,j=0,l=0,m=0,n=0,o=0,p=0;k[a>>2]=36316;k[a+4>>2]=c;o=a+8|0;g=k[c>>2]|0;m=c+16|0;f=k[m>>2]|0;l=ia(f,g)|0;k[o>>2]=0;p=a+12|0;k[p>>2]=0;k[a+16>>2]=0;do{if(l){if(!((l|0)<0?(x=0,qa(178,o|0),g=x,x=0,g&1):0))n=4;if((n|0)==4?(h=l<<1,x=0,j=ta(67,h|0)|0,g=x,x=0,!(g&1)):0){k[o>>2]=j;g=j+(l<<1)|0;k[a+16>>2]=g;sw(j|0,0,h|0)|0;k[p>>2]=g;g=k[c>>2]|0;f=k[m>>2]|0;break}h=Wa()|0;e=k[o>>2]|0;f=e;if(e){g=k[p>>2]|0;if((g|0)!=(e|0))k[p>>2]=g+(~((g+-2-f|0)>>>1)<<1);mj(e)}p=h;fb(p|0)}}while(0);h=a+20|0;f=ia(g<<1,f)|0;k[h>>2]=0;j=a+24|0;k[j>>2]=0;k[a+28>>2]=0;if(!f){p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}if(!((f|0)<0?(x=0,qa(178,h|0),m=x,x=0,m&1):0))n=13;if((n|0)==13?(x=0,e=ta(67,f|0)|0,n=x,x=0,!(n&1)):0){k[j>>2]=e;k[h>>2]=e;k[a+28>>2]=e+f;do{i[e>>0]=0;e=(k[j>>2]|0)+1|0;k[j>>2]=e;f=f+-1|0}while((f|0)!=0);p=a+32|0;o=d;o=k[o>>2]|0;d=d+4|0;d=k[d>>2]|0;n=p;k[n>>2]=o;p=p+4|0;k[p>>2]=d;p=a+40|0;k[p>>2]=o;p=a+48|0;k[p>>2]=k[b>>2];k[p+4>>2]=k[b+4>>2];k[p+8>>2]=k[b+8>>2];return}g=Wa()|0;e=k[h>>2]|0;if(e){if((k[j>>2]|0)!=(e|0))k[j>>2]=e;mj(e)}e=k[o>>2]|0;if(!e){p=g;fb(p|0)}f=k[p>>2]|0;if((f|0)!=(e|0))k[p>>2]=f+(~((f+-2-e|0)>>>1)<<1);mj(e);p=g;fb(p|0)}function Sc(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36316;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Tc(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36316;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Uc(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,j=0;e=a+48|0;if(!(k[e>>2]|0)){h=a+52|0;Zc(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Zc(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Vc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+48>>2]|0;if(!e){e=a+52|0;Wc(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Xc(a,e,b,c,d);return}}function Wc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0;l=a+4|0;f=k[l>>2]|0;do{if(!(i[f+32>>0]|0))n=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*6|0)|0;f=k[l>>2]|0;h=k[f+16>>2]|0;if((d|0)<=0){n=k[g>>2]|0;break}b=k[g>>2]|0;f=b;g=0;while(1){n=f+4|0;o=j[f>>1]|0;j[f>>1]=j[n>>1]|0;j[n>>1]=o;g=g+1|0;if((g|0)==(d|0))break;else f=f+(h<<1)|0}n=b;f=k[l>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:if((k[f+24>>2]|0)==2){if((d|0)<=0)return;f=a+32|0;b=0;do{o=k[f>>2]|0;l=m[n+(b*6|0)+2>>1]<>1]<>1]<>1]=(l+49152+((a+e|0)>>>2)&65535)>>>o;j[c+(b*6|0)+2>>1]=a>>>o;j[c+(b*6|0)+4>>1]=e>>>o;b=b+1|0}while((b|0)!=(d|0));return}else{g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;f=k[a+32>>2]|0;b=0;do{d=m[n+(b*6|0)+2>>1]<>1]<>1]<>1]=(d+49152+((a+o|0)>>>2)&65535)>>>f;j[c+(b+e<<1)>>1]=a>>>f;j[c+(b+h<<1)>>1]=o>>>f;b=b+1|0}while((b|0)!=(g|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;l=e*3|0;f=k[a+32>>2]|0;b=0;do{o=j[n+(b<<3)+6>>1]|0;p=m[n+(b<<3)+2>>1]<>1]<>1]<>1]=(p+49152+((d+a|0)>>>2)&65535)>>>f;j[c+(b+e<<1)>>1]=d>>>f;j[c+(b+h<<1)>>1]=a>>>f;j[c+(b+l<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}default:return}}function Xc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Wc(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Wc(a,q,c,d,e);r=n;return}function Yc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;e=r;r=r+176|0;c=e+152|0;j=e+16|0;g=e;if(!(b&1)){c=(b|0)/4|0;if((b|0)>3){d=0;do{j=a+(d<<2)|0;h=k[j>>2]|0;k[j>>2]=h>>>8&16711935|h<<8&-16711936;d=d+1|0}while((d|0)<(c|0))}if(!(b&3)){r=e;return}g=a+(b+-2)|0;j=a+(b+-1)|0;h=i[g>>0]|0;i[g>>0]=i[j>>0]|0;i[j>>0]=h;r=e;return}h=j+56|0;f=j+4|0;k[j>>2]=36160;k[h>>2]=36180;x=0;ra(62,j+56|0,f|0);e=x;x=0;if(e&1){j=Wa()|0;qn(h);fb(j|0)}k[j+128>>2]=0;k[j+132>>2]=-1;k[j>>2]=36200;k[j+56>>2]=36220;x=0;qa(180,f|0);e=x;x=0;do{if(e&1)c=Wa()|0;else{k[f>>2]=36236;e=j+36|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[j+52>>2]=16;k[c>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;x=0;ra(63,f|0,c|0);a=x;x=0;if(a&1){j=Wa()|0;Sm(c);Sm(e);xn(f);c=j;break}Sm(c);x=0;c=va(28,j|0,49087,24)|0;a=x;x=0;if((!(a&1)?(x=0,d=Aa(36,c|0,b|0)|0,b=x,x=0,!(b&1)):0)?(x=0,va(28,d|0,49112,20)|0,b=x,x=0,!(b&1)):0){a=Va(16)|0;x=0;ra(64,g|0,f|0);b=x;x=0;if(!(b&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,a|0,1,35648,g|0);b=x;x=0;if(b&1)d=1;else{x=0;Fa(6,a|0,824,96);x=0;d=0}c=Wa()|0;Sm(g);if(!d){g=c;k[j>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}else c=Wa()|0;Ua(a|0);g=c;k[j>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}g=Wa()|0;k[j>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}while(0);j=c;qn(h);fb(j|0)}function Zc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;n=a+4|0;f=k[n>>2]|0;a:do{switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)<=0)break a;f=a+40|0;a=0;do{e=k[f>>2]|0;h=m[b+(a*6|0)+2>>1]<>1]<>1]<>2)+16384|0;j[c+(a*6|0)>>1]=(g+32768+l&65535)>>>e;j[c+(a*6|0)+2>>1]=(l&65535)>>>e;j[c+(a*6|0)+4>>1]=(h+32768+l&65535)>>>e;a=a+1|0}while((a|0)!=(d|0))}else{g=(d|0)<(e|0)?d:e;if((g|0)<=0)break a;h=e<<1;f=a+40|0;a=0;do{l=k[f>>2]|0;p=m[b+(a+e<<1)>>1]<>1]<>1]<>2)+16384|0;j[c+(a*6|0)>>1]=(q+32768+o&65535)>>>l;j[c+(a*6|0)+2>>1]=(o&65535)>>>l;j[c+(a*6|0)+4>>1]=(p+32768+o&65535)>>>l;a=a+1|0}while((a|0)!=(g|0))}break}case 4:{if((k[f+24>>2]|0)==1?(l=(d|0)<(e|0)?d:e,(l|0)>0):0){h=e<<1;f=a+40|0;a=e*3|0;g=0;do{q=k[f>>2]|0;p=m[b+(g+e<<1)>>1]<>1]<>1]<>2)+16384|0;r=j[b+(g+a<<1)>>1]|0;t=ww((o&65535)>>>q&65535|0,0,16)|0;p=(p+32768+o&65535)>>>q|M;r=ww(r&65535|0,0,48)|0;r=t|(s+32768+o&65535)>>>q&65535|r;p=p&65535|M;q=c+(g<<3)|0;o=q;j[o>>1]=r;j[o+2>>1]=r>>>16;q=q+4|0;j[q>>1]=p;j[q+2>>1]=p>>>16;g=g+1|0}while((g|0)!=(l|0))}break}default:{}}}while(0);f=k[n>>2]|0;if(!(i[f+32>>0]|0))return;g=k[f+16>>2]|0;if((d|0)<=0)return;f=c;a=0;while(1){t=f+4|0;s=j[f>>1]|0;j[f>>1]=j[t>>1]|0;j[t>>1]=s;a=a+1|0;if((a|0)==(d|0))break;else f=f+(g<<1)|0}return}function _c(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36340;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function $c(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36340;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=a+48|0;if(!(k[e>>2]|0)){h=a+52|0;ed(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;ed(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function bd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+48>>2]|0;if(!e){e=a+52|0;cd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{dd(a,e,b,c,d);return}}function cd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0;l=a+4|0;f=k[l>>2]|0;do{if(!(i[f+32>>0]|0))n=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*6|0)|0;f=k[l>>2]|0;h=k[f+16>>2]|0;if((d|0)<=0){n=k[g>>2]|0;break}b=k[g>>2]|0;f=b;g=0;while(1){n=f+4|0;o=j[f>>1]|0;j[f>>1]=j[n>>1]|0;j[n>>1]=o;g=g+1|0;if((g|0)==(d|0))break;else f=f+(h<<1)|0}n=b;f=k[l>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:if((k[f+24>>2]|0)==2){if((d|0)<=0)return;f=a+32|0;b=0;do{e=k[f>>2]|0;l=m[n+(b*6|0)>>1]<>1]<>1]<>>1)&65535)>>>e&65535;j[c+(b*6|0)>>1]=(l+32768-a&65535)>>>e;j[c+(b*6|0)+2>>1]=(a&65535)>>>e;j[c+(b*6|0)+4>>1]=o;b=b+1|0}while((b|0)!=(d|0));return}else{g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;f=k[a+32>>2]|0;b=0;do{d=m[n+(b*6|0)>>1]<>1]<>1]<>>1)&65535)>>>f&65535;j[c+(b<<1)>>1]=(d+32768-a&65535)>>>f;j[c+(b+e<<1)>>1]=(a&65535)>>>f;j[c+(b+h<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;l=e*3|0;f=k[a+32>>2]|0;b=0;do{o=j[n+(b<<3)+6>>1]|0;p=m[n+(b<<3)>>1]<>1]<>1]<>>1)&65535)>>>f&65535;j[c+(b<<1)>>1]=(p+32768-d&65535)>>>f;j[c+(b+e<<1)>>1]=(d&65535)>>>f;j[c+(b+h<<1)>>1]=a;j[c+(b+l<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}default:return}}function dd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;cd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;cd(a,q,c,d,e);r=n;return}function ed(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;n=a+4|0;f=k[n>>2]|0;a:do{switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)<=0)break a;f=a+40|0;a=0;do{l=k[f>>2]|0;h=m[b+(a*6|0)+2>>1]<>1]<>1]<>>1)&65535)>>>l&65535;j[c+(a*6|0)>>1]=g>>>l;j[c+(a*6|0)+2>>1]=h>>>l;j[c+(a*6|0)+4>>1]=e;a=a+1|0}while((a|0)!=(d|0))}else{g=(d|0)<(e|0)?d:e;if((g|0)<=0)break a;h=e<<1;f=a+40|0;a=0;do{o=k[f>>2]|0;p=m[b+(a+e<<1)>>1]<>1]<>1]<>>1)&65535)>>>o&65535;j[c+(a*6|0)>>1]=q>>>o;j[c+(a*6|0)+2>>1]=p>>>o;j[c+(a*6|0)+4>>1]=l;a=a+1|0}while((a|0)!=(g|0))}break}case 4:{if((k[f+24>>2]|0)==1?(l=(d|0)<(e|0)?d:e,(l|0)>0):0){h=e<<1;f=a+40|0;a=e*3|0;g=0;do{o=k[f>>2]|0;q=m[b+(g+e<<1)>>1]<>1]<>1]<>>1)&65535)>>>o;r=j[b+(g+a<<1)>>1]|0;q=ww(q>>>o&65535|0,0,16)|0;p=M|p;r=ww(r&65535|0,0,48)|0;r=s>>>o&65535|q|r;p=p&65535|M;q=c+(g<<3)|0;o=q;j[o>>1]=r;j[o+2>>1]=r>>>16;q=q+4|0;j[q>>1]=p;j[q+2>>1]=p>>>16;g=g+1|0}while((g|0)!=(l|0))}break}default:{}}}while(0);f=k[n>>2]|0;if(!(i[f+32>>0]|0))return;g=k[f+16>>2]|0;if((d|0)<=0)return;f=c;a=0;while(1){s=f+4|0;r=j[f>>1]|0;j[f>>1]=j[s>>1]|0;j[s>>1]=r;a=a+1|0;if((a|0)==(d|0))break;else f=f+(g<<1)|0}return}function fd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36364;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function gd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36364;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function hd(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,j=0;e=a+48|0;if(!(k[e>>2]|0)){h=a+52|0;ld(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;ld(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+48>>2]|0;if(!e){e=a+52|0;jd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{kd(a,e,b,c,d);return}}function jd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0;l=a+4|0;f=k[l>>2]|0;do{if(!(i[f+32>>0]|0))n=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*6|0)|0;f=k[l>>2]|0;h=k[f+16>>2]|0;if((d|0)<=0){n=k[g>>2]|0;break}b=k[g>>2]|0;f=b;g=0;while(1){n=f+4|0;o=j[f>>1]|0;j[f>>1]=j[n>>1]|0;j[n>>1]=o;g=g+1|0;if((g|0)==(d|0))break;else f=f+(h<<1)|0}n=b;f=k[l>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:if((k[f+24>>2]|0)==2){if((d|0)<=0)return;f=a+32|0;b=0;do{e=k[f>>2]|0;a=m[n+(b*6|0)+2>>1]<>1]<>>e&65535;j[c+(b*6|0)>>1]=((m[n+(b*6|0)>>1]<>>e;j[c+(b*6|0)+2>>1]=(a&65535)>>>e;j[c+(b*6|0)+4>>1]=o;b=b+1|0}while((b|0)!=(d|0));return}else{g=(e|0)<(d|0)?e:d;if((g|0)<=0)return;h=e<<1;f=k[a+32>>2]|0;b=0;do{a=m[n+(b*6|0)+2>>1]<>1]<>>f&65535;j[c+(b<<1)>>1]=((m[n+(b*6|0)>>1]<>>f;j[c+(b+e<<1)>>1]=(a&65535)>>>f;j[c+(b+h<<1)>>1]=o;b=b+1|0}while((b|0)!=(g|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;h=(e|0)<(d|0)?e:d;if((h|0)<=0)return;l=e<<1;g=e*3|0;f=k[a+32>>2]|0;b=0;do{o=j[n+(b<<3)+6>>1]|0;d=m[n+(b<<3)+2>>1]<>1]<>>f&65535;j[c+(b<<1)>>1]=((m[n+(b<<3)>>1]<>>f;j[c+(b+e<<1)>>1]=(d&65535)>>>f;j[c+(b+l<<1)>>1]=a;j[c+(b+g<<1)>>1]=o;b=b+1|0}while((b|0)!=(h|0));return}default:return}}function kd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;jd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;jd(a,q,c,d,e);r=n;return}function ld(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;n=a+4|0;f=k[n>>2]|0;a:do{switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)<=0)break a;f=a+40|0;a=0;do{l=k[f>>2]|0;h=m[b+(a*6|0)+2>>1]<>1]<>>l&65535;j[c+(a*6|0)>>1]=((m[b+(a*6|0)>>1]<>>l;j[c+(a*6|0)+2>>1]=(h&65535)>>>l;j[c+(a*6|0)+4>>1]=e;a=a+1|0}while((a|0)!=(d|0))}else{g=(d|0)<(e|0)?d:e;if((g|0)<=0)break a;h=e<<1;f=a+40|0;a=0;do{o=k[f>>2]|0;p=m[b+(a+e<<1)>>1]<>1]<>>o&65535;j[c+(a*6|0)>>1]=((m[b+(a<<1)>>1]<>>o;j[c+(a*6|0)+2>>1]=(p&65535)>>>o;j[c+(a*6|0)+4>>1]=l;a=a+1|0}while((a|0)!=(g|0))}break}case 4:{if((k[f+24>>2]|0)==1?(l=(d|0)<(e|0)?d:e,(l|0)>0):0){h=e<<1;f=a+40|0;a=e*3|0;g=0;do{q=k[f>>2]|0;s=m[b+(g+e<<1)>>1]<>1]<>>q;o=(s+32768+(m[b+(g+h<<1)>>1]<>>q;r=j[b+(g+a<<1)>>1]|0;q=ww((s&65535)>>>q&65535|0,0,16)|0;o=o|M;r=ww(r&65535|0,0,48)|0;r=q|p&65535|r;o=o&65535|M;p=c+(g<<3)|0;q=p;j[q>>1]=r;j[q+2>>1]=r>>>16;p=p+4|0;j[p>>1]=o;j[p+2>>1]=o>>>16;g=g+1|0}while((g|0)!=(l|0))}break}default:{}}}while(0);f=k[n>>2]|0;if(!(i[f+32>>0]|0))return;g=k[f+16>>2]|0;if((d|0)<=0)return;f=c;a=0;while(1){s=f+4|0;r=j[f>>1]|0;j[f>>1]=j[s>>1]|0;j[s>>1]=r;a=a+1|0;if((a|0)==(d|0))break;else f=f+(g<<1)|0}return}function md(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0;n=r;r=r+16|0;l=n;m=k[a>>2]|0;if(!m){a=0;r=n;return a|0}o=b;h=d-o|0;j=e+12|0;g=k[j>>2]|0;h=(g|0)>(h|0)?g-h|0:0;g=c;e=g-o|0;if((e|0)>0?(Qb[k[(k[m>>2]|0)+48>>2]&63](m,b,e)|0)!=(e|0):0){k[a>>2]=0;o=0;r=n;return o|0}do{if((h|0)>0){Rm(l,h,f);x=0;e=va(k[(k[m>>2]|0)+48>>2]|0,m|0,((i[l>>0]&1)==0?l+1|0:k[l+8>>2]|0)|0,h|0)|0;o=x;x=0;if(o&1){o=Wa()|0;Sm(l);fb(o|0)}if((e|0)==(h|0)){Sm(l);break}k[a>>2]=0;Sm(l);o=0;r=n;return o|0}}while(0);d=d-g|0;if((d|0)>0?(Qb[k[(k[m>>2]|0)+48>>2]&63](m,c,d)|0)!=(d|0):0){k[a>>2]=0;o=0;r=n;return o|0}k[j>>2]=0;o=m;r=n;return o|0}function nd(a){a=a|0;k[a>>2]=36236;Sm(a+32|0);xn(a);return}function od(a){a=a|0;k[a>>2]=36236;Sm(a+32|0);xn(a);mj(a);return}function pd(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0;g=b+44|0;h=k[g>>2]|0;l=b+24|0;m=k[l>>2]|0;if(h>>>0>>0){k[g>>2]=m;h=m}j=h;g=f&24;if(!g){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}if((e|0)==1&(g|0)==24){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}a:do{switch(e|0){case 0:{g=0;e=0;break}case 1:if(!(f&8)){e=m-(k[b+20>>2]|0)|0;g=e;e=((e|0)<0)<<31>>31;break a}else{e=(k[b+12>>2]|0)-(k[b+8>>2]|0)|0;g=e;e=((e|0)<0)<<31>>31;break a}case 2:{g=b+32|0;if(!(i[g>>0]&1))g=g+1|0;else g=k[b+40>>2]|0;e=h-g|0;g=e;e=((e|0)<0)<<31>>31;break}default:{b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}}}while(0);e=tw(g|0,e|0,c|0,d|0)|0;c=M;if((c|0)>=0){g=b+32|0;if(!(i[g>>0]&1))g=g+1|0;else g=k[b+40>>2]|0;d=h-g|0;h=((d|0)<0)<<31>>31;if(!((h|0)<(c|0)|(h|0)==(c|0)&d>>>0>>0)){g=f&8;if(!((e|0)==0&(c|0)==0)){if((g|0)!=0?(k[b+12>>2]|0)==0:0){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}if((f&16|0)!=0&(m|0)==0){b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}}if(g){k[b+12>>2]=(k[b+8>>2]|0)+e;k[b+16>>2]=j}if(f&16)k[l>>2]=(k[b+20>>2]|0)+e;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=e;k[b+4>>2]=c;return}}b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function qd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=c+8|0;Sb[k[(k[b>>2]|0)+16>>2]&15](a,b,k[c>>2]|0,k[c+4>>2]|0,0,d);return}function rd(a){a=a|0;var b=0,c=0,d=0,e=0;b=a+44|0;c=k[b>>2]|0;d=k[a+24>>2]|0;if(c>>>0>>0){k[b>>2]=d;c=d}if(!(k[a+48>>2]&8)){a=-1;return a|0}e=a+16|0;b=k[e>>2]|0;d=a+12|0;if(b>>>0>>0){d=k[d>>2]|0;k[e>>2]=c;b=c}else d=k[d>>2]|0;if(d>>>0>=b>>>0){a=-1;return a|0}a=l[d>>0]|0;return a|0}function sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;d=a+44|0;c=k[d>>2]|0;e=k[a+24>>2]|0;if(c>>>0>>0){k[d>>2]=e;c=e}h=a+8|0;d=k[h>>2]|0;j=a+12|0;f=k[j>>2]|0;g=d;if(d>>>0>=f>>>0){a=-1;return a|0}if((b|0)==-1){k[h>>2]=d;k[j>>2]=f+-1;k[a+16>>2]=c;a=0;return a|0}if(!(k[a+48>>2]&16)){e=b&255;d=f+-1|0;if(e<<24>>24!=(i[d>>0]|0)){a=-1;return a|0}}else{e=b&255;d=f+-1|0}k[h>>2]=g;k[j>>2]=d;k[a+16>>2]=c;i[d>>0]=e;a=b;return a|0}function td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;s=r;r=r+16|0;m=s;if((b|0)==-1){a=0;r=s;return a|0}n=a+12|0;o=a+8|0;p=(k[n>>2]|0)-(k[o>>2]|0)|0;q=a+24|0;c=k[q>>2]|0;l=a+28|0;d=k[l>>2]|0;do{if((c|0)==(d|0)){h=a+48|0;if(!(k[h>>2]&16)){a=-1;r=s;return a|0}j=a+20|0;g=k[j>>2]|0;e=c-g|0;f=a+44|0;g=(k[f>>2]|0)-g|0;d=a+32|0;x=0;ra(67,d|0,0);c=x;x=0;if(!(c&1)){if(!(i[d>>0]&1))c=10;else c=(k[d>>2]&-2)+-1|0;x=0;Fa(8,d|0,c|0,0);c=x;x=0;if(!(c&1)){c=i[d>>0]|0;if(!(c&1)){d=d+1|0;c=(c&255)>>>1}else{d=k[a+40>>2]|0;c=k[a+36>>2]|0}t=d+c|0;k[j>>2]=d;k[l>>2]=t;j=d+e|0;k[q>>2]=j;c=d+g|0;k[f>>2]=c;d=t;break}}t=Wa(0)|0;cb(t|0)|0;eb();t=-1;r=s;return t|0}else{t=a+44|0;h=a+48|0;f=t;j=c;c=k[t>>2]|0}}while(0);g=j+1|0;k[m>>2]=g;e=k[(g>>>0>>0?f:m)>>2]|0;k[f>>2]=e;if(k[h>>2]&8){c=a+32|0;if(!(i[c>>0]&1))c=c+1|0;else c=k[a+40>>2]|0;k[o>>2]=c;k[n>>2]=c+p;k[a+16>>2]=e}if((j|0)==(d|0)){t=Vb[k[(k[a>>2]|0)+52>>2]&63](a,b&255)|0;r=s;return t|0}else{k[q>>2]=g;i[j>>0]=b;t=b&255;r=s;return t|0}return 0}function ud(a){a=a|0;var b=0,c=0;k[a>>2]=36200;b=a+56|0;k[b>>2]=36220;c=a+4|0;k[c>>2]=36236;Sm(a+36|0);xn(c);qn(b);return}function vd(a){a=a|0;var b=0,c=0;k[a>>2]=36200;b=a+56|0;k[b>>2]=36220;c=a+4|0;k[c>>2]=36236;Sm(a+36|0);xn(c);qn(b);mj(a);return}function wd(a){a=a|0;var b=0,c=0,d=0,e=0;e=k[(k[a>>2]|0)+-12>>2]|0;b=a+e|0;k[b>>2]=36200;c=a+(e+56)|0;k[c>>2]=36220;d=a+(e+4)|0;k[d>>2]=36236;Sm(a+(e+36)|0);xn(d);qn(c);mj(b);return}function xd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36388;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function yd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36388;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function zd(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,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Dd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Dd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Bd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Cd(a,e,b,c,d);return}}function Bd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;n=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=n;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{h=m[l+(f*6|0)+2>>1]|0;e=32768-h+(m[l+(f*6|0)+4>>1]|0)|0;n=(m[l+(f*6|0)>>1]|0)-h+32768|0;j[c+(f*6|0)>>1]=h+49152+(((e&65535)+(n&65535)|0)>>>2);j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=n;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{h=m[l+(b*6|0)+2>>1]|0;d=32768-h+(m[l+(b*6|0)+4>>1]|0)|0;n=(m[l+(b*6|0)>>1]|0)-h+32768|0;j[c+(b<<1)>>1]=h+49152+(((d&65535)+(n&65535)|0)>>>2);j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=n;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{n=j[l+(g<<3)+6>>1]|0;o=m[l+(g<<3)+2>>1]|0;h=32768-o+(m[l+(g<<3)+4>>1]|0)|0;d=(m[l+(g<<3)>>1]|0)-o+32768|0;j[c+(g<<1)>>1]=o+49152+(((h&65535)+(d&65535)|0)>>>2);j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=n;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Cd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Bd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Bd(a,q,c,d,e);r=n;return}function Dd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=m[b+(a*6|0)+2>>1]|0;g=m[b+(a*6|0)+4>>1]|0;e=(m[b+(a*6|0)>>1]|0)-((g+h|0)>>>2)+16384|0;j[c+(a*6|0)>>1]=g+32768+e;j[c+(a*6|0)+2>>1]=e;j[c+(a*6|0)+4>>1]=h+32768+e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=m[b+(g+e<<1)>>1]|0;o=m[b+(g+f<<1)>>1]|0;h=(m[b+(g<<1)>>1]|0)-((o+n|0)>>>2)+16384|0;j[c+(g*6|0)>>1]=o+32768+h;j[c+(g*6|0)+2>>1]=h;j[c+(g*6|0)+4>>1]=n+32768+h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=m[b+(g+e<<1)>>1]|0;p=m[b+(g+a<<1)>>1]|0;o=(m[b+(g<<1)>>1]|0)-((p+n|0)>>>2)+16384|0;q=j[b+(g+f<<1)>>1]|0;r=ww(o&65535|0,0,16)|0;n=n+32768+o|M;q=ww(q&65535|0,0,48)|0;q=r|p+32768+o&65535|q;n=n&65535|M;o=c+(g<<3)|0;p=o;j[p>>1]=q;j[p+2>>1]=q>>>16;o=o+4|0;j[o>>1]=n;j[o+2>>1]=n>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){r=a+4|0;q=j[a>>1]|0;j[a>>1]=j[r>>1]|0;j[r>>1]=q;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Ed(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36412;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Fd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36412;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Gd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Kd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Kd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Hd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Id(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Jd(a,e,b,c,d);return}}function Id(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;n=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=n;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{g=m[l+(f*6|0)>>1]|0;e=j[l+(f*6|0)+2>>1]|0;h=e&65535;n=(m[l+(f*6|0)+4>>1]|0)+32768-((h+g|0)>>>1)&65535;j[c+(f*6|0)>>1]=g+32768-h;j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=n;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=j[l+(b*6|0)+2>>1]|0;g=m[l+(b*6|0)>>1]|0;h=d&65535;n=(m[l+(b*6|0)+4>>1]|0)+32768-((h+g|0)>>>1)&65535;j[c+(b<<1)>>1]=g+32768-h;j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=n;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{h=j[l+(g<<3)+2>>1]|0;n=j[l+(g<<3)+6>>1]|0;p=m[l+(g<<3)>>1]|0;o=h&65535;d=(m[l+(g<<3)+4>>1]|0)+32768-((o+p|0)>>>1)&65535;j[c+(g<<1)>>1]=p+32768-o;j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=n;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Jd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Id(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Id(a,q,c,d,e);r=n;return}function Kd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=j[b+(a*6|0)+2>>1]|0;e=h&65535;g=(m[b+(a*6|0)>>1]|0)+32768+e|0;e=(m[b+(a*6|0)+4>>1]|0)+32768+(((g&65535)+e|0)>>>1)&65535;j[c+(a*6|0)>>1]=g;j[c+(a*6|0)+2>>1]=h;j[c+(a*6|0)+4>>1]=e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=j[b+(g+e<<1)>>1]|0;h=n&65535;o=(m[b+(g<<1)>>1]|0)+32768+h|0;h=(m[b+(g+f<<1)>>1]|0)+32768+(((o&65535)+h|0)>>>1)&65535;j[c+(g*6|0)>>1]=o;j[c+(g*6|0)+2>>1]=n;j[c+(g*6|0)+4>>1]=h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{o=j[b+(g+e<<1)>>1]|0;n=o&65535;p=(m[b+(g<<1)>>1]|0)+32768+n&65535;n=(m[b+(g+a<<1)>>1]|0)+32768+((p+n|0)>>>1)|0;q=j[b+(g+f<<1)>>1]|0;o=ww(o&65535|0,0,16)|0;n=M|n;q=ww(q&65535|0,0,48)|0;q=p|o|q;n=n&65535|M;o=c+(g<<3)|0;p=o;j[p>>1]=q;j[p+2>>1]=q>>>16;o=o+4|0;j[o>>1]=n;j[o+2>>1]=n>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){q=a+4|0;p=j[a>>1]|0;j[a>>1]=j[q>>1]|0;j[q>>1]=p;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Ld(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36436;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Md(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36436;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Nd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Rd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Rd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Od(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Pd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Qd(a,e,b,c,d);return}}function Pd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;n=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=n;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=j[l+(f*6|0)+2>>1]|0;h=e&65535;n=32768-h+(m[l+(f*6|0)+4>>1]|0)&65535;j[c+(f*6|0)>>1]=(m[l+(f*6|0)>>1]|0)+32768-h;j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=n;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=j[l+(b*6|0)+2>>1]|0;h=d&65535;n=32768-h+(m[l+(b*6|0)+4>>1]|0)&65535;j[c+(b<<1)>>1]=(m[l+(b*6|0)>>1]|0)+32768-h;j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=n;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{h=j[l+(g<<3)+2>>1]|0;n=j[l+(g<<3)+6>>1]|0;o=h&65535;d=32768-o+(m[l+(g<<3)+4>>1]|0)&65535;j[c+(g<<1)>>1]=(m[l+(g<<3)>>1]|0)+32768-o;j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=n;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Qd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Pd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Pd(a,q,c,d,e);r=n;return}function Rd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=j[b+(a*6|0)+2>>1]|0;g=h&65535;e=g+32768+(m[b+(a*6|0)+4>>1]|0)&65535;j[c+(a*6|0)>>1]=(m[b+(a*6|0)>>1]|0)+32768+g;j[c+(a*6|0)+2>>1]=h;j[c+(a*6|0)+4>>1]=e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=j[b+(g+e<<1)>>1]|0;o=n&65535;h=o+32768+(m[b+(g+f<<1)>>1]|0)&65535;j[c+(g*6|0)>>1]=(m[b+(g<<1)>>1]|0)+32768+o;j[c+(g*6|0)+2>>1]=n;j[c+(g*6|0)+4>>1]=h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{o=j[b+(g+e<<1)>>1]|0;n=o&65535;p=(m[b+(g<<1)>>1]|0)+32768+n|0;n=n+32768+(m[b+(g+a<<1)>>1]|0)|0;q=j[b+(g+f<<1)>>1]|0;o=ww(o&65535|0,0,16)|0;n=M|n;q=ww(q&65535|0,0,48)|0;q=p&65535|o|q;n=n&65535|M;o=c+(g<<3)|0;p=o;j[p>>1]=q;j[p+2>>1]=q>>>16;o=o+4|0;j[o>>1]=n;j[o+2>>1]=n>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){q=a+4|0;p=j[a>>1]|0;j[a>>1]=j[q>>1]|0;j[q>>1]=p;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Sd(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36460;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d)return;b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);return}function Td(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=36460;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}d=k[a+8>>2]|0;if(!d){mj(a);return}b=a+12|0;c=k[b>>2]|0;if((c|0)!=(d|0))k[b>>2]=c+(~((c+-2-d|0)>>>1)<<1);mj(d);mj(a);return}function Ud(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,j=0;e=a+36|0;if(!(k[e>>2]|0)){h=a+40|0;Yd(a,b,k[h>>2]|0,c,d);k[h>>2]=(k[h>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}j=a+4|0;f=c<<1;g=ia(f,k[(k[j>>2]|0)+16>>2]|0)|0;h=a+20|0;Yd(a,b,k[h>>2]|0,c,d);b=k[j>>2]|0;if((k[b+28>>2]|0)==536870912)Yc(k[h>>2]|0,ia(f,k[b+16>>2]|0)|0);j=k[e>>2]|0;if((Qb[k[(k[j>>2]|0)+48>>2]&63](j,k[h>>2]|0,g)|0)==(g|0))return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,3,35648);j=x;x=0;if(j&1){j=Wa()|0;Ua(b|0);fb(j|0)}else ub(b|0,824,96)}function Vd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Wd(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{Xd(a,e,b,c,d);return}}function Wd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0;h=a+4|0;f=k[h>>2]|0;do{if(!(i[f+32>>0]|0))l=b;else{a=a+8|0;vw(k[a>>2]|0,b|0,d*6|0)|0;f=k[h>>2]|0;g=k[f+16>>2]|0;if((d|0)<=0){l=k[a>>2]|0;break}a=k[a>>2]|0;f=a;b=0;while(1){l=f+4|0;m=j[f>>1]|0;j[f>>1]=j[l>>1]|0;j[l>>1]=m;b=b+1|0;if((b|0)==(d|0))break;else f=f+(g<<1)|0}l=a;f=k[h>>2]|0}}while(0);switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=j[l+(f*6|0)+2>>1]|0;m=j[l+(f*6|0)+4>>1]|0;j[c+(f*6|0)>>1]=j[l+(f*6|0)>>1]|0;j[c+(f*6|0)+2>>1]=e;j[c+(f*6|0)+4>>1]=m;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=j[l+(b*6|0)+2>>1]|0;m=j[l+(b*6|0)+4>>1]|0;j[c+(b<<1)>>1]=j[l+(b*6|0)>>1]|0;j[c+(b+e<<1)>>1]=d;j[c+(b+a<<1)>>1]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{h=j[l+(g<<3)+2>>1]|0;d=j[l+(g<<3)+4>>1]|0;m=j[l+(g<<3)+6>>1]|0;j[c+(g<<1)>>1]=j[l+(g<<3)>>1]|0;j[c+(g+e<<1)>>1]=h;j[c+(g+a<<1)>>1]=d;j[c+(g+b<<1)>>1]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function Xd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=r;r=r+176|0;o=n+152|0;q=n+16|0;p=n;j=a+4|0;f=k[j>>2]|0;m=d<<1;g=ia(m,k[f+16>>2]|0)|0;do{if(g){h=a+20|0;while(1){f=Qb[k[(k[b>>2]|0)+32>>2]&63](b,k[h>>2]|0,g)|0;if(!f)break;if((g|0)==(f|0)){l=26;break}else g=g-f|0}if((l|0)==26){f=k[j>>2]|0;break}l=q+56|0;j=q+4|0;k[q>>2]=36160;k[l>>2]=36180;x=0;ra(62,q+56|0,j|0);n=x;x=0;if(n&1){q=Wa()|0;qn(l);fb(q|0)}k[q+128>>2]=0;k[q+132>>2]=-1;k[q>>2]=36200;k[q+56>>2]=36220;x=0;qa(180,j|0);n=x;x=0;do{if(n&1)f=Wa()|0;else{k[j>>2]=36236;b=q+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[q+52>>2]=16;k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;x=0;ra(63,j|0,o|0);n=x;x=0;if(n&1){f=Wa()|0;Sm(o);Sm(b);xn(j);break}Sm(o);x=0;f=va(28,q|0,49029,57)|0;o=x;x=0;if(!(o&1)?(x=0,Aa(36,f|0,0)|0,o=x,x=0,!(o&1)):0){h=Va(16)|0;x=0;ra(64,p|0,j|0);o=x;x=0;if(!(o&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,p|0);o=x;x=0;if(o&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(p);if(!g){p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}else f=Wa()|0;Ua(h|0);p=f;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}p=Wa()|0;k[q>>2]=36200;k[l>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(l);fb(p|0)}}while(0);q=f;qn(l);fb(q|0)}}while(0);g=a+20|0;if((k[f+28>>2]|0)!=536870912){q=k[g>>2]|0;Wd(a,q,c,d,e);r=n;return}Yc(k[g>>2]|0,ia(m,k[f+16>>2]|0)|0);q=k[g>>2]|0;Wd(a,q,c,d,e);r=n;return}function Yd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0;l=a+4|0;a=k[l>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){h=j[b+(a*6|0)+2>>1]|0;e=j[b+(a*6|0)+4>>1]|0;j[c+(a*6|0)>>1]=j[b+(a*6|0)>>1]|0;j[c+(a*6|0)+2>>1]=h;j[c+(a*6|0)+4>>1]=e;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=j[b+(g+e<<1)>>1]|0;h=j[b+(g+f<<1)>>1]|0;j[c+(g*6|0)>>1]=j[b+(g<<1)>>1]|0;j[c+(g*6|0)+2>>1]=n;j[c+(g*6|0)+4>>1]=h;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=j[b+(g<<1)>>1]|0;q=j[b+(g+f<<1)>>1]|0;o=m[b+(g+a<<1)>>1]|0;p=ww(m[b+(g+e<<1)>>1]|0,0,16)|0;o=M|o;q=ww(q&65535|0,0,48)|0;q=p|n&65535|q;o=o&65535|M;n=c+(g<<3)|0;p=n;j[p>>1]=q;j[p+2>>1]=q>>>16;n=n+4|0;j[n>>1]=o;j[n+2>>1]=o>>>16;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[l>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)<=0)return;a=c;f=0;while(1){q=a+4|0;p=j[a>>1]|0;j[a>>1]=j[q>>1]|0;j[q>>1]=p;f=f+1|0;if((f|0)==(d|0))break;else a=a+(g<<1)|0}return}function Zd(a){a=a|0;return}function _d(a){a=a|0;mj(a);return}function $d(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=ia(k[a+8>>2]|0,c)|0;a=k[a+4>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,b,c)|0)==(c|0))return;d=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,d|0,3,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(d|0);fb(a|0)}else ub(d|0,824,96)}function ae(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,j=0,l=0,m=0;m=r;r=r+16|0;l=m;j=a+8|0;e=k[j>>2]|0;d=ia(e,c)|0;do{if(d){g=a+4|0;f=d;while(1){e=k[g>>2]|0;e=Qb[k[(k[e>>2]|0)+32>>2]&63](e,b,f)|0;if(!e)break;d=f-e|0;if((f|0)==(e|0)){h=11;break}else f=d}if((h|0)==11){e=k[j>>2]|0;f=d;break}d=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,d|0,3,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(d|0);fb(a|0)}else ub(d|0,824,96)}else f=0}while(0);if((e|0)==2){Yc(b,c<<1);e=k[j>>2]|0}d=k[a+12>>2]|0;if((d|0)<=(ia(e,c)|0)){r=m;return}a=k[a+4>>2]|0;Sb[k[(k[a>>2]|0)+16>>2]&15](l,a,d-f|0,0,1,24);r=m;return}function be(a){a=a|0;mj(a);return}function ce(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=a+4|0;vw(k[d>>2]|0,b|0,ia(k[a+8>>2]|0,c)|0)|0;k[d>>2]=(k[d>>2]|0)+(k[a+12>>2]|0);return}function de(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=a+4|0;vw(b|0,k[d>>2]|0,ia(k[a+8>>2]|0,c)|0)|0;k[d>>2]=(k[d>>2]|0)+(k[a+12>>2]|0);return}function ee(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;k[a+112>>2]=0;k[a+108>>2]=0;l=k[b>>2]|0;e=l;do{if(l){g=a+92|0;l=a+96|0;h=k[l>>2]|0;j=k[g>>2]|0;c=j;d=h-c|0;if(d>>>0>=4e4)if(d>>>0>4e4?(f=j+4e4|0,(h|0)!=(f|0)):0){k[l>>2]=f;f=c}else f=c;else{fe(g,4e4-d|0);f=k[g>>2]|0;e=k[b>>2]|0}c=a+116|0;k[c>>2]=f;h=a+124|0;k[h>>2]=f;j=a+104|0;k[j>>2]=e;d=e;if(e){if((k[d+12>>2]|0)==(k[d+16>>2]|0)){b=(Ob[k[(k[e>>2]|0)+36>>2]&127](d)|0)==-1;d=k[h>>2]|0;if(b)break;e=k[c>>2]|0}else{d=f;e=f}g=d-e|0;if(g>>>0<=64){f=a+92|0;if((d|0)==(e|0))d=e;else{d=e;e=0;do{i[(k[f>>2]|0)+e>>0]=i[d+e>>0]|0;e=e+1|0;d=k[c>>2]|0}while(e>>>0>>0);e=k[h>>2]|0}f=k[f>>2]|0;b=f;m=b-d|0;k[c>>2]=f;d=e+m|0;k[h>>2]=d;f=a+120|0;k[f>>2]=(k[f>>2]|0)+m;j=k[j>>2]|0;d=Qb[k[(k[j>>2]|0)+32>>2]&63](j,d,(k[l>>2]|0)-(b+g)|0)|0;d=(k[h>>2]|0)+d|0;k[h>>2]=d}}else d=f}else{k[a+104>>2]=0;d=k[b+4>>2]|0;c=a+116|0;k[c>>2]=d;d=d+(k[b+8>>2]|0)|0;k[a+124>>2]=d}}while(0);c=k[c>>2]|0;if(c>>>0>=d>>>0){l=c;m=a+120|0;k[m>>2]=l;qe(a);return}while(1){if((i[c>>0]|0)==-1){d=20;break}c=c+1|0;if(c>>>0>=d>>>0){d=20;break}}if((d|0)==20){m=a+120|0;k[m>>2]=c;qe(a);return}}function fe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=a+8|0;e=k[j>>2]|0;l=a+4|0;c=k[l>>2]|0;d=c;if((e-d|0)>>>0>=b>>>0){do{i[c>>0]=0;c=(k[l>>2]|0)+1|0;k[l>>2]=c;b=b+-1|0}while((b|0)!=0);return}c=k[a>>2]|0;f=d-c+b|0;if((f|0)<0){jj(a);e=k[j>>2]|0;c=k[a>>2]|0}d=e-c|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d;c=(k[l>>2]|0)-c|0;if(!d){e=0;g=0;f=c}else h=8}else{d=2147483647;c=(k[l>>2]|0)-c|0;h=8}if((h|0)==8){e=d;g=lj(d)|0;f=c}c=g+f|0;e=g+e|0;d=c;do{i[d>>0]=0;d=c+1|0;c=d;b=b+-1|0}while((b|0)!=0);b=k[a>>2]|0;d=(k[l>>2]|0)-b|0;h=g+(f-d)|0;vw(h|0,b|0,d|0)|0;k[a>>2]=h;k[l>>2]=c;k[j>>2]=e;if(!b)return;mj(b);return}function ge(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;u=r;r=r+32|0;w=u+12|0;t=u;p=a+180|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)s=k[a+24>>2]|0;else s=1;b=ia(s<<1,q)|0;k[w>>2]=0;y=w+4|0;k[y>>2]=0;k[w+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,w|0),v=x,x=0,v&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,v=x,x=0,!(v&1)):0){k[w>>2]=d;v=d+(b<<1)|0;k[w+8>>2]=v;sw(d|0,0,c|0)|0;k[y>>2]=v;break}d=Wa()|0;b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[t>>2]=0;v=t+4|0;k[v>>2]=0;k[t+8>>2]=0;do{if(!s)g=18;else{if(!(s>>>0>1073741823?(x=0,qa(178,t|0),o=x,x=0,o&1):0))g=16;if((g|0)==16?(e=s<<2,x=0,f=ta(67,e|0)|0,o=x,x=0,!(o&1)):0){k[t>>2]=f;g=f+(s<<2)|0;k[t+8>>2]=g;sw(f|0,0,e|0)|0;k[v>>2]=g;g=18;break}d=Wa()|0;b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+12|0;a:do{if((k[f>>2]|0)>0){g=a+4604|0;h=(ia(s,q)|0)+1|0;i=a+4608|0;l=a+92|0;m=(s|0)>0;n=a+4600|0;o=0;b:while(1){c=k[w>>2]|0;b=c+2|0;k[g>>2]=b;c=c+(h<<1)|0;k[i>>2]=c;if(!(o&1))b=c;else{k[g>>2]=c;k[i>>2]=b}e=k[l>>2]|0;x=0;Ja(k[(k[e>>2]|0)+12>>2]|0,e|0,b|0,k[p>>2]|0,q|0);e=x;x=0;if(e&1){g=28;break}if(m){b=k[g>>2]|0;c=k[i>>2]|0;d=k[t>>2]|0;e=0;do{k[n>>2]=k[d+(e<<2)>>2];d=k[p>>2]|0;j[b+(d<<1)>>1]=j[b+(d+-1<<1)>>1]|0;j[c+-2>>1]=j[b>>1]|0;x=0;ra(68,a|0,0);d=x;x=0;if(d&1){g=27;break b}d=k[t>>2]|0;k[d+(e<<2)>>2]=k[n>>2];b=(k[g>>2]|0)+(q<<1)|0;k[g>>2]=b;c=(k[i>>2]|0)+(q<<1)|0;k[i>>2]=c;e=e+1|0}while((e|0)<(s|0))}o=o+1|0;if((o|0)>=(k[f>>2]|0)){g=40;break a}}if((g|0)==27){d=Wa()|0;break}else if((g|0)==28){d=Wa()|0;break}}else g=40}while(0);do{if((g|0)==40){x=0;qa(182,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[t>>2]|0;c=b;if(b){d=k[v>>2]|0;if((d|0)!=(b|0))k[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[w>>2]|0;if(!b){r=u;return}c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=u;return}}while(0);b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function he(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4604|0;b=k[p>>2]|0;s=a+180|0;if((k[s>>2]|0)<=0)return;q=a+4608|0;r=a+4612|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(me(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=le(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function ie(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;e=a+104|0;if((k[e>>2]|0)>>>0<4)je(a);f=a+100|0;g=a+112|0;h=a+96|0;j=a+108|0;l=a+116|0;b=k[f>>2]|0;d=0;do{c=i[g>>0]|0;if((b|0)>31)break;b=k[h>>2]|0;if(!(c<<24>>24)){i[k[j>>2]>>0]=b>>>24;k[h>>2]=k[h>>2]<<8;b=(k[f>>2]|0)+8|0}else{i[k[j>>2]>>0]=b>>>25;k[h>>2]=k[h>>2]<<7;b=(k[f>>2]|0)+7|0}k[f>>2]=b;m=k[j>>2]|0;c=(i[m>>0]|0)==-1&1;i[g>>0]=c;k[j>>2]=m+1;k[e>>2]=(k[e>>2]|0)+-1;k[l>>2]=(k[l>>2]|0)+1;d=d+1|0}while((d|0)<4);if(!(c<<24>>24))ke(a,0,(b|0)%8|0);else ke(a,0,(b+-1|0)%8|0);if((k[e>>2]|0)>>>0<4)je(a);b=k[f>>2]|0;c=0;do{if((b|0)>31)break;b=k[h>>2]|0;if(!(i[g>>0]|0)){i[k[j>>2]>>0]=b>>>24;k[h>>2]=k[h>>2]<<8;b=(k[f>>2]|0)+8|0}else{i[k[j>>2]>>0]=b>>>25;k[h>>2]=k[h>>2]<<7;b=(k[f>>2]|0)+7|0}k[f>>2]=b;m=k[j>>2]|0;i[g>>0]=(i[m>>0]|0)==-1&1;k[j>>2]=m+1;k[e>>2]=(k[e>>2]|0)+-1;k[l>>2]=(k[l>>2]|0)+1;c=c+1|0}while((c|0)<4);if(!(k[a+132>>2]|0))return;je(a);return}function je(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=k[a+132>>2]|0;if(!b){b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,4,35648);a=x;x=0;if(!(a&1))ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}c=a+108|0;d=a+120|0;f=k[d>>2]|0;e=(k[c>>2]|0)-f|0;if((Qb[k[(k[b>>2]|0)+48>>2]&63](b,f,e)|0)==(e|0)){f=k[d>>2]|0;k[c>>2]=f;k[a+104>>2]=(k[a+124>>2]|0)-f;return}b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,4,35648);f=x;x=0;if(!(f&1))ub(b|0,824,96);f=Wa()|0;Ua(b|0);fb(f|0)}function ke(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;l=a+100|0;c=(k[l>>2]|0)-c|0;k[l>>2]=c;if((c|0)>-1){m=a+96|0;k[m>>2]=k[m>>2]|b<>2]=k[m>>2]|b>>0-c;j=a+104|0;if((k[j>>2]|0)>>>0<4){je(a);c=k[l>>2]|0}f=a+112|0;g=a+108|0;h=a+116|0;d=0;while(1){if((c|0)>31)break;c=k[m>>2]|0;if(!(i[f>>0]|0)){i[k[g>>2]>>0]=c>>>24;k[m>>2]=k[m>>2]<<8;c=(k[l>>2]|0)+8|0}else{i[k[g>>2]>>0]=c>>>25;k[m>>2]=k[m>>2]<<7;c=(k[l>>2]|0)+7|0}k[l>>2]=c;n=k[g>>2]|0;i[f>>0]=(i[n>>0]|0)==-1&1;k[g>>2]=n+1;k[j>>2]=(k[j>>2]|0)+-1;k[h>>2]=(k[h>>2]|0)+1;d=d+1|0;if((d|0)>=4){e=11;break}}a:do{if((e|0)==11)if((c|0)<0){k[m>>2]=k[m>>2]|b>>0-c;if((k[j>>2]|0)>>>0<4){je(a);c=k[l>>2]|0;d=0}else d=0;do{if((c|0)>31)break a;c=k[m>>2]|0;if(!(i[f>>0]|0)){i[k[g>>2]>>0]=c>>>24;k[m>>2]=k[m>>2]<<8;c=(k[l>>2]|0)+8|0}else{i[k[g>>2]>>0]=c>>>25;k[m>>2]=k[m>>2]<<7;c=(k[l>>2]|0)+7|0}k[l>>2]=c;n=k[g>>2]|0;i[f>>0]=(i[n>>0]|0)==-1&1;k[g>>2]=n+1;k[j>>2]=(k[j>>2]|0)+-1;k[h>>2]=(k[h>>2]|0)+1;d=d+1|0}while((d|0)<4)}}while(0);k[m>>2]=k[m>>2]|b<>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;pe(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&65535;return r|0}r=e&~(b>>31);r=r&65535;return r|0}function me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0;i=(k[a+180>>2]|0)-b|0;l=k[a+4608>>2]|0;n=k[a+4604>>2]|0;e=j[l+(b+-1<<1)>>1]|0;h=e&65535;c=k[a+144>>2]|0;f=0;while(1){d=l+(f+b<<1)|0;g=(m[d>>1]|0)-h|0;if((((g|0)>-1?g:0-g|0)|0)>(c|0))break;j[d>>1]=e;f=f+1|0;if((f|0)==(i|0)){f=i;break}}e=(f|0)==(i|0);g=a+4600|0;d=k[36476+(k[g>>2]<<2)>>2]|0;if((1<(f|0))c=f;else{c=f;do{ke(a,1,1);d=k[g>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[g>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]|0,h,m[n+(i<<1)>>1]|0)|0;j[b>>1]=a;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;a=f+1|0;return a|0}if(!c){a=i;return a|0}ke(a,1,1);a=i;return a|0}function ne(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;h=c-d|0;i=a+136|0;g=a+144|0;e=k[g>>2]|0;if((((h|0)>-1?h:0-h|0)|0)>(e|0)){f=d-c>>31|1;b=ia(f,b-d|0)|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;c=((b|0)<0?e:0)+b|0;e=c-((c|0)<((e+1|0)/2|0|0)?0:e)|0;oe(a,a+4576|0,e);e=ia(e,f)|0;f=k[g>>2]|0;g=f<<1|1;e=(ia(e,g)|0)+d|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&65535;return i|0}i=b&~(e>>31);i=i&65535;return i|0}else{b=b-c|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;f=((b|0)<0?e:0)+b|0;e=f-((f|0)<((e+1|0)/2|0|0)?0:e)|0;oe(a,a+4588|0,e);f=k[g>>2]|0;g=f<<1|1;e=(ia(g,e)|0)+c|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&65535;return i|0}i=b&~(e>>31);i=i&65535;return i|0}return 0}function oe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;pe(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function pe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>2]|0;j=a+120|0;if(b>>>0<((k[j>>2]|0)+-3|0)>>>0){j=a+112|0;g=k[j>>2]|0;a=a+108|0;k[a>>2]=(l[b+1>>0]<<16|l[b>>0]<<24|l[b+2>>0]<<8|l[b+3>>0])>>>g|k[a>>2];a=32-g>>3;k[h>>2]=b+a;k[j>>2]=(a<<3)+g;return}g=a+104|0;c=k[g>>2]|0;do{if(c){if((k[c+12>>2]|0)==(k[c+16>>2]|0)){if((Ob[k[(k[c>>2]|0)+36>>2]&127](c)|0)==-1)break;b=k[h>>2]|0}e=a+124|0;c=k[e>>2]|0;f=c-b|0;if(f>>>0<=64){d=a+92|0;if((c|0)==(b|0))c=b;else{c=0;do{i[(k[d>>2]|0)+c>>0]=i[b+c>>0]|0;c=c+1|0;b=k[h>>2]|0}while(c>>>0>>0);c=b;b=k[e>>2]|0}n=k[d>>2]|0;d=n;m=d-c|0;k[h>>2]=n;c=b+m|0;k[e>>2]=c;k[j>>2]=(k[j>>2]|0)+m;g=k[g>>2]|0;g=Qb[k[(k[g>>2]|0)+32>>2]&63](g,c,(k[a+96>>2]|0)-(d+f)|0)|0;k[e>>2]=(k[e>>2]|0)+g}}}while(0);g=a+112|0;f=a+108|0;a=k[a+124>>2]|0;e=a+-1|0;b=k[h>>2]|0;while(1){if(b>>>0>=a>>>0){c=14;break}d=i[b>>0]|0;c=d&255;d=d<<24>>24==-1;if(d){if((b|0)==(e|0)){c=25;break}b=b+1|0;if((i[b>>0]|0)<0){c=25;break}}else b=b+1|0;n=k[g>>2]|0;k[f>>2]=c<<24-n|k[f>>2];k[h>>2]=b;n=n+(d?7:8)|0;k[g>>2]=n;if((n|0)>=24){c=33;break}}if((c|0)==14){if((k[g>>2]|0)>=1)return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,5,35648);n=x;x=0;if(!(n&1))ub(b|0,824,96);n=Wa()|0;Ua(b|0);fb(n|0)}else if((c|0)==25){if((k[g>>2]|0)>=1)return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,5,35648);n=x;x=0;if(!(n&1))ub(b|0,824,96);n=Wa()|0;Ua(b|0);fb(n|0)}else if((c|0)==33){a:do{if(b>>>0
>>0)do{if((i[b>>0]|0)==-1)break a;b=b+1|0}while(b>>>0>>0)}while(0);k[j>>2]=b;return}}function re(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+144|0;a:do{if(!(k[n>>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function se(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;j=a+8|0;e=k[j>>2]|0;l=a+4|0;c=k[l>>2]|0;d=c;if((e-d|0)>>>0>=b>>>0){do{i[c>>0]=0;c=(k[l>>2]|0)+1|0;k[l>>2]=c;b=b+-1|0}while((b|0)!=0);return}c=k[a>>2]|0;f=d-c+b|0;if((f|0)<0){jj(a);e=k[j>>2]|0;c=k[a>>2]|0}d=e-c|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?f:d;c=(k[l>>2]|0)-c|0;if(!d){e=0;g=0;f=c}else h=8}else{d=2147483647;c=(k[l>>2]|0)-c|0;h=8}if((h|0)==8){e=d;g=lj(d)|0;f=c}c=g+f|0;e=g+e|0;d=c;do{i[d>>0]=0;d=c+1|0;c=d;b=b+-1|0}while((b|0)!=0);b=k[a>>2]|0;d=(k[l>>2]|0)-b|0;h=g+(f-d)|0;vw(h|0,b|0,d|0)|0;k[a>>2]=h;k[l>>2]=c;k[j>>2]=e;if(!b)return;mj(b);return}function te(a){a=a|0;var b=0,c=0;k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function ue(a){a=a|0;var b=0,c=0;k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function ve(a){a=a|0;var b=0,c=0;k[a>>2]=36052;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function we(a){a=a|0;var b=0,c=0;k[a>>2]=36052;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function xe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;He(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function ye(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35828;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];Ae(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;Ae(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function ze(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ae(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+180|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;do{if(b){if(!(b>>>0>715827882?(x=0,qa(178,v|0),u=x,x=0,u&1):0))g=6;if((g|0)==6?(x=0,c=ta(67,b*6|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;d=c+(b*6|0)|0;k[v+8>>2]=d;while(1){j[c>>1]=0;j[c+2>>1]=0;j[c+4>>1]=0;b=b+-1|0;if(!b)break;else c=c+6|0}k[w>>2]=d;break}d=Wa()|0;b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)g=20;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))g=18;if((g|0)==18?(e=q<<2,x=0,f=ta(67,e|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=f;g=f+(q<<2)|0;k[s+8>>2]=g;sw(f|0,0,e|0)|0;k[u>>2]=g;g=20;break}d=Wa()|0;b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==20){e=a+12|0;a:do{if((k[e>>2]|0)>0){f=a+4604|0;g=(ia(q,p)|0)+1|0;h=a+4608|0;i=a+92|0;l=(q|0)>0;m=a+4600|0;n=0;b:while(1){c=k[v>>2]|0;b=c+6|0;k[f>>2]=b;c=c+(g*6|0)|0;k[h>>2]=c;if(!(n&1))b=c;else{k[f>>2]=c;k[h>>2]=b}d=k[i>>2]|0;x=0;Ja(k[(k[d>>2]|0)+12>>2]|0,d|0,b|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){g=30;break}if(l){b=k[s>>2]|0;c=k[f>>2]|0;d=0;do{k[m>>2]=k[b+(d<<2)>>2];y=k[o>>2]|0;b=c+(y*6|0)|0;c=c+((y+-1|0)*6|0)|0;j[b>>1]=j[c>>1]|0;j[b+2>>1]=j[c+2>>1]|0;j[b+4>>1]=j[c+4>>1]|0;c=(k[h>>2]|0)+-6|0;b=k[f>>2]|0;j[c>>1]=j[b>>1]|0;j[c+2>>1]=j[b+2>>1]|0;j[c+4>>1]=j[b+4>>1]|0;x=0;ra(69,a|0,0);c=x;x=0;if(c&1){g=29;break b}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[m>>2];c=(k[f>>2]|0)+(p*6|0)|0;k[f>>2]=c;k[h>>2]=(k[h>>2]|0)+(p*6|0);d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(182,a|0);y=x;x=0;if(y&1){d=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);r=t;return}}while(0);b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}function Be(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=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;B=a+180|0;if((k[B>>2]|0)<=0)return;C=a+4608|0;D=a+4604|0;E=a+4612|0;A=0;while(1){x=A+-1|0;f=k[C>>2]|0;g=k[D>>2]|0;b=A+1|0;e=m[g+(A*6|0)>>1]|0;z=k[E>>2]|0;h=m[g+(x*6|0)>>1]|0;l=e-h|0;n=m[f+(x*6|0)>>1]|0;o=h-n|0;p=((((i[z+((m[g+(b*6|0)>>1]|0)-e)>>0]|0)*9|0)+(i[z+l>>0]|0)|0)*9|0)+(i[z+o>>0]|0)|0;d=m[g+(A*6|0)+2>>1]|0;q=m[g+(x*6|0)+2>>1]|0;r=d-q|0;s=m[f+(x*6|0)+2>>1]|0;t=q-s|0;u=((((i[z+((m[g+(b*6|0)+2>>1]|0)-d)>>0]|0)*9|0)+(i[z+r>>0]|0)|0)*9|0)+(i[z+t>>0]|0)|0;c=m[g+(A*6|0)+4>>1]|0;v=m[g+(x*6|0)+4>>1]|0;w=c-v|0;x=m[f+(x*6|0)+4>>1]|0;y=v-x|0;z=((((i[z+((m[g+(b*6|0)+4>>1]|0)-c)>>0]|0)*9|0)+(i[z+w>>0]|0)|0)*9|0)+(i[z+y>>0]|0)|0;if(!(u|p|z))b=(Ce(a,A,0)|0)+A|0;else{g=m[f+(A*6|0)>>1]|0;f=e-n>>31;if((f^o|0)>=0)if((f^l|0)<0)e=n;else e=n-h+e|0;g=De(a,p,g,e,0)|0;f=m[(k[C>>2]|0)+(A*6|0)+2>>1]|0;e=d-s>>31;if((e^t|0)>=0)if((e^r|0)<0)d=s;else d=s-q+d|0;e=De(a,u,f,d,0)|0;f=m[(k[C>>2]|0)+(A*6|0)+4>>1]|0;d=c-x>>31;if((d^y|0)>=0)if((d^w|0)<0)c=x;else c=x-v+c|0;y=De(a,z,f,c,0)|0;z=k[C>>2]|0;j[z+(A*6|0)>>1]=g;j[z+(A*6|0)+2>>1]=e;j[z+(A*6|0)+4>>1]=y}if((b|0)<(k[B>>2]|0))A=b;else break}return}function Ce(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;B=r;r=r+48|0;q=B+30|0;p=B+24|0;o=B+18|0;s=B+12|0;x=B+6|0;y=B;z=(k[a+180>>2]|0)-b|0;A=k[a+4608>>2]|0;t=k[a+4604>>2]|0;w=b+-1|0;u=j[A+(w*6|0)>>1]|0;v=j[A+(w*6|0)+2>>1]|0;w=j[A+(w*6|0)+4>>1]|0;c=u&65535;d=a+144|0;e=v&65535;f=w&65535;n=0;while(1){i=n+b|0;g=A+(i*6|0)|0;h=A+(i*6|0)+2|0;i=A+(i*6|0)+4|0;C=(m[g>>1]|0)-c|0;l=k[d>>2]|0;if((((C|0)>-1?C:0-C|0)|0)>(l|0))break;C=(m[h>>1]|0)-e|0;if((((C|0)>-1?C:0-C|0)|0)>(l|0))break;C=(m[i>>1]|0)-f|0;if((((C|0)>-1?C:0-C|0)|0)>(l|0))break;j[g>>1]=u;j[h>>1]=v;j[i>>1]=w;n=n+1|0;if((n|0)==(z|0)){n=z;break}}e=(n|0)==(z|0);f=a+4600|0;d=k[36476+(k[f>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[f>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[f>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]=j[C>>1]|0;j[x+2>>1]=j[C+2>>1]|0;j[x+4>>1]=j[C+4>>1]|0;j[y>>1]=u;j[y+2>>1]=v;j[y+4>>1]=w;b=t+(b*6|0)|0;j[o>>1]=j[x>>1]|0;j[o+2>>1]=j[x+2>>1]|0;j[o+4>>1]=j[x+4>>1]|0;j[p>>1]=j[y>>1]|0;j[p+2>>1]=j[y+2>>1]|0;j[p+4>>1]=j[y+4>>1]|0;j[q>>1]=j[b>>1]|0;j[q+2>>1]=j[b+2>>1]|0;j[q+4>>1]=j[b+4>>1]|0;Fe(s,a,o,p,q);j[C>>1]=j[s>>1]|0;j[C+2>>1]=j[s+2>>1]|0;j[C+4>>1]=j[s+4>>1]|0;C=k[f>>2]|0;k[f>>2]=(C|0)<1?0:C+-1|0;C=n+1|0;r=B;return C|0}if(!c){C=z;r=B;return C|0}ke(a,1,1);C=z;r=B;return C|0}function De(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;Ee(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&65535;return r|0}r=e&~(b>>31);r=r&65535;return r|0}function Ee(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>1]|0;p=o-(m[d>>1]|0)>>31|1;f=ia(p,(m[c>>1]|0)-o|0)|0;l=b+144|0;g=k[l>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;w=b+140|0;i=k[w>>2]|0;h=((f|0)<0?i:0)+f|0;i=h-((h|0)<((i+1|0)/2|0|0)?0:i)|0;h=b+4576|0;Ge(b,h,i);t=m[e+2>>1]|0;u=t-(m[d+2>>1]|0)>>31|1;f=ia(u,(m[c+2>>1]|0)-t|0)|0;g=k[l>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;q=k[w>>2]|0;v=((f|0)<0?q:0)+f|0;q=v-((v|0)<((q+1|0)/2|0|0)?0:q)|0;Ge(b,h,q);v=m[e+4>>1]|0;s=v-(m[d+4>>1]|0)>>31|1;f=ia(s,(m[c+4>>1]|0)-v|0)|0;g=k[l>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;n=k[w>>2]|0;f=((f|0)<0?n:0)+f|0;n=f-((f|0)<((n+1|0)/2|0|0)?0:n)|0;Ge(b,h,n);h=k[l>>2]|0;l=h<<1|1;f=(ia(ia(l,i)|0,p)|0)+o|0;c=0-h|0;if((f|0)>=(c|0)){g=k[r>>2]|0;if((g+h|0)<(f|0)){f=f-(ia(k[w>>2]|0,l)|0)|0;d=g}else d=g}else{f=(ia(k[w>>2]|0,l)|0)+f|0;d=k[r>>2]|0}if((f&d|0)!=(f|0))f=d&~(f>>31);e=f&65535;f=(ia(ia(l,q)|0,u)|0)+t|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,l)|0)|0}else f=(ia(k[w>>2]|0,l)|0)+f|0;if((f&d|0)!=(f|0))f=d&~(f>>31);g=f&65535;f=(ia(ia(l,n)|0,s)|0)+v|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,l)|0)|0}else f=(ia(k[w>>2]|0,l)|0)+f|0;if((f&d|0)==(f|0)){w=f;w=w&65535;j[a>>1]=e;v=a+2|0;j[v>>1]=g;a=a+4|0;j[a>>1]=w;return}w=d&~(f>>31);w=w&65535;j[a>>1]=e;v=a+2|0;j[v>>1]=g;a=a+4|0;j[a>>1]=w;return}function Ge(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Ee(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function He(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+144|0;a:do{if(!(k[n>>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Ie(a){a=a|0;var b=0,c=0;k[a>>2]=36024;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Je(a){a=a|0;var b=0,c=0;k[a>>2]=36024;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Ke(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;zf(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function Le(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35800;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];sf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;sf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Me(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ne(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,j=0,l=0,m=0,n=0;k[a>>2]=36712;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Oe(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,j=0,l=0,m=0,n=0;k[a>>2]=36688;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Pe(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,j=0,l=0,m=0,n=0;k[a>>2]=36664;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Qe(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,j=0,l=0,m=0,n=0;k[a>>2]=36640;k[a+4>>2]=c;m=a+8|0;d=k[c>>2]|0;j=c+16|0;g=k[j>>2]|0;f=ia(g,d)|0;k[m>>2]=0;n=a+12|0;k[n>>2]=0;k[a+16>>2]=0;do{if(!f)f=g;else{if(!((f|0)<0?(x=0,qa(178,m|0),g=x,x=0,g&1):0))l=4;if((l|0)==4?(x=0,h=ta(67,f|0)|0,g=x,x=0,!(g&1)):0){k[n>>2]=h;k[m>>2]=h;k[a+16>>2]=h+f;d=h;do{i[d>>0]=0;d=(k[n>>2]|0)+1|0;k[n>>2]=d;f=f+-1|0}while((f|0)!=0);f=k[j>>2]|0;d=k[c>>2]|0;break}d=Wa()|0;e=k[m>>2]|0;if(e){if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e)}n=d;fb(n|0)}}while(0);g=a+20|0;d=ia(f,d)|0;k[g>>2]=0;f=a+24|0;k[f>>2]=0;k[a+28>>2]=0;if(!d){n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}if(!((d|0)<0?(x=0,qa(178,g|0),c=x,x=0,c&1):0))l=15;if((l|0)==15?(x=0,e=ta(67,d|0)|0,l=x,x=0,!(l&1)):0){k[f>>2]=e;k[g>>2]=e;k[a+28>>2]=e+d;do{i[e>>0]=0;e=(k[f>>2]|0)+1|0;k[f>>2]=e;d=d+-1|0}while((d|0)!=0);n=a+36|0;k[n>>2]=k[b>>2];k[n+4>>2]=k[b+4>>2];k[n+8>>2]=k[b+8>>2];return}d=Wa()|0;e=k[g>>2]|0;if(e){if((k[f>>2]|0)!=(e|0))k[f>>2]=e;mj(e)}e=k[m>>2]|0;if(!e){n=d;fb(n|0)}if((k[n>>2]|0)!=(e|0))k[n>>2]=e;mj(e);n=d;fb(n|0)}function Re(a){a=a|0;var b=0,c=0;k[a>>2]=36640;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function Se(a){a=a|0;var b=0,c=0;k[a>>2]=36640;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function Te(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;Xe(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;Xe(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function Ue(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;Ve(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{We(a,e,b,c,d);return}}function Ve(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;m=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=m;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{g=l[h+(f*3|0)+1>>0]|0;e=128-g+(l[h+(f*3|0)+2>>0]|0)|0;j=(l[h+(f*3|0)>>0]|0)-g+128|0;m=c+(f*3|0)|0;i[m>>0]=g+192+(((e&255)+(j&255)|0)>>>2);i[m+1>>0]=e;i[m+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{d=l[h+(b*3|0)+1>>0]|0;j=128-d+(l[h+(b*3|0)+2>>0]|0)|0;m=(l[h+(b*3|0)>>0]|0)-d+128|0;i[c+b>>0]=d+192+(((j&255)+(m&255)|0)>>>2);i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{m=i[h+(g<<2)+3>>0]|0;n=l[h+(g<<2)+1>>0]|0;d=128-n+(l[h+(g<<2)+2>>0]|0)|0;j=(l[h+(g<<2)>>0]|0)-n+128|0;i[c+g>>0]=n+192+(((d&255)+(j&255)|0)>>>2);i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function We(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;Ve(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){Ve(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function Xe(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=l[b+(a*3|0)+1>>0]|0;f=l[b+(a*3|0)+2>>0]|0;h=(l[b+(a*3|0)>>0]|0)-((f+g|0)>>>2)+64|0;e=c+(a*3|0)|0;i[e>>0]=f+128+h;i[e+1>>0]=h;i[e+2>>0]=g+128+h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=l[b+(g+e)>>0]|0;o=l[b+(g+f)>>0]|0;m=(l[b+g>>0]|0)-((o+n|0)>>>2)+64|0;h=c+(g*3|0)|0;i[h>>0]=o+128+m;i[h+1>>0]=m;i[h+2>>0]=n+128+m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{m=l[b+(g+e)>>0]|0;p=l[b+(g+a)>>0]|0;n=(l[b+g>>0]|0)-((p+m|0)>>>2)+64|0;o=c+(g<<2)|0;n=n<<8&65280|l[b+(g+f)>>0]<<24|p+128+n&255|m+128+n<<16&16711680;i[o>>0]=n;i[o+1>>0]=n>>8;i[o+2>>0]=n>>16;i[o+3>>0]=n>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){p=a+2|0;o=i[a>>0]|0;i[a>>0]=i[p>>0]|0;i[p>>0]=o;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function Ye(a){a=a|0;var b=0,c=0;k[a>>2]=36664;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function Ze(a){a=a|0;var b=0,c=0;k[a>>2]=36664;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function _e(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;cf(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;cf(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function $e(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;af(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{bf(a,e,b,c,d);return}}function af(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;m=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=m;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{b=l[h+(f*3|0)>>0]|0;e=i[h+(f*3|0)+1>>0]|0;g=e&255;j=(l[h+(f*3|0)+2>>0]|0)+128-((g+b|0)>>>1)&255;m=c+(f*3|0)|0;i[m>>0]=b+128-g;i[m+1>>0]=e;i[m+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{j=i[h+(b*3|0)+1>>0]|0;g=l[h+(b*3|0)>>0]|0;d=j&255;m=(l[h+(b*3|0)+2>>0]|0)+128-((d+g|0)>>>1)&255;i[c+b>>0]=g+128-d;i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{d=i[h+(g<<2)+1>>0]|0;m=i[h+(g<<2)+3>>0]|0;o=l[h+(g<<2)>>0]|0;n=d&255;j=(l[h+(g<<2)+2>>0]|0)+128-((n+o|0)>>>1)&255;i[c+g>>0]=o+128-n;i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function bf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;af(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){af(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function cf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=i[b+(a*3|0)+1>>0]|0;h=g&255;f=(l[b+(a*3|0)>>0]|0)+128+h|0;h=(l[b+(a*3|0)+2>>0]|0)+128+(((f&255)+h|0)>>>1)&255;e=c+(a*3|0)|0;i[e>>0]=f;i[e+1>>0]=g;i[e+2>>0]=h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=i[b+(g+e)>>0]|0;m=n&255;o=(l[b+g>>0]|0)+128+m|0;m=(l[b+(g+f)>>0]|0)+128+(((o&255)+m|0)>>>1)&255;h=c+(g*3|0)|0;i[h>>0]=o;i[h+1>>0]=n;i[h+2>>0]=m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=l[b+(g+e)>>0]|0;m=(l[b+g>>0]|0)+128+n&255;o=c+(g<<2)|0;n=m|n<<8|l[b+(g+f)>>0]<<24|(l[b+(g+a)>>0]|0)+128+((m+n|0)>>>1)<<16&16711680;i[o>>0]=n;i[o+1>>0]=n>>8;i[o+2>>0]=n>>16;i[o+3>>0]=n>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){o=a+2|0;n=i[a>>0]|0;i[a>>0]=i[o>>0]|0;i[o>>0]=n;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function df(a){a=a|0;var b=0,c=0;k[a>>2]=36688;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function ef(a){a=a|0;var b=0,c=0;k[a>>2]=36688;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function ff(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;kf(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;kf(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function gf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;hf(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{jf(a,e,b,c,d);return}}function hf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;m=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=m;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=i[h+(f*3|0)+1>>0]|0;g=e&255;j=128-g+(l[h+(f*3|0)+2>>0]|0)&255;m=c+(f*3|0)|0;i[m>>0]=(l[h+(f*3|0)>>0]|0)+128-g;i[m+1>>0]=e;i[m+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{j=i[h+(b*3|0)+1>>0]|0;d=j&255;m=128-d+(l[h+(b*3|0)+2>>0]|0)&255;i[c+b>>0]=(l[h+(b*3|0)>>0]|0)+128-d;i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=m;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{d=i[h+(g<<2)+1>>0]|0;m=i[h+(g<<2)+3>>0]|0;n=d&255;j=128-n+(l[h+(g<<2)+2>>0]|0)&255;i[c+g>>0]=(l[h+(g<<2)>>0]|0)+128-n;i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=m;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function jf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;hf(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){hf(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function kf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=i[b+(a*3|0)+1>>0]|0;f=g&255;h=f+128+(l[b+(a*3|0)+2>>0]|0)&255;e=c+(a*3|0)|0;i[e>>0]=(l[b+(a*3|0)>>0]|0)+128+f;i[e+1>>0]=g;i[e+2>>0]=h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=i[b+(g+e)>>0]|0;o=n&255;m=o+128+(l[b+(g+f)>>0]|0)&255;h=c+(g*3|0)|0;i[h>>0]=(l[b+g>>0]|0)+128+o;i[h+1>>0]=n;i[h+2>>0]=m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=l[b+(g+e)>>0]|0;o=c+(g<<2)|0;n=(l[b+g>>0]|0)+128+n&255|n<<8|l[b+(g+f)>>0]<<24|n+128+(l[b+(g+a)>>0]|0)<<16&16711680;i[o>>0]=n;i[o+1>>0]=n>>8;i[o+2>>0]=n>>16;i[o+3>>0]=n>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){o=a+2|0;n=i[a>>0]|0;i[a>>0]=i[o>>0]|0;i[o>>0]=n;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function lf(a){a=a|0;var b=0,c=0;k[a>>2]=36712;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=k[a+8>>2]|0;if(!c)return;b=a+12|0;if((k[b>>2]|0)!=(c|0))k[b>>2]=c;mj(c);return}function mf(a){a=a|0;var b=0,c=0;k[a>>2]=36712;b=k[a+20>>2]|0;if(b){c=a+24|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function nf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=a+36|0;if(!(k[e>>2]|0)){e=a+40|0;rf(a,b,k[e>>2]|0,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}f=ia(k[(k[a+4>>2]|0)+16>>2]|0,c)|0;g=a+20|0;rf(a,b,k[g>>2]|0,c,d);a=k[e>>2]|0;if((Qb[k[(k[a>>2]|0)+48>>2]&63](a,k[g>>2]|0,f)|0)==(f|0))return;e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,3,35648);g=x;x=0;if(g&1){g=Wa()|0;Ua(e|0);fb(g|0)}else ub(e|0,824,96)}function of(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=k[a+36>>2]|0;if(!e){e=a+40|0;pf(a,k[e>>2]|0,b,c,d);k[e>>2]=(k[e>>2]|0)+(k[(k[a+4>>2]|0)+12>>2]|0);return}else{qf(a,e,b,c,d);return}}function pf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0;h=a+4|0;f=k[h>>2]|0;if(!(i[f+32>>0]|0))h=b;else{g=a+8|0;vw(k[g>>2]|0,b|0,d*3|0)|0;f=k[h>>2]|0;b=k[f+16>>2]|0;if((d|0)>0){f=k[g>>2]|0;a=0;while(1){j=f+2|0;l=i[f>>0]|0;i[f>>0]=i[j>>0]|0;i[j>>0]=l;a=a+1|0;if((a|0)==(d|0))break;else f=f+b|0}f=k[h>>2]|0}h=k[g>>2]|0}switch(k[f+16>>2]|0){case 3:{if((k[f+24>>2]|0)==2){if((d|0)>0)f=0;else return;do{e=i[h+(f*3|0)+1>>0]|0;j=i[h+(f*3|0)+2>>0]|0;l=c+(f*3|0)|0;i[l>>0]=i[h+(f*3|0)>>0]|0;i[l+1>>0]=e;i[l+2>>0]=j;f=f+1|0}while((f|0)!=(d|0));return}f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=0;do{j=i[h+(b*3|0)+1>>0]|0;l=i[h+(b*3|0)+2>>0]|0;i[c+b>>0]=i[h+(b*3|0)>>0]|0;i[c+(b+e)>>0]=j;i[c+(b+a)>>0]=l;b=b+1|0}while((b|0)!=(f|0));return}case 4:{if((k[f+24>>2]|0)!=1)return;f=(e|0)<(d|0)?e:d;if((f|0)<=0)return;a=e<<1;b=e*3|0;g=0;do{d=i[h+(g<<2)+1>>0]|0;j=i[h+(g<<2)+2>>0]|0;l=i[h+(g<<2)+3>>0]|0;i[c+g>>0]=i[h+(g<<2)>>0]|0;i[c+(g+e)>>0]=d;i[c+(g+a)>>0]=j;i[c+(g+b)>>0]=l;g=g+1|0}while((g|0)!=(f|0));return}default:return}}function qf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+176|0;n=m+152|0;p=m+16|0;o=m;g=ia(k[(k[a+4>>2]|0)+16>>2]|0,d)|0;j=a+20|0;f=k[j>>2]|0;if(!g){p=f;pf(a,p,c,d,e);r=m;return}while(1){h=Qb[k[(k[b>>2]|0)+32>>2]&63](b,f,g)|0;if(!h)break;f=k[j>>2]|0;if((g|0)==(h|0)){l=26;break}else g=g-h|0}if((l|0)==26){pf(a,f,c,d,e);r=m;return}c=p+56|0;j=p+4|0;k[p>>2]=36160;k[c>>2]=36180;x=0;ra(62,p+56|0,j|0);m=x;x=0;if(m&1){p=Wa()|0;qn(c);fb(p|0)}k[p+128>>2]=0;k[p+132>>2]=-1;k[p>>2]=36200;k[p+56>>2]=36220;x=0;qa(180,j|0);m=x;x=0;do{if(m&1)f=Wa()|0;else{k[j>>2]=36236;b=p+36|0;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;k[b+12>>2]=0;k[p+52>>2]=16;k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;x=0;ra(63,j|0,n|0);m=x;x=0;if(m&1){f=Wa()|0;Sm(n);Sm(b);xn(j);break}Sm(n);x=0;f=va(28,p|0,49029,57)|0;n=x;x=0;if(!(n&1)?(x=0,Aa(36,f|0,0)|0,n=x,x=0,!(n&1)):0){h=Va(16)|0;x=0;ra(64,o|0,j|0);n=x;x=0;if(!(n&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,h|0,3,35648,o|0);n=x;x=0;if(n&1)g=1;else{x=0;Fa(6,h|0,824,96);x=0;g=0}f=Wa()|0;Sm(o);if(!g){o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}else f=Wa()|0;Ua(h|0);o=f;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}o=Wa()|0;k[p>>2]=36200;k[c>>2]=36220;k[j>>2]=36236;Sm(b);xn(j);qn(c);fb(o|0)}}while(0);p=f;qn(c);fb(p|0)}function rf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0;j=a+4|0;a=k[j>>2]|0;a:do{switch(k[a+16>>2]|0){case 3:{if((k[a+24>>2]|0)==2){if((d|0)>0)a=0;else break a;while(1){g=i[b+(a*3|0)+1>>0]|0;h=i[b+(a*3|0)+2>>0]|0;e=c+(a*3|0)|0;i[e>>0]=i[b+(a*3|0)>>0]|0;i[e+1>>0]=g;i[e+2>>0]=h;a=a+1|0;if((a|0)==(d|0))break a}}a=(d|0)<(e|0)?d:e;if((a|0)>0){f=e<<1;g=0;do{n=i[b+(g+e)>>0]|0;m=i[b+(g+f)>>0]|0;h=c+(g*3|0)|0;i[h>>0]=i[b+g>>0]|0;i[h+1>>0]=n;i[h+2>>0]=m;g=g+1|0}while((g|0)!=(a|0))}break}case 4:{if((k[a+24>>2]|0)==1?(h=(d|0)<(e|0)?d:e,(h|0)>0):0){a=e<<1;f=e*3|0;g=0;do{n=c+(g<<2)|0;m=l[b+(g+e)>>0]<<8|l[b+g>>0]|l[b+(g+a)>>0]<<16|l[b+(g+f)>>0]<<24;i[n>>0]=m;i[n+1>>0]=m>>8;i[n+2>>0]=m>>16;i[n+3>>0]=m>>24;g=g+1|0}while((g|0)!=(h|0))}break}default:{}}}while(0);a=k[j>>2]|0;if(!(i[a+32>>0]|0))return;g=k[a+16>>2]|0;if((d|0)>0){a=c;f=0}else return;while(1){n=a+2|0;m=i[a>>0]|0;i[a>>0]=i[n>>0]|0;i[n>>0]=m;f=f+1|0;if((f|0)==(d|0))break;else a=a+g|0}return}function sf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+180|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,v|0),u=x,x=0,u&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[w>>2]|0)+3|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)f=19;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))f=17;if((f|0)==17?(d=q<<2,x=0,e=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=e;f=e+(q<<2)|0;k[s+8>>2]=f;sw(e|0,0,d|0)|0;k[u>>2]=f;f=19;break}d=Wa()|0;b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){e=a+12|0;b:do{if((k[e>>2]|0)>0){f=a+4604|0;g=(ia(q,p)|0)+1|0;h=a+4608|0;j=a+92|0;l=(q|0)>0;m=a+4600|0;n=0;c:while(1){d=k[v>>2]|0;b=d+3|0;k[f>>2]=b;c=d+(g*3|0)|0;k[h>>2]=c;if(!(n&1))b=g;else{k[f>>2]=c;k[h>>2]=b;b=1}c=k[j>>2]|0;x=0;Ja(k[(k[c>>2]|0)+12>>2]|0,c|0,d+(b*3|0)|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){f=29;break}if(l){b=k[s>>2]|0;c=k[f>>2]|0;d=0;do{k[m>>2]=k[b+(d<<2)>>2];y=k[o>>2]|0;b=c+(y*3|0)|0;c=c+((y+-1|0)*3|0)|0;i[b>>0]=i[c>>0]|0;i[b+1>>0]=i[c+1>>0]|0;i[b+2>>0]=i[c+2>>0]|0;b=k[f>>2]|0;c=(k[h>>2]|0)+-3|0;i[c>>0]=i[b>>0]|0;i[c+1>>0]=i[b+1>>0]|0;i[c+2>>0]=i[b+2>>0]|0;x=0;ra(70,a|0,0);c=x;x=0;if(c&1){f=28;break c}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[m>>2];c=(k[f>>2]|0)+(p*3|0)|0;k[f>>2]=c;k[h>>2]=(k[h>>2]|0)+(p*3|0);d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){f=41;break b}}if((f|0)==28){d=Wa()|0;break}else if((f|0)==29){d=Wa()|0;break}}else f=41}while(0);do{if((f|0)==41){x=0;qa(182,a|0);y=x;x=0;if(y&1){d=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=t;return}}while(0);b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function tf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=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;A=a+180|0;if((k[A>>2]|0)<=0)return;B=a+4608|0;C=a+4604|0;D=a+4612|0;z=0;while(1){w=z+-1|0;f=k[B>>2]|0;g=k[C>>2]|0;b=z+1|0;e=l[g+(z*3|0)>>0]|0;y=k[D>>2]|0;h=l[g+(w*3|0)>>0]|0;j=e-h|0;m=l[f+(w*3|0)>>0]|0;n=h-m|0;o=((((i[y+((l[g+(b*3|0)>>0]|0)-e)>>0]|0)*9|0)+(i[y+j>>0]|0)|0)*9|0)+(i[y+n>>0]|0)|0;d=l[g+(z*3|0)+1>>0]|0;p=l[g+(w*3|0)+1>>0]|0;q=d-p|0;r=l[f+(w*3|0)+1>>0]|0;s=p-r|0;t=((((i[y+((l[g+(b*3|0)+1>>0]|0)-d)>>0]|0)*9|0)+(i[y+q>>0]|0)|0)*9|0)+(i[y+s>>0]|0)|0;c=l[g+(z*3|0)+2>>0]|0;u=l[g+(w*3|0)+2>>0]|0;v=c-u|0;w=l[f+(w*3|0)+2>>0]|0;x=u-w|0;y=((((i[y+((l[g+(b*3|0)+2>>0]|0)-c)>>0]|0)*9|0)+(i[y+v>>0]|0)|0)*9|0)+(i[y+x>>0]|0)|0;if(!(t|o|y))b=(uf(a,z,0)|0)+z|0;else{g=l[f+(z*3|0)>>0]|0;f=e-m>>31;if((f^n|0)>=0)if((f^j|0)<0)e=m;else e=m-h+e|0;g=vf(a,o,g,e,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+1>>0]|0;e=d-r>>31;if((e^s|0)>=0)if((e^q|0)<0)d=r;else d=r-p+d|0;e=vf(a,t,f,d,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+2>>0]|0;d=c-w>>31;if((d^x|0)>=0)if((d^v|0)<0)c=w;else c=w-u+c|0;y=vf(a,y,f,c,0)|0;z=(k[B>>2]|0)+(z*3|0)|0;i[z>>0]=g;i[z+1>>0]=e;i[z+2>>0]=y}if((b|0)<(k[A>>2]|0))z=b;else break}return}function uf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;B=r;r=r+32|0;A=B+15|0;p=B+12|0;o=B+9|0;q=B+6|0;w=B+3|0;x=B;y=(k[a+180>>2]|0)-b|0;z=k[a+4608>>2]|0;s=k[a+4604>>2]|0;v=z+((b+-1|0)*3|0)|0;t=i[v>>0]|0;u=i[v+1>>0]|0;v=i[v+2>>0]|0;c=t&255;d=a+144|0;e=u&255;f=v&255;n=0;while(1){g=z+((n+b|0)*3|0)|0;h=g+1|0;j=g+2|0;C=(l[g>>0]|0)-c|0;m=k[d>>2]|0;if((((C|0)>-1?C:0-C|0)|0)>(m|0))break;C=(l[h>>0]|0)-e|0;if((((C|0)>-1?C:0-C|0)|0)>(m|0))break;C=(l[j>>0]|0)-f|0;if((((C|0)>-1?C:0-C|0)|0)>(m|0))break;i[g>>0]=t;i[h>>0]=u;i[j>>0]=v;n=n+1|0;if((n|0)==(y|0)){n=y;break}}e=(n|0)==(y|0);f=a+4600|0;d=k[36476+(k[f>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[f>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[f>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]=i[C>>0]|0;i[w+1>>0]=i[C+1>>0]|0;i[w+2>>0]=i[C+2>>0]|0;i[x>>0]=t;i[x+1>>0]=u;i[x+2>>0]=v;b=s+(b*3|0)|0;i[o>>0]=i[w>>0]|0;i[o+1>>0]=i[w+1>>0]|0;i[o+2>>0]=i[w+2>>0]|0;i[p>>0]=i[x>>0]|0;i[p+1>>0]=i[x+1>>0]|0;i[p+2>>0]=i[x+2>>0]|0;i[A>>0]=i[b>>0]|0;i[A+1>>0]=i[b+1>>0]|0;i[A+2>>0]=i[b+2>>0]|0;xf(q,a,o,p,A);i[C>>0]=i[q>>0]|0;i[C+1>>0]=i[q+1>>0]|0;i[C+2>>0]=i[q+2>>0]|0;C=k[f>>2]|0;k[f>>2]=(C|0)<1?0:C+-1|0;C=n+1|0;r=B;return C|0}if(!c){C=y;r=B;return C|0}ke(a,1,1);C=y;r=B;return C|0}function vf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;wf(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&255;return r|0}r=e&~(b>>31);r=r&255;return r|0}function wf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>0]|0;p=o-(l[d>>0]|0)>>31|1;f=ia(p,(l[c>>0]|0)-o|0)|0;m=b+144|0;g=k[m>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;w=b+140|0;j=k[w>>2]|0;h=((f|0)<0?j:0)+f|0;j=h-((h|0)<((j+1|0)/2|0|0)?0:j)|0;h=b+4576|0;yf(b,h,j);t=l[e+1>>0]|0;u=t-(l[d+1>>0]|0)>>31|1;f=ia(u,(l[c+1>>0]|0)-t|0)|0;g=k[m>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;q=k[w>>2]|0;v=((f|0)<0?q:0)+f|0;q=v-((v|0)<((q+1|0)/2|0|0)?0:q)|0;yf(b,h,q);v=l[e+2>>0]|0;s=v-(l[d+2>>0]|0)>>31|1;f=ia(s,(l[c+2>>0]|0)-v|0)|0;g=k[m>>2]|0;if((f|0)>0)f=(f+g|0)/(g<<1|1|0)|0;else f=(f-g|0)/(g<<1|1|0)|0;n=k[w>>2]|0;f=((f|0)<0?n:0)+f|0;n=f-((f|0)<((n+1|0)/2|0|0)?0:n)|0;yf(b,h,n);h=k[m>>2]|0;m=h<<1|1;f=(ia(ia(m,j)|0,p)|0)+o|0;c=0-h|0;if((f|0)>=(c|0)){g=k[r>>2]|0;if((g+h|0)<(f|0)){f=f-(ia(k[w>>2]|0,m)|0)|0;d=g}else d=g}else{f=(ia(k[w>>2]|0,m)|0)+f|0;d=k[r>>2]|0}if((f&d|0)!=(f|0))f=d&~(f>>31);e=f&255;f=(ia(ia(m,q)|0,u)|0)+t|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,m)|0)|0}else f=(ia(k[w>>2]|0,m)|0)+f|0;if((f&d|0)!=(f|0))f=d&~(f>>31);g=f&255;f=(ia(ia(m,n)|0,s)|0)+v|0;if((f|0)>=(c|0)){if((d+h|0)<(f|0))f=f-(ia(k[w>>2]|0,m)|0)|0}else f=(ia(k[w>>2]|0,m)|0)+f|0;if((f&d|0)==(f|0)){w=f;w=w&255;i[a>>0]=e;v=a+1|0;i[v>>0]=g;a=a+2|0;i[a>>0]=w;return}w=d&~(f>>31);w=w&255;i[a>>0]=e;v=a+1|0;i[v>>0]=g;a=a+2|0;i[a>>0]=w;return}function yf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;wf(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function zf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+144|0;a:do{if(!(k[n>>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Af(a){a=a|0;var b=0,c=0;k[a>>2]=35996;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Bf(a){a=a|0;var b=0,c=0;k[a>>2]=35996;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Cf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,65535,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;Lf(a);d=0;do{k[a+172+(d*12|0)>>2]=1024;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=1024;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=1024;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function Df(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35772;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];Ff(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;Ff(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Ef(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Ff(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;u=r;r=r+32|0;w=u+12|0;t=u;p=a+156|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)s=k[a+24>>2]|0;else s=1;b=ia(s<<1,q)|0;k[w>>2]=0;y=w+4|0;k[y>>2]=0;k[w+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,w|0),v=x,x=0,v&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,v=x,x=0,!(v&1)):0){k[w>>2]=d;v=d+(b<<1)|0;k[w+8>>2]=v;sw(d|0,0,c|0)|0;k[y>>2]=v;break}d=Wa()|0;b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[t>>2]=0;v=t+4|0;k[v>>2]=0;k[t+8>>2]=0;do{if(!s)g=18;else{if(!(s>>>0>1073741823?(x=0,qa(178,t|0),o=x,x=0,o&1):0))g=16;if((g|0)==16?(e=s<<2,x=0,f=ta(67,e|0)|0,o=x,x=0,!(o&1)):0){k[t>>2]=f;g=f+(s<<2)|0;k[t+8>>2]=g;sw(f|0,0,e|0)|0;k[v>>2]=g;g=18;break}d=Wa()|0;b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+12|0;a:do{if((k[f>>2]|0)>0){g=a+4580|0;h=(ia(s,q)|0)+1|0;i=a+4584|0;l=a+92|0;m=(s|0)>0;n=a+4576|0;o=0;b:while(1){c=k[w>>2]|0;b=c+2|0;k[g>>2]=b;c=c+(h<<1)|0;k[i>>2]=c;if(!(o&1))b=c;else{k[g>>2]=c;k[i>>2]=b}e=k[l>>2]|0;x=0;Ja(k[(k[e>>2]|0)+12>>2]|0,e|0,b|0,k[p>>2]|0,q|0);e=x;x=0;if(e&1){g=28;break}if(m){b=k[g>>2]|0;c=k[i>>2]|0;d=k[t>>2]|0;e=0;do{k[n>>2]=k[d+(e<<2)>>2];d=k[p>>2]|0;j[b+(d<<1)>>1]=j[b+(d+-1<<1)>>1]|0;j[c+-2>>1]=j[b>>1]|0;x=0;ra(71,a|0,0);d=x;x=0;if(d&1){g=27;break b}d=k[t>>2]|0;k[d+(e<<2)>>2]=k[n>>2];b=(k[g>>2]|0)+(q<<1)|0;k[g>>2]=b;c=(k[i>>2]|0)+(q<<1)|0;k[i>>2]=c;e=e+1|0}while((e|0)<(s|0))}o=o+1|0;if((o|0)>=(k[f>>2]|0)){g=40;break a}}if((g|0)==27){d=Wa()|0;break}else if((g|0)==28){d=Wa()|0;break}}else g=40}while(0);do{if((g|0)==40){x=0;qa(182,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[t>>2]|0;c=b;if(b){d=k[v>>2]|0;if((d|0)!=(b|0))k[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[w>>2]|0;if(!b){r=u;return}c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=u;return}}while(0);b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Gf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4580|0;b=k[p>>2]|0;s=a+156|0;if((k[s>>2]|0)<=0)return;q=a+4584|0;r=a+4588|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(If(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Hf(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Hf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&65535|0)==(e|0))m=e;else m=e>>31&65535^65535;h=(c-m^q)-q<<16;l=h>>16;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;d=e^l;d=d>>30^d<<1;e=d>>f;if((e|0)<47){if((e|0)>30){g=(e|0)/2|0;ke(a,0,g);e=e-g|0}ke(a,1,e+1|0);ke(a,d&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-65536?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&65535;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&65535;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&65535;return b|0}function If(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0;g=(k[a+156>>2]|0)-b|0;h=k[a+4584>>2]|0;l=k[a+4580>>2]|0;e=j[h+(b+-1<<1)>>1]|0;d=0;while(1){c=h+(d+b<<1)|0;if((j[c>>1]|0)!=e<<16>>16){n=d;break}j[c>>1]=e;d=d+1|0;if((d|0)==(g|0)){n=g;break}}f=e&65535;e=(n|0)==(g|0);i=a+4576|0;d=k[36476+(k[i>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[i>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[i>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]|0;c=m[l+(c<<1)>>1]|0;l=f-c|0;if((((l|0)>-1?l:0-l|0)|0)<1){c=d-f<<16>>16;Jf(a,a+4564|0,c);c=c+f|0}else{l=c-f>>31|1;b=(ia(d-c<<16,l)|0)>>16;Jf(a,a+4552|0,b);c=(ia(b,l)|0)+c|0}j[e>>1]=c;a=k[i>>2]|0;k[i>>2]=(a|0)<1?0:a+-1|0;a=n+1|0;return a|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Kf(a,e,d,63-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function Kf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-16|0;if((e|0)<(d+-17|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-47|0)}else ke(a,1,f);ke(a,c+65535&65535,16);return}function Lf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,65535,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8909]|0;k[a+4588>>2]=j+(((k[8910]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=131072){if(f>>>0>131072?(g=b+131072|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,131072-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+65536;g=a+168|0;e=a+164|0;f=-65536;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==65536)break}r=l;return}function Mf(a){a=a|0;var b=0,c=0;k[a>>2]=35968;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Nf(a){a=a|0;var b=0,c=0;k[a>>2]=35968;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,4095,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;Xf(a);d=0;do{k[a+172+(d*12|0)>>2]=64;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=64;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=64;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function Pf(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35744;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];Rf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;Rf(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function Qf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Rf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;u=r;r=r+32|0;w=u+12|0;t=u;p=a+156|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)s=k[a+24>>2]|0;else s=1;b=ia(s<<1,q)|0;k[w>>2]=0;y=w+4|0;k[y>>2]=0;k[w+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,w|0),v=x,x=0,v&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,v=x,x=0,!(v&1)):0){k[w>>2]=d;v=d+(b<<1)|0;k[w+8>>2]=v;sw(d|0,0,c|0)|0;k[y>>2]=v;break}d=Wa()|0;b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[t>>2]=0;v=t+4|0;k[v>>2]=0;k[t+8>>2]=0;do{if(!s)g=18;else{if(!(s>>>0>1073741823?(x=0,qa(178,t|0),o=x,x=0,o&1):0))g=16;if((g|0)==16?(e=s<<2,x=0,f=ta(67,e|0)|0,o=x,x=0,!(o&1)):0){k[t>>2]=f;g=f+(s<<2)|0;k[t+8>>2]=g;sw(f|0,0,e|0)|0;k[v>>2]=g;g=18;break}d=Wa()|0;b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+12|0;a:do{if((k[f>>2]|0)>0){g=a+4580|0;h=(ia(s,q)|0)+1|0;i=a+4584|0;l=a+92|0;m=(s|0)>0;n=a+4576|0;o=0;b:while(1){c=k[w>>2]|0;b=c+2|0;k[g>>2]=b;c=c+(h<<1)|0;k[i>>2]=c;if(!(o&1))b=c;else{k[g>>2]=c;k[i>>2]=b}e=k[l>>2]|0;x=0;Ja(k[(k[e>>2]|0)+12>>2]|0,e|0,b|0,k[p>>2]|0,q|0);e=x;x=0;if(e&1){g=28;break}if(m){b=k[g>>2]|0;c=k[i>>2]|0;d=k[t>>2]|0;e=0;do{k[n>>2]=k[d+(e<<2)>>2];d=k[p>>2]|0;j[b+(d<<1)>>1]=j[b+(d+-1<<1)>>1]|0;j[c+-2>>1]=j[b>>1]|0;x=0;ra(72,a|0,0);d=x;x=0;if(d&1){g=27;break b}d=k[t>>2]|0;k[d+(e<<2)>>2]=k[n>>2];b=(k[g>>2]|0)+(q<<1)|0;k[g>>2]=b;c=(k[i>>2]|0)+(q<<1)|0;k[i>>2]=c;e=e+1|0}while((e|0)<(s|0))}o=o+1|0;if((o|0)>=(k[f>>2]|0)){g=40;break a}}if((g|0)==27){d=Wa()|0;break}else if((g|0)==28){d=Wa()|0;break}}else g=40}while(0);do{if((g|0)==40){x=0;qa(182,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[t>>2]|0;c=b;if(b){d=k[v>>2]|0;if((d|0)!=(b|0))k[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[w>>2]|0;if(!b){r=u;return}c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=u;return}}while(0);b=k[t>>2]|0;c=b;if(b){e=k[v>>2]|0;if((e|0)!=(b|0))k[v>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[w>>2]|0;if(!b)fb(d|0);c=k[y>>2]|0;if((c|0)!=(b|0))k[y>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Sf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4580|0;b=k[p>>2]|0;s=a+156|0;if((k[s>>2]|0)<=0)return;q=a+4584|0;r=a+4588|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Uf(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Tf(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Tf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&4095|0)==(e|0))m=e;else m=e>>31&4095^4095;h=(c-m^q)-q<<20;l=h>>20;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;d=e^l;d=d>>30^d<<1;e=d>>f;if((e|0)<35){if((e|0)>30){g=(e|0)/2|0;ke(a,0,g);e=e-g|0}ke(a,1,e+1|0);ke(a,d&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-1048576?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}function Uf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,l=0,n=0;g=(k[a+156>>2]|0)-b|0;h=k[a+4584>>2]|0;l=k[a+4580>>2]|0;e=j[h+(b+-1<<1)>>1]|0;d=0;while(1){c=h+(d+b<<1)|0;if((j[c>>1]|0)!=e<<16>>16){n=d;break}j[c>>1]=e;d=d+1|0;if((d|0)==(g|0)){n=g;break}}f=e&65535;e=(n|0)==(g|0);i=a+4576|0;d=k[36476+(k[i>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[i>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[i>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>1]|0;c=m[l+(c<<1)>>1]|0;l=f-c|0;if((((l|0)>-1?l:0-l|0)|0)<1){c=d-f<<20>>20;Vf(a,a+4564|0,c);c=c+f|0}else{l=c-f>>31|1;b=(ia(d-c<<20,l)|0)>>20;Vf(a,a+4552|0,b);c=(ia(b,l)|0)+c|0}j[e>>1]=c&4095;a=k[i>>2]|0;k[i>>2]=(a|0)<1?0:a+-1|0;a=n+1|0;return a|0}function Vf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Wf(a,e,d,47-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function Wf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-12|0;if((e|0)<(d+-13|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-43|0)}else ke(a,1,f);ke(a,c+4095&4095,12);return}function Xf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,4095,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8906]|0;k[a+4588>>2]=j+(((k[8907]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=8192){if(f>>>0>8192?(g=b+8192|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,8192-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+4096;g=a+168|0;e=a+164|0;f=-4096;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==4096)break}r=l;return}function Yf(a){a=a|0;var b=0,c=0;k[a>>2]=35940;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Zf(a){a=a|0;var b=0,c=0;k[a>>2]=35940;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function _f(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;hg(a);d=0;do{k[a+172+(d*12|0)>>2]=4;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=4;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=4;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function $f(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35716;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];bg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;bg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function bg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+156|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,v|0),u=x,x=0,u&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[w>>2]|0)+1|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)f=19;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))f=17;if((f|0)==17?(d=q<<2,x=0,e=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=e;f=e+(q<<2)|0;k[s+8>>2]=f;sw(e|0,0,d|0)|0;k[u>>2]=f;f=19;break}c=Wa()|0;b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){e=a+12|0;b:do{if((k[e>>2]|0)>0){f=a+4580|0;g=(ia(q,p)|0)+1|0;h=a+4584|0;j=a+92|0;l=(q|0)>0;m=a+4576|0;n=0;c:while(1){c=k[v>>2]|0;b=c+1|0;k[f>>2]=b;c=c+g|0;k[h>>2]=c;if(!(n&1))b=c;else{k[f>>2]=c;k[h>>2]=b}d=k[j>>2]|0;x=0;Ja(k[(k[d>>2]|0)+12>>2]|0,d|0,b|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){f=29;break}if(l){b=k[f>>2]|0;c=k[s>>2]|0;d=0;do{k[m>>2]=k[c+(d<<2)>>2];c=k[o>>2]|0;i[b+c>>0]=i[b+(c+-1)>>0]|0;i[(k[h>>2]|0)+-1>>0]=i[k[f>>2]>>0]|0;x=0;ra(73,a|0,0);c=x;x=0;if(c&1){f=28;break c}c=k[s>>2]|0;k[c+(d<<2)>>2]=k[m>>2];b=(k[f>>2]|0)+p|0;k[f>>2]=b;k[h>>2]=(k[h>>2]|0)+p;d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){f=41;break b}}if((f|0)==28){c=Wa()|0;break}else if((f|0)==29){c=Wa()|0;break}}else f=41}while(0);do{if((f|0)==41){x=0;qa(182,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);r=t;return}}while(0);b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}function cg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+4580|0;b=k[o>>2]|0;r=a+156|0;if((k[r>>2]|0)<=0)return;p=a+4584|0;q=a+4588|0;e=b;f=l[b+-1>>0]|0;b=l[b>>0]|0;n=0;while(1){m=k[p>>2]|0;j=l[m+(n+-1)>>0]|0;d=n+1|0;c=l[e+d>>0]|0;h=k[q>>2]|0;g=b-f|0;e=f-j|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(eg(a,n,0)|0)+n|0;c=k[o>>2]|0;b=l[c+(d+-1)>>0]|0;c=l[c+d>>0]|0}else{f=b-j>>31;if((f^e|0)<0)e=b;else e=j+((f^g|0)<0?0:g)|0;m=dg(a,h,l[m+n>>0]|0,e,0)|0;i[(k[p>>2]|0)+n>>0]=m}if((d|0)>=(k[r>>2]|0))break;e=k[o>>2]|0;f=b;b=c;n=d}return}function dg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&255|0)==(e|0))m=e;else m=e>>31&255^255;h=(c-m^q)-q<<24;l=h>>24;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;e=e^l;e=e>>30^e<<1;d=e>>f;if((d|0)<23){ke(a,1,d+1|0);ke(a,e&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-16777216?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}function eg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;g=(k[a+156>>2]|0)-b|0;h=k[a+4584>>2]|0;m=k[a+4580>>2]|0;e=i[h+(b+-1)>>0]|0;d=0;while(1){c=h+(d+b)|0;if((i[c>>0]|0)!=e<<24>>24){n=d;break}i[c>>0]=e;d=d+1|0;if((d|0)==(g|0)){n=g;break}}f=e&255;e=(n|0)==(g|0);j=a+4576|0;d=k[36476+(k[j>>2]<<2)>>2]|0;if((1<(n|0))c=n;else{c=n;do{ke(a,1,1);d=k[j>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[j>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]|0;c=l[m+c>>0]|0;m=f-c|0;if((((m|0)>-1?m:0-m|0)|0)<1){c=d-f<<24>>24;fg(a,a+4564|0,c);c=c+f|0}else{m=c-f>>31|1;b=(ia(d-c<<24,m)|0)>>24;fg(a,a+4552|0,b);c=(ia(b,m)|0)+c|0}i[e>>0]=c;a=k[j>>2]|0;k[j>>2]=(a|0)<1?0:a+-1|0;a=n+1|0;return a|0}function fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;gg(a,e,d,31-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function gg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-8|0;if((e|0)<(d+-9|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-39|0)}else ke(a,1,f);ke(a,c+255&255,8);return}function hg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8900]|0;k[a+4588>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+256;g=a+168|0;e=a+164|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function ig(a){a=a|0;var b=0,c=0;k[a>>2]=35912;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function jg(a){a=a|0;var b=0,c=0;k[a>>2]=35912;b=k[a+4592>>2]|0;if(b){c=a+4596|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+160>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+164>>2]=f;k[a+168>>2]=d;tg(a);d=0;do{k[a+172+(d*12|0)>>2]=4;k[a+172+(d*12|0)+4>>2]=0;j[a+172+(d*12|0)+8>>1]=0;j[a+172+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4552>>2]=4;k[a+4556>>2]=0;i[a+4560>>0]=h;i[a+4561>>0]=1;i[a+4562>>0]=0;k[a+4564>>2]=4;k[a+4568>>2]=1;i[a+4572>>0]=h;i[a+4573>>0]=1;i[a+4574>>0]=0;k[a+4576>>2]=0;r=e;return}function lg(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4600)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35688;e=b+132|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+148>>2]=k[d>>2];k[b+152>>2]=0;k[b+156>>2]=0;k[b+160>>2]=0;e=b+4544|0;d=b+164|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4556|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4568|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];ng(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;ng(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function ng(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;v=t+12|0;s=t;o=a+156|0;p=(k[o>>2]|0)+4|0;if((k[a+32>>2]|0)==1)q=k[a+24>>2]|0;else q=1;b=ia(q<<1,p)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,v|0),u=x,x=0,u&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[w>>2]|0)+3|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!q)f=19;else{if(!(q>>>0>1073741823?(x=0,qa(178,s|0),n=x,x=0,n&1):0))f=17;if((f|0)==17?(d=q<<2,x=0,e=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[s>>2]=e;f=e+(q<<2)|0;k[s+8>>2]=f;sw(e|0,0,d|0)|0;k[u>>2]=f;f=19;break}d=Wa()|0;b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){e=a+12|0;b:do{if((k[e>>2]|0)>0){f=a+4580|0;g=(ia(q,p)|0)+1|0;h=a+4584|0;j=a+92|0;l=(q|0)>0;m=a+4576|0;n=0;c:while(1){d=k[v>>2]|0;b=d+3|0;k[f>>2]=b;c=d+(g*3|0)|0;k[h>>2]=c;if(!(n&1))b=g;else{k[f>>2]=c;k[h>>2]=b;b=1}c=k[j>>2]|0;x=0;Ja(k[(k[c>>2]|0)+12>>2]|0,c|0,d+(b*3|0)|0,k[o>>2]|0,p|0);d=x;x=0;if(d&1){f=29;break}if(l){b=k[s>>2]|0;c=k[f>>2]|0;d=0;do{k[m>>2]=k[b+(d<<2)>>2];y=k[o>>2]|0;b=c+(y*3|0)|0;c=c+((y+-1|0)*3|0)|0;i[b>>0]=i[c>>0]|0;i[b+1>>0]=i[c+1>>0]|0;i[b+2>>0]=i[c+2>>0]|0;b=k[f>>2]|0;c=(k[h>>2]|0)+-3|0;i[c>>0]=i[b>>0]|0;i[c+1>>0]=i[b+1>>0]|0;i[c+2>>0]=i[b+2>>0]|0;x=0;ra(74,a|0,0);c=x;x=0;if(c&1){f=28;break c}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[m>>2];c=(k[f>>2]|0)+(p*3|0)|0;k[f>>2]=c;k[h>>2]=(k[h>>2]|0)+(p*3|0);d=d+1|0}while((d|0)<(q|0))}n=n+1|0;if((n|0)>=(k[e>>2]|0)){f=41;break b}}if((f|0)==28){d=Wa()|0;break}else if((f|0)==29){d=Wa()|0;break}}else f=41}while(0);do{if((f|0)==41){x=0;qa(182,a|0);y=x;x=0;if(y&1){d=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=t;return}}while(0);b=k[s>>2]|0;c=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(d|0);c=k[w>>2]|0;if((c|0)!=(b|0))k[w>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=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;A=a+156|0;if((k[A>>2]|0)<=0)return;B=a+4584|0;C=a+4580|0;D=a+4588|0;z=0;while(1){w=z+-1|0;f=k[B>>2]|0;g=k[C>>2]|0;b=z+1|0;e=l[g+(z*3|0)>>0]|0;y=k[D>>2]|0;h=l[g+(w*3|0)>>0]|0;j=e-h|0;m=l[f+(w*3|0)>>0]|0;n=h-m|0;o=((((i[y+((l[g+(b*3|0)>>0]|0)-e)>>0]|0)*9|0)+(i[y+j>>0]|0)|0)*9|0)+(i[y+n>>0]|0)|0;d=l[g+(z*3|0)+1>>0]|0;p=l[g+(w*3|0)+1>>0]|0;q=d-p|0;r=l[f+(w*3|0)+1>>0]|0;s=p-r|0;t=((((i[y+((l[g+(b*3|0)+1>>0]|0)-d)>>0]|0)*9|0)+(i[y+q>>0]|0)|0)*9|0)+(i[y+s>>0]|0)|0;c=l[g+(z*3|0)+2>>0]|0;u=l[g+(w*3|0)+2>>0]|0;v=c-u|0;w=l[f+(w*3|0)+2>>0]|0;x=u-w|0;y=((((i[y+((l[g+(b*3|0)+2>>0]|0)-c)>>0]|0)*9|0)+(i[y+v>>0]|0)|0)*9|0)+(i[y+x>>0]|0)|0;if(!(t|o|y))b=(pg(a,z,0)|0)+z|0;else{g=l[f+(z*3|0)>>0]|0;f=e-m>>31;if((f^n|0)>=0)if((f^j|0)<0)e=m;else e=m-h+e|0;g=qg(a,o,g,e,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+1>>0]|0;e=d-r>>31;if((e^s|0)>=0)if((e^q|0)<0)d=r;else d=r-p+d|0;e=qg(a,t,f,d,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+2>>0]|0;d=c-w>>31;if((d^x|0)>=0)if((d^v|0)<0)c=w;else c=w-u+c|0;y=qg(a,y,f,c,0)|0;z=(k[B>>2]|0)+(z*3|0)|0;i[z>>0]=g;i[z+1>>0]=e;i[z+2>>0]=y}if((b|0)<(k[A>>2]|0))z=b;else break}return}function pg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;m=(k[a+156>>2]|0)-b|0;n=k[a+4584>>2]|0;o=k[a+4580>>2]|0;j=n+((b+-1|0)*3|0)|0;p=i[j>>0]|0;h=i[j+1>>0]|0;j=i[j+2>>0]|0;f=0;while(1){c=n+((f+b|0)*3|0)|0;d=c+1|0;e=c+2|0;if(!(((i[c>>0]|0)==p<<24>>24?(i[d>>0]|0)==h<<24>>24:0)&(i[e>>0]|0)==j<<24>>24))break;i[c>>0]=p;i[d>>0]=h;i[e>>0]=j;f=f+1|0;if((f|0)==(m|0)){f=m;break}}e=(f|0)==(m|0);g=a+4576|0;d=k[36476+(k[g>>2]<<2)>>2]|0;if((1<(f|0))c=f;else{c=f;do{ke(a,1,1);d=k[g>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[g>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]|0;b=m+2|0;e=i[b>>0]|0;o=o+(d*3|0)|0;d=i[o+1>>0]|0;t=i[o+2>>0]|0;o=l[o>>0]|0;q=o-(p&255)>>31|1;r=(ia((l[m>>0]|0)-o<<24,q)|0)>>24;s=a+4552|0;rg(a,s,r);p=d&255;d=p-(h&255)>>31|1;c=(ia((c&255)-p<<24,d)|0)>>24;rg(a,s,c);h=t&255;j=h-(j&255)>>31|1;e=(ia((e&255)-h<<24,j)|0)>>24;rg(a,s,e);o=(ia(r,q)|0)+o&255;p=(ia(c,d)|0)+p&255;a=(ia(e,j)|0)+h&255;i[m>>0]=o;i[n>>0]=p;i[b>>0]=a;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;a=f+1|0;return a|0}if(!c){t=m;return t|0}ke(a,1,1);t=m;return t|0}function qg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;i=(q^b)-q|0;p=a+172+(i*12|0)+10|0;g=j[p>>1]|0;o=a+172+(i*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){f=5;while(1)if((g<>1]^q)-q+d|0;if((e&255|0)==(e|0))m=e;else m=e>>31&255^255;h=(c-m^q)-q<<24;l=h>>24;if(!f)e=(k[a+172+(i*12|0)+4>>2]<<1)+-1+g>>31;else e=0;e=e^l;e=e>>30^e<<1;d=e>>f;if((d|0)<23){ke(a,1,d+1|0);ke(a,e&(1<>1]|0;e=g<<16>>16==64;f=e&1;c=(k[d>>2]|0)+l>>f;g=e?32:g<<16>>16;k[o>>2]=(k[o>>2]|0)+((h|0)>-16777216?l:0-l|0)>>f;f=g+1|0;j[p>>1]=f;e=f+c|0;if((e|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(e|0)>(~g|0)?e:0-g|0;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}if((c|0)<=0){p=c;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}p=c-f|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[d>>2]=p;q=l^q;b=b>>>31;b=m+b|0;b=b+q|0;b=b&255;return b|0}function rg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;sg(a,e,d,31-(k[36476+(k[a+4576>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c>>b;f=d+-8|0;if((e|0)<(d+-9|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-39|0)}else ke(a,1,f);ke(a,c+255&255,8);return}function tg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+160|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+164>>2]|0):0)?(k[h+12>>2]|0)==(k[a+168>>2]|0):0){j=k[8900]|0;k[a+4588>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4592|0;d=a+4596|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4588|0;k[h>>2]=b+256;g=a+168|0;e=a+164|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function ug(a){a=a|0;var b=0,c=0;k[a>>2]=35884;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function vg(a){a=a|0;var b=0,c=0;k[a>>2]=35884;b=k[a+4616>>2]|0;if(b){c=a+4620|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36612;b=k[a+120>>2]|0;if(b){c=a+124|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+92|0;b=k[c>>2]|0;k[c>>2]=0;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);c=a+4|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function wg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+136>>2]|0,k[a+144>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+184>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+188>>2]=f;k[a+192>>2]=e;Gg(a);e=a+140|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+196+(f*12|0)>>2]=b;k[a+196+(f*12|0)+4>>2]=0;j[a+196+(f*12|0)+8>>1]=0;j[a+196+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4576>>2]=h;k[a+4580>>2]=0;i[a+4584>>0]=l;i[a+4585>>0]=1;i[a+4586>>0]=0;k[a+4588>>2]=h;k[a+4592>>2]=1;i[a+4596>>0]=l;i[a+4597>>0]=1;i[a+4598>>0]=0;k[a+4600>>2]=0;r=g;return}function xg(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,l=0,m=0,n=0;n=r;r=r+16|0;l=n;h=a+92|0;g=k[b>>2]|0;k[b>>2]=0;b=k[h>>2]|0;k[h>>2]=g;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);k[l>>2]=0;k[l+4>>2]=d;h=c+8|0;k[l+8>>2]=k[h>>2];if(d){b=lj(4624)|0;d=a+8|0;e=b+4|0;f=d;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));e=b+88|0;g=e+40|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[b>>2]=35660;k[b+128>>2]=k[a+136>>2];k[b+132>>2]=k[a+140>>2];k[b+136>>2]=k[a+144>>2];k[b+140>>2]=k[a+148>>2];k[b+144>>2]=k[a+152>>2];k[b+148>>2]=k[a+156>>2];k[b+152>>2]=k[a+160>>2];e=b+156|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[b+172>>2]=k[d>>2];k[b+176>>2]=0;k[b+180>>2]=0;k[b+184>>2]=0;e=b+4568|0;d=b+188|0;do{k[d>>2]=0;k[d+4>>2]=0;j[d+8>>1]=0;j[d+10>>1]=1;d=d+12|0}while((d|0)!=(e|0));f=a+4|0;k[e>>2]=0;k[e+4>>2]=0;j[e+8>>1]=0;i[e+10>>0]=0;g=b+4580|0;k[g>>2]=0;k[g+4>>2]=0;j[g+8>>1]=0;i[g+10>>0]=0;g=b+4592|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[g+16>>2]=0;k[g+20>>2]=0;k[g+24>>2]=0;i[g+28>>0]=0;if(!(k[b+28>>2]|0))k[b+20>>2]=1;d=k[f>>2]|0;k[f>>2]=b;if(d){Lb[k[(k[d>>2]|0)+4>>2]&255](d);b=k[f>>2]|0}ee(b,l)}l=a+100|0;k[l>>2]=32;k[a+96>>2]=0;b=k[c>>2]|0;if(!b){k[a+108>>2]=k[c+4>>2];k[a+104>>2]=k[h>>2];zg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}k[a+132>>2]=b;e=a+120|0;h=a+124|0;d=k[h>>2]|0;b=k[e>>2]|0;f=b;g=d-f|0;if(g>>>0>=4e3){if(g>>>0>4e3?(m=b+4e3|0,(d|0)!=(m|0)):0){k[h>>2]=m;d=m}}else{fe(e,4e3-g|0);b=k[e>>2]|0;f=b;d=k[h>>2]|0}k[a+108>>2]=f;k[a+104>>2]=d-b;zg(a);m=a+116|0;m=k[m>>2]|0;a=k[l>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=m-a|0;r=n;return a|0}function yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+32>>2]|0)!=0?(k[a+24>>2]|0)!=1:0){p=a+8|0;s=a+36|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+16>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+20>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function zg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;t=r;r=r+32|0;v=t+12|0;s=t;p=a+180|0;q=(k[p>>2]|0)+4|0;if((k[a+32>>2]|0)==1)n=k[a+24>>2]|0;else n=1;b=ia(n<<1,q)|0;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,v|0),u=x,x=0,u&1):0))o=6;if((o|0)==6?(x=0,c=ta(67,b|0)|0,u=x,x=0,!(u&1)):0){k[w>>2]=c;k[v>>2]=c;k[v+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[w>>2]|0)+1|0;k[w>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}}while(0);k[s>>2]=0;u=s+4|0;k[u>>2]=0;k[s+8>>2]=0;do{if(!n)o=19;else{if(!(n>>>0>1073741823?(x=0,qa(178,s|0),m=x,x=0,m&1):0))o=17;if((o|0)==17?(d=n<<2,x=0,e=ta(67,d|0)|0,m=x,x=0,!(m&1)):0){k[s>>2]=e;o=e+(n<<2)|0;k[s+8>>2]=o;sw(e|0,0,d|0)|0;k[u>>2]=o;o=19;break}c=Wa()|0;b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((o|0)==19){g=a+12|0;b:do{if((k[g>>2]|0)>0){h=a+4604|0;j=(ia(n,q)|0)+1|0;l=a+4608|0;m=a+92|0;f=a+4600|0;if((n|0)>0)e=0;else{d=0;while(1){c=k[v>>2]|0;b=c+1|0;k[h>>2]=b;c=c+j|0;k[l>>2]=c;if(!(d&1))b=c;else{k[h>>2]=c;k[l>>2]=b}n=k[m>>2]|0;x=0;Ja(k[(k[n>>2]|0)+12>>2]|0,n|0,b|0,k[p>>2]|0,q|0);n=x;x=0;if(n&1)break;d=d+1|0;if((d|0)>=(k[g>>2]|0)){o=45;break b}}c=Wa()|0;break}c:while(1){c=k[v>>2]|0;b=c+1|0;k[h>>2]=b;c=c+j|0;k[l>>2]=c;if(!(e&1))b=c;else{k[h>>2]=c;k[l>>2]=b}o=k[m>>2]|0;x=0;Ja(k[(k[o>>2]|0)+12>>2]|0,o|0,b|0,k[p>>2]|0,q|0);o=x;x=0;if(o&1){o=28;break}b=k[s>>2]|0;c=k[h>>2]|0;d=0;do{k[f>>2]=k[b+(d<<2)>>2];o=k[p>>2]|0;i[c+o>>0]=i[c+(o+-1)>>0]|0;i[(k[l>>2]|0)+-1>>0]=i[k[h>>2]>>0]|0;x=0;ra(75,a|0,0);o=x;x=0;if(o&1){o=36;break c}b=k[s>>2]|0;k[b+(d<<2)>>2]=k[f>>2];c=(k[h>>2]|0)+q|0;k[h>>2]=c;k[l>>2]=(k[l>>2]|0)+q;d=d+1|0}while((d|0)<(n|0));e=e+1|0;if((e|0)>=(k[g>>2]|0)){o=45;break b}}if((o|0)==28){c=Wa()|0;break}else if((o|0)==36){c=Wa()|0;break}}else o=45}while(0);do{if((o|0)==45){x=0;qa(182,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[s>>2]|0;c=b;if(b){d=k[u>>2]|0;if((d|0)!=(b|0))k[u>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[v>>2]|0;if(!b){r=t;return}if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);r=t;return}}while(0);b=k[s>>2]|0;d=b;if(b){e=k[u>>2]|0;if((e|0)!=(b|0))k[u>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0)}function Ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+4604|0;b=k[o>>2]|0;r=a+180|0;if((k[r>>2]|0)<=0)return;p=a+4608|0;q=a+4612|0;e=b;f=l[b+-1>>0]|0;b=l[b>>0]|0;n=0;while(1){m=k[p>>2]|0;j=l[m+(n+-1)>>0]|0;d=n+1|0;c=l[e+d>>0]|0;h=k[q>>2]|0;g=b-f|0;e=f-j|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Cg(a,n,0)|0)+n|0;c=k[o>>2]|0;b=l[c+(d+-1)>>0]|0;c=l[c+d>>0]|0}else{f=b-j>>31;if((f^e|0)<0)e=b;else e=j+((f^g|0)<0?0:g)|0;m=Bg(a,h,l[m+n>>0]|0,e,0)|0;i[(k[p>>2]|0)+n>>0]=m}if((d|0)>=(k[r>>2]|0))break;e=k[o>>2]|0;f=b;b=c;n=d}return}function Bg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;f=(r^b)-r|0;p=a+196+(f*12|0)+10|0;g=j[p>>1]|0;o=a+196+(f*12|0)|0;e=k[o>>2]|0;if((g|0)<(e|0))if((g<<1|0)<(e|0))if((g<<2|0)<(e|0))if((g<<3|0)<(e|0))if((g<<4|0)<(e|0)){b=5;while(1)if((g<>1]^r)-r+d|0;q=a+136|0;d=k[q>>2]|0;if((e&d|0)==(e|0))l=e;else l=d&~(e>>31);e=(c-l^r)-r|0;i=a+144|0;d=k[i>>2]|0;if((e|0)>0)e=(e+d|0)/(d<<1|1|0)|0;else e=(e-d|0)/(d<<1|1|0)|0;n=a+140|0;h=k[n>>2]|0;c=((e|0)<0?h:0)+e|0;h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0;f=a+196+(f*12|0)+4|0;if(!(d|b))e=(k[f>>2]<<1)+-1+g>>31;else e=0;d=e^h;Fg(a,b,d>>30^d<<1,k[a+156>>2]|0);d=k[a+160>>2]|0;b=(k[o>>2]|0)+((h|0)>-1?h:0-h|0)|0;e=(k[f>>2]|0)+(ia(k[i>>2]<<1|1,h)|0)|0;c=j[p>>1]|0;if((c|0)==(d|0)){b=b>>1;e=e>>1;c=d>>1}k[o>>2]=b;d=c+1|0;j[p>>1]=d;b=d+e|0;if((b|0)>=1){if((e|0)>0){e=e-d|0;p=j[m>>1]|0;j[m>>1]=(p<<16>>16<127&1)+(p&65535);e=(e|0)>0?0:e}}else{e=j[m>>1]|0;j[m>>1]=(e&65535)-(e<<16>>16>-128&1);e=(b|0)>(~c|0)?b:0-c|0}k[f>>2]=e;d=k[i>>2]|0;c=d<<1|1;b=(ia(c,(h^r)-r|0)|0)+l|0;if((b|0)>=(0-d|0)){e=k[q>>2]|0;if((e+d|0)<(b|0))b=b-(ia(k[n>>2]|0,c)|0)|0}else{b=(ia(k[n>>2]|0,c)|0)+b|0;e=k[q>>2]|0}if((b&e|0)==(b|0)){r=b;r=r&255;return r|0}r=e&~(b>>31);r=r&255;return r|0}function Cg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;j=(k[a+180>>2]|0)-b|0;m=k[a+4608>>2]|0;n=k[a+4604>>2]|0;e=i[m+(b+-1)>>0]|0;h=e&255;c=a+144|0;f=0;while(1){d=m+(f+b)|0;g=(l[d>>0]|0)-h|0;if((((g|0)>-1?g:0-g|0)|0)>(k[c>>2]|0))break;i[d>>0]=e;f=f+1|0;if((f|0)==(j|0)){f=j;break}}e=(f|0)==(j|0);g=a+4600|0;d=k[36476+(k[g>>2]<<2)>>2]|0;if((1<(f|0))c=f;else{c=f;do{ke(a,1,1);d=k[g>>2]|0;c=c-(1<>2])|0;d=(d|0)>30?31:d+1|0;k[g>>2]=d;d=k[36476+(d<<2)>>2]|0}while((c|0)>=(1<>0]|0,h,l[n+j>>0]|0)|0;i[b>>0]=a;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;a=f+1|0;return a|0}if(!c){a=j;return a|0}ke(a,1,1);a=j;return a|0}function Dg(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;h=c-d|0;i=a+136|0;g=a+144|0;e=k[g>>2]|0;if((((h|0)>-1?h:0-h|0)|0)>(e|0)){f=d-c>>31|1;b=ia(f,b-d|0)|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;c=((b|0)<0?e:0)+b|0;e=c-((c|0)<((e+1|0)/2|0|0)?0:e)|0;Eg(a,a+4576|0,e);e=ia(e,f)|0;f=k[g>>2]|0;g=f<<1|1;e=(ia(e,g)|0)+d|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&255;return i|0}i=b&~(e>>31);i=i&255;return i|0}else{b=b-c|0;if((b|0)>0)b=(e+b|0)/(e<<1|1|0)|0;else b=(b-e|0)/(e<<1|1|0)|0;h=a+140|0;e=k[h>>2]|0;f=((b|0)<0?e:0)+b|0;e=f-((f|0)<((e+1|0)/2|0|0)?0:e)|0;Eg(a,a+4588|0,e);f=k[g>>2]|0;g=f<<1|1;e=(ia(g,e)|0)+c|0;if((e|0)>=(0-f|0)){b=k[i>>2]|0;if((b+f|0)<(e|0))e=e-(ia(k[h>>2]|0,g)|0)|0}else{e=(ia(k[h>>2]|0,g)|0)+e|0;b=k[i>>2]|0}if((e&b|0)==(e|0)){i=e;i=i&255;return i|0}i=b&~(e>>31);i=i&255;return i|0}return 0}function Eg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0;n=b+9|0;g=l[n>>0]|0;m=b+4|0;j=k[m>>2]|0;e=(ia(g>>>1,j)|0)+(k[b>>2]|0)|0;if((g|0)<(e|0)){f=g;d=0;do{f=f<<1;d=d+1|0}while((f|0)<(e|0));e=d}else e=0;if((c|0)>0&(e|0)==0?l[b+10>>0]<<1>>>0>>0:0)d=1;else h=5;do{if((h|0)==5){d=(c|0)<0;if(d?l[b+10>>0]<<1>>>0>=g>>>0:0){d=1;break}d=d&(e|0)!=0}}while(0);d=(((c|0)>-1?c:0-c|0)<<1)-j+(d<<31>>31)|0;Fg(a,e,d,(k[a+156>>2]|0)+-1-(k[36476+(k[a+4600>>2]<<2)>>2]|0)|0);if((c|0)<0){a=b+10|0;i[a>>0]=(l[a>>0]|0)+1}d=(d+1-(k[m>>2]|0)>>1)+(k[b>>2]|0)|0;k[b>>2]=d;e=i[n>>0]|0;if(e<<24>>24!=(i[b+8>>0]|0)){b=e;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}k[b>>2]=d>>1;a=(e&255)>>>1;i[n>>0]=a;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=a;b=b&255;b=b+1|0;b=b&255;i[n>>0]=b;return}function Fg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=c>>b;f=a+148|0;g=d-(k[f>>2]|0)|0;if((e|0)<(g+-1|0)){if((e|0)>30){d=(e|0)/2|0;ke(a,0,d);e=e-d|0}ke(a,1,e+1|0);ke(a,(1<31){ke(a,0,31);ke(a,1,d+-31-(k[f>>2]|0)|0)}else ke(a,1,g);b=k[f>>2]|0;ke(a,(1<>2]|0)){c=k[a+136>>2]|0;b=a+152|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+184>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+188>>2]|0):0)?(k[d+12>>2]|0)==(k[a+192>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4612>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4612>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4612>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4612>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+152|0}while(0);m=1<>2];c=a+4616|0;d=m<<1;e=a+4620|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4612|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+192|0;j=a+188|0;g=a+184|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Hg(a){a=a|0;var b=0,c=0;k[a>>2]=35856;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Ig(a){a=a|0;var b=0,c=0;k[a>>2]=35856;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Jg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;Vg(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function Lg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);Mg(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function Mg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+172|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,B=x,x=0,!(B&1)):0){k[C>>2]=d;B=d+(b<<1)|0;k[C+8>>2]=B;sw(d|0,0,c|0)|0;k[D>>2]=B;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=18;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=16;if((g|0)==16?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=18;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4596|0;h=ia(y,w)|0;i=h+1|0;l=a+4600|0;m=(y|0)>0;n=a+160|0;o=a+168|0;p=a+164|0;q=a+156|0;s=a+88|0;t=a+4592|0;u=0;b:while(1){d=k[C>>2]|0;c=d+2|0;k[g>>2]=c;d=d+(i<<1)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;j[c+(e<<1)>>1]=j[c+(e+-1<<1)>>1]|0;j[b+-2>>1]=j[c>>1]|0;x=0;ra(76,a|0,0);e=x;x=0;if(e&1){g=29;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w<<1)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w<<1)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h<<1)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=30;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Ng(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;q=a+4596|0;c=k[q>>2]|0;u=a+172|0;b=k[u>>2]|0;if((b|0)<=0)return;r=a+4600|0;s=a+4604|0;t=a+4592|0;h=c;f=m[c+-2>>1]|0;c=m[c>>1]|0;p=0;while(1){n=k[r>>2]|0;g=j[n+(p+-1<<1)>>1]|0;o=g&65535;e=p+1|0;d=m[h+(e<<1)>>1]|0;l=k[s>>2]|0;h=c-f|0;f=f-o|0;l=((((i[l+(d-c)>>0]|0)*9|0)+(i[l+h>>0]|0)|0)*9|0)+(i[l+f>>0]|0)|0;n=n+(p<<1)|0;if(!l){b=Qg(a,g,n,b-p|0)|0;c=b+p|0;if((c|0)!=(k[u>>2]|0)){o=Rg(a,o,m[(k[q>>2]|0)+(c<<1)>>1]|0)|0;j[(k[r>>2]|0)+(c<<1)>>1]=o;o=k[t>>2]|0;k[t>>2]=(o|0)<1?0:o+-1|0;b=b+1|0}e=b+p|0;d=k[q>>2]|0;c=m[d+(e+-1<<1)>>1]|0;d=m[d+(e<<1)>>1]|0}else{b=c-o>>31;if((b^f|0)<0)b=c;else b=o+((b^h|0)<0?0:h)|0;o=Pg(a,l,m[n>>1]|0,b,0)|0;j[(k[r>>2]|0)+(p<<1)>>1]=o}b=k[u>>2]|0;if((b|0)<=(e|0))break;h=k[q>>2]|0;f=c;c=d;p=e}return}function Og(a){a=a|0;var b=0,c=0,d=0,e=0;d=a+116|0;c=k[d>>2]|0;if((i[c>>0]|0)!=-1){e=a+112|0;b=k[e>>2]|0;if((b|0)<1){qe(a);b=k[e>>2]|0;c=k[d>>2]|0}a=a+108|0;d=k[a>>2]|0;k[e>>2]=b+-1;b=d<<1;k[a>>2]=b;if((i[c>>0]|0)!=-1){b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,6,35648);a=x;x=0;if(!(a&1))ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}}else b=k[a+108>>2]|0;if(!b)return;b=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,b|0,6,35648);a=x;x=0;if(!(a&1))ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}function Pg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&65535;return a|0}a=c&~(e>>31);a=a&65535;return a|0}function Qg(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)>0)f=0;else return e|0;do{j[c+(f<<1)>>1]=b;f=f+1|0}while((f|0)!=(e|0));return e|0}function Rg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b-c|0;g=a+128|0;d=a+136|0;if((((f|0)>-1?f:0-f|0)|0)>(k[d>>2]|0)){b=ia(Sg(a,a+4568|0)|0,c-b>>31|1)|0;e=k[d>>2]|0;f=e<<1|1;b=(ia(b,f)|0)+c|0;if((b|0)>=(0-e|0)){d=k[g>>2]|0;if((d+e|0)<(b|0))b=b-(ia(k[a+132>>2]|0,f)|0)|0}else{b=(ia(k[a+132>>2]|0,f)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&65535;return a|0}a=d&~(b>>31);a=a&65535;return a|0}else{c=Sg(a,a+4580|0)|0;f=k[d>>2]|0;e=f<<1|1;b=(ia(e,c)|0)+b|0;if((b|0)>=(0-f|0)){d=k[g>>2]|0;if((d+f|0)<(b|0))b=b-(ia(k[a+132>>2]|0,e)|0)|0}else{b=(ia(k[a+132>>2]|0,e)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&65535;return a|0}a=d&~(b>>31);a=a&65535;return a|0}return 0}function Sg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function Tg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=a+112|0;if((k[f>>2]|0)<16)qe(a);g=a+108|0;c=k[g>>2]|0;if((c|0)>=0)if(!(c&1073741824))if(!(c&536870912))if(!(c&268435456))if(!(c&134217728))if(!(c&67108864))if(!(c&33554432))if(!(c&16777216))if(!(c&8388608))if(!(c&4194304))if(!(c&2097152))if(!(c&1048576))if(!(c&524288))if(!(c&262144))if(!(c&131072)){e=c>>>12&16;b=e+-1|0;if(!e){b=(k[f>>2]|0)+-15|0;k[f>>2]=b;d=c<<15;k[g>>2]=d;c=b;b=15;while(1){if((c|0)<1){qe(a);e=k[g>>2]|0;c=k[f>>2]|0}else e=d;c=c+-1|0;k[f>>2]=c;d=e<<1;k[g>>2]=d;if((e|0)<0)break;else b=b+1|0}return b|0}}else b=14;else b=13;else b=12;else b=11;else b=10;else b=9;else b=8;else b=7;else b=6;else b=5;else b=4;else b=3;else b=2;else b=1;else b=0;a=b+1|0;k[f>>2]=(k[f>>2]|0)-a;k[g>>2]=c<>2]|0;if((c|0)<(b|0)){qe(a);c=k[d>>2]|0;if((c|0)<(b|0)){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}e=a+108|0;a=k[e>>2]|0;k[d>>2]=c-b;k[e>>2]=a<>>(32-b|0)|0}function Vg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Wg(a){a=a|0;var b=0,c=0;k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Xg(a){a=a|0;var b=0,c=0;k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Yg(a){a=a|0;var b=0,c=0;k[a>>2]=35828;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Zg(a){a=a|0;var b=0,c=0;k[a>>2]=35828;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function _g(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=6;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function $g(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;hh(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function ah(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);bh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function bh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+172|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!(b>>>0>715827882?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(x=0,c=ta(67,b*6|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;d=c+(b*6|0)|0;k[C+8>>2]=d;while(1){j[c>>1]=0;j[c+2>>1]=0;j[c+4>>1]=0;b=b+-1|0;if(!b)break;else c=c+6|0}k[D>>2]=d;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=20;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=18;if((g|0)==18?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=20;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==20){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4596|0;h=ia(y,w)|0;i=h+1|0;l=a+4600|0;m=(y|0)>0;n=a+160|0;o=a+168|0;p=a+164|0;q=a+156|0;s=a+88|0;t=a+4592|0;u=0;b:while(1){d=k[C>>2]|0;c=d+6|0;k[g>>2]=c;d=d+(i*6|0)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];b=k[v>>2]|0;e=c+(b*6|0)|0;c=c+((b+-1|0)*6|0)|0;j[e>>1]=j[c>>1]|0;j[e+2>>1]=j[c+2>>1]|0;j[e+4>>1]=j[c+4>>1]|0;e=(k[l>>2]|0)+-6|0;c=k[g>>2]|0;j[e>>1]=j[c>>1]|0;j[e+2>>1]=j[c+2>>1]|0;j[e+4>>1]=j[c+4>>1]|0;x=0;ra(77,a|0,0);e=x;x=0;if(e&1){g=31;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w*6|0)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w*6|0)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+(((k[q>>2]|0)-h|0)*6|0)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=32;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=44;break a}}if((g|0)==31){d=Wa()|0;break}else if((g|0)==32){d=Wa()|0;break}}else g=44}while(0);do{if((g|0)==44){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-6-b|0)>>>0)/6|0)*6|0);mj(b);fb(d|0)}function ch(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=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;N=r;r=r+32|0;D=N+24|0;M=N+18|0;L=N+12|0;E=N+6|0;F=N;G=a+172|0;b=k[G>>2]|0;if((b|0)<=0){r=N;return}H=a+4600|0;I=a+4596|0;J=a+4604|0;K=a+4592|0;C=0;while(1){d=C+-1|0;e=k[H>>2]|0;O=k[I>>2]|0;c=C+1|0;f=m[O+(C*6|0)>>1]|0;B=k[J>>2]|0;g=m[O+(d*6|0)>>1]|0;h=f-g|0;l=m[e+(d*6|0)>>1]|0;n=g-l|0;o=((((i[B+((m[O+(c*6|0)>>1]|0)-f)>>0]|0)*9|0)+(i[B+h>>0]|0)|0)*9|0)+(i[B+n>>0]|0)|0;p=m[O+(C*6|0)+2>>1]|0;q=m[O+(d*6|0)+2>>1]|0;s=p-q|0;t=m[e+(d*6|0)+2>>1]|0;u=q-t|0;v=((((i[B+((m[O+(c*6|0)+2>>1]|0)-p)>>0]|0)*9|0)+(i[B+s>>0]|0)|0)*9|0)+(i[B+u>>0]|0)|0;w=m[O+(C*6|0)+4>>1]|0;x=m[O+(d*6|0)+4>>1]|0;y=w-x|0;z=m[e+(d*6|0)+4>>1]|0;A=x-z|0;B=((((i[B+((m[O+(c*6|0)+4>>1]|0)-w)>>0]|0)*9|0)+(i[B+y>>0]|0)|0)*9|0)+(i[B+A>>0]|0)|0;if(!(v|o|B)){c=e+(d*6|0)|0;j[L>>1]=j[c>>1]|0;j[L+2>>1]=j[c+2>>1]|0;j[L+4>>1]=j[c+4>>1]|0;j[D>>1]=j[c>>1]|0;j[D+2>>1]=j[c+2>>1]|0;j[D+4>>1]=j[c+4>>1]|0;b=dh(a,D,e+(C*6|0)|0,b-C|0)|0;c=b+C|0;if((c|0)!=(k[G>>2]|0)){O=(k[I>>2]|0)+(c*6|0)|0;j[F>>1]=j[O>>1]|0;j[F+2>>1]=j[O+2>>1]|0;j[F+4>>1]=j[O+4>>1]|0;O=(k[H>>2]|0)+(c*6|0)|0;j[M>>1]=j[L>>1]|0;j[M+2>>1]=j[L+2>>1]|0;j[M+4>>1]=j[L+4>>1]|0;j[D>>1]=j[F>>1]|0;j[D+2>>1]=j[F+2>>1]|0;j[D+4>>1]=j[F+4>>1]|0;eh(E,a,M,D);j[O>>1]=j[E>>1]|0;j[O+2>>1]=j[E+2>>1]|0;j[O+4>>1]=j[E+4>>1]|0;O=k[K>>2]|0;k[K>>2]=(O|0)<1?0:O+-1|0;b=b+1|0}c=b+C|0}else{d=m[e+(C*6|0)>>1]|0;b=f-l>>31;if((b^n|0)>=0)if((b^h|0)<0)b=l;else b=l-g+f|0;else b=f;f=fh(a,o,d,b,0)|0;d=m[(k[H>>2]|0)+(C*6|0)+2>>1]|0;b=p-t>>31;if((b^u|0)>=0)if((b^s|0)<0)b=t;else b=t-q+p|0;else b=p;d=fh(a,v,d,b,0)|0;e=m[(k[H>>2]|0)+(C*6|0)+4>>1]|0;b=w-z>>31;if((b^A|0)>=0)if((b^y|0)<0)b=z;else b=z-x+w|0;else b=w;B=fh(a,B,e,b,0)|0;O=k[H>>2]|0;j[O+(C*6|0)>>1]=f;j[O+(C*6|0)+2>>1]=d;j[O+(C*6|0)+4>>1]=B}b=k[G>>2]|0;if((c|0)>=(b|0))break;else C=c}r=N;return}function dh(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;f=0;do{p=c+(f*6|0)|0;j[p>>1]=j[b>>1]|0;j[p+2>>1]=j[b+2>>1]|0;j[p+4>>1]=j[b+4>>1]|0;f=f+1|0}while((f|0)!=(e|0));return e|0}function eh(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,l=0,n=0,o=0;i=b+4568|0;o=gh(b,i)|0;g=gh(b,i)|0;i=gh(b,i)|0;f=b+128|0;e=m[d>>1]|0;l=k[b+136>>2]|0;n=l<<1|1;e=(ia(ia(n,o)|0,e-(m[c>>1]|0)>>31|1)|0)+e|0;o=0-l|0;if((e|0)>=(o|0)){f=k[f>>2]|0;if((f+l|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else{e=(ia(k[b+132>>2]|0,n)|0)+e|0;f=k[f>>2]|0}if((e&f|0)!=(e|0))e=f&~(e>>31);h=e&65535;e=m[d+2>>1]|0;e=(ia(ia(n,g)|0,e-(m[c+2>>1]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+l|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)!=(e|0))e=f&~(e>>31);g=e&65535;e=m[d+4>>1]|0;e=(ia(ia(n,i)|0,e-(m[c+4>>1]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+l|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)==(e|0)){b=e;b=b&65535;j[a>>1]=h;o=a+2|0;j[o>>1]=g;a=a+4|0;j[a>>1]=b;return}b=f&~(e>>31);b=b&65535;j[a>>1]=h;o=a+2|0;j[o>>1]=g;a=a+4|0;j[a>>1]=b;return}function fh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&65535;return a|0}a=c&~(e>>31);a=a&65535;return a|0}function gh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function hh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function ih(a){a=a|0;var b=0,c=0;k[a>>2]=35800;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function jh(a){a=a|0;var b=0,c=0;k[a>>2]=35800;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function kh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function lh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;th(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function mh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);nh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function nh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+172|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,C|0),B=x,x=0,B&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[D>>2]|0)+3|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)f=19;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))f=17;if((f|0)==17?(d=y<<2,x=0,e=ta(67,d|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=e;f=e+(y<<2)|0;k[z+8>>2]=f;sw(e|0,0,d|0)|0;k[B>>2]=f;f=19;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){f=a+8|0;b:do{if((k[f>>2]|0)>0){g=a+4596|0;h=ia(y,w)|0;j=h+1|0;l=a+4600|0;m=(y|0)>0;n=a+160|0;o=a+168|0;p=a+164|0;q=a+156|0;s=a+88|0;t=a+4592|0;u=0;c:while(1){d=k[C>>2]|0;c=d+3|0;k[g>>2]=c;d=d+(j*3|0)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];b=k[v>>2]|0;e=c+(b*3|0)|0;c=c+((b+-1|0)*3|0)|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;c=k[g>>2]|0;e=(k[l>>2]|0)+-3|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;x=0;ra(78,a|0,0);e=x;x=0;if(e&1){f=30;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w*3|0)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w*3|0)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+(((k[q>>2]|0)-h|0)*3|0)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){f=31;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){f=43;break b}}if((f|0)==30){d=Wa()|0;break}else if((f|0)==31){d=Wa()|0;break}}else f=43}while(0);do{if((f|0)==43){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function oh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=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;M=r;r=r+16|0;C=M+12|0;L=M+9|0;K=M+6|0;D=M+3|0;E=M;F=a+172|0;b=k[F>>2]|0;if((b|0)<=0){r=M;return}G=a+4600|0;H=a+4596|0;I=a+4604|0;J=a+4592|0;B=0;while(1){y=B+-1|0;d=k[G>>2]|0;e=d+(y*3|0)|0;N=k[H>>2]|0;c=B+1|0;f=l[N+(B*3|0)>>0]|0;A=k[I>>2]|0;g=l[N+(y*3|0)>>0]|0;h=f-g|0;j=l[e>>0]|0;m=g-j|0;n=((((i[A+((l[N+(c*3|0)>>0]|0)-f)>>0]|0)*9|0)+(i[A+h>>0]|0)|0)*9|0)+(i[A+m>>0]|0)|0;o=l[N+(B*3|0)+1>>0]|0;p=l[N+(y*3|0)+1>>0]|0;q=o-p|0;s=l[d+(y*3|0)+1>>0]|0;t=p-s|0;u=((((i[A+((l[N+(c*3|0)+1>>0]|0)-o)>>0]|0)*9|0)+(i[A+q>>0]|0)|0)*9|0)+(i[A+t>>0]|0)|0;v=l[N+(B*3|0)+2>>0]|0;w=l[N+(y*3|0)+2>>0]|0;x=v-w|0;y=l[d+(y*3|0)+2>>0]|0;z=w-y|0;A=((((i[A+((l[N+(c*3|0)+2>>0]|0)-v)>>0]|0)*9|0)+(i[A+x>>0]|0)|0)*9|0)+(i[A+z>>0]|0)|0;if(!(u|n|A)){i[K>>0]=i[e>>0]|0;i[K+1>>0]=i[e+1>>0]|0;i[K+2>>0]=i[e+2>>0]|0;i[C>>0]=i[e>>0]|0;i[C+1>>0]=i[e+1>>0]|0;i[C+2>>0]=i[e+2>>0]|0;b=ph(a,C,d+(B*3|0)|0,b-B|0)|0;c=b+B|0;if((c|0)!=(k[F>>2]|0)){N=(k[H>>2]|0)+(c*3|0)|0;i[E>>0]=i[N>>0]|0;i[E+1>>0]=i[N+1>>0]|0;i[E+2>>0]=i[N+2>>0]|0;N=k[G>>2]|0;i[L>>0]=i[K>>0]|0;i[L+1>>0]=i[K+1>>0]|0;i[L+2>>0]=i[K+2>>0]|0;i[C>>0]=i[E>>0]|0;i[C+1>>0]=i[E+1>>0]|0;i[C+2>>0]=i[E+2>>0]|0;qh(D,a,L,C);N=N+(c*3|0)|0;i[N>>0]=i[D>>0]|0;i[N+1>>0]=i[D+1>>0]|0;i[N+2>>0]=i[D+2>>0]|0;N=k[J>>2]|0;k[J>>2]=(N|0)<1?0:N+-1|0;b=b+1|0}c=b+B|0}else{d=l[d+(B*3|0)>>0]|0;b=f-j>>31;if((b^m|0)>=0)if((b^h|0)<0)b=j;else b=j-g+f|0;else b=f;f=rh(a,n,d,b,0)|0;d=l[(k[G>>2]|0)+(B*3|0)+1>>0]|0;b=o-s>>31;if((b^t|0)>=0)if((b^q|0)<0)b=s;else b=s-p+o|0;else b=o;d=rh(a,u,d,b,0)|0;e=l[(k[G>>2]|0)+(B*3|0)+2>>0]|0;b=v-y>>31;if((b^z|0)>=0)if((b^x|0)<0)b=y;else b=y-w+v|0;else b=v;A=rh(a,A,e,b,0)|0;N=(k[G>>2]|0)+(B*3|0)|0;i[N>>0]=f;i[N+1>>0]=d;i[N+2>>0]=A}b=k[F>>2]|0;if((c|0)>=(b|0))break;else B=c}r=M;return}function ph(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;f=0;do{o=c+(f*3|0)|0;i[o>>0]=i[b>>0]|0;i[o+1>>0]=i[b+1>>0]|0;i[o+2>>0]=i[b+2>>0]|0;f=f+1|0}while((f|0)!=(e|0));return e|0}function qh(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,j=0,m=0,n=0,o=0;j=b+4568|0;o=sh(b,j)|0;g=sh(b,j)|0;j=sh(b,j)|0;f=b+128|0;e=l[d>>0]|0;m=k[b+136>>2]|0;n=m<<1|1;e=(ia(ia(n,o)|0,e-(l[c>>0]|0)>>31|1)|0)+e|0;o=0-m|0;if((e|0)>=(o|0)){f=k[f>>2]|0;if((f+m|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else{e=(ia(k[b+132>>2]|0,n)|0)+e|0;f=k[f>>2]|0}if((e&f|0)!=(e|0))e=f&~(e>>31);h=e&255;e=l[d+1>>0]|0;e=(ia(ia(n,g)|0,e-(l[c+1>>0]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+m|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)!=(e|0))e=f&~(e>>31);g=e&255;e=l[d+2>>0]|0;e=(ia(ia(n,j)|0,e-(l[c+2>>0]|0)>>31|1)|0)+e|0;if((e|0)>=(o|0)){if((f+m|0)<(e|0))e=e-(ia(k[b+132>>2]|0,n)|0)|0}else e=(ia(k[b+132>>2]|0,n)|0)+e|0;if((e&f|0)==(e|0)){b=e;b=b&255;i[a>>0]=h;o=a+1|0;i[o>>0]=g;a=a+2|0;i[a>>0]=b;return}b=f&~(e>>31);b=b&255;i[a>>0]=h;o=a+1|0;i[o>>0]=g;a=a+2|0;i[a>>0]=b;return}function rh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&255;return a|0}a=c&~(e>>31);a=a&255;return a|0}function sh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function th(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function uh(a){a=a|0;var b=0,c=0;k[a>>2]=35772;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function vh(a){a=a|0;var b=0,c=0;k[a>>2]=35772;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function wh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function xh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,65535,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;Fh(a);d=0;do{k[a+164+(d*12|0)>>2]=1024;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=1024;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=1024;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function yh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);zh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function zh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,B=x,x=0,!(B&1)):0){k[C>>2]=d;B=d+(b<<1)|0;k[C+8>>2]=B;sw(d|0,0,c|0)|0;k[D>>2]=B;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=18;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=16;if((g|0)==16?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=18;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;i=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;b:while(1){d=k[C>>2]|0;c=d+2|0;k[g>>2]=c;d=d+(i<<1)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;j[c+(e<<1)>>1]=j[c+(e+-1<<1)>>1]|0;j[b+-2>>1]=j[c>>1]|0;x=0;ra(79,a|0,0);e=x;x=0;if(e&1){g=29;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w<<1)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w<<1)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h<<1)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=30;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Ah(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4572|0;b=k[p>>2]|0;s=a+148|0;if((k[s>>2]|0)<=0)return;q=a+4576|0;r=a+4580|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Ch(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Bh(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Bh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&65535|0)!=(c|0))c=c>>31&65535^65535;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<47){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&65535;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&65535;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&65535;return b|0}function Ch(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4576|0;e=k[f>>2]|0;c=j[e+(b+-1<<1)>>1]|0;g=a+148|0;e=Dh(a,c,e+(b<<1)|0,(k[g>>2]|0)-b|0)|0;d=e+b|0;if((d|0)==(k[g>>2]|0)){g=e;return g|0}c=c&65535;b=m[(k[a+4572>>2]|0)+(d<<1)>>1]|0;g=c-b|0;if((((g|0)>-1?g:0-g|0)|0)<1)c=(Eh(a,a+4556|0)|0)+c|0;else c=(ia(Eh(a,a+4544|0)|0,b-c>>31|1)|0)+b|0;j[(k[f>>2]|0)+(d<<1)>>1]=c;g=a+4568|0;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;g=e+1|0;return g|0}function Dh(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)>0)f=0;else return e|0;do{j[c+(f<<1)>>1]=b;f=f+1|0}while((f|0)!=(e|0));return e|0}function Eh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(46-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,16)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function Fh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,65535,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8909]|0;k[a+4580>>2]=j+(((k[8910]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=131072){if(f>>>0>131072?(g=b+131072|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,131072-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+65536;g=a+160|0;e=a+156|0;f=-65536;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==65536)break}r=l;return}function Gh(a){a=a|0;var b=0,c=0;k[a>>2]=35744;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Hh(a){a=a|0;var b=0,c=0;k[a>>2]=35744;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Ih(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(37,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==16)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(38,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(39,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(40,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=2;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Jh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,4095,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;Rh(a);d=0;do{k[a+164+(d*12|0)>>2]=64;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=64;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=64;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function Kh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);Lh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function Lh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))g=6;if((g|0)==6?(c=b<<1,x=0,d=ta(67,c|0)|0,B=x,x=0,!(B&1)):0){k[C>>2]=d;B=d+(b<<1)|0;k[C+8>>2]=B;sw(d|0,0,c|0)|0;k[D>>2]=B;break}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)g=18;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))g=16;if((g|0)==16?(e=y<<2,x=0,f=ta(67,e|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=f;g=f+(y<<2)|0;k[z+8>>2]=g;sw(f|0,0,e|0)|0;k[B>>2]=g;g=18;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((g|0)==18){f=a+8|0;a:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;i=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;b:while(1){d=k[C>>2]|0;c=d+2|0;k[g>>2]=c;d=d+(i<<1)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;j[c+(e<<1)>>1]=j[c+(e+-1<<1)>>1]|0;j[b+-2>>1]=j[c>>1]|0;x=0;ra(80,a|0,0);e=x;x=0;if(e&1){g=29;break b}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w<<1)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w<<1)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h<<1)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){g=30;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){g=42;break a}}if((g|0)==29){d=Wa()|0;break}else if((g|0)==30){d=Wa()|0;break}}else g=42}while(0);do{if((g|0)==42){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~((c+-2-b|0)>>>1)<<1);mj(b);fb(d|0)}function Mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0;p=a+4572|0;b=k[p>>2]|0;s=a+148|0;if((k[s>>2]|0)<=0)return;q=a+4576|0;r=a+4580|0;e=b;f=m[b+-2>>1]|0;b=m[b>>1]|0;o=0;while(1){n=k[q>>2]|0;l=m[n+(o+-1<<1)>>1]|0;d=o+1|0;c=m[e+(d<<1)>>1]|0;h=k[r>>2]|0;g=b-f|0;e=f-l|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(Oh(a,o,0)|0)+o|0;c=k[p>>2]|0;b=m[c+(d+-1<<1)>>1]|0;c=m[c+(d<<1)>>1]|0}else{f=b-l>>31;if((f^e|0)<0)e=b;else e=l+((f^g|0)<0?0:g)|0;n=Nh(a,h,m[n+(o<<1)>>1]|0,e,0)|0;j[(k[q>>2]|0)+(o<<1)>>1]=n}if((d|0)>=(k[s>>2]|0))break;e=k[p>>2]|0;f=b;b=c;o=d}return}function Nh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&4095|0)!=(c|0))c=c>>31&4095^4095;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<35){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&4095;b=b&65535;return b|0}function Oh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4576|0;e=k[f>>2]|0;c=j[e+(b+-1<<1)>>1]|0;g=a+148|0;e=Ph(a,c,e+(b<<1)|0,(k[g>>2]|0)-b|0)|0;d=e+b|0;if((d|0)==(k[g>>2]|0)){g=e;return g|0}c=c&65535;b=m[(k[a+4572>>2]|0)+(d<<1)>>1]|0;g=c-b|0;if((((g|0)>-1?g:0-g|0)|0)<1)c=(Qh(a,a+4556|0)|0)+c|0;else c=(ia(Qh(a,a+4544|0)|0,b-c>>31|1)|0)+b|0;j[(k[f>>2]|0)+(d<<1)>>1]=c&4095;g=a+4568|0;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;g=e+1|0;return g|0}function Ph(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,l=0,m=0,n=0,o=0,p=0;h=a+112|0;l=a+108|0;m=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[l>>2]|0;e=e+-1|0;k[h>>2]=e;k[l>>2]=g<<1;if((g|0)>=0){n=8;break}g=k[m>>2]|0;o=1<>2];p=d-f|0;p=(o|0)<(p|0)?o:p;f=p+f|0;if((p|0)==(o|0))k[m>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((n|0)==8)if((f|0)!=(d|0)){e=k[m>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);p=x;x=0;if(p&1){p=Wa()|0;Ua(e|0);fb(p|0)}else ub(e|0,824,96)}}else e=d;if((e|0)>0)f=0;else return e|0;do{j[c+(f<<1)>>1]=b;f=f+1|0}while((f|0)!=(e|0));return e|0}function Qh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(34-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,12)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function Rh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,4095,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8906]|0;k[a+4580>>2]=j+(((k[8907]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=8192){if(f>>>0>8192?(g=b+8192|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,8192-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+4096;g=a+160|0;e=a+156|0;f=-4096;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==4096)break}r=l;return}function Sh(a){a=a|0;var b=0,c=0;k[a>>2]=35716;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function Th(a){a=a|0;var b=0,c=0;k[a>>2]=35716;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function Uh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function Vh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;bi(a);d=0;do{k[a+164+(d*12|0)>>2]=4;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=4;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=4;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function Wh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);Xh(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function Xh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[D>>2]|0)+1|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)f=19;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))f=17;if((f|0)==17?(d=y<<2,x=0,e=ta(67,d|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=e;f=e+(y<<2)|0;k[z+8>>2]=f;sw(e|0,0,d|0)|0;k[B>>2]=f;f=19;break}c=Wa()|0;b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){f=a+8|0;b:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;j=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;c:while(1){d=k[C>>2]|0;c=d+1|0;k[g>>2]=c;d=d+j|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];e=k[v>>2]|0;i[c+e>>0]=i[c+(e+-1)>>0]|0;i[(k[l>>2]|0)+-1>>0]=i[k[g>>2]>>0]|0;x=0;ra(81,a|0,0);e=x;x=0;if(e&1){f=30;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+w|0;k[g>>2]=c;b=(k[l>>2]|0)+w|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+((k[q>>2]|0)-h)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){f=31;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){f=43;break b}}if((f|0)==30){c=Wa()|0;break}else if((f|0)==31){c=Wa()|0;break}}else f=43}while(0);do{if((f|0)==43){x=0;qa(183,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);r=A;return}}while(0);b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}function Yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+4572|0;b=k[o>>2]|0;r=a+148|0;if((k[r>>2]|0)<=0)return;p=a+4576|0;q=a+4580|0;e=b;f=l[b+-1>>0]|0;b=l[b>>0]|0;n=0;while(1){m=k[p>>2]|0;j=l[m+(n+-1)>>0]|0;d=n+1|0;c=l[e+d>>0]|0;h=k[q>>2]|0;g=b-f|0;e=f-j|0;h=((((i[h+(c-b)>>0]|0)*9|0)+(i[h+g>>0]|0)|0)*9|0)+(i[h+e>>0]|0)|0;if(!h){d=(_h(a,n,0)|0)+n|0;c=k[o>>2]|0;b=l[c+(d+-1)>>0]|0;c=l[c+d>>0]|0}else{f=b-j>>31;if((f^e|0)<0)e=b;else e=j+((f^g|0)<0?0:g)|0;m=Zh(a,h,l[m+n>>0]|0,e,0)|0;i[(k[p>>2]|0)+n>>0]=m}if((d|0)>=(k[r>>2]|0))break;e=k[o>>2]|0;f=b;b=c;n=d}return}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,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&255|0)!=(c|0))c=c>>31&255^255;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<23){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}function _h(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4576|0;e=k[f>>2]|0;c=i[e+(b+-1)>>0]|0;g=a+148|0;e=$h(a,c,e+b|0,(k[g>>2]|0)-b|0)|0;d=e+b|0;if((d|0)==(k[g>>2]|0)){g=e;return g|0}c=c&255;b=l[(k[a+4572>>2]|0)+d>>0]|0;g=c-b|0;if((((g|0)>-1?g:0-g|0)|0)<1)c=(ai(a,a+4556|0)|0)+c|0;else c=(ia(ai(a,a+4544|0)|0,b-c>>31|1)|0)+b|0;i[(k[f>>2]|0)+d>>0]=c;g=a+4568|0;a=k[g>>2]|0;k[g>>2]=(a|0)<1?0:a+-1|0;g=e+1|0;return g|0}function $h(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;sw(c|0,b|0,e|0)|0;return e|0}function ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(22-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,8)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function bi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8900]|0;k[a+4580>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+256;g=a+160|0;e=a+156|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function ci(a){a=a|0;var b=0,c=0;k[a>>2]=35688;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function di(a){a=a|0;var b=0,c=0;k[a>>2]=35688;b=k[a+4584>>2]|0;if(b){c=a+4588|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function ei(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=3;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function fi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+32|0;h=e;Oi(h,255,0);g=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[h+8>>2]|0:f;d=k[b+12>>2]|0;d=(d|0)==0?k[h+12>>2]|0:d;b=k[b+16>>2]|0;c=k[h+16>>2]|0;k[a+152>>2]=(g|0)==0?k[h+4>>2]|0:g;k[a+156>>2]=f;k[a+160>>2]=d;ni(a);d=0;do{k[a+164+(d*12|0)>>2]=4;k[a+164+(d*12|0)+4>>2]=0;j[a+164+(d*12|0)+8>>1]=0;j[a+164+(d*12|0)+10>>1]=1;d=d+1|0}while((d|0)!=365);h=((b|0)==0?c:b)&255;k[a+4544>>2]=4;k[a+4548>>2]=0;i[a+4552>>0]=h;i[a+4553>>0]=1;i[a+4554>>0]=0;k[a+4556>>2]=4;k[a+4560>>2]=1;i[a+4564>>0]=h;i[a+4565>>0]=1;i[a+4566>>0]=0;k[a+4568>>2]=0;r=e;return}function gi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4596>>0]=e&1;b=a+132|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);hi(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function hi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;v=a+148|0;w=(k[v>>2]|0)+4|0;if((k[a+28>>2]|0)==1)y=k[a+20>>2]|0;else y=1;b=ia(y<<1,w)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!(b>>>0>1431655765?(x=0,qa(178,C|0),B=x,x=0,B&1):0))f=6;if((f|0)==6?(x=0,c=ta(67,b*3|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+(b*3|0);while(1){i[c>>0]=0;i[c+1>>0]=0;i[c+2>>0]=0;c=(k[D>>2]|0)+3|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}d=Wa()|0;b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!y)f=19;else{if(!(y>>>0>1073741823?(x=0,qa(178,z|0),u=x,x=0,u&1):0))f=17;if((f|0)==17?(d=y<<2,x=0,e=ta(67,d|0)|0,u=x,x=0,!(u&1)):0){k[z>>2]=e;f=e+(y<<2)|0;k[z+8>>2]=f;sw(e|0,0,d|0)|0;k[B>>2]=f;f=19;break}d=Wa()|0;b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}}while(0);if((f|0)==19){f=a+8|0;b:do{if((k[f>>2]|0)>0){g=a+4572|0;h=ia(y,w)|0;j=h+1|0;l=a+4576|0;m=(y|0)>0;n=a+136|0;o=a+144|0;p=a+140|0;q=a+132|0;s=a+88|0;t=a+4568|0;u=0;c:while(1){d=k[C>>2]|0;c=d+3|0;k[g>>2]=c;d=d+(j*3|0)|0;k[l>>2]=d;if(!(u&1))b=d;else{k[g>>2]=d;k[l>>2]=c;b=c;c=d}if(m){e=k[z>>2]|0;d=0;do{k[t>>2]=k[e+(d<<2)>>2];b=k[v>>2]|0;e=c+(b*3|0)|0;c=c+((b+-1|0)*3|0)|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;c=k[g>>2]|0;e=(k[l>>2]|0)+-3|0;i[e>>0]=i[c>>0]|0;i[e+1>>0]=i[c+1>>0]|0;i[e+2>>0]=i[c+2>>0]|0;x=0;ra(82,a|0,0);e=x;x=0;if(e&1){f=30;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[t>>2];c=(k[g>>2]|0)+(w*3|0)|0;k[g>>2]=c;b=(k[l>>2]|0)+(w*3|0)|0;k[l>>2]=b;d=d+1|0}while((d|0)<(y|0))}e=k[n>>2]|0;if(((e|0)<=(u|0)?(u|0)<((k[o>>2]|0)+e|0):0)?(e=k[s>>2]|0,x=0,Ja(k[(k[e>>2]|0)+8>>2]|0,e|0,b+(((k[q>>2]|0)-h|0)*3|0)|0,k[p>>2]|0,w|0),e=x,x=0,e&1):0){f=31;break}u=u+1|0;if((u|0)>=(k[f>>2]|0)){f=43;break b}}if((f|0)==30){d=Wa()|0;break}else if((f|0)==31){d=Wa()|0;break}}else f=43}while(0);do{if((f|0)==43){x=0;qa(183,a|0);a=x;x=0;if(a&1){d=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);r=A;return}}while(0);b=k[z>>2]|0;c=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-c|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(d|0);c=k[D>>2]|0;if((c|0)!=(b|0))k[D>>2]=c+(~(((c+-3-b|0)>>>0)/3|0)*3|0);mj(b);fb(d|0)}function ii(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=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;A=a+148|0;if((k[A>>2]|0)<=0)return;B=a+4576|0;C=a+4572|0;D=a+4580|0;z=0;while(1){w=z+-1|0;f=k[B>>2]|0;g=k[C>>2]|0;b=z+1|0;e=l[g+(z*3|0)>>0]|0;y=k[D>>2]|0;h=l[g+(w*3|0)>>0]|0;j=e-h|0;m=l[f+(w*3|0)>>0]|0;n=h-m|0;o=((((i[y+((l[g+(b*3|0)>>0]|0)-e)>>0]|0)*9|0)+(i[y+j>>0]|0)|0)*9|0)+(i[y+n>>0]|0)|0;d=l[g+(z*3|0)+1>>0]|0;p=l[g+(w*3|0)+1>>0]|0;q=d-p|0;r=l[f+(w*3|0)+1>>0]|0;s=p-r|0;t=((((i[y+((l[g+(b*3|0)+1>>0]|0)-d)>>0]|0)*9|0)+(i[y+q>>0]|0)|0)*9|0)+(i[y+s>>0]|0)|0;c=l[g+(z*3|0)+2>>0]|0;u=l[g+(w*3|0)+2>>0]|0;v=c-u|0;w=l[f+(w*3|0)+2>>0]|0;x=u-w|0;y=((((i[y+((l[g+(b*3|0)+2>>0]|0)-c)>>0]|0)*9|0)+(i[y+v>>0]|0)|0)*9|0)+(i[y+x>>0]|0)|0;if(!(t|o|y))b=(ji(a,z,0)|0)+z|0;else{g=l[f+(z*3|0)>>0]|0;f=e-m>>31;if((f^n|0)>=0)if((f^j|0)<0)e=m;else e=m-h+e|0;g=ki(a,o,g,e,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+1>>0]|0;e=d-r>>31;if((e^s|0)>=0)if((e^q|0)<0)d=r;else d=r-p+d|0;e=ki(a,t,f,d,0)|0;f=l[(k[B>>2]|0)+(z*3|0)+2>>0]|0;d=c-w>>31;if((d^x|0)>=0)if((d^v|0)<0)c=w;else c=w-u+c|0;y=ki(a,y,f,c,0)|0;z=(k[B>>2]|0)+(z*3|0)|0;i[z>>0]=g;i[z+1>>0]=e;i[z+2>>0]=y}if((b|0)<(k[A>>2]|0))z=b;else break}return}function ji(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;j=r;r=r+16|0;m=j+3|0;n=j;f=a+4576|0;c=k[f>>2]|0;d=c+((b+-1|0)*3|0)|0;g=i[d>>0]|0;h=i[d+1>>0]|0;d=i[d+2>>0]|0;i[n>>0]=g;i[n+1>>0]=h;i[n+2>>0]=d;l=a+148|0;e=(k[l>>2]|0)-b|0;i[m>>0]=i[n>>0]|0;i[m+1>>0]=i[n+1>>0]|0;i[m+2>>0]=i[n+2>>0]|0;e=li(a,m,c+(b*3|0)|0,e)|0;c=e+b|0;if((c|0)==(k[l>>2]|0)){n=e;r=j;return n|0}m=(k[a+4572>>2]|0)+(c*3|0)|0;b=i[m>>0]|0;l=i[m+1>>0]|0;m=i[m+2>>0]|0;n=k[f>>2]|0;f=a+4544|0;p=mi(a,f)|0;o=mi(a,f)|0;b=b&255;b=(ia(b-(g&255)>>31|1,p)|0)+b&255;l=l&255;l=(ia(l-(h&255)>>31|1,o)|0)+l&255;m=m&255;m=(ia(m-(d&255)>>31|1,mi(a,f)|0)|0)+m&255;n=n+(c*3|0)|0;i[n>>0]=b;i[n+1>>0]=l;i[n+2>>0]=m;n=a+4568|0;m=k[n>>2]|0;k[n>>2]=(m|0)<1?0:m+-1|0;n=e+1|0;r=j;return n|0}function ki(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0;q=b>>31;m=(q^b)-q|0;p=a+164+(m*12|0)+10|0;c=j[p>>1]|0;o=a+164+(m*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){f=5;while(1)if((c<>1]^q)-q+d|0;if((c&255|0)!=(c|0))c=c>>31&255^255;e=a+112|0;if((k[e>>2]|0)<8)qe(a);d=a+108|0;g=k[d>>2]|0;h=g>>>24;l=k[2832+(f<<11)+(h<<3)+4>>2]|0;if(!l){e=Tg(a)|0;if((e|0)<23){if(f)e=(Ug(a,f)|0)+(e<>31^e>>1;if((((e|0)>-1?e:0-e|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}}else{k[e>>2]=(k[e>>2]|0)-l;k[d>>2]=g<>2]|0}l=a+164+(m*12|0)+4|0;d=k[l>>2]|0;if(!f){a=j[p>>1]|0;f=a;e=(d<<1)+-1+(a<<16>>16)>>31^e}else f=j[p>>1]|0;g=f<<16>>16==64;a=g&1;h=d+e>>a;g=g?32:f<<16>>16;k[o>>2]=((e|0)>-1?e:0-e|0)+(k[o>>2]|0)>>a;d=g+1|0;j[p>>1]=d;f=d+h|0;if((f|0)<1){p=j[n>>1]|0;j[n>>1]=(p&65535)-(p<<16>>16>-128&1);p=(f|0)>(~g|0)?f:0-g|0;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}if((h|0)<=0){p=h;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}p=h-d|0;o=j[n>>1]|0;j[n>>1]=(o<<16>>16<127&1)+(o&65535);p=(p|0)>0?0:p;k[l>>2]=p;q=e^q;b=b>>>31;b=c+b|0;b=b+q|0;b=b&255;return b|0}function li(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4568|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;f=0;do{o=c+(f*3|0)|0;i[o>>0]=i[b>>0]|0;i[o+1>>0]=i[b+1>>0]|0;i[o+2>>0]=i[b+2>>0]|0;f=f+1|0}while((f|0)!=(e|0));return e|0}function mi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;h=b+9|0;c=l[h>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;e=k[36476+(k[a+4568>>2]<<2)>>2]|0;c=Tg(a)|0;do{if((c|0)<(22-e|0))if(!d){a=k[f>>2]|0;e=a+c|0;d=e&1;e=(d+e|0)/2|0;g=8;break}else{c=(Ug(a,d)|0)+(c<>2]|0;e=c+a|0;j=e&1;d=j;f=1;e=(j+e|0)/2|0;break}else{c=(Ug(a,8)|0)+1|0;a=k[f>>2]|0;e=c+a|0;f=e&1;e=(f+e|0)/2|0;if(!d){d=f;g=8}else{d=f;f=1}}}while(0);if((g|0)==8)f=l[b+10>>0]<<1>>>0>=(l[h>>0]|0)>>>0;e=(d|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(c+1-a>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[h>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){j=d;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[h>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;j=j&255;j=j+1|0;j=j&255;i[h>>0]=j;return e|0}function Vp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+128|0;f=m;o=m+116|0;p=m+104|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,0,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=cv(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Wp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+240|0;g=m+8|0;a=m;o=m+204|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,0,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,23,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=cv(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Xp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+352|0;t=z+312|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+316|0;s=z+80|0;h=z+84|0;y=z+76|0;w=z+72|0;u=z+68|0;v=z+64|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58898,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,k[n>>2]=k[c+8>>2],p[n+8>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<3)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(4,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(40,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function Yp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;y=r;r=r+16|0;z=y;w=Ss(g,44212)|0;u=Ss(g,44368)|0;Mb[k[(k[u>>2]|0)+20>>2]&127](z,u);k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,g|0)|0;v=x;x=0;if(v&1)t=8;else{l=k[f>>2]|0;k[f>>2]=l+4;k[l>>2]=g;l=a+1|0;t=10}break}default:{l=a;t=10}}a:do{if((t|0)==10){v=c;b:do{if((v-l|0)>1?(i[l>>0]|0)==48:0){h=l+1|0;switch(i[h>>0]|0){case 88:case 120:break;default:{t=11;break b}}x=0;g=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,48)|0;s=x;x=0;if(s&1){t=8;break a}s=k[f>>2]|0;k[f>>2]=s+4;k[s>>2]=g;l=l+2|0;x=0;g=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,i[h>>0]|0)|0;s=x;x=0;if(s&1){t=8;break a}s=k[f>>2]|0;k[f>>2]=s+4;k[s>>2]=g;if(l>>>0>>0){g=l;while(1){h=i[g>>0]|0;x=0;j=Da(3)|0;s=x;x=0;if(s&1)break;x=0;h=Aa(39,h<<24>>24|0,j|0)|0;s=x;x=0;if(s&1)break;if(!h){s=l;break b}g=g+1|0;if(g>>>0>=c>>>0){s=l;break b}}g=Wa()|0;break a}else{s=l;g=l}}else t=11}while(0);c:do{if((t|0)==11)if(l>>>0>>0){g=l;while(1){h=i[g>>0]|0;x=0;j=Da(3)|0;s=x;x=0;if(s&1)break;x=0;h=Aa(40,h<<24>>24|0,j|0)|0;s=x;x=0;if(s&1)break;if(!h){s=l;break c}g=g+1|0;if(g>>>0>=c>>>0){s=l;break c}}g=Wa()|0;break a}else{s=l;g=l}}while(0);p=i[z>>0]|0;q=z+4|0;if(((p&1)==0?(p&255)>>>1:k[q>>2]|0)|0){if((s|0)!=(g|0)?(m=g+-1|0,s>>>0>>0):0){j=s;h=m;do{p=i[j>>0]|0;i[j>>0]=i[h>>0]|0;i[h>>0]=p;j=j+1|0;h=h+-1|0}while(j>>>0>>0)}x=0;m=ta(k[(k[u>>2]|0)+16>>2]|0,u|0)|0;p=x;x=0;if(p&1){t=8;break}n=z+8|0;o=z+1|0;d:do{if(s>>>0>>0){h=0;j=0;p=s;while(1){l=i[((i[z>>0]&1)==0?o:k[n>>2]|0)+j>>0]|0;if(l<<24>>24>0&(h|0)==(l<<24>>24|0)){h=k[f>>2]|0;k[f>>2]=h+4;k[h>>2]=m;h=i[z>>0]|0;l=0;j=(j>>>0<(((h&1)==0?(h&255)>>>1:k[q>>2]|0)+-1|0)>>>0&1)+j|0}else l=h;x=0;h=Aa(k[(k[w>>2]|0)+44>>2]|0,w|0,i[p>>0]|0)|0;A=x;x=0;if(A&1)break;A=k[f>>2]|0;k[f>>2]=A+4;k[A>>2]=h;p=p+1|0;if(p>>>0>=g>>>0)break d;else h=l+1|0}g=Wa()|0;break a}}while(0);h=d+(s-a<<2)|0;l=k[f>>2]|0;if((h|0)!=(l|0)){j=l+-4|0;if(h>>>0>>0){do{A=k[h>>2]|0;k[h>>2]=k[j>>2];k[j>>2]=A;h=h+4|0;j=j+-4|0}while(h>>>0>>0);m=w;h=l}else{m=w;h=l}}else m=w}else{x=0;Ea(k[(k[w>>2]|0)+48>>2]|0,w|0,s|0,g|0,k[f>>2]|0)|0;A=x;x=0;if(A&1){t=8;break}h=(k[f>>2]|0)+(g-s<<2)|0;k[f>>2]=h;m=w}e:do{if(g>>>0>>0){while(1){h=i[g>>0]|0;if(h<<24>>24==46){j=g;break}x=0;j=Aa(k[(k[m>>2]|0)+44>>2]|0,w|0,h|0)|0;A=x;x=0;if(A&1){t=4;break}A=k[f>>2]|0;h=A+4|0;k[f>>2]=h;k[A>>2]=j;g=g+1|0;if(g>>>0>=c>>>0)break e}if((t|0)==4){g=Wa()|0;break a}x=0;g=ta(k[(k[u>>2]|0)+12>>2]|0,u|0)|0;A=x;x=0;if(A&1){t=8;break a}A=k[f>>2]|0;h=A+4|0;k[f>>2]=h;k[A>>2]=g;g=j+1|0}}while(0);x=0;Ea(k[(k[w>>2]|0)+48>>2]|0,w|0,g|0,c|0,h|0)|0;A=x;x=0;if(A&1)t=8;else{A=(k[f>>2]|0)+(v-g<<2)|0;k[f>>2]=A;k[e>>2]=(b|0)==(c|0)?A:d+(b-a<<2)|0;Sm(z);r=y;return}}}while(0);if((t|0)==8)g=Wa()|0;Sm(z);fb(g|0)}function Zp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+352|0;t=z+304|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+308|0;s=z+72|0;h=z+76|0;y=z+68|0;w=z+64|0;u=z+60|0;v=z+56|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58899,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,p[n>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<3)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(4,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(40,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function _p(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+192|0;j=o;a=o+180|0;m=o+160|0;n=o+12|0;h=o+8|0;l=o+4|0;i[a>>0]=i[58901]|0;i[a+1>>0]=i[58902]|0;i[a+2>>0]=i[58903]|0;i[a+3>>0]=i[58904]|0;i[a+4>>0]=i[58905]|0;i[a+5>>0]=i[58906]|0;f=fp()|0;k[j>>2]=e;a=av(m,20,f,a,j)|0;e=m+a|0;f=Fp(m,e,c)|0;g=tn(c)|0;k[h>>2]=g;x=0;h=Aa(37,h|0,44212)|0;p=x;x=0;if(p&1){p=Wa()|0;zm(g)|0;fb(p|0)}else{zm(g)|0;Zb[k[(k[h>>2]|0)+48>>2]&31](h,m,e,n)|0;p=n+(a<<2)|0;k[l>>2]=k[b>>2];k[j>>2]=k[l>>2];p=cv(j,n,(f|0)==(e|0)?p:n+(f-m<<2)|0,p,c,d)|0;r=o;return p|0}return 0}function $p(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0;C=r;r=r+32|0;v=C+16|0;u=C+12|0;z=C+8|0;w=C+4|0;y=C;m=tn(d)|0;k[z>>2]=m;x=0;z=Aa(37,z|0,44220)|0;t=x;x=0;if(t&1){C=Wa()|0;zm(m)|0;fb(C|0)}zm(m)|0;k[e>>2]=0;t=z+8|0;m=k[b>>2]|0;a:do{if((g|0)!=(h|0)){b:while(1){n=m;if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)?(Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0)==-1:0){k[b>>2]=0;m=0;n=0}}else m=0;q=(m|0)==0;p=k[c>>2]|0;o=p;do{if(p){if((k[p+12>>2]|0)==(k[p+16>>2]|0)?(Ob[k[(k[p>>2]|0)+36>>2]&127](p)|0)==-1:0){k[c>>2]=0;o=0;B=12;break}if(!q){B=13;break b}}else B=12}while(0);if((B|0)==12){B=0;if(q){B=13;break}else p=0}c:do{if((Qb[k[(k[z>>2]|0)+36>>2]&63](z,i[g>>0]|0,0)|0)<<24>>24==37){p=g+1|0;if((p|0)==(h|0)){B=17;break b}s=Qb[k[(k[z>>2]|0)+36>>2]&63](z,i[p>>0]|0,0)|0;switch(s<<24>>24){case 48:case 69:{q=g+2|0;if((q|0)==(h|0)){B=20;break b}g=p;p=Qb[k[(k[z>>2]|0)+36>>2]&63](z,i[q>>0]|0,0)|0;m=s;break}default:{p=s;m=0}}s=k[(k[a>>2]|0)+36>>2]|0;k[w>>2]=n;k[y>>2]=o;k[u>>2]=k[w>>2];k[v>>2]=k[y>>2];s=ac[s&15](a,u,v,d,e,f,p,m)|0;k[b>>2]=s;g=g+2|0}else{n=i[g>>0]|0;if(n<<24>>24>-1?(A=k[t>>2]|0,(j[A+(n<<24>>24<<1)>>1]&8192)!=0):0){do{g=g+1|0;if((g|0)==(h|0)){g=h;break}n=i[g>>0]|0;if(n<<24>>24<=-1)break}while((j[A+(n<<24>>24<<1)>>1]&8192)!=0);n=p;while(1){if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)?(Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0)==-1:0){k[b>>2]=0;m=0}}else m=0;o=(m|0)==0;do{if(p){if((k[p+12>>2]|0)!=(k[p+16>>2]|0))if(o){s=n;break}else break c;if((Ob[k[(k[p>>2]|0)+36>>2]&127](p)|0)!=-1)if(o^(n|0)==0){s=n;p=n;break}else break c;else{k[c>>2]=0;n=0;B=39;break}}else B=39}while(0);if((B|0)==39){B=0;if(o)break c;else{s=n;p=0}}o=m+12|0;n=k[o>>2]|0;q=m+16|0;if((n|0)==(k[q>>2]|0))n=Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0;else n=l[n>>0]|0;if((n&255)<<24>>24<=-1)break c;if(!(j[(k[t>>2]|0)+(n<<24>>24<<1)>>1]&8192))break c;n=k[o>>2]|0;if((n|0)==(k[q>>2]|0)){Ob[k[(k[m>>2]|0)+40>>2]&127](m)|0;n=s;continue}else{k[o>>2]=n+1;n=s;continue}}}o=m+12|0;n=k[o>>2]|0;p=m+16|0;if((n|0)==(k[p>>2]|0))n=Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0;else n=l[n>>0]|0;s=Vb[k[(k[z>>2]|0)+12>>2]&63](z,n&255)|0;if(s<<24>>24!=(Vb[k[(k[z>>2]|0)+12>>2]&63](z,i[g>>0]|0)|0)<<24>>24){B=57;break b}n=k[o>>2]|0;if((n|0)==(k[p>>2]|0))Ob[k[(k[m>>2]|0)+40>>2]&127](m)|0;else k[o>>2]=n+1;g=g+1|0}}while(0);m=k[b>>2]|0;if(!((g|0)!=(h|0)&(k[e>>2]|0)==0))break a}if((B|0)==13){k[e>>2]=4;break}else if((B|0)==17){k[e>>2]=4;break}else if((B|0)==20){k[e>>2]=4;break}else if((B|0)==57){k[e>>2]=4;m=k[b>>2]|0;break}}}while(0);if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)?(Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0)==-1:0){k[b>>2]=0;m=0}}else m=0;g=(m|0)==0;n=k[c>>2]|0;do{if(n){if((k[n+12>>2]|0)==(k[n+16>>2]|0)?(Ob[k[(k[n>>2]|0)+36>>2]&127](n)|0)==-1:0){k[c>>2]=0;B=67;break}if(!g)B=68}else B=67}while(0);if((B|0)==67?g:0)B=68;if((B|0)==68)k[e>>2]=k[e>>2]|2;r=C;return m|0}function aq(a){a=a|0;return}function bq(a){a=a|0;mj(a);return}function cq(a){a=a|0;return 2}function dq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=$p(a,i,h,d,e,f,58907,58915)|0;r=g;return a|0}function eq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0;g=r;r=r+16|0;h=g+12|0;j=g+8|0;m=g+4|0;l=g;n=a+8|0;n=Ob[k[(k[n>>2]|0)+20>>2]&127](n)|0;k[m>>2]=k[b>>2];k[l>>2]=k[c>>2];c=i[n>>0]|0;o=(c&1)==0;b=o?n+1|0:k[n+8>>2]|0;c=b+(o?(c&255)>>>1:k[n+4>>2]|0)|0;k[j>>2]=k[m>>2];k[h>>2]=k[l>>2];a=$p(a,j,h,d,e,f,b,c)|0;r=g;return a|0}function fq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44220)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];gq(a,f+24|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function gq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[k[a>>2]>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Hu(c,h,a,a+168|0,f,e,0)|0)-a|0;if((c|0)<168)k[b>>2]=((c|0)/12|0|0)%7|0;r=g;return}function hq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44220)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];iq(a,f+16|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function iq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[(k[a>>2]|0)+4>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Hu(c,h,a,a+288|0,f,e,0)|0)-a|0;if((c|0)<288)k[b>>2]=((c|0)/12|0|0)%12|0;r=g;return}function jq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44220)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];kq(a,f+20|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function kq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,4)|0;if(!(k[e>>2]&4)){if((a|0)<69)a=a+2e3|0;else a=(a+-69|0)>>>0<31?a+1900|0:a;k[b>>2]=a+-1900}r=g;return}function lq(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=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;U=r;r=r+144|0;j=U+132|0;h=U+116|0;N=U+128|0;w=U+124|0;I=U+120|0;O=U+112|0;P=U+108|0;Q=U+104|0;R=U+100|0;S=U+96|0;T=U+92|0;l=U+88|0;m=U+84|0;n=U+80|0;o=U+76|0;p=U+72|0;q=U+68|0;s=U+64|0;t=U+60|0;u=U+56|0;v=U+52|0;y=U+48|0;z=U+44|0;A=U+40|0;B=U+36|0;C=U+32|0;D=U+28|0;E=U+24|0;F=U+20|0;G=U+16|0;H=U+12|0;J=U+8|0;K=U+4|0;L=U;k[e>>2]=0;M=tn(d)|0;k[N>>2]=M;x=0;N=Aa(37,N|0,44220)|0;W=x;x=0;if(W&1){W=Wa()|0;zm(M)|0;fb(W|0)}zm(M)|0;do{switch(g<<24>>24|0){case 65:case 97:{k[w>>2]=k[c>>2];k[j>>2]=k[w>>2];gq(a,f+24|0,b,j,e,N);V=28;break}case 104:case 66:case 98:{k[I>>2]=k[c>>2];k[j>>2]=k[I>>2];iq(a,f+16|0,b,j,e,N);V=28;break}case 99:{V=a+8|0;V=Ob[k[(k[V>>2]|0)+12>>2]&127](V)|0;k[O>>2]=k[b>>2];k[P>>2]=k[c>>2];g=i[V>>0]|0;c=(g&1)==0;W=c?V+1|0:k[V+8>>2]|0;V=W+(c?(g&255)>>>1:k[V+4>>2]|0)|0;k[h>>2]=k[O>>2];k[j>>2]=k[P>>2];V=$p(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 101:case 100:{k[Q>>2]=k[c>>2];k[j>>2]=k[Q>>2];mq(a,f+12|0,b,j,e,N);V=28;break}case 68:{k[R>>2]=k[b>>2];k[S>>2]=k[c>>2];k[h>>2]=k[R>>2];k[j>>2]=k[S>>2];V=$p(a,h,j,d,e,f,58915,58923)|0;k[b>>2]=V;V=28;break}case 70:{k[T>>2]=k[b>>2];k[l>>2]=k[c>>2];k[h>>2]=k[T>>2];k[j>>2]=k[l>>2];V=$p(a,h,j,d,e,f,58923,58931)|0;k[b>>2]=V;V=28;break}case 72:{k[m>>2]=k[c>>2];k[j>>2]=k[m>>2];nq(a,f+8|0,b,j,e,N);V=28;break}case 73:{k[n>>2]=k[c>>2];k[j>>2]=k[n>>2];oq(a,f+8|0,b,j,e,N);V=28;break}case 106:{k[o>>2]=k[c>>2];k[j>>2]=k[o>>2];pq(a,f+28|0,b,j,e,N);V=28;break}case 109:{k[p>>2]=k[c>>2];k[j>>2]=k[p>>2];qq(a,f+16|0,b,j,e,N);V=28;break}case 77:{k[q>>2]=k[c>>2];k[j>>2]=k[q>>2];rq(a,f+4|0,b,j,e,N);V=28;break}case 116:case 110:{k[s>>2]=k[c>>2];k[j>>2]=k[s>>2];sq(a,b,j,e,N);V=28;break}case 112:{k[t>>2]=k[c>>2];k[j>>2]=k[t>>2];tq(a,f+8|0,b,j,e,N);V=28;break}case 114:{k[u>>2]=k[b>>2];k[v>>2]=k[c>>2];k[h>>2]=k[u>>2];k[j>>2]=k[v>>2];V=$p(a,h,j,d,e,f,58931,58942)|0;k[b>>2]=V;V=28;break}case 82:{k[y>>2]=k[b>>2];k[z>>2]=k[c>>2];k[h>>2]=k[y>>2];k[j>>2]=k[z>>2];V=$p(a,h,j,d,e,f,58942,58947)|0;k[b>>2]=V;V=28;break}case 83:{k[A>>2]=k[c>>2];k[j>>2]=k[A>>2];uq(a,f,b,j,e,N);V=28;break}case 84:{k[B>>2]=k[b>>2];k[C>>2]=k[c>>2];k[h>>2]=k[B>>2];k[j>>2]=k[C>>2];V=$p(a,h,j,d,e,f,58947,58955)|0;k[b>>2]=V;V=28;break}case 119:{k[D>>2]=k[c>>2];k[j>>2]=k[D>>2];vq(a,f+24|0,b,j,e,N);V=28;break}case 120:{W=k[(k[a>>2]|0)+20>>2]|0;k[E>>2]=k[b>>2];k[F>>2]=k[c>>2];k[h>>2]=k[E>>2];k[j>>2]=k[F>>2];h=Nb[W&63](a,h,j,d,e,f)|0;break}case 88:{V=a+8|0;V=Ob[k[(k[V>>2]|0)+24>>2]&127](V)|0;k[G>>2]=k[b>>2];k[H>>2]=k[c>>2];g=i[V>>0]|0;c=(g&1)==0;W=c?V+1|0:k[V+8>>2]|0;V=W+(c?(g&255)>>>1:k[V+4>>2]|0)|0;k[h>>2]=k[G>>2];k[j>>2]=k[H>>2];V=$p(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 121:{k[J>>2]=k[c>>2];k[j>>2]=k[J>>2];kq(a,f+20|0,b,j,e,N);V=28;break}case 89:{k[K>>2]=k[c>>2];k[j>>2]=k[K>>2];wq(a,f+20|0,b,j,e,N);V=28;break}case 37:{k[L>>2]=k[c>>2];k[j>>2]=k[L>>2];xq(a,b,j,e,N);V=28;break}default:{k[e>>2]=k[e>>2]|4;V=28}}}while(0);if((V|0)==28)h=k[b>>2]|0;r=U;return h|0}function mq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<31&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function nq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<24&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function oq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<12&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function pq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,3)|0;c=k[e>>2]|0;if((a|0)<366&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function qq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<13&(c&4|0)==0)k[b>>2]=a+-1;else k[e>>2]=c|4;r=g;return}function rq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<60&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function sq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=e+8|0;a:while(1){e=k[b>>2]|0;do{if(e){if((k[e+12>>2]|0)==(k[e+16>>2]|0))if((Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0)==-1){k[b>>2]=0;e=0;break}else{e=k[b>>2]|0;break}}else e=0}while(0);e=(e|0)==0;a=k[c>>2]|0;do{if(a){if((k[a+12>>2]|0)!=(k[a+16>>2]|0))if(e)break;else break a;if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)!=-1)if(e)break;else break a;else{k[c>>2]=0;h=12;break}}else h=12}while(0);if((h|0)==12){h=0;if(e){a=0;break}else a=0}e=k[b>>2]|0;f=k[e+12>>2]|0;if((f|0)==(k[e+16>>2]|0))e=Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0;else e=l[f>>0]|0;if((e&255)<<24>>24<=-1)break;if(!(j[(k[g>>2]|0)+(e<<24>>24<<1)>>1]&8192))break;e=k[b>>2]|0;a=e+12|0;f=k[a>>2]|0;if((f|0)==(k[e+16>>2]|0)){Ob[k[(k[e>>2]|0)+40>>2]&127](e)|0;continue}else{k[a>>2]=f+1;continue}}e=k[b>>2]|0;do{if(e){if((k[e+12>>2]|0)==(k[e+16>>2]|0))if((Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0)==-1){k[b>>2]=0;e=0;break}else{e=k[b>>2]|0;break}}else e=0}while(0);e=(e|0)==0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)?(Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1:0){k[c>>2]=0;h=32;break}if(!e)h=33}else h=32}while(0);if((h|0)==32?e:0)h=33;if((h|0)==33)k[d>>2]=k[d>>2]|2;return}function tq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0;m=r;r=r+16|0;h=m+4|0;j=m;l=a+8|0;l=Ob[k[(k[l>>2]|0)+8>>2]&127](l)|0;a=i[l>>0]|0;if(!(a&1))g=(a&255)>>>1;else g=k[l+4>>2]|0;a=i[l+12>>0]|0;if(!(a&1))a=(a&255)>>>1;else a=k[l+16>>2]|0;do{if((g|0)!=(0-a|0)){k[j>>2]=k[d>>2];k[h>>2]=k[j>>2];a=Hu(c,h,l,l+24|0,f,e,0)|0;g=k[b>>2]|0;if((a|0)==(l|0)&(g|0)==12){k[b>>2]=0;break}if((g|0)<12&(a-l|0)==12)k[b>>2]=g+12}else k[e>>2]=k[e>>2]|4}while(0);r=m;return}function uq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<61&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function vq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,1)|0;c=k[e>>2]|0;if((a|0)<7&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function wq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=dv(c,a,e,f,4)|0;if(!(k[e>>2]&4))k[b>>2]=a+-1900;r=g;return}function xq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a=k[b>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0))if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}else a=0}while(0);f=(a|0)==0;a=k[c>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)?(Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1:0){k[c>>2]=0;h=11;break}if(f){g=a;h=13}else h=12}else h=11}while(0);if((h|0)==11)if(f)h=12;else{g=0;h=13}a:do{if((h|0)==12)k[d>>2]=k[d>>2]|6;else if((h|0)==13){a=k[b>>2]|0;f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=l[f>>0]|0;if((Qb[k[(k[e>>2]|0)+36>>2]&63](e,a&255,0)|0)<<24>>24!=37){k[d>>2]=k[d>>2]|4;break}a=k[b>>2]|0;f=a+12|0;e=k[f>>2]|0;if((e|0)==(k[a+16>>2]|0)){Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;a=k[b>>2]|0;if(!a)a=0;else h=21}else{k[f>>2]=e+1;h=21}do{if((h|0)==21)if((k[a+12>>2]|0)==(k[a+16>>2]|0))if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}while(0);a=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)?(Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0)==-1:0){k[c>>2]=0;h=30;break}if(a)break a}else h=30}while(0);if((h|0)==30?!a:0)break;k[d>>2]=k[d>>2]|2}}while(0);return}function yq(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;w=r;r=r+32|0;q=w+16|0;p=w+12|0;u=w+8|0;s=w+4|0;t=w;i=tn(d)|0;k[u>>2]=i;x=0;u=Aa(37,u|0,44212)|0;o=x;x=0;if(o&1){w=Wa()|0;zm(i)|0;fb(w|0)}zm(i)|0;k[e>>2]=0;i=k[b>>2]|0;a:do{if((g|0)!=(h|0)){b:while(1){l=i;if(i){j=k[i+12>>2]|0;if((j|0)==(k[i+16>>2]|0))j=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else j=k[j>>2]|0;if((j|0)==-1){k[b>>2]=0;i=0;n=1;o=0}else{n=0;o=l}}else{i=0;n=1;o=l}m=k[c>>2]|0;j=m;do{if(m){l=k[m+12>>2]|0;if((l|0)==(k[m+16>>2]|0))l=Ob[k[(k[m>>2]|0)+36>>2]&127](m)|0;else l=k[l>>2]|0;if((l|0)!=-1)if(n)break;else{v=17;break b}else{k[c>>2]=0;j=0;v=15;break}}else v=15}while(0);if((v|0)==15){v=0;if(n){v=17;break}else m=0}c:do{if((Qb[k[(k[u>>2]|0)+52>>2]&63](u,k[g>>2]|0,0)|0)<<24>>24==37){l=g+4|0;if((l|0)==(h|0)){v=21;break b}n=Qb[k[(k[u>>2]|0)+52>>2]&63](u,k[l>>2]|0,0)|0;switch(n<<24>>24){case 48:case 69:{m=g+8|0;if((m|0)==(h|0)){v=24;break b}g=l;l=Qb[k[(k[u>>2]|0)+52>>2]&63](u,k[m>>2]|0,0)|0;i=n;break}default:{l=n;i=0}}n=k[(k[a>>2]|0)+36>>2]|0;k[s>>2]=o;k[t>>2]=j;k[p>>2]=k[s>>2];k[q>>2]=k[t>>2];o=ac[n&15](a,p,q,d,e,f,l,i)|0;k[b>>2]=o;g=g+8|0}else{if(!(Qb[k[(k[u>>2]|0)+12>>2]&63](u,8192,k[g>>2]|0)|0)){l=i+12|0;j=k[l>>2]|0;m=i+16|0;if((j|0)==(k[m>>2]|0))j=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else j=k[j>>2]|0;o=Vb[k[(k[u>>2]|0)+28>>2]&63](u,j)|0;if((o|0)!=(Vb[k[(k[u>>2]|0)+28>>2]&63](u,k[g>>2]|0)|0)){v=61;break b}j=k[l>>2]|0;if((j|0)==(k[m>>2]|0))Ob[k[(k[i>>2]|0)+40>>2]&127](i)|0;else k[l>>2]=j+4;g=g+4|0;break}do{g=g+4|0;if((g|0)==(h|0)){g=h;break}}while(Qb[k[(k[u>>2]|0)+12>>2]&63](u,8192,k[g>>2]|0)|0);j=m;n=m;while(1){if(i){l=k[i+12>>2]|0;if((l|0)==(k[i+16>>2]|0))l=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else l=k[l>>2]|0;if((l|0)==-1){k[b>>2]=0;m=1;i=0}else m=0}else{m=1;i=0}do{if(n){l=k[n+12>>2]|0;if((l|0)==(k[n+16>>2]|0))l=Ob[k[(k[n>>2]|0)+36>>2]&127](n)|0;else l=k[l>>2]|0;if((l|0)!=-1)if(m^(j|0)==0){o=j;n=j;break}else break c;else{k[c>>2]=0;j=0;v=44;break}}else v=44}while(0);if((v|0)==44){v=0;if(m)break c;else{o=j;n=0}}l=i+12|0;j=k[l>>2]|0;m=i+16|0;if((j|0)==(k[m>>2]|0))j=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else j=k[j>>2]|0;if(!(Qb[k[(k[u>>2]|0)+12>>2]&63](u,8192,j)|0))break c;j=k[l>>2]|0;if((j|0)==(k[m>>2]|0)){Ob[k[(k[i>>2]|0)+40>>2]&127](i)|0;j=o;continue}else{k[l>>2]=j+4;j=o;continue}}}}while(0);i=k[b>>2]|0;if(!((g|0)!=(h|0)&(k[e>>2]|0)==0))break a}if((v|0)==17){k[e>>2]=4;break}else if((v|0)==21){k[e>>2]=4;break}else if((v|0)==24){k[e>>2]=4;break}else if((v|0)==61){k[e>>2]=4;i=k[b>>2]|0;break}}}while(0);if(i){g=k[i+12>>2]|0;if((g|0)==(k[i+16>>2]|0))g=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else g=k[g>>2]|0;if((g|0)==-1){k[b>>2]=0;i=0;l=1}else l=0}else{i=0;l=1}g=k[c>>2]|0;do{if(g){j=k[g+12>>2]|0;if((j|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=k[j>>2]|0;if((g|0)!=-1)if(l)break;else{v=76;break}else{k[c>>2]=0;v=74;break}}else v=74}while(0);if((v|0)==74?l:0)v=76;if((v|0)==76)k[e>>2]=k[e>>2]|2;r=w;return i|0}function zq(a){a=a|0;return}function Aq(a){a=a|0;mj(a);return}function Bq(a){a=a|0;return 2}function Cq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=yq(a,i,h,d,e,f,44788,44820)|0;r=g;return a|0}function Dq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;g=r;r=r+16|0;h=g+12|0;j=g+8|0;m=g+4|0;l=g;p=a+8|0;p=Ob[k[(k[p>>2]|0)+20>>2]&127](p)|0;k[m>>2]=k[b>>2];k[l>>2]=k[c>>2];n=i[p>>0]|0;o=(n&1)==0;c=p+4|0;b=o?c:k[p+8>>2]|0;c=b+((o?(n&255)>>>1:k[c>>2]|0)<<2)|0;k[j>>2]=k[m>>2];k[h>>2]=k[l>>2];a=yq(a,j,h,d,e,f,b,c)|0;r=g;return a|0}function Eq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44212)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];Fq(a,f+24|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function Fq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[k[a>>2]>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Su(c,h,a,a+168|0,f,e,0)|0)-a|0;if((c|0)<168)k[b>>2]=((c|0)/12|0|0)%7|0;r=g;return}function Gq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44212)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];Hq(a,f+16|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function Hq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=r;r=r+16|0;h=g+4|0;i=g;a=a+8|0;a=Ob[k[(k[a>>2]|0)+4>>2]&127](a)|0;k[i>>2]=k[d>>2];k[h>>2]=k[i>>2];c=(Su(c,h,a,a+288|0,f,e,0)|0)-a|0;if((c|0)<288)k[b>>2]=((c|0)/12|0|0)%12|0;r=g;return}function Iq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j+4|0;i=j;d=tn(d)|0;k[g>>2]=d;x=0;g=Aa(37,g|0,44212)|0;l=x;x=0;if(l&1){l=Wa()|0;zm(d)|0;fb(l|0)}else{zm(d)|0;k[i>>2]=k[c>>2];k[h>>2]=k[i>>2];Jq(a,f+20|0,b,h,e,g);r=j;return k[b>>2]|0}return 0}function Jq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,4)|0;if(!(k[e>>2]&4)){if((a|0)<69)a=a+2e3|0;else a=(a+-69|0)>>>0<31?a+1900|0:a;k[b>>2]=a+-1900}r=g;return}function Kq(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=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;U=r;r=r+144|0;j=U+132|0;h=U+116|0;N=U+128|0;w=U+124|0;I=U+120|0;O=U+112|0;P=U+108|0;Q=U+104|0;R=U+100|0;S=U+96|0;T=U+92|0;l=U+88|0;m=U+84|0;n=U+80|0;o=U+76|0;p=U+72|0;q=U+68|0;s=U+64|0;t=U+60|0;u=U+56|0;v=U+52|0;y=U+48|0;z=U+44|0;A=U+40|0;B=U+36|0;C=U+32|0;D=U+28|0;E=U+24|0;F=U+20|0;G=U+16|0;H=U+12|0;J=U+8|0;K=U+4|0;L=U;k[e>>2]=0;M=tn(d)|0;k[N>>2]=M;x=0;N=Aa(37,N|0,44212)|0;W=x;x=0;if(W&1){W=Wa()|0;zm(M)|0;fb(W|0)}zm(M)|0;do{switch(g<<24>>24|0){case 65:case 97:{k[w>>2]=k[c>>2];k[j>>2]=k[w>>2];Fq(a,f+24|0,b,j,e,N);V=28;break}case 104:case 66:case 98:{k[I>>2]=k[c>>2];k[j>>2]=k[I>>2];Hq(a,f+16|0,b,j,e,N);V=28;break}case 99:{W=a+8|0;W=Ob[k[(k[W>>2]|0)+12>>2]&127](W)|0;k[O>>2]=k[b>>2];k[P>>2]=k[c>>2];g=i[W>>0]|0;c=(g&1)==0;V=W+4|0;W=c?V:k[W+8>>2]|0;V=W+((c?(g&255)>>>1:k[V>>2]|0)<<2)|0;k[h>>2]=k[O>>2];k[j>>2]=k[P>>2];V=yq(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 101:case 100:{k[Q>>2]=k[c>>2];k[j>>2]=k[Q>>2];Lq(a,f+12|0,b,j,e,N);V=28;break}case 68:{k[R>>2]=k[b>>2];k[S>>2]=k[c>>2];k[h>>2]=k[R>>2];k[j>>2]=k[S>>2];V=yq(a,h,j,d,e,f,44820,44852)|0;k[b>>2]=V;V=28;break}case 70:{k[T>>2]=k[b>>2];k[l>>2]=k[c>>2];k[h>>2]=k[T>>2];k[j>>2]=k[l>>2];V=yq(a,h,j,d,e,f,44852,44884)|0;k[b>>2]=V;V=28;break}case 72:{k[m>>2]=k[c>>2];k[j>>2]=k[m>>2];Mq(a,f+8|0,b,j,e,N);V=28;break}case 73:{k[n>>2]=k[c>>2];k[j>>2]=k[n>>2];Nq(a,f+8|0,b,j,e,N);V=28;break}case 106:{k[o>>2]=k[c>>2];k[j>>2]=k[o>>2];Oq(a,f+28|0,b,j,e,N);V=28;break}case 109:{k[p>>2]=k[c>>2];k[j>>2]=k[p>>2];Pq(a,f+16|0,b,j,e,N);V=28;break}case 77:{k[q>>2]=k[c>>2];k[j>>2]=k[q>>2];Qq(a,f+4|0,b,j,e,N);V=28;break}case 116:case 110:{k[s>>2]=k[c>>2];k[j>>2]=k[s>>2];Rq(a,b,j,e,N);V=28;break}case 112:{k[t>>2]=k[c>>2];k[j>>2]=k[t>>2];Sq(a,f+8|0,b,j,e,N);V=28;break}case 114:{k[u>>2]=k[b>>2];k[v>>2]=k[c>>2];k[h>>2]=k[u>>2];k[j>>2]=k[v>>2];V=yq(a,h,j,d,e,f,44884,44928)|0;k[b>>2]=V;V=28;break}case 82:{k[y>>2]=k[b>>2];k[z>>2]=k[c>>2];k[h>>2]=k[y>>2];k[j>>2]=k[z>>2];V=yq(a,h,j,d,e,f,44928,44948)|0;k[b>>2]=V;V=28;break}case 83:{k[A>>2]=k[c>>2];k[j>>2]=k[A>>2];Tq(a,f,b,j,e,N);V=28;break}case 84:{k[B>>2]=k[b>>2];k[C>>2]=k[c>>2];k[h>>2]=k[B>>2];k[j>>2]=k[C>>2];V=yq(a,h,j,d,e,f,44948,44980)|0;k[b>>2]=V;V=28;break}case 119:{k[D>>2]=k[c>>2];k[j>>2]=k[D>>2];Uq(a,f+24|0,b,j,e,N);V=28;break}case 120:{W=k[(k[a>>2]|0)+20>>2]|0;k[E>>2]=k[b>>2];k[F>>2]=k[c>>2];k[h>>2]=k[E>>2];k[j>>2]=k[F>>2];h=Nb[W&63](a,h,j,d,e,f)|0;break}case 88:{W=a+8|0;W=Ob[k[(k[W>>2]|0)+24>>2]&127](W)|0;k[G>>2]=k[b>>2];k[H>>2]=k[c>>2];g=i[W>>0]|0;c=(g&1)==0;V=W+4|0;W=c?V:k[W+8>>2]|0;V=W+((c?(g&255)>>>1:k[V>>2]|0)<<2)|0;k[h>>2]=k[G>>2];k[j>>2]=k[H>>2];V=yq(a,h,j,d,e,f,W,V)|0;k[b>>2]=V;V=28;break}case 121:{k[J>>2]=k[c>>2];k[j>>2]=k[J>>2];Jq(a,f+20|0,b,j,e,N);V=28;break}case 89:{k[K>>2]=k[c>>2];k[j>>2]=k[K>>2];Vq(a,f+20|0,b,j,e,N);V=28;break}case 37:{k[L>>2]=k[c>>2];k[j>>2]=k[L>>2];Wq(a,b,j,e,N);V=28;break}default:{k[e>>2]=k[e>>2]|4;V=28}}}while(0);if((V|0)==28)h=k[b>>2]|0;r=U;return h|0}function Lq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<31&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Mq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<24&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Nq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a+-1|0)>>>0<12&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Oq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,3)|0;c=k[e>>2]|0;if((a|0)<366&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Pq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<13&(c&4|0)==0)k[b>>2]=a+-1;else k[e>>2]=c|4;r=g;return}function Qq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<60&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Rq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a:while(1){a=k[b>>2]|0;do{if(a){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;g=1;break}else{g=(k[b>>2]|0)==0;break}}else g=1}while(0);f=k[c>>2]|0;do{if(f){a=k[f+12>>2]|0;if((a|0)==(k[f+16>>2]|0))a=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(g){g=f;break}else{g=f;break a}else{k[c>>2]=0;h=15;break}}else h=15}while(0);if((h|0)==15){h=0;if(g){g=0;break}else g=0}a=k[b>>2]|0;f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if(!(Qb[k[(k[e>>2]|0)+12>>2]&63](e,8192,a)|0))break;a=k[b>>2]|0;f=a+12|0;g=k[f>>2]|0;if((g|0)==(k[a+16>>2]|0)){Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;continue}else{k[f>>2]=g+4;continue}}a=k[b>>2]|0;do{if(a){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;f=1;break}else{f=(k[b>>2]|0)==0;break}}else f=1}while(0);do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0))a=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(f)break;else{h=39;break}else{k[c>>2]=0;h=37;break}}else h=37}while(0);if((h|0)==37?f:0)h=39;if((h|0)==39)k[d>>2]=k[d>>2]|2;return}function Sq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0;m=r;r=r+16|0;h=m+4|0;j=m;l=a+8|0;l=Ob[k[(k[l>>2]|0)+8>>2]&127](l)|0;a=i[l>>0]|0;if(!(a&1))g=(a&255)>>>1;else g=k[l+4>>2]|0;a=i[l+12>>0]|0;if(!(a&1))a=(a&255)>>>1;else a=k[l+16>>2]|0;do{if((g|0)!=(0-a|0)){k[j>>2]=k[d>>2];k[h>>2]=k[j>>2];a=Su(c,h,l,l+24|0,f,e,0)|0;g=k[b>>2]|0;if((a|0)==(l|0)&(g|0)==12){k[b>>2]=0;break}if((g|0)<12&(a-l|0)==12)k[b>>2]=g+12}else k[e>>2]=k[e>>2]|4}while(0);r=m;return}function Tq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,2)|0;c=k[e>>2]|0;if((a|0)<61&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Uq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,1)|0;c=k[e>>2]|0;if((a|0)<7&(c&4|0)==0)k[b>>2]=a;else k[e>>2]=c|4;r=g;return}function Vq(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=r;r=r+16|0;a=g+4|0;h=g;k[h>>2]=k[d>>2];k[a>>2]=k[h>>2];a=ev(c,a,e,f,4)|0;if(!(k[e>>2]&4))k[b>>2]=a+-1900;r=g;return}function Wq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;a=k[b>>2]|0;do{if(a){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;g=1;break}else{g=(k[b>>2]|0)==0;break}}else g=1}while(0);f=k[c>>2]|0;do{if(f){a=k[f+12>>2]|0;if((a|0)==(k[f+16>>2]|0))a=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(g){h=f;i=17;break}else{i=16;break}else{k[c>>2]=0;i=14;break}}else i=14}while(0);if((i|0)==14)if(g)i=16;else{h=0;i=17}a:do{if((i|0)==16)k[d>>2]=k[d>>2]|6;else if((i|0)==17){a=k[b>>2]|0;f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((Qb[k[(k[e>>2]|0)+52>>2]&63](e,a,0)|0)<<24>>24!=37){k[d>>2]=k[d>>2]|4;break}a=k[b>>2]|0;f=a+12|0;g=k[f>>2]|0;if((g|0)==(k[a+16>>2]|0)){Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;a=k[b>>2]|0;if(!a)f=1;else i=25}else{k[f>>2]=g+4;i=25}do{if((i|0)==25){f=k[a+12>>2]|0;if((f|0)==(k[a+16>>2]|0))a=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;else a=k[f>>2]|0;if((a|0)==-1){k[b>>2]=0;f=1;break}else{f=(k[b>>2]|0)==0;break}}}while(0);do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0))a=Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0;else a=k[a>>2]|0;if((a|0)!=-1)if(f)break a;else break;else{k[c>>2]=0;i=37;break}}else i=37}while(0);if((i|0)==37?!f:0)break;k[d>>2]=k[d>>2]|2}}while(0);return}function Xq(a){a=a|0;Yq(a+8|0);return}function Yq(a){a=a|0;var b=0,c=0,d=0;b=k[a>>2]|0;x=0;c=Da(3)|0;d=x;x=0;do{if(!(d&1)){if((b|0)!=(c|0)?(x=0,qa(188,k[a>>2]|0),d=x,x=0,d&1):0)break;return}}while(0);d=Wa(0)|0;oc(d)}function Zq(a){a=a|0;Yq(a+8|0);mj(a);return}function _q(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0;j=r;r=r+112|0;h=j+4|0;c=j;k[c>>2]=h+100;$q(a+8|0,h,c,e,f,g);e=k[c>>2]|0;c=k[b>>2]|0;if((h|0)!=(e|0))do{g=i[h>>0]|0;do{if(c){d=c+24|0;f=k[d>>2]|0;if((f|0)==(k[c+28>>2]|0)){b=(Vb[k[(k[c>>2]|0)+52>>2]&63](c,g&255)|0)==-1;c=b?0:c;break}else{k[d>>2]=f+1;i[f>>0]=g;break}}else c=0}while(0);h=h+1|0}while((h|0)!=(e|0));r=j;return c|0}function $q(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0;l=r;r=r+16|0;j=l;i[j>>0]=37;g=j+1|0;i[g>>0]=e;h=j+2|0;i[h>>0]=f;i[j+3>>0]=0;if(f<<24>>24){i[g>>0]=f;i[h>>0]=e}a=b+(_a(b|0,(k[c>>2]|0)-b|0,j|0,d|0,k[a>>2]|0)|0)|0;k[c>>2]=a;r=l;return}function ar(a){a=a|0;Yq(a+8|0);return}function br(a){a=a|0;Yq(a+8|0);mj(a);return}function cr(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;h=r;r=r+416|0;d=h+8|0;c=h;k[c>>2]=d+400;dr(a+8|0,d,c,e,f,g);a=k[c>>2]|0;c=k[b>>2]|0;if((d|0)!=(a|0)){e=d;do{d=k[e>>2]|0;if(!c)c=0;else{f=c+24|0;g=k[f>>2]|0;if((g|0)==(k[c+28>>2]|0))d=Vb[k[(k[c>>2]|0)+52>>2]&63](c,d)|0;else{k[f>>2]=g+4;k[g>>2]=d}c=(d|0)==-1?0:c}e=e+4|0}while((e|0)!=(a|0))}r=h;return c|0}function dr(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+128|0;j=g+16|0;l=g+12|0;h=g;i=g+8|0;k[l>>2]=j+100;$q(a,j,l,d,e,f);e=h;k[e>>2]=0;k[e+4>>2]=0;k[i>>2]=j;e=(k[c>>2]|0)-b>>2;f=Ak(k[a>>2]|0)|0;x=0;e=Ea(18,b|0,i|0,e|0,h|0)|0;a=x;x=0;if(a&1){e=Wa()|0;if((f|0)!=0?(x=0,ta(75,f|0)|0,l=x,x=0,l&1):0){l=Wa(0)|0;oc(l)}fb(e|0)}if((f|0)!=0?(x=0,ta(75,f|0)|0,l=x,x=0,l&1):0){l=Wa(0)|0;oc(l)}if((e|0)==-1)$r(58955);else{k[c>>2]=b+(e<<2);r=g;return}}function er(a){a=a|0;return}function fr(a){a=a|0;mj(a);return}function gr(a){a=a|0;return 127}function hr(a){a=a|0;return 127}function ir(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function jr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function kr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function lr(a,b){a=a|0;b=b|0;Rm(a,1,45);return}function mr(a){a=a|0;return 0}function nr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function or(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function pr(a){a=a|0;return}function qr(a){a=a|0;mj(a);return}function rr(a){a=a|0;return 127}function sr(a){a=a|0;return 127}function tr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function ur(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function vr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function wr(a,b){a=a|0;b=b|0;Rm(a,1,45);return}function xr(a){a=a|0;return 0}function yr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function zr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Ar(a){a=a|0;return}function Br(a){a=a|0;mj(a);return}function Cr(a){a=a|0;return 2147483647}function Dr(a){a=a|0;return 2147483647}function Er(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Fr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Gr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Hr(a,b){a=a|0;b=b|0;dn(a,1,45);return}function Ir(a){a=a|0;return 0}function Jr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Kr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Lr(a){a=a|0;return}function Mr(a){a=a|0;mj(a);return}function Nr(a){a=a|0;return 2147483647}function Or(a){a=a|0;return 2147483647}function Pr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Qr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Rr(a,b){a=a|0;b=b|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function Sr(a,b){a=a|0;b=b|0;dn(a,1,45);return}function Tr(a){a=a|0;return 0}function Ur(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Vr(a,b){a=a|0;b=b|0;i[a>>0]=2;i[a+1>>0]=3;i[a+2>>0]=0;i[a+3>>0]=4;return}function Wr(a){a=a|0;return}function Xr(a){a=a|0;mj(a);return}function Yr(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;B=r;r=r+240|0;z=B+24|0;A=B;a=B+136|0;D=B+16|0;y=B+12|0;C=B+8|0;n=B+134|0;j=B+4|0;w=B+124|0;k[D>>2]=a;E=D+4|0;k[E>>2]=189;l=a+100|0;x=0;h=ta(68,e|0)|0;v=x;x=0;if(!(v&1)){k[C>>2]=h;x=0;a=Aa(37,C|0,44220)|0;v=x;x=0;a:do{if(!(v&1)?(i[n>>0]=0,k[j>>2]=k[c>>2],m=k[e+4>>2]|0,x=0,k[z>>2]=k[j>>2],m=ua(1,b|0,z|0,d|0,C|0,m|0,f|0,n|0,a|0,D|0,y|0,l|0)|0,v=x,x=0,!(v&1)):0){b:do{if(m){x=0;Ea(k[(k[a>>2]|0)+32>>2]|0,a|0,58976,58986,w|0)|0;v=x;x=0;if(v&1){G=10;break a}j=k[y>>2]|0;l=k[D>>2]|0;a=j-l|0;if((a|0)>98){a=Pl(a+2|0)|0;h=a;if(!a){x=0;Ga(6);v=x;x=0;if(!(v&1)){a=0;G=13}}else G=13}else{h=0;a=z;G=13}do{if((G|0)==13){if(i[n>>0]|0){i[a>>0]=45;a=a+1|0}u=w+10|0;v=w;if(l>>>0>>0){m=w+1|0;d=m+1|0;e=d+1|0;n=e+1|0;o=n+1|0;p=o+1|0;q=p+1|0;s=q+1|0;t=s+1|0;do{j=i[l>>0]|0;do{if((i[w>>0]|0)!=j<<24>>24)if((i[m>>0]|0)!=j<<24>>24)if((i[d>>0]|0)!=j<<24>>24)if((i[e>>0]|0)!=j<<24>>24)if((i[n>>0]|0)==j<<24>>24)j=n;else{if((i[o>>0]|0)==j<<24>>24){j=o;break}if((i[p>>0]|0)==j<<24>>24){j=p;break}if((i[q>>0]|0)==j<<24>>24){j=q;break}if((i[s>>0]|0)==j<<24>>24){j=s;break}j=(i[t>>0]|0)==j<<24>>24?t:u}else j=e;else j=d;else j=m;else j=w}while(0);i[a>>0]=i[58976+(j-v)>>0]|0;l=l+1|0;a=a+1|0}while(l>>>0<(k[y>>2]|0)>>>0)}i[a>>0]=0;k[A>>2]=g;if((jl(z,58987,A)|0)!=1?(x=0,qa(190,58991),g=x,x=0,g&1):0)break;if(h)Ql(h);break b}}while(0);a=Wa()|0;if(!h){j=a;h=D;break a}Ql(h);j=a;h=D;break a}}while(0);a=k[b>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}if((a|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}}else a=0}while(0);h=(a|0)==0;a=k[c>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}if((a|0)==-1){k[c>>2]=0;G=37;break}}if(!h)G=38}else G=37}while(0);if((G|0)==37?h:0)G=38;if((G|0)==38)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(k[C>>2]|0)|0;a=k[D>>2]|0;k[D>>2]=0;if((a|0)!=0?(x=0,qa(k[E>>2]|0,a|0),G=x,x=0,G&1):0){G=Wa(0)|0;oc(G)}r=B;return h|0}else G=10}while(0);if((G|0)==10){j=Wa()|0;h=D}zm(k[C>>2]|0)|0;a=k[h>>2]|0;k[h>>2]=0;if(!a)F=j;else{h=k[E>>2]|0;G=45}}else{j=Wa()|0;k[D>>2]=0;h=189;G=45}if((G|0)==45){x=0;qa(h|0,a|0);G=x;x=0;if(G&1){G=Wa(0)|0;oc(G)}else F=j}fb(F|0);return 0}function Zr(a){a=a|0;return}function _r(a,b,c,d,e,f,g,h,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,s=0,t=0,u=0,v=0,w=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;ba=r;r=r+512|0;P=ba+88|0;t=ba+96|0;da=ba+80|0;T=ba+72|0;S=ba+68|0;U=ba+500|0;Q=ba+497|0;V=ba+496|0;Y=ba+56|0;aa=ba+44|0;_=ba+32|0;Z=ba+20|0;$=ba+8|0;R=ba+4|0;X=ba;k[P>>2]=o;k[da>>2]=t;ca=da+4|0;k[ca>>2]=189;k[T>>2]=t;k[S>>2]=t+400;k[Y>>2]=0;k[Y+4>>2]=0;k[Y+8>>2]=0;k[aa>>2]=0;k[aa+4>>2]=0;k[aa+8>>2]=0;k[_>>2]=0;k[_+4>>2]=0;k[_+8>>2]=0;k[Z>>2]=0;k[Z+4>>2]=0;k[Z+8>>2]=0;k[$>>2]=0;k[$+4>>2]=0;k[$+8>>2]=0;x=0;za(1,c|0,d|0,U|0,Q|0,V|0,Y|0,aa|0,_|0,Z|0,R|0);O=x;x=0;a:do{if(O&1)h=Wa()|0;else{k[n>>2]=k[m>>2];I=h+8|0;J=_+4|0;K=Z+4|0;L=Z+8|0;M=Z+1|0;N=_+8|0;O=_+1|0;z=(e&512|0)!=0;A=aa+8|0;B=aa+1|0;C=aa+4|0;D=$+4|0;E=$+8|0;F=$+1|0;G=U+3|0;H=Y+4|0;y=0;s=0;b:while(1){o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);o=(o|0)==0;h=k[b>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(o){w=h;break}else{W=235;break b}x=0;c=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=24;break b}if((c|0)!=-1)if(o){w=h;break}else{W=235;break b}else{k[b>>2]=0;W=15;break}}else W=15}while(0);if((W|0)==15){W=0;if(o){W=235;break}else w=0}c:do{switch(i[U+y>>0]|0){case 1:{if((y|0)!=3){o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;W=x;x=0;if(W&1){W=24;break b}}else o=l[h>>0]|0;if((o&255)<<24>>24<=-1){W=40;break b}if(!(j[(k[I>>2]|0)+(o<<24>>24<<1)>>1]&8192)){W=40;break b}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;W=x;x=0;if(W&1){W=24;break b}}else{k[h>>2]=c+1;o=l[c>>0]|0}x=0;ra(67,$|0,o&255|0);W=x;x=0;if(W&1){W=24;break b}else{o=w;d=w;W=42}}break}case 0:{if((y|0)!=3){o=w;d=w;W=42}break}case 3:{h=i[_>>0]|0;o=(h&1)==0?(h&255)>>>1:k[J>>2]|0;c=i[Z>>0]|0;d=(c&1)==0?(c&255)>>>1:k[K>>2]|0;if((o|0)!=(0-d|0)){if(!o){o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}h=i[Z>>0]|0}else{o=l[h>>0]|0;h=c}if((o&255)<<24>>24!=(i[((h&1)==0?M:k[L>>2]|0)>>0]|0))break c;o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;i[g>>0]=1;w=i[Z>>0]|0;s=((w&1)==0?(w&255)>>>1:k[K>>2]|0)>>>0>1?Z:s;break c}e=k[a>>2]|0;p=k[e+12>>2]|0;c=k[e+16>>2]|0;o=(p|0)==(c|0);if(!d){if(o){x=0;o=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}h=i[_>>0]|0}else o=l[p>>0]|0;if((o&255)<<24>>24!=(i[((h&1)==0?O:k[N>>2]|0)>>0]|0)){i[g>>0]=1;break c}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;w=i[_>>0]|0;s=((w&1)==0?(w&255)>>>1:k[J>>2]|0)>>>0>1?_:s;break c}if(o){x=0;o=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}c=k[a>>2]|0;h=i[_>>0]|0;e=c;p=k[c+12>>2]|0;c=k[c+16>>2]|0}else o=l[p>>0]|0;d=e+12|0;c=(p|0)==(c|0);if((o&255)<<24>>24==(i[((h&1)==0?O:k[N>>2]|0)>>0]|0)){if(c){x=0;ta(k[(k[e>>2]|0)+40>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[d>>2]=p+1;w=i[_>>0]|0;s=((w&1)==0?(w&255)>>>1:k[J>>2]|0)>>>0>1?_:s;break c}if(c){x=0;o=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=24;break b}}else o=l[p>>0]|0;if((o&255)<<24>>24!=(i[((i[Z>>0]&1)==0?M:k[L>>2]|0)>>0]|0)){W=104;break b}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;i[g>>0]=1;w=i[Z>>0]|0;s=((w&1)==0?(w&255)>>>1:k[K>>2]|0)>>>0>1?Z:s}break}case 2:{if(!(y>>>0<2|(s|0)!=0)?!(z|(y|0)==2&(i[G>>0]|0)!=0):0){s=0;break c}u=i[aa>>0]|0;o=(u&1)==0;v=k[A>>2]|0;c=o?B:v;q=c;d:do{if((y|0)!=0?(l[U+(y+-1)>>0]|0)<2:0){p=o?(u&255)>>>1:k[C>>2]|0;d=c+p|0;e=k[I>>2]|0;e:do{if(!p)h=q;else{p=c;h=q;do{o=i[p>>0]|0;if(o<<24>>24<=-1)break e;if(!(j[e+(o<<24>>24<<1)>>1]&8192))break e;p=p+1|0;h=p}while((p|0)!=(d|0))}}while(0);d=h-q|0;e=i[$>>0]|0;o=(e&1)==0;e=o?(e&255)>>>1:k[D>>2]|0;if(e>>>0>=d>>>0){o=o?F:k[E>>2]|0;p=o+e|0;if((h|0)!=(q|0)){o=o+(e-d)|0;while(1){if((i[o>>0]|0)!=(i[c>>0]|0)){h=q;break d}o=o+1|0;if((o|0)==(p|0))break;else c=c+1|0}}}else h=q}else h=q}while(0);o=(u&1)==0;o=(o?B:v)+(o?(u&255)>>>1:k[C>>2]|0)|0;f:do{if((h|0)!=(o|0)){e=w;d=w;o=h;while(1){h=k[a>>2]|0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=21;break b}if((h|0)==-1){k[a>>2]=0;h=0;break}else{h=k[a>>2]|0;break}}}else h=0}while(0);c=(h|0)==0;do{if(d){if((k[d+12>>2]|0)!=(k[d+16>>2]|0))if(c){h=e;p=d;break}else break f;x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){W=21;break b}if((h|0)!=-1)if(c^(e|0)==0){h=e;p=e;break}else break f;else{k[b>>2]=0;h=0;W=131;break}}else{h=e;W=131}}while(0);if((W|0)==131){W=0;if(c)break f;else p=0}c=k[a>>2]|0;d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=21;break b}}else c=l[d>>0]|0;if((c&255)<<24>>24!=(i[o>>0]|0))break f;c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=21;break b}}else k[d>>2]=e+1;o=o+1|0;c=i[aa>>0]|0;w=(c&1)==0;c=(w?B:k[A>>2]|0)+(w?(c&255)>>>1:k[C>>2]|0)|0;if((o|0)==(c|0)){o=c;break}else{e=h;d=p}}}}while(0);if(z?(w=i[aa>>0]|0,v=(w&1)==0,(o|0)!=((v?B:k[A>>2]|0)+(v?(w&255)>>>1:k[C>>2]|0)|0)):0){W=143;break b}break}case 4:{q=i[V>>0]|0;h=w;e=w;o=0;g:while(1){c=k[a>>2]|0;do{if(c){if((k[c+12>>2]|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=23;break b}if((c|0)==-1){k[a>>2]=0;c=0;break}else{c=k[a>>2]|0;break}}}else c=0}while(0);d=(c|0)==0;do{if(e){if((k[e+12>>2]|0)!=(k[e+16>>2]|0))if(d){p=h;break}else{d=h;break g}x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){W=23;break b}if((c|0)!=-1)if(d^(h|0)==0){p=h;e=h;break}else{d=h;break g}else{k[b>>2]=0;h=0;W=156;break}}else W=156}while(0);if((W|0)==156){W=0;if(d){d=h;break}else{p=h;e=0}}h=k[a>>2]|0;c=k[h+12>>2]|0;if((c|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=23;break b}}else h=l[c>>0]|0;c=h&255;if(c<<24>>24>-1?(j[(k[I>>2]|0)+(h<<24>>24<<1)>>1]&2048)!=0:0){h=k[n>>2]|0;if((h|0)==(k[P>>2]|0)){x=0;Fa(12,m|0,n|0,P|0);w=x;x=0;if(w&1){W=23;break b}h=k[n>>2]|0}k[n>>2]=h+1;i[h>>0]=c;o=o+1|0}else{w=i[Y>>0]|0;if(!(c<<24>>24==q<<24>>24&((o|0)!=0?(((w&1)==0?(w&255)>>>1:k[H>>2]|0)|0)!=0:0))){d=p;break}if((t|0)==(k[S>>2]|0)){x=0;Fa(13,da|0,T|0,S|0);w=x;x=0;if(w&1){W=23;break b}t=k[T>>2]|0}w=t+4|0;k[T>>2]=w;k[t>>2]=o;t=w;o=0}h=k[a>>2]|0;c=h+12|0;d=k[c>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;ta(k[(k[h>>2]|0)+40>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=23;break b}else{h=p;continue}}else{k[c>>2]=d+1;h=p;continue}}if((o|0)!=0?(k[da>>2]|0)!=(t|0):0){if((t|0)==(k[S>>2]|0)){x=0;Fa(13,da|0,T|0,S|0);w=x;x=0;if(w&1){W=24;break b}t=k[T>>2]|0}w=t+4|0;k[T>>2]=w;k[t>>2]=o;t=w}p=k[R>>2]|0;if((p|0)>0){o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);o=(o|0)==0;do{if(d){if((k[d+12>>2]|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){W=24;break b}if((h|0)==-1){k[b>>2]=0;W=193;break}}if(!o){W=198;break b}}else W=193}while(0);if((W|0)==193){W=0;if(o){W=198;break b}else d=0}o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else o=l[h>>0]|0;if((o&255)<<24>>24!=(i[Q>>0]|0)){W=198;break b}o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=24;break b}}else k[h>>2]=c+1;if((p|0)>0){e=d;c=d;q=p;while(1){o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=22;break b}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);h=(o|0)==0;do{if(c){if((k[c+12>>2]|0)!=(k[c+16>>2]|0))if(h){o=e;p=c;break}else{W=222;break b}x=0;o=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=22;break b}if((o|0)!=-1)if(h^(e|0)==0){o=e;p=e;break}else{W=222;break b}else{k[b>>2]=0;o=0;W=215;break}}else{o=e;W=215}}while(0);if((W|0)==215){W=0;if(h){W=222;break b}else p=0}h=k[a>>2]|0;c=k[h+12>>2]|0;if((c|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=22;break b}}else h=l[c>>0]|0;if((h&255)<<24>>24<=-1){W=222;break b}if(!(j[(k[I>>2]|0)+(h<<24>>24<<1)>>1]&2048)){W=222;break b}if((k[n>>2]|0)==(k[P>>2]|0)?(x=0,Fa(12,m|0,n|0,P|0),w=x,x=0,w&1):0){W=22;break b}h=k[a>>2]|0;c=k[h+12>>2]|0;if((c|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=22;break b}}else h=l[c>>0]|0;c=k[n>>2]|0;k[n>>2]=c+1;i[c>>0]=h;h=q;q=q+-1|0;k[R>>2]=q;c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;w=x;x=0;if(w&1){W=22;break b}}else k[d>>2]=e+1;if((h|0)<=1)break;else{e=o;c=p}}}}if((k[n>>2]|0)==(k[m>>2]|0)){W=233;break b}break}default:{}}}while(0);h:do{if((W|0)==42)while(1){W=0;h=k[a>>2]|0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;h=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;w=x;x=0;if(w&1){W=20;break b}if((h|0)==-1){k[a>>2]=0;h=0;break}else{h=k[a>>2]|0;break}}}else h=0}while(0);c=(h|0)==0;do{if(d){if((k[d+12>>2]|0)!=(k[d+16>>2]|0))if(c){e=o;break}else break h;x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){W=20;break b}if((h|0)!=-1)if(c^(o|0)==0){e=o;d=o;break}else break h;else{k[b>>2]=0;o=0;W=54;break}}else W=54}while(0);if((W|0)==54){W=0;if(c)break h;else{e=o;d=0}}o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){W=20;break b}}else o=l[h>>0]|0;if((o&255)<<24>>24<=-1)break h;if(!(j[(k[I>>2]|0)+(o<<24>>24<<1)>>1]&8192))break h;o=k[a>>2]|0;h=o+12|0;c=k[h>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+40>>2]|0,o|0)|0;W=x;x=0;if(W&1){W=20;break b}}else{k[h>>2]=c+1;o=l[c>>0]|0}x=0;ra(67,$|0,o&255|0);W=x;x=0;if(W&1){W=20;break b}else{o=e;W=42}}}while(0);y=y+1|0;if(y>>>0>=4){W=235;break}}i:switch(W|0){case 20:{h=Wa()|0;break a}case 21:{h=Wa()|0;break a}case 22:{h=Wa()|0;break a}case 23:{h=Wa()|0;break a}case 24:{h=Wa()|0;break a}case 40:{k[f>>2]=k[f>>2]|4;h=0;break}case 104:{k[f>>2]=k[f>>2]|4;h=0;break}case 143:{k[f>>2]=k[f>>2]|4;h=0;break}case 198:{k[f>>2]=k[f>>2]|4;h=0;break}case 222:{k[f>>2]=k[f>>2]|4;h=0;break}case 233:{k[f>>2]=k[f>>2]|4;h=0;break}case 235:{j:do{if(s){e=s+1|0;p=s+8|0;q=s+4|0;c=1;k:while(1){o=i[s>>0]|0;if(!(o&1))o=(o&255)>>>1;else o=k[q>>2]|0;if(c>>>0>=o>>>0)break j;o=k[a>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;n=x;x=0;if(n&1){W=19;break k}if((o|0)==-1){k[a>>2]=0;o=0;break}else{o=k[a>>2]|0;break}}}else o=0}while(0);h=(o|0)==0;o=k[b>>2]|0;do{if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;n=x;x=0;if(n&1){W=19;break k}if((o|0)==-1){k[b>>2]=0;W=253;break}}if(!h){W=260;break k}}else W=253}while(0);if((W|0)==253?(W=0,h):0){W=260;break}o=k[a>>2]|0;h=k[o+12>>2]|0;if((h|0)==(k[o+16>>2]|0)){x=0;o=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;n=x;x=0;if(n&1){W=19;break}}else o=l[h>>0]|0;if(!(i[s>>0]&1))h=e;else h=k[p>>2]|0;if((o&255)<<24>>24!=(i[h+c>>0]|0)){W=260;break}o=c+1|0;h=k[a>>2]|0;c=h+12|0;d=k[c>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;ta(k[(k[h>>2]|0)+40>>2]|0,h|0)|0;n=x;x=0;if(n&1){W=19;break}else{c=o;continue}}else{k[c>>2]=d+1;c=o;continue}}if((W|0)==19){h=Wa()|0;break a}else if((W|0)==260){k[f>>2]=k[f>>2]|4;h=0;break i}}}while(0);o=k[da>>2]|0;if((o|0)!=(t|0)?(k[X>>2]=0,cs(Y,o,t,X),(k[X>>2]|0)!=0):0){k[f>>2]=k[f>>2]|4;h=0}else h=1;break}}Sm($);Sm(Z);Sm(_);Sm(aa);Sm(Y);o=k[da>>2]|0;k[da>>2]=0;if((o|0)!=0?(x=0,qa(k[ca>>2]|0,o|0),da=x,x=0,da&1):0){da=Wa(0)|0;oc(da)}r=ba;return h|0}}while(0);Sm($);Sm(Z);Sm(_);Sm(aa);Sm(Y);o=k[da>>2]|0;k[da>>2]=0;if((o|0)!=0?(x=0,qa(k[ca>>2]|0,o|0),da=x,x=0,da&1):0){da=Wa(0)|0;oc(da)}fb(h|0);return 0}function $r(a){a=a|0;var b=0;b=Va(8)|0;x=0;ra(90,b|0,a|0);a=x;x=0;if(a&1){a=Wa()|0;Ua(b|0);fb(a|0)}else ub(b|0,616,80)}function as(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;v=r;r=r+144|0;h=v+24|0;a=v+32|0;w=v+16|0;q=v+8|0;n=v+4|0;o=v+28|0;j=v;k[w>>2]=a;A=w+4|0;k[A>>2]=189;l=a+100|0;x=0;u=ta(68,e|0)|0;m=x;x=0;if(!(m&1)){k[n>>2]=u;x=0;m=Aa(37,n|0,44220)|0;a=x;x=0;a:do{if(!(a&1)?(i[o>>0]=0,s=k[c>>2]|0,k[j>>2]=s,p=k[e+4>>2]|0,t=s,x=0,k[h>>2]=k[j>>2],p=ua(1,b|0,h|0,d|0,n|0,p|0,f|0,o|0,m|0,w|0,q|0,l|0)|0,e=x,x=0,!(e&1)):0){if(p){if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}if(i[o>>0]|0){x=0;a=Aa(k[(k[m>>2]|0)+28>>2]|0,m|0,45)|0;e=x;x=0;if(e&1)break;x=0;ra(67,g|0,a|0);e=x;x=0;if(e&1)break}x=0;j=Aa(k[(k[m>>2]|0)+28>>2]|0,m|0,48)|0;e=x;x=0;if(e&1)break;a=k[w>>2]|0;l=k[q>>2]|0;h=l+-1|0;b:do{if(a>>>0>>0)do{if((i[a>>0]|0)!=j<<24>>24)break b;a=a+1|0}while(a>>>0>>0)}while(0);x=0;va(32,g|0,a|0,l|0)|0;g=x;x=0;if(g&1)break}a=k[b>>2]|0;do{if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1)break a;if((a|0)==-1){k[b>>2]=0;a=0;break}else{a=k[b>>2]|0;break}}}else a=0}while(0);h=(a|0)==0;do{if(s){if((k[t+12>>2]|0)==(k[t+16>>2]|0)){x=0;a=ta(k[(k[s>>2]|0)+36>>2]|0,t|0)|0;t=x;x=0;if(t&1)break a;if((a|0)==-1){k[c>>2]=0;z=29;break}}if(!h)z=30}else z=29}while(0);if((z|0)==29?h:0)z=30;if((z|0)==30)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(u)|0;a=k[w>>2]|0;k[w>>2]=0;if((a|0)!=0?(x=0,qa(k[A>>2]|0,a|0),A=x,x=0,A&1):0){A=Wa(0)|0;oc(A)}r=v;return h|0}}while(0);h=Wa()|0;zm(u)|0;a=k[w>>2]|0;k[w>>2]=0;if(!a)y=h;else z=36}else{h=Wa()|0;k[w>>2]=0;z=36}if((z|0)==36){x=0;qa(k[A>>2]|0,a|0);A=x;x=0;if(A&1){A=Wa(0)|0;oc(A)}else y=h}fb(y|0);return 0}function bs(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;z=r;r=r+112|0;m=z+100|0;n=z+88|0;o=z+76|0;p=z+64|0;q=z+52|0;s=z+48|0;t=z+36|0;u=z+24|0;v=z+12|0;w=z;do{if(a){a=Ss(b,43828)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](m,a);w=k[m>>2]|0;i[c>>0]=w;i[c+1>>0]=w>>8;i[c+2>>0]=w>>16;i[c+3>>0]=w>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](n,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[n>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;Sm(n);Mb[k[(k[a>>2]|0)+28>>2]&127](o,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[o>>2];k[h+4>>2]=k[o+4>>2];k[h+8>>2]=k[o+8>>2];k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;Sm(o);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[d>>0]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[e>>0]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](p,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[p>>2];k[f+4>>2]=k[p+4>>2];k[f+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;Sm(p);Mb[k[(k[a>>2]|0)+24>>2]&127](q,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[q>>2];k[g+4>>2]=k[q+4>>2];k[g+8>>2]=k[q+8>>2];k[q>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;Sm(q);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(b,43764)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](s,a);s=k[s>>2]|0;i[c>>0]=s;i[c+1>>0]=s>>8;i[c+2>>0]=s>>16;i[c+3>>0]=s>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](t,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[t>>2];k[j+4>>2]=k[t+4>>2];k[j+8>>2]=k[t+8>>2];k[t>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;Sm(t);Mb[k[(k[a>>2]|0)+28>>2]&127](u,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[u>>2];k[h+4>>2]=k[u+4>>2];k[h+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;Sm(u);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[d>>0]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[e>>0]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](v,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[v>>2];k[f+4>>2]=k[v+4>>2];k[f+8>>2]=k[v+8>>2];k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;Sm(v);Mb[k[(k[a>>2]|0)+24>>2]&127](w,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[w>>2];k[g+4>>2]=k[w+4>>2];k[g+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;Sm(w);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=y;r=z;return}function cs(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;e=i[a>>0]|0;g=a+4|0;f=k[g>>2]|0;a:do{if(((e&1)==0?(e&255)>>>1:f)|0){if((b|0)!=(c|0)){e=c+-4|0;if(e>>>0>b>>>0){f=b;do{h=k[f>>2]|0;k[f>>2]=k[e>>2];k[e>>2]=h;f=f+4|0;e=e+-4|0}while(f>>>0>>0)}e=i[a>>0]|0;f=k[g>>2]|0}h=(e&1)==0;g=h?a+1|0:k[a+8>>2]|0;c=c+-4|0;a=g+(h?(e&255)>>>1:f)|0;f=i[g>>0]|0;e=f<<24>>24<1|f<<24>>24==127;b:do{if(c>>>0>b>>>0){while(1){if(!e?(f<<24>>24|0)!=(k[b>>2]|0):0)break;g=(a-g|0)>1?g+1|0:g;b=b+4|0;f=i[g>>0]|0;e=f<<24>>24<1|f<<24>>24==127;if(b>>>0>=c>>>0)break b}k[d>>2]=4;break a}}while(0);if(!e?((k[c>>2]|0)+-1|0)>>>0>=f<<24>>24>>>0:0)k[d>>2]=4}}while(0);return}function ds(a){a=a|0;return}function es(a){a=a|0;mj(a);return}function fs(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;B=r;r=r+576|0;w=B+424|0;A=B;a=B+24|0;D=B+16|0;y=B+12|0;C=B+8|0;n=B+464|0;j=B+4|0;z=B+468|0;k[D>>2]=a;F=D+4|0;k[F>>2]=189;l=a+400|0;x=0;h=ta(68,e|0)|0;v=x;x=0;if(!(v&1)){k[C>>2]=h;x=0;a=Aa(37,C|0,44212)|0;v=x;x=0;a:do{if(!(v&1)?(i[n>>0]=0,k[j>>2]=k[c>>2],m=k[e+4>>2]|0,x=0,k[w>>2]=k[j>>2],m=ua(2,b|0,w|0,d|0,C|0,m|0,f|0,n|0,a|0,D|0,y|0,l|0)|0,v=x,x=0,!(v&1)):0){b:do{if(m){x=0;Ea(k[(k[a>>2]|0)+48>>2]|0,a|0,59007,59017,w|0)|0;v=x;x=0;if(v&1){G=10;break a}j=k[y>>2]|0;l=k[D>>2]|0;a=j-l|0;if((a|0)>392){a=Pl((a>>2)+2|0)|0;h=a;if(!a){x=0;Ga(6);v=x;x=0;if(!(v&1)){a=0;G=13}}else G=13}else{h=0;a=z;G=13}do{if((G|0)==13){if(i[n>>0]|0){i[a>>0]=45;a=a+1|0}u=w+40|0;v=w;if(l>>>0>>0){m=w+4|0;d=m+4|0;e=d+4|0;n=e+4|0;o=n+4|0;p=o+4|0;q=p+4|0;s=q+4|0;t=s+4|0;do{j=k[l>>2]|0;do{if((k[w>>2]|0)!=(j|0))if((k[m>>2]|0)!=(j|0))if((k[d>>2]|0)!=(j|0))if((k[e>>2]|0)!=(j|0))if((k[n>>2]|0)==(j|0))j=n;else{if((k[o>>2]|0)==(j|0)){j=o;break}if((k[p>>2]|0)==(j|0)){j=p;break}if((k[q>>2]|0)==(j|0)){j=q;break}if((k[s>>2]|0)==(j|0)){j=s;break}j=(k[t>>2]|0)==(j|0)?t:u}else j=e;else j=d;else j=m;else j=w}while(0);i[a>>0]=i[59007+(j-v>>2)>>0]|0;l=l+4|0;a=a+1|0}while(l>>>0<(k[y>>2]|0)>>>0)}i[a>>0]=0;k[A>>2]=g;if((jl(z,58987,A)|0)!=1?(x=0,qa(190,58991),g=x,x=0,g&1):0)break;if(h)Ql(h);break b}}while(0);a=Wa()|0;if(!h){j=a;h=D;break a}Ql(h);j=a;h=D;break a}}while(0);a=k[b>>2]|0;do{if(a){h=k[a+12>>2]|0;if((h|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}}else a=k[h>>2]|0;if((a|0)==-1){k[b>>2]=0;j=1;break}else{j=(k[b>>2]|0)==0;break}}else j=1}while(0);a=k[c>>2]|0;do{if(a){h=k[a+12>>2]|0;if((h|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1){G=10;break a}}else a=k[h>>2]|0;if((a|0)!=-1)if(j)break;else{G=40;break}else{k[c>>2]=0;G=38;break}}else G=38}while(0);if((G|0)==38?j:0)G=40;if((G|0)==40)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(k[C>>2]|0)|0;a=k[D>>2]|0;k[D>>2]=0;if((a|0)!=0?(x=0,qa(k[F>>2]|0,a|0),G=x,x=0,G&1):0){G=Wa(0)|0;oc(G)}r=B;return h|0}else G=10}while(0);if((G|0)==10){j=Wa()|0;h=D}zm(k[C>>2]|0)|0;a=k[h>>2]|0;k[h>>2]=0;if(!a)E=j;else{h=k[F>>2]|0;G=47}}else{j=Wa()|0;k[D>>2]=0;h=189;G=47}if((G|0)==47){x=0;qa(h|0,a|0);G=x;x=0;if(G&1){G=Wa(0)|0;oc(G)}else E=j}fb(E|0);return 0}function gs(a,b,c,d,e,f,g,h,j,m,n){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;m=m|0;n=n|0;var o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=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;Y=r;r=r+512|0;K=Y+96|0;o=Y+104|0;_=Y+88|0;O=Y+80|0;N=Y+76|0;P=Y+504|0;L=Y+72|0;Q=Y+68|0;T=Y+56|0;X=Y+44|0;V=Y+32|0;U=Y+20|0;W=Y+8|0;M=Y+4|0;S=Y;k[K>>2]=n;k[_>>2]=o;Z=_+4|0;k[Z>>2]=189;k[O>>2]=o;k[N>>2]=o+400;k[T>>2]=0;k[T+4>>2]=0;k[T+8>>2]=0;k[X>>2]=0;k[X+4>>2]=0;k[X+8>>2]=0;k[V>>2]=0;k[V+4>>2]=0;k[V+8>>2]=0;k[U>>2]=0;k[U+4>>2]=0;k[U+8>>2]=0;k[W>>2]=0;k[W+4>>2]=0;k[W+8>>2]=0;x=0;za(2,c|0,d|0,P|0,L|0,Q|0,T|0,X|0,V|0,U|0,M|0);J=x;x=0;a:do{if(J&1)c=Wa()|0;else{k[m>>2]=k[j>>2];G=V+4|0;H=U+4|0;I=U+8|0;J=V+8|0;z=(e&512|0)!=0;A=X+8|0;B=X+4|0;C=W+4|0;D=W+8|0;E=P+3|0;F=T+4|0;y=0;q=0;b:while(1){n=k[a>>2]|0;do{if(n){c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else n=k[c>>2]|0;if((n|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);c=k[b>>2]|0;do{if(c){n=k[c+12>>2]|0;if((n|0)==(k[c+16>>2]|0)){x=0;n=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else n=k[n>>2]|0;if((n|0)!=-1)if(d){w=c;break}else{s=o;R=244;break b}else{k[b>>2]=0;R=16;break}}else R=16}while(0);if((R|0)==16){R=0;if(d){s=o;R=244;break}else w=0}c:do{switch(i[P+y>>0]|0){case 1:{if((y|0)!=3){n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;R=x;x=0;if(R&1){R=26;break b}}else n=k[c>>2]|0;x=0;n=va(k[(k[h>>2]|0)+12>>2]|0,h|0,8192,n|0)|0;R=x;x=0;if(R&1){R=26;break b}if(!n){R=42;break b}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;R=x;x=0;if(R&1){R=26;break b}}else{k[c>>2]=d+4;n=k[d>>2]|0}x=0;ra(92,W|0,n|0);R=x;x=0;if(R&1){R=26;break b}else{n=w;e=w;R=44}}else n=o;break}case 0:{if((y|0)==3)n=o;else{n=w;e=w;R=44}break}case 3:{c=i[V>>0]|0;n=(c&1)==0?(c&255)>>>1:k[G>>2]|0;d=i[U>>0]|0;e=(d&1)==0?(d&255)>>>1:k[H>>2]|0;if((n|0)==(0-e|0))n=o;else{if(!n){n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}c=i[U>>0]|0}else{n=k[c>>2]|0;c=d}if((n|0)!=(k[((c&1)==0?H:k[I>>2]|0)>>2]|0)){n=o;break c}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[c>>2]=d+4;i[g>>0]=1;w=i[U>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[H>>2]|0)>>>0>1?U:q;break c}p=k[a>>2]|0;s=k[p+12>>2]|0;d=k[p+16>>2]|0;n=(s|0)==(d|0);if(!e){if(n){x=0;n=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}c=i[V>>0]|0}else n=k[s>>2]|0;if((n|0)!=(k[((c&1)==0?G:k[J>>2]|0)>>2]|0)){i[g>>0]=1;n=o;break c}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[c>>2]=d+4;w=i[V>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[G>>2]|0)>>>0>1?V:q;break c}if(n){x=0;n=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}d=k[a>>2]|0;c=i[V>>0]|0;p=d;s=k[d+12>>2]|0;d=k[d+16>>2]|0}else n=k[s>>2]|0;e=p+12|0;d=(s|0)==(d|0);if((n|0)==(k[((c&1)==0?G:k[J>>2]|0)>>2]|0)){if(d){x=0;ta(k[(k[p>>2]|0)+40>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[e>>2]=s+4;w=i[V>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[G>>2]|0)>>>0>1?V:q;break c}if(d){x=0;n=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=26;break b}}else n=k[s>>2]|0;if((n|0)!=(k[((i[U>>0]&1)==0?H:k[I>>2]|0)>>2]|0)){R=107;break b}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[c>>2]=d+4;i[g>>0]=1;w=i[U>>0]|0;n=o;q=((w&1)==0?(w&255)>>>1:k[H>>2]|0)>>>0>1?U:q}break}case 2:{if(!(y>>>0<2|(q|0)!=0)?!(z|(y|0)==2&(i[E>>0]|0)!=0):0){n=o;q=0;break c}e=i[X>>0]|0;d=k[A>>2]|0;c=(e&1)==0?B:d;n=c;d:do{if((y|0)!=0?(l[P+(y+-1)>>0]|0)<2:0){v=(e&1)==0;e:do{if((c|0)!=((v?B:d)+((v?(e&255)>>>1:k[B>>2]|0)<<2)|0)){e=c;while(1){x=0;c=va(k[(k[h>>2]|0)+12>>2]|0,h|0,8192,k[e>>2]|0)|0;v=x;x=0;if(v&1){R=23;break b}if(!c)break;e=e+4|0;n=e;c=i[X>>0]|0;d=k[A>>2]|0;v=(c&1)==0;if((e|0)==((v?B:d)+((v?(c&255)>>>1:k[B>>2]|0)<<2)|0)){e=c;break e}}e=i[X>>0]|0;d=k[A>>2]|0}}while(0);s=(e&1)==0?B:d;c=s;t=n-c>>2;u=i[W>>0]|0;p=(u&1)==0;u=p?(u&255)>>>1:k[C>>2]|0;if(u>>>0>=t>>>0){p=p?C:k[D>>2]|0;v=p+(u<<2)|0;if(!t)c=n;else{p=p+(u-t<<2)|0;while(1){if((k[p>>2]|0)!=(k[s>>2]|0))break d;p=p+4|0;if((p|0)==(v|0)){c=n;break}else s=s+4|0}}}}else c=n}while(0);n=(e&1)==0;n=(n?B:d)+((n?(e&255)>>>1:k[B>>2]|0)<<2)|0;f:do{if((c|0)!=(n|0)){p=w;e=w;n=c;while(1){c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=22;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(e){c=k[e+12>>2]|0;if((c|0)==(k[e+16>>2]|0)){x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=22;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d^(p|0)==0){c=p;s=p;break}else break f;else{k[b>>2]=0;c=0;R=136;break}}else{c=p;R=136}}while(0);if((R|0)==136){R=0;if(d)break f;else s=0}d=k[a>>2]|0;e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=22;break b}}else d=k[e>>2]|0;if((d|0)!=(k[n>>2]|0))break f;d=k[a>>2]|0;e=d+12|0;p=k[e>>2]|0;if((p|0)==(k[d+16>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=22;break b}}else k[e>>2]=p+4;n=n+4|0;d=i[X>>0]|0;w=(d&1)==0;d=(w?B:k[A>>2]|0)+((w?(d&255)>>>1:k[B>>2]|0)<<2)|0;if((n|0)==(d|0)){n=d;break}else{p=c;e=s}}}}while(0);if(z?(w=i[X>>0]|0,v=(w&1)==0,(n|0)!=((v?B:k[A>>2]|0)+((v?(w&255)>>>1:k[B>>2]|0)<<2)|0)):0){R=148;break b}else n=o;break}case 4:{u=k[Q>>2]|0;t=w;p=w;n=o;c=0;g:while(1){d=k[a>>2]|0;do{if(d){e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=25;break b}}else d=k[e>>2]|0;if((d|0)==-1){k[a>>2]=0;e=1;break}else{e=(k[a>>2]|0)==0;break}}else e=1}while(0);do{if(p){d=k[p+12>>2]|0;if((d|0)==(k[p+16>>2]|0)){x=0;d=ta(k[(k[p>>2]|0)+36>>2]|0,p|0)|0;w=x;x=0;if(w&1){R=25;break b}}else d=k[d>>2]|0;if((d|0)!=-1)if(e^(t|0)==0){d=t;s=t;break}else{o=t;break g}else{k[b>>2]=0;d=0;R=162;break}}else{d=t;R=162}}while(0);if((R|0)==162){R=0;if(e){o=d;break}else s=0}e=k[a>>2]|0;o=k[e+12>>2]|0;if((o|0)==(k[e+16>>2]|0)){x=0;e=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=25;break b}}else e=k[o>>2]|0;x=0;o=va(k[(k[h>>2]|0)+12>>2]|0,h|0,2048,e|0)|0;w=x;x=0;if(w&1){R=25;break b}if(o){o=k[m>>2]|0;if((o|0)==(k[K>>2]|0)){x=0;Fa(14,j|0,m|0,K|0);w=x;x=0;if(w&1){R=25;break b}o=k[m>>2]|0}k[m>>2]=o+4;k[o>>2]=e;c=c+1|0}else{w=i[T>>0]|0;if(!((e|0)==(u|0)&((c|0)!=0?(((w&1)==0?(w&255)>>>1:k[F>>2]|0)|0)!=0:0))){o=d;break}if((n|0)==(k[N>>2]|0)){x=0;Fa(13,_|0,O|0,N|0);w=x;x=0;if(w&1){R=25;break b}n=k[O>>2]|0}w=n+4|0;k[O>>2]=w;k[n>>2]=c;n=w;c=0}e=k[a>>2]|0;o=e+12|0;p=k[o>>2]|0;if((p|0)==(k[e+16>>2]|0)){x=0;ta(k[(k[e>>2]|0)+40>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=25;break b}else{t=d;p=s;continue}}else{k[o>>2]=p+4;t=d;p=s;continue}}if((c|0)!=0?(k[_>>2]|0)!=(n|0):0){if((n|0)==(k[N>>2]|0)){x=0;Fa(13,_|0,O|0,N|0);w=x;x=0;if(w&1){R=26;break b}n=k[O>>2]|0}w=n+4|0;k[O>>2]=w;k[n>>2]=c;n=w}s=k[M>>2]|0;if((s|0)>0){c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(o){c=k[o+12>>2]|0;if((c|0)==(k[o+16>>2]|0)){x=0;c=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;w=x;x=0;if(w&1){R=26;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d)break;else{R=206;break b}else{k[b>>2]=0;R=200;break}}else R=200}while(0);if((R|0)==200){R=0;if(d){R=206;break b}else o=0}c=k[a>>2]|0;d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else c=k[d>>2]|0;if((c|0)!=(k[L>>2]|0)){R=206;break b}c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=26;break b}}else k[d>>2]=e+4;if((s|0)>0){p=o;e=o;t=s;while(1){c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=24;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(e){c=k[e+12>>2]|0;if((c|0)==(k[e+16>>2]|0)){x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=24;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d^(p|0)==0){c=p;s=p;break}else{R=231;break b}else{k[b>>2]=0;c=0;R=224;break}}else{c=p;R=224}}while(0);if((R|0)==224){R=0;if(d){R=231;break b}else s=0}d=k[a>>2]|0;e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=24;break b}}else d=k[e>>2]|0;x=0;d=va(k[(k[h>>2]|0)+12>>2]|0,h|0,2048,d|0)|0;w=x;x=0;if(w&1){R=24;break b}if(!d){R=231;break b}if((k[m>>2]|0)==(k[K>>2]|0)?(x=0,Fa(14,j|0,m|0,K|0),w=x,x=0,w&1):0){R=24;break b}d=k[a>>2]|0;e=k[d+12>>2]|0;if((e|0)==(k[d+16>>2]|0)){x=0;d=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;w=x;x=0;if(w&1){R=24;break b}}else d=k[e>>2]|0;e=k[m>>2]|0;k[m>>2]=e+4;k[e>>2]=d;d=t;t=t+-1|0;k[M>>2]=t;e=k[a>>2]|0;o=e+12|0;p=k[o>>2]|0;if((p|0)==(k[e+16>>2]|0)){x=0;ta(k[(k[e>>2]|0)+40>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=24;break b}}else k[o>>2]=p+4;if((d|0)<=1)break;else{p=c;e=s}}}}if((k[m>>2]|0)==(k[j>>2]|0)){R=242;break b}break}default:n=o}}while(0);h:do{if((R|0)==44)while(1){R=0;c=k[a>>2]|0;do{if(c){d=k[c+12>>2]|0;if((d|0)==(k[c+16>>2]|0)){x=0;c=ta(k[(k[c>>2]|0)+36>>2]|0,c|0)|0;w=x;x=0;if(w&1){R=21;break b}}else c=k[d>>2]|0;if((c|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);do{if(e){c=k[e+12>>2]|0;if((c|0)==(k[e+16>>2]|0)){x=0;c=ta(k[(k[e>>2]|0)+36>>2]|0,e|0)|0;w=x;x=0;if(w&1){R=21;break b}}else c=k[c>>2]|0;if((c|0)!=-1)if(d^(n|0)==0){p=n;e=n;break}else{n=o;break h}else{k[b>>2]=0;n=0;R=57;break}}else R=57}while(0);if((R|0)==57){R=0;if(d){n=o;break h}else{p=n;e=0}}n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;w=x;x=0;if(w&1){R=21;break b}}else n=k[c>>2]|0;x=0;n=va(k[(k[h>>2]|0)+12>>2]|0,h|0,8192,n|0)|0;w=x;x=0;if(w&1){R=21;break b}if(!n){n=o;break h}n=k[a>>2]|0;c=n+12|0;d=k[c>>2]|0;if((d|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+40>>2]|0,n|0)|0;R=x;x=0;if(R&1){R=21;break b}}else{k[c>>2]=d+4;n=k[d>>2]|0}x=0;ra(92,W|0,n|0);R=x;x=0;if(R&1){R=21;break b}else{n=p;R=44}}}while(0);y=y+1|0;if(y>>>0>=4){s=n;R=244;break}else o=n}i:switch(R|0){case 21:{c=Wa()|0;break a}case 22:{c=Wa()|0;break a}case 23:{c=Wa()|0;break a}case 24:{c=Wa()|0;break a}case 25:{c=Wa()|0;break a}case 26:{c=Wa()|0;break a}case 42:{k[f>>2]=k[f>>2]|4;c=0;break}case 107:{k[f>>2]=k[f>>2]|4;c=0;break}case 148:{k[f>>2]=k[f>>2]|4;c=0;break}case 206:{k[f>>2]=k[f>>2]|4;c=0;break}case 231:{k[f>>2]=k[f>>2]|4;c=0;break}case 242:{k[f>>2]=k[f>>2]|4;c=0;break}case 244:{j:do{if(q){o=q+4|0;p=q+8|0;e=1;k:while(1){n=i[q>>0]|0;if(!(n&1))n=(n&255)>>>1;else n=k[o>>2]|0;if(e>>>0>=n>>>0)break j;n=k[a>>2]|0;do{if(n){c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;m=x;x=0;if(m&1){R=20;break k}}else n=k[c>>2]|0;if((n|0)==-1){k[a>>2]=0;d=1;break}else{d=(k[a>>2]|0)==0;break}}else d=1}while(0);n=k[b>>2]|0;do{if(n){c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;m=x;x=0;if(m&1){R=20;break k}}else n=k[c>>2]|0;if((n|0)!=-1)if(d)break;else{R=271;break k}else{k[b>>2]=0;R=263;break}}else R=263}while(0);if((R|0)==263?(R=0,d):0){R=271;break}n=k[a>>2]|0;c=k[n+12>>2]|0;if((c|0)==(k[n+16>>2]|0)){x=0;n=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;m=x;x=0;if(m&1){R=20;break}}else n=k[c>>2]|0;if(!(i[q>>0]&1))c=o;else c=k[p>>2]|0;if((n|0)!=(k[c+(e<<2)>>2]|0)){R=271;break}n=e+1|0;c=k[a>>2]|0;d=c+12|0;e=k[d>>2]|0;if((e|0)==(k[c+16>>2]|0)){x=0;ta(k[(k[c>>2]|0)+40>>2]|0,c|0)|0;m=x;x=0;if(m&1){R=20;break}else{e=n;continue}}else{k[d>>2]=e+4;e=n;continue}}if((R|0)==20){c=Wa()|0;break a}else if((R|0)==271){k[f>>2]=k[f>>2]|4;c=0;break i}}}while(0);n=k[_>>2]|0;if((n|0)!=(s|0)?(k[S>>2]=0,cs(T,n,s,S),(k[S>>2]|0)!=0):0){k[f>>2]=k[f>>2]|4;c=0}else c=1;break}}en(W);en(U);en(V);en(X);Sm(T);n=k[_>>2]|0;k[_>>2]=0;if((n|0)!=0?(x=0,qa(k[Z>>2]|0,n|0),_=x,x=0,_&1):0){_=Wa(0)|0;oc(_)}r=Y;return c|0}}while(0);en(W);en(U);en(V);en(X);Sm(T);n=k[_>>2]|0;k[_>>2]=0;if((n|0)!=0?(x=0,qa(k[Z>>2]|0,n|0),_=x,x=0,_&1):0){_=Wa(0)|0;oc(_)}fb(c|0);return 0}function hs(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;v=r;r=r+432|0;h=v+424|0;a=v+24|0;y=v+16|0;q=v+8|0;n=v+4|0;o=v+428|0;j=v;k[y>>2]=a;A=y+4|0;k[A>>2]=189;l=a+400|0;x=0;u=ta(68,e|0)|0;m=x;x=0;if(!(m&1)){k[n>>2]=u;x=0;m=Aa(37,n|0,44212)|0;a=x;x=0;a:do{if(!(a&1)?(i[o>>0]=0,s=k[c>>2]|0,k[j>>2]=s,p=k[e+4>>2]|0,t=s,x=0,k[h>>2]=k[j>>2],p=ua(2,b|0,h|0,d|0,n|0,p|0,f|0,o|0,m|0,y|0,q|0,l|0)|0,e=x,x=0,!(e&1)):0){if(p){if(!(i[g>>0]&1))i[g>>0]=0;else k[k[g+8>>2]>>2]=0;k[g+4>>2]=0;if(i[o>>0]|0){x=0;a=Aa(k[(k[m>>2]|0)+44>>2]|0,m|0,45)|0;e=x;x=0;if(e&1)break;x=0;ra(92,g|0,a|0);e=x;x=0;if(e&1)break}x=0;j=Aa(k[(k[m>>2]|0)+44>>2]|0,m|0,48)|0;e=x;x=0;if(e&1)break;a=k[y>>2]|0;l=k[q>>2]|0;h=l+-4|0;b:do{if(a>>>0>>0)do{if((k[a>>2]|0)!=(j|0))break b;a=a+4|0}while(a>>>0>>0)}while(0);x=0;va(33,g|0,a|0,l|0)|0;g=x;x=0;if(g&1)break}a=k[b>>2]|0;do{if(a){h=k[a+12>>2]|0;if((h|0)==(k[a+16>>2]|0)){x=0;a=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;g=x;x=0;if(g&1)break a}else a=k[h>>2]|0;if((a|0)==-1){k[b>>2]=0;h=1;break}else{h=(k[b>>2]|0)==0;break}}else h=1}while(0);do{if(s){a=k[t+12>>2]|0;if((a|0)==(k[t+16>>2]|0)){x=0;a=ta(k[(k[s>>2]|0)+36>>2]|0,t|0)|0;t=x;x=0;if(t&1)break a}else a=k[a>>2]|0;if((a|0)!=-1)if(h)break;else{z=32;break}else{k[c>>2]=0;z=30;break}}else z=30}while(0);if((z|0)==30?h:0)z=32;if((z|0)==32)k[f>>2]=k[f>>2]|2;h=k[b>>2]|0;zm(u)|0;a=k[y>>2]|0;k[y>>2]=0;if((a|0)!=0?(x=0,qa(k[A>>2]|0,a|0),A=x,x=0,A&1):0){A=Wa(0)|0;oc(A)}r=v;return h|0}}while(0);h=Wa()|0;zm(u)|0;a=k[y>>2]|0;k[y>>2]=0;if(!a)w=h;else z=38}else{h=Wa()|0;k[y>>2]=0;z=38}if((z|0)==38){x=0;qa(k[A>>2]|0,a|0);A=x;x=0;if(A&1){A=Wa(0)|0;oc(A)}else w=h}fb(w|0);return 0}function is(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;z=r;r=r+112|0;m=z+100|0;n=z+88|0;o=z+76|0;p=z+64|0;q=z+52|0;s=z+48|0;t=z+36|0;u=z+24|0;v=z+12|0;w=z;do{if(a){a=Ss(b,43956)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](m,a);w=k[m>>2]|0;i[c>>0]=w;i[c+1>>0]=w>>8;i[c+2>>0]=w>>16;i[c+3>>0]=w>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](n,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[n>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;en(n);Mb[k[(k[a>>2]|0)+28>>2]&127](o,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[o>>2];k[h+4>>2]=k[o+4>>2];k[h+8>>2]=k[o+8>>2];k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;en(o);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[d>>2]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[e>>2]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](p,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[p>>2];k[f+4>>2]=k[p+4>>2];k[f+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;Sm(p);Mb[k[(k[a>>2]|0)+24>>2]&127](q,a);if(!(i[g>>0]&1))i[g>>0]=0;else k[k[g+8>>2]>>2]=0;k[g+4>>2]=0;x=0;ra(93,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[q>>2];k[g+4>>2]=k[q+4>>2];k[g+8>>2]=k[q+8>>2];k[q>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;en(q);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(b,43892)|0;Mb[k[(k[a>>2]|0)+44>>2]&127](s,a);s=k[s>>2]|0;i[c>>0]=s;i[c+1>>0]=s>>8;i[c+2>>0]=s>>16;i[c+3>>0]=s>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](t,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[j>>2]=k[t>>2];k[j+4>>2]=k[t+4>>2];k[j+8>>2]=k[t+8>>2];k[t>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;en(t);Mb[k[(k[a>>2]|0)+28>>2]&127](u,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}k[h>>2]=k[u>>2];k[h+4>>2]=k[u+4>>2];k[h+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;en(u);h=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[d>>2]=h;h=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[e>>2]=h;Mb[k[(k[a>>2]|0)+20>>2]&127](v,a);if(!(i[f>>0]&1)){i[f+1>>0]=0;i[f>>0]=0}else{i[k[f+8>>2]>>0]=0;k[f+4>>2]=0}x=0;ra(91,f|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}k[f>>2]=k[v>>2];k[f+4>>2]=k[v+4>>2];k[f+8>>2]=k[v+8>>2];k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;Sm(v);Mb[k[(k[a>>2]|0)+24>>2]&127](w,a);if(!(i[g>>0]&1))i[g>>0]=0;else k[k[g+8>>2]>>2]=0;k[g+4>>2]=0;x=0;ra(93,g|0,0);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else{k[g>>2]=k[w>>2];k[g+4>>2]=k[w+4>>2];k[g+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;en(w);y=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=y;r=z;return}function js(a){a=a|0;return}function ks(a){a=a|0;mj(a);return}function ls(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;D=r;r=r+384|0;u=D+8|0;g=D;j=D+284|0;l=D+72|0;h=D+184|0;F=D+68|0;A=D+80|0;w=D+77|0;B=D+76|0;G=D+56|0;I=D+44|0;H=D+32|0;m=D+28|0;t=D+84|0;z=D+24|0;y=D+20|0;v=D+16|0;k[l>>2]=j;p[u>>3]=f;j=il(j,100,59018,u)|0;do{if(j>>>0>99){x=0;a=Da(3)|0;C=x;x=0;if(!(C&1)?(x=0,p[g>>3]=f,q=Ea(17,l|0,a|0,59018,g|0)|0,C=x,x=0,!(C&1)):0){a=k[l>>2]|0;if(!a){x=0;Ga(6);C=x;x=0;if(C&1){a=0;g=0;C=7;break}a=k[l>>2]|0}h=Pl(q)|0;g=h;if(!h){x=0;Ga(6);C=x;x=0;if(C&1)C=7;else{s=0;C=10}}else{s=h;C=10}}else{a=0;g=0;C=7}}else{g=0;a=0;s=h;q=j;C=10}}while(0);if((C|0)==10){x=0;h=ta(68,d|0)|0;o=x;x=0;if(o&1)C=7;else{k[F>>2]=h;x=0;o=Aa(37,F|0,44220)|0;n=x;x=0;if(!(n&1)?(n=k[l>>2]|0,x=0,Ea(k[(k[o>>2]|0)+32>>2]|0,o|0,n|0,n+q|0,s|0)|0,n=x,x=0,!(n&1)):0){if(!q)n=0;else n=(i[k[l>>2]>>0]|0)==45;k[G>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;k[I>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;k[H>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;x=0;za(3,c|0,n|0,F|0,A|0,w|0,B|0,G|0,I|0,H|0,m|0);c=x;x=0;if(!(c&1)){m=k[m>>2]|0;if((q|0)>(m|0)){c=i[H>>0]|0;j=i[I>>0]|0;j=(q-m<<1|1)+m+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}else{c=i[H>>0]|0;j=i[I>>0]|0;j=m+2+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}if(j>>>0>100){j=Pl(j)|0;l=j;if(!j){x=0;Ga(6);t=x;x=0;if(!(t&1)){j=0;C=26}}else C=26}else{l=0;j=t;C=26}if((C|0)==26){x=0;wa(1,j|0,z|0,y|0,k[d+4>>2]|0,s|0,s+q|0,o|0,n|0,A|0,i[w>>0]|0,i[B>>0]|0,G|0,I|0,H|0,m|0);B=x;x=0;if(!(B&1)?(k[v>>2]=k[b>>2],b=k[z>>2]|0,E=k[y>>2]|0,x=0,k[u>>2]=k[v>>2],E=sa(39,u|0,j|0,b|0,E|0,d|0,e|0)|0,b=x,x=0,!(b&1)):0){if(l){Ql(l);h=k[F>>2]|0}Sm(H);Sm(I);Sm(G);zm(h)|0;if(g)Ql(g);if(a)Ql(a);r=D;return E|0}}j=Wa()|0;if(l){Ql(l);h=k[F>>2]|0}}else j=Wa()|0;Sm(H);Sm(I);Sm(G)}else j=Wa()|0;zm(h)|0}}if((C|0)==7)j=Wa()|0;if(g)Ql(g);if(a)Ql(a);fb(j|0);return 0}function ms(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;D=r;r=r+112|0;o=D+108|0;p=D+96|0;t=D+92|0;u=D+80|0;v=D+68|0;w=D+56|0;y=D+52|0;z=D+40|0;A=D+36|0;B=D+24|0;q=D+12|0;s=D;do{if(a){a=Ss(c,43828)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](o,a);b=k[o>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](p,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[p>>2];k[j+4>>2]=k[p+4>>2];k[j+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;Sm(p);n=a;break}}else{Mb[k[c+40>>2]&127](t,a);b=k[t>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](u,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[u>>2];k[j+4>>2]=k[u+4>>2];k[j+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;Sm(u);n=a;break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[e>>0]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[f>>0]=j;Mb[k[(k[n>>2]|0)+20>>2]&127](v,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[v>>2];k[g+4>>2]=k[v+4>>2];k[g+8>>2]=k[v+8>>2];k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;Sm(v);Mb[k[(k[n>>2]|0)+24>>2]&127](w,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[w>>2];k[h+4>>2]=k[w+4>>2];k[h+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;Sm(w);C=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(c,43764)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](y,a);b=k[y>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](z,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[z>>2];k[j+4>>2]=k[z+4>>2];k[j+8>>2]=k[z+8>>2];k[z>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;Sm(z);m=a;break}}else{Mb[k[c+40>>2]&127](A,a);b=k[A>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](B,a);if(!(i[j>>0]&1)){i[j+1>>0]=0;i[j>>0]=0}else{i[k[j+8>>2]>>0]=0;k[j+4>>2]=0}x=0;ra(91,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[B>>2];k[j+4>>2]=k[B+4>>2];k[j+8>>2]=k[B+8>>2];k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;Sm(B);m=a;break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;i[e>>0]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;i[f>>0]=j;Mb[k[(k[m>>2]|0)+20>>2]&127](q,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[q>>2];k[g+4>>2]=k[q+4>>2];k[g+8>>2]=k[q+8>>2];k[q>>2]=0;k[q+4>>2]=0;k[q+8>>2]=0;Sm(q);Mb[k[(k[m>>2]|0)+24>>2]&127](s,a);if(!(i[h>>0]&1)){i[h+1>>0]=0;i[h>>0]=0}else{i[k[h+8>>2]>>0]=0;k[h+4>>2]=0}x=0;ra(91,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[s>>2];k[h+4>>2]=k[s+4>>2];k[h+8>>2]=k[s+8>>2];k[s>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;Sm(s);C=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=C;r=D;return}function ns(a,b,c,d,e,f,g,h,l,m,n,o,p,q,r){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var 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;k[c>>2]=a;N=q+4|0;O=q+8|0;P=q+1|0;H=p+4|0;I=(d&512|0)==0;J=p+8|0;K=p+1|0;L=g+8|0;M=(r|0)>0;A=o+4|0;B=o+8|0;C=o+1|0;D=r+1|0;F=-2-r-((r|0)<0?~r:-1)|0;G=(r|0)>0;z=0;do{switch(i[l+z>>0]|0){case 0:{k[b>>2]=k[c>>2];break}case 1:{k[b>>2]=k[c>>2];x=Vb[k[(k[g>>2]|0)+28>>2]&63](g,32)|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x;break}case 3:{y=i[q>>0]|0;s=(y&1)==0;if((s?(y&255)>>>1:k[N>>2]|0)|0){x=i[(s?P:k[O>>2]|0)>>0]|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x}break}case 2:{u=i[p>>0]|0;s=(u&1)==0;u=s?(u&255)>>>1:k[H>>2]|0;if(!(I|(u|0)==0)){t=s?K:k[J>>2]|0;v=t+u|0;s=k[c>>2]|0;if(u)do{i[s>>0]=i[t>>0]|0;t=t+1|0;s=s+1|0}while((t|0)!=(v|0));k[c>>2]=s}break}case 4:{s=k[c>>2]|0;e=h?e+1|0:e;w=e;v=k[L>>2]|0;a:do{if(e>>>0>>0){t=e;do{u=i[t>>0]|0;if(u<<24>>24<=-1)break a;if(!(j[v+(u<<24>>24<<1)>>1]&2048))break a;t=t+1|0}while(t>>>0>>0)}else t=e}while(0);u=t;if(M){x=-2-u-~(u>>>0>w>>>0?w:u)|0;x=F>>>0>x>>>0?F:x;if(t>>>0>e>>>0&G){u=t;w=r;while(1){u=u+-1|0;y=i[u>>0]|0;v=k[c>>2]|0;k[c>>2]=v+1;i[v>>0]=y;v=(w|0)>1;if(!(u>>>0>e>>>0&v))break;else w=w+-1|0}}else v=G;y=D+x|0;u=t+(x+1)|0;if(v)w=Vb[k[(k[g>>2]|0)+28>>2]&63](g,48)|0;else w=0;t=k[c>>2]|0;k[c>>2]=t+1;if((y|0)>0){v=y;while(1){i[t>>0]=w;t=k[c>>2]|0;k[c>>2]=t+1;if((v|0)>1)v=v+-1|0;else break}}i[t>>0]=m}else u=t;if((u|0)!=(e|0)){y=i[o>>0]|0;t=(y&1)==0;if(!((t?(y&255)>>>1:k[A>>2]|0)|0))t=-1;else t=i[(t?C:k[B>>2]|0)>>0]|0;if((u|0)!=(e|0)){v=0;w=0;while(1){if((w|0)==(t|0)){y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=n;v=v+1|0;y=i[o>>0]|0;t=(y&1)==0;if(v>>>0<(t?(y&255)>>>1:k[A>>2]|0)>>>0){t=i[(t?C:k[B>>2]|0)+v>>0]|0;t=t<<24>>24==127?-1:t<<24>>24;w=0}else{t=w;w=0}}u=u+-1|0;x=i[u>>0]|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x;if((u|0)==(e|0))break;else w=w+1|0}}}else{x=Vb[k[(k[g>>2]|0)+28>>2]&63](g,48)|0;y=k[c>>2]|0;k[c>>2]=y+1;i[y>>0]=x}t=k[c>>2]|0;if((s|0)!=(t|0)?(E=t+-1|0,s>>>0>>0):0){t=E;do{y=i[s>>0]|0;i[s>>0]=i[t>>0]|0;i[t>>0]=y;s=s+1|0;t=t+-1|0}while(s>>>0>>0)}break}default:{}}z=z+1|0}while((z|0)!=4);t=i[q>>0]|0;e=(t&1)==0;t=e?(t&255)>>>1:k[N>>2]|0;if(t>>>0>1){s=e?P:k[O>>2]|0;u=s+t|0;e=k[c>>2]|0;if((t|0)!=1){s=s+1|0;do{i[e>>0]=i[s>>0]|0;e=e+1|0;s=s+1|0}while((s|0)!=(u|0))}k[c>>2]=e}switch(d&176|0){case 32:{k[b>>2]=k[c>>2];break}case 16:break;default:k[b>>2]=a}return}function os(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;z=r;r=r+176|0;p=z+56|0;B=z+52|0;w=z+64|0;t=z+61|0;y=z+60|0;C=z+40|0;E=z+28|0;D=z+16|0;l=z+12|0;o=z+68|0;v=z+8|0;u=z+4|0;q=z;a=tn(d)|0;k[B>>2]=a;x=0;s=Aa(37,B|0,44220)|0;n=x;x=0;do{if(n&1)F=13;else{m=i[f>>0]|0;g=(m&1)==0;n=f+4|0;if(!((g?(m&255)>>>1:k[n>>2]|0)|0))m=0;else{g=i[(g?f+1|0:k[f+8>>2]|0)>>0]|0;x=0;h=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,45)|0;m=x;x=0;if(m&1){F=13;break}m=g<<24>>24==h<<24>>24}k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;x=0;za(3,c|0,m|0,B|0,w|0,t|0,y|0,C|0,E|0,D|0,l|0);j=x;x=0;if(!(j&1)){j=i[f>>0]|0;c=k[n>>2]|0;g=(j&1)==0?(j&255)>>>1:c;l=k[l>>2]|0;if((g|0)>(l|0)){G=i[D>>0]|0;h=i[E>>0]|0;g=(g-l<<1|1)+l+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((h&1)==0?(h&255)>>>1:k[E+4>>2]|0)|0}else{G=i[D>>0]|0;g=i[E>>0]|0;g=l+2+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((g&1)==0?(g&255)>>>1:k[E+4>>2]|0)|0}if(g>>>0>100){g=Pl(g)|0;h=g;if(!g){x=0;Ga(6);G=x;x=0;if(!(G&1)){j=i[f>>0]|0;c=k[n>>2]|0;g=0;F=17}}else F=17}else{h=0;g=o;F=17}if((F|0)==17){G=(j&1)==0;f=G?f+1|0:k[f+8>>2]|0;x=0;wa(1,g|0,v|0,u|0,k[d+4>>2]|0,f|0,f+(G?(j&255)>>>1:c)|0,s|0,m|0,w|0,i[t>>0]|0,i[y>>0]|0,C|0,E|0,D|0,l|0);G=x;x=0;if(!(G&1)?(k[q>>2]=k[b>>2],G=k[v>>2]|0,A=k[u>>2]|0,x=0,k[p>>2]=k[q>>2],A=sa(39,p|0,g|0,G|0,A|0,d|0,e|0)|0,G=x,x=0,!(G&1)):0){if(h){Ql(h);a=k[B>>2]|0}Sm(D);Sm(E);Sm(C);zm(a)|0;r=z;return A|0}}g=Wa()|0;if(h){Ql(h);a=k[B>>2]|0}}else g=Wa()|0;Sm(D);Sm(E);Sm(C)}}while(0);if((F|0)==13)g=Wa()|0;zm(a)|0;fb(g|0);return 0}function ps(a){a=a|0;return}function qs(a){a=a|0;mj(a);return}function rs(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;D=r;r=r+992|0;u=D+8|0;g=D;j=D+888|0;l=D+880|0;h=D+480|0;F=D+76|0;A=D+884|0;w=D+72|0;B=D+68|0;G=D+56|0;I=D+44|0;H=D+32|0;m=D+28|0;t=D+80|0;z=D+24|0;y=D+20|0;v=D+16|0;k[l>>2]=j;p[u>>3]=f;j=il(j,100,59018,u)|0;do{if(j>>>0>99){x=0;a=Da(3)|0;C=x;x=0;if(!(C&1)?(x=0,p[g>>3]=f,q=Ea(17,l|0,a|0,59018,g|0)|0,C=x,x=0,!(C&1)):0){a=k[l>>2]|0;if(!a){x=0;Ga(6);C=x;x=0;if(C&1){a=0;g=0;C=7;break}a=k[l>>2]|0}h=Pl(q<<2)|0;g=h;if(!h){x=0;Ga(6);C=x;x=0;if(C&1)C=7;else{s=0;C=10}}else{s=h;C=10}}else{a=0;g=0;C=7}}else{g=0;a=0;s=h;q=j;C=10}}while(0);if((C|0)==10){x=0;h=ta(68,d|0)|0;o=x;x=0;if(o&1)C=7;else{k[F>>2]=h;x=0;o=Aa(37,F|0,44212)|0;n=x;x=0;if(!(n&1)?(n=k[l>>2]|0,x=0,Ea(k[(k[o>>2]|0)+48>>2]|0,o|0,n|0,n+q|0,s|0)|0,n=x,x=0,!(n&1)):0){if(!q)n=0;else n=(i[k[l>>2]>>0]|0)==45;k[G>>2]=0;k[G+4>>2]=0;k[G+8>>2]=0;k[I>>2]=0;k[I+4>>2]=0;k[I+8>>2]=0;k[H>>2]=0;k[H+4>>2]=0;k[H+8>>2]=0;x=0;za(4,c|0,n|0,F|0,A|0,w|0,B|0,G|0,I|0,H|0,m|0);c=x;x=0;if(!(c&1)){m=k[m>>2]|0;if((q|0)>(m|0)){c=i[H>>0]|0;j=i[I>>0]|0;j=(q-m<<1|1)+m+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}else{c=i[H>>0]|0;j=i[I>>0]|0;j=m+2+((c&1)==0?(c&255)>>>1:k[H+4>>2]|0)+((j&1)==0?(j&255)>>>1:k[I+4>>2]|0)|0}if(j>>>0>100){j=Pl(j<<2)|0;l=j;if(!j){x=0;Ga(6);t=x;x=0;if(!(t&1)){j=0;C=26}}else C=26}else{l=0;j=t;C=26}if((C|0)==26){x=0;wa(2,j|0,z|0,y|0,k[d+4>>2]|0,s|0,s+(q<<2)|0,o|0,n|0,A|0,k[w>>2]|0,k[B>>2]|0,G|0,I|0,H|0,m|0);B=x;x=0;if(!(B&1)?(k[v>>2]=k[b>>2],b=k[z>>2]|0,E=k[y>>2]|0,x=0,k[u>>2]=k[v>>2],E=sa(40,u|0,j|0,b|0,E|0,d|0,e|0)|0,b=x,x=0,!(b&1)):0){if(l){Ql(l);h=k[F>>2]|0}en(H);en(I);Sm(G);zm(h)|0;if(g)Ql(g);if(a)Ql(a);r=D;return E|0}}j=Wa()|0;if(l){Ql(l);h=k[F>>2]|0}}else j=Wa()|0;en(H);en(I);Sm(G)}else j=Wa()|0;zm(h)|0}}if((C|0)==7)j=Wa()|0;if(g)Ql(g);if(a)Ql(a);fb(j|0);return 0}function ss(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0;B=r;r=r+112|0;m=B+108|0;n=B+96|0;q=B+92|0;s=B+80|0;t=B+68|0;u=B+56|0;v=B+52|0;w=B+40|0;y=B+36|0;z=B+24|0;o=B+12|0;p=B;do{if(a){a=Ss(c,43956)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](m,a);b=k[m>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](n,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[n>>2];k[j+4>>2]=k[n+4>>2];k[j+8>>2]=k[n+8>>2];k[n>>2]=0;k[n+4>>2]=0;k[n+8>>2]=0;en(n);break}}else{Mb[k[c+40>>2]&127](q,a);b=k[q>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](s,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[s>>2];k[j+4>>2]=k[s+4>>2];k[j+8>>2]=k[s+8>>2];k[s>>2]=0;k[s+4>>2]=0;k[s+8>>2]=0;en(s);break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[e>>2]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[f>>2]=j;Mb[k[(k[a>>2]|0)+20>>2]&127](t,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[t>>2];k[g+4>>2]=k[t+4>>2];k[g+8>>2]=k[t+8>>2];k[t>>2]=0;k[t+4>>2]=0;k[t+8>>2]=0;Sm(t);Mb[k[(k[a>>2]|0)+24>>2]&127](u,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[u>>2];k[h+4>>2]=k[u+4>>2];k[h+8>>2]=k[u+8>>2];k[u>>2]=0;k[u+4>>2]=0;k[u+8>>2]=0;en(u);A=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}else{a=Ss(c,43892)|0;c=k[a>>2]|0;do{if(b){Mb[k[c+44>>2]&127](v,a);b=k[v>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+32>>2]&127](w,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[w>>2];k[j+4>>2]=k[w+4>>2];k[j+8>>2]=k[w+8>>2];k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;en(w);break}}else{Mb[k[c+40>>2]&127](y,a);b=k[y>>2]|0;i[d>>0]=b;i[d+1>>0]=b>>8;i[d+2>>0]=b>>16;i[d+3>>0]=b>>24;Mb[k[(k[a>>2]|0)+28>>2]&127](z,a);if(!(i[j>>0]&1))i[j>>0]=0;else k[k[j+8>>2]>>2]=0;k[j+4>>2]=0;x=0;ra(93,j|0,0);d=x;x=0;if(d&1){j=Wa(0)|0;oc(j)}else{k[j>>2]=k[z>>2];k[j+4>>2]=k[z+4>>2];k[j+8>>2]=k[z+8>>2];k[z>>2]=0;k[z+4>>2]=0;k[z+8>>2]=0;en(z);break}}}while(0);j=Ob[k[(k[a>>2]|0)+12>>2]&127](a)|0;k[e>>2]=j;j=Ob[k[(k[a>>2]|0)+16>>2]&127](a)|0;k[f>>2]=j;Mb[k[(k[a>>2]|0)+20>>2]&127](o,a);if(!(i[g>>0]&1)){i[g+1>>0]=0;i[g>>0]=0}else{i[k[g+8>>2]>>0]=0;k[g+4>>2]=0}x=0;ra(91,g|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}k[g>>2]=k[o>>2];k[g+4>>2]=k[o+4>>2];k[g+8>>2]=k[o+8>>2];k[o>>2]=0;k[o+4>>2]=0;k[o+8>>2]=0;Sm(o);Mb[k[(k[a>>2]|0)+24>>2]&127](p,a);if(!(i[h>>0]&1))i[h>>0]=0;else k[k[h+8>>2]>>2]=0;k[h+4>>2]=0;x=0;ra(93,h|0,0);f=x;x=0;if(f&1){f=Wa(0)|0;oc(f)}else{k[h>>2]=k[p>>2];k[h+4>>2]=k[p+4>>2];k[h+8>>2]=k[p+8>>2];k[p>>2]=0;k[p+4>>2]=0;k[p+8>>2]=0;en(p);A=Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0;break}}}while(0);k[l>>2]=A;r=B;return}function ts(a,b,c,d,e,f,g,h,j,l,m,n,o,p,q){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var 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;k[c>>2]=a;J=p+4|0;K=p+8|0;C=o+4|0;D=(d&512|0)==0;E=o+8|0;F=(q|0)>0;G=n+4|0;H=n+8|0;I=n+1|0;A=(q|0)>0;z=0;do{switch(i[j+z>>0]|0){case 0:{k[b>>2]=k[c>>2];break}case 1:{k[b>>2]=k[c>>2];x=Vb[k[(k[g>>2]|0)+44>>2]&63](g,32)|0;y=k[c>>2]|0;k[c>>2]=y+4;k[y>>2]=x;break}case 3:{y=i[p>>0]|0;r=(y&1)==0;if((r?(y&255)>>>1:k[J>>2]|0)|0){x=k[(r?J:k[K>>2]|0)>>2]|0;y=k[c>>2]|0;k[c>>2]=y+4;k[y>>2]=x}break}case 2:{v=i[o>>0]|0;r=(v&1)==0;v=r?(v&255)>>>1:k[C>>2]|0;if(!(D|(v|0)==0)){r=r?C:k[E>>2]|0;t=r+(v<<2)|0;u=k[c>>2]|0;if(v){s=u;while(1){k[s>>2]=k[r>>2];r=r+4|0;if((r|0)==(t|0))break;else s=s+4|0}}k[c>>2]=u+(v<<2)}break}case 4:{r=k[c>>2]|0;e=h?e+4|0:e;a:do{if(e>>>0>>0){s=e;do{if(!(Qb[k[(k[g>>2]|0)+12>>2]&63](g,2048,k[s>>2]|0)|0))break a;s=s+4|0}while(s>>>0>>0)}else s=e}while(0);if(F){if(s>>>0>e>>>0&A){v=k[c>>2]|0;u=q;while(1){s=s+-4|0;t=v+4|0;k[v>>2]=k[s>>2];w=u+-1|0;u=(u|0)>1;if(s>>>0>e>>>0&u){v=t;u=w}else{v=w;break}}k[c>>2]=t;t=v}else{u=A;t=q}if(u)w=Vb[k[(k[g>>2]|0)+44>>2]&63](g,48)|0;else w=0;x=k[c>>2]|0;u=t+((t|0)<0?~t:-1)|0;if((t|0)>0){v=x;while(1){k[v>>2]=w;if((t|0)>1){v=v+4|0;t=t+-1|0}else break}}k[c>>2]=x+(u+2<<2);k[x+(u+1<<2)>>2]=l}if((s|0)==(e|0)){x=Vb[k[(k[g>>2]|0)+44>>2]&63](g,48)|0;y=k[c>>2]|0;s=y+4|0;k[c>>2]=s;k[y>>2]=x}else{x=i[n>>0]|0;t=(x&1)==0;y=k[G>>2]|0;if(!((t?(x&255)>>>1:y)|0))t=-1;else t=i[(t?I:k[H>>2]|0)>>0]|0;if((s|0)!=(e|0)){w=0;x=0;while(1){u=k[c>>2]|0;if((x|0)==(t|0)){v=u+4|0;k[c>>2]=v;k[u>>2]=m;w=w+1|0;u=i[n>>0]|0;t=(u&1)==0;if(w>>>0<(t?(u&255)>>>1:y)>>>0){t=i[(t?I:k[H>>2]|0)+w>>0]|0;u=v;t=t<<24>>24==127?-1:t<<24>>24;v=0}else{u=v;t=x;v=0}}else v=x;s=s+-4|0;x=k[s>>2]|0;k[c>>2]=u+4;k[u>>2]=x;if((s|0)==(e|0))break;else x=v+1|0}}s=k[c>>2]|0}if((r|0)!=(s|0)?(B=s+-4|0,r>>>0>>0):0){s=B;do{y=k[r>>2]|0;k[r>>2]=k[s>>2];k[s>>2]=y;r=r+4|0;s=s+-4|0}while(r>>>0>>0)}break}default:{}}z=z+1|0}while((z|0)!=4);r=i[p>>0]|0;e=(r&1)==0;r=e?(r&255)>>>1:k[J>>2]|0;if(r>>>0>1){s=e?J:k[K>>2]|0;e=s+4|0;s=s+(r<<2)|0;t=k[c>>2]|0;u=s-e|0;if((r|0)!=1){r=t;while(1){k[r>>2]=k[e>>2];e=e+4|0;if((e|0)==(s|0))break;else r=r+4|0}}k[c>>2]=t+(u>>>2<<2)}switch(d&176|0){case 32:{k[b>>2]=k[c>>2];break}case 16:break;default:k[b>>2]=a}return}function us(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;z=r;r=r+480|0;o=z+468|0;B=z+464|0;w=z+472|0;t=z+56|0;y=z+52|0;C=z+40|0;E=z+28|0;D=z+16|0;l=z+12|0;n=z+64|0;v=z+8|0;u=z+4|0;p=z;a=tn(d)|0;k[B>>2]=a;x=0;q=Aa(37,B|0,44212)|0;s=x;x=0;do{if(s&1)F=13;else{m=i[f>>0]|0;g=(m&1)==0;s=f+4|0;if(!((g?(m&255)>>>1:k[s>>2]|0)|0))m=0;else{g=k[(g?s:k[f+8>>2]|0)>>2]|0;x=0;h=Aa(k[(k[q>>2]|0)+44>>2]|0,q|0,45)|0;m=x;x=0;if(m&1){F=13;break}m=(g|0)==(h|0)}k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;x=0;za(4,c|0,m|0,B|0,w|0,t|0,y|0,C|0,E|0,D|0,l|0);j=x;x=0;if(!(j&1)){j=i[f>>0]|0;c=k[s>>2]|0;g=(j&1)==0?(j&255)>>>1:c;l=k[l>>2]|0;if((g|0)>(l|0)){G=i[D>>0]|0;h=i[E>>0]|0;g=(g-l<<1|1)+l+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((h&1)==0?(h&255)>>>1:k[E+4>>2]|0)|0}else{G=i[D>>0]|0;g=i[E>>0]|0;g=l+2+((G&1)==0?(G&255)>>>1:k[D+4>>2]|0)+((g&1)==0?(g&255)>>>1:k[E+4>>2]|0)|0}if(g>>>0>100){g=Pl(g<<2)|0;h=g;if(!g){x=0;Ga(6);G=x;x=0;if(!(G&1)){j=i[f>>0]|0;c=k[s>>2]|0;g=0;F=17}}else F=17}else{h=0;g=n;F=17}if((F|0)==17){G=(j&1)==0;f=G?s:k[f+8>>2]|0;x=0;wa(2,g|0,v|0,u|0,k[d+4>>2]|0,f|0,f+((G?(j&255)>>>1:c)<<2)|0,q|0,m|0,w|0,k[t>>2]|0,k[y>>2]|0,C|0,E|0,D|0,l|0);G=x;x=0;if(!(G&1)?(k[p>>2]=k[b>>2],G=k[v>>2]|0,A=k[u>>2]|0,x=0,k[o>>2]=k[p>>2],A=sa(40,o|0,g|0,G|0,A|0,d|0,e|0)|0,G=x,x=0,!(G&1)):0){if(h){Ql(h);a=k[B>>2]|0}en(D);en(E);Sm(C);zm(a)|0;r=z;return A|0}}g=Wa()|0;if(h){Ql(h);a=k[B>>2]|0}}else g=Wa()|0;en(D);en(E);Sm(C)}}while(0);if((F|0)==13)g=Wa()|0;zm(a)|0;fb(g|0);return 0}function vs(a){a=a|0;return}function ws(a){a=a|0;mj(a);return}function xs(a,b,c){a=a|0;b=b|0;c=c|0;a=vk((i[b>>0]&1)==0?b+1|0:k[b+8>>2]|0,1)|0;return a>>>((a|0)!=(-1|0)&1)|0}function ys(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0;h=r;r=r+16|0;j=h;k[j>>2]=0;k[j+4>>2]=0;k[j+8>>2]=0;g=i[f>>0]|0;l=(g&1)==0;b=l?f+1|0:k[f+8>>2]|0;g=l?(g&255)>>>1:k[f+4>>2]|0;f=b+g|0;a:do{if((g|0)>0){while(1){x=0;ra(67,j|0,i[b>>0]|0);l=x;x=0;if(l&1)break;b=b+1|0;if(b>>>0>=f>>>0){g=4;break a}}b=Wa()|0;g=7}else g=4}while(0);b:do{if((g|0)==4){x=0;b=Ea(19,((c|0)==-1?-1:c<<1)|0,d|0,e|0,((i[j>>0]&1)==0?j+1|0:k[j+8>>2]|0)|0)|0;l=x;x=0;if(l&1){b=Wa()|0;g=7;break}k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;l=xl(b)|0;f=b+l|0;c:do{if((l|0)>0){while(1){x=0;ra(67,a|0,i[b>>0]|0);l=x;x=0;if(l&1)break;b=b+1|0;if(b>>>0>=f>>>0)break c}b=Wa()|0;Sm(a);break b}}while(0);Sm(j);r=h;return}}while(0);Sm(j);fb(b|0)}function zs(a,b){a=a|0;b=b|0;return}function As(a){a=a|0;return}function Bs(a){a=a|0;mj(a);return}function Cs(a,b,c){a=a|0;b=b|0;c=c|0;a=vk((i[b>>0]&1)==0?b+1|0:k[b+8>>2]|0,1)|0;return a>>>((a|0)!=(-1|0)&1)|0}function Ds(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;v=r;r=r+224|0;n=v+184|0;m=v+192|0;l=v+180|0;o=v+176|0;t=v+168|0;s=v+40|0;q=v+32|0;u=v+28|0;w=v+16|0;j=v+8|0;p=v;k[w>>2]=0;k[w+4>>2]=0;k[w+8>>2]=0;k[j+4>>2]=0;k[j>>2]=44696;h=i[f>>0]|0;y=(h&1)==0;g=f+4|0;b=y?g:k[f+8>>2]|0;f=y?(h&255)>>>1:k[g>>2]|0;g=b+(f<<2)|0;h=m+32|0;a:do{if((f|0)>0){b:while(1){k[o>>2]=b;x=0;f=Ha(k[(k[j>>2]|0)+12>>2]|0,j|0,n|0,b|0,g|0,o|0,m|0,h|0,l|0)|0;y=x;x=0;if(y&1){f=12;break}if((f|0)==2?1:(k[o>>2]|0)==(b|0)){f=5;break}if(m>>>0<(k[l>>2]|0)>>>0){b=m;do{x=0;ra(67,w|0,i[b>>0]|0);y=x;x=0;if(y&1){f=11;break b}b=b+1|0}while(b>>>0<(k[l>>2]|0)>>>0)}b=k[o>>2]|0;if(!((f|0)!=2&b>>>0>>0)){f=9;break a}}if((f|0)==5){x=0;qa(190,58955);x=0;b=Wa()|0}else if((f|0)==11)b=Wa()|0;else if((f|0)==12)b=Wa()|0}else f=9}while(0);c:do{if((f|0)==9){x=0;b=Ea(19,((c|0)==-1?-1:c<<1)|0,d|0,e|0,((i[w>>0]&1)==0?w+1|0:k[w+8>>2]|0)|0)|0;y=x;x=0;if(y&1){b=Wa()|0;break}k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[p+4>>2]=0;k[p>>2]=44744;y=xl(b)|0;g=b+y|0;h=g;j=s+128|0;d:do{if((y|0)>0){e:while(1){k[u>>2]=b;x=0;f=Ha(k[(k[p>>2]|0)+16>>2]|0,p|0,t|0,b|0,((h-b|0)>32?b+32|0:g)|0,u|0,s|0,j|0,q|0)|0;y=x;x=0;if(y&1){f=24;break}if((f|0)==2?1:(k[u>>2]|0)==(b|0)){f=18;break}if(s>>>0<(k[q>>2]|0)>>>0){b=s;do{x=0;ra(92,a|0,k[b>>2]|0);y=x;x=0;if(y&1){f=23;break e}b=b+4|0}while(b>>>0<(k[q>>2]|0)>>>0)}b=k[u>>2]|0;if(!((f|0)!=2&b>>>0>>0))break d}if((f|0)==18){x=0;qa(190,58955);x=0;b=Wa()|0}else if((f|0)==23)b=Wa()|0;else if((f|0)==24)b=Wa()|0;en(a);break c}}while(0);Sm(w);r=v;return}}while(0);Sm(w);fb(b|0)}function Es(a,b){a=a|0;b=b|0;return}function Fs(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;k[a+4>>2]=b+-1;k[a>>2]=44196;f=a+8|0;x=0;ra(94,f|0,28);e=x;x=0;if(e&1)b=Wa()|0;else{e=a+144|0;x=0;Fa(5,e|0,58885,1);d=x;x=0;if(d&1)b=Wa()|0;else{c=k[f>>2]|0;d=a+12|0;b=k[d>>2]|0;if((b|0)!=(c|0)){do{b=b+-4|0}while((b|0)!=(c|0));k[d>>2]=b}k[495]=0;k[494]=43124;x=0;ra(95,a|0,1976);d=x;x=0;do{if(((((((((((((!(d&1)?(k[497]=0,k[496]=43164,x=0,ra(96,a|0,1984),d=x,x=0,!(d&1)):0)?(k[499]=0,k[498]=44236,k[500]=0,i[2004]=0,d=Ys()|0,k[500]=d,x=0,ra(97,a|0,1992),d=x,x=0,!(d&1)):0)?(k[503]=0,k[502]=44484,x=0,ra(98,a|0,2008),d=x,x=0,!(d&1)):0)?(k[505]=0,k[504]=44552,x=0,ra(99,a|0,2016),d=x,x=0,!(d&1)):0)?(x=0,ra(100,2024,1),d=x,x=0,!(d&1)):0)?(x=0,ra(101,a|0,2024),d=x,x=0,!(d&1)):0)?(k[511]=0,k[510]=44600,x=0,ra(102,a|0,2040),d=x,x=0,!(d&1)):0)?(k[513]=0,k[512]=44648,x=0,ra(103,a|0,2048),d=x,x=0,!(d&1)):0)?(bu(2056,1),x=0,ra(104,a|0,2056),d=x,x=0,!(d&1)):0)?(cu(2080,1),x=0,ra(105,a|0,2080),d=x,x=0,!(d&1)):0)?(k[529]=0,k[528]=43204,x=0,ra(106,a|0,2112),d=x,x=0,!(d&1)):0)?(k[531]=0,k[530]=43276,x=0,ra(107,a|0,2120),d=x,x=0,!(d&1)):0)?(k[533]=0,k[532]=43348,x=0,ra(108,a|0,2128),d=x,x=0,!(d&1)):0){k[535]=0;k[534]=43408;x=0;ra(109,a|0,2136);d=x;x=0;if(d&1){g=42;break}k[537]=0;k[536]=43716;x=0;ra(110,a|0,2144);d=x;x=0;if(d&1){g=42;break}k[539]=0;k[538]=43780;x=0;ra(111,a|0,2152);d=x;x=0;if(d&1){g=42;break}k[541]=0;k[540]=43844;x=0;ra(112,a|0,2160);d=x;x=0;if(d&1){g=42;break}k[543]=0;k[542]=43908;x=0;ra(113,a|0,2168);d=x;x=0;if(d&1){g=42;break}k[545]=0;k[544]=43972;x=0;ra(114,a|0,2176);d=x;x=0;if(d&1){g=42;break}k[547]=0;k[546]=44008;x=0;ra(115,a|0,2184);d=x;x=0;if(d&1){g=42;break}k[549]=0;k[548]=44044;x=0;ra(116,a|0,2192);d=x;x=0;if(d&1){g=42;break}k[551]=0;k[550]=44080;x=0;ra(117,a|0,2200);d=x;x=0;if(d&1){g=42;break}k[553]=0;k[552]=43468;k[554]=43516;x=0;ra(118,a|0,2208);d=x;x=0;if(d&1){g=42;break}k[557]=0;k[556]=43560;k[558]=43608;x=0;ra(119,a|0,2224);d=x;x=0;if(d&1){g=42;break}k[561]=0;k[560]=44464;x=0;b=Da(3)|0;d=x;x=0;if(d&1){b=Wa()|0;break}k[562]=b;k[560]=43652;x=0;ra(120,a|0,2240);d=x;x=0;if(d&1){g=42;break}k[565]=0;k[564]=44464;x=0;b=Da(3)|0;d=x;x=0;if(d&1){b=Wa()|0;break}k[566]=b;k[564]=43684;x=0;ra(121,a|0,2256);g=x;x=0;if(g&1){g=42;break}k[569]=0;k[568]=44116;x=0;ra(122,a|0,2272);g=x;x=0;if(g&1){g=42;break}k[571]=0;k[570]=44156;x=0;ra(123,a|0,2280);g=x;x=0;if(g&1){g=42;break}return}else g=42}while(0);if((g|0)==42)b=Wa()|0;Sm(e)}Nv(f)}fb(b|0)}function Gs(){var a=0;do{if((i[2288]|0)==0?(Qa(2288)|0)!=0:0){x=0;Da(4)|0;a=x;x=0;if(a&1){a=Wa()|0;Bb(2288);fb(a|0)}else{k[11246]=44980;Ya(2288);break}}}while(0);return k[11246]|0}function Hs(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;ym(b);e=a+8|0;d=k[e>>2]|0;do{if((k[a+12>>2]|0)-d>>2>>>0<=c>>>0){x=0;ra(124,e|0,c+1|0);a=x;x=0;if(!(a&1)){d=k[e>>2]|0;break}d=Wa()|0;if(b)zm(b)|0;fb(d|0)}}while(0);a=k[d+(c<<2)>>2]|0;if(a){zm(a)|0;d=k[e>>2]|0}k[d+(c<<2)>>2]=b;return}function Is(a){a=a|0;var b=0,c=0,d=0,e=0;k[a>>2]=44196;d=a+8|0;e=a+12|0;b=k[d>>2]|0;if((k[e>>2]|0)!=(b|0)){c=0;do{b=k[b+(c<<2)>>2]|0;if(b)zm(b)|0;c=c+1|0;b=k[d>>2]|0}while(c>>>0<(k[e>>2]|0)-b>>2>>>0)}Sm(a+144|0);Nv(d);return}function Js(a){a=a|0;Is(a);mj(a);return}function Ks(a,b){a=a|0;b=b|0;if(Pv(a,b)|0)return k[(k[a+8>>2]|0)+(b<<2)>>2]|0;else{a=Va(4)|0;Aj(a);ub(a|0,640,82)}return 0}function Ls(){Fs(2296,1);k[11245]=2296;return 44980}function Ms(){var a=0;a=Gs()|0;a=k[a>>2]|0;k[11247]=a;ym(a);return 44988}function Ns(){var a=0;do{if((i[2456]|0)==0?(Qa(2456)|0)!=0:0){x=0;Da(5)|0;a=x;x=0;if(a&1){a=Wa()|0;Bb(2456);fb(a|0)}else{k[11248]=44988;Ya(2456);break}}}while(0);return k[11248]|0}function Os(a){a=a|0;var b=0,c=0;x=0;b=Da(6)|0;c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}else{c=k[b>>2]|0;k[a>>2]=c;ym(c);return}}function Ps(a,b){a=a|0;b=b|0;b=k[b>>2]|0;k[a>>2]=b;ym(b);return}function Qs(a){a=a|0;zm(k[a>>2]|0)|0;return}function Rs(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;if((k[a>>2]|0)!=-1){k[b>>2]=a;k[b+4>>2]=191;k[b+8>>2]=0;Om(a,b,192)}r=c;return(k[a+4>>2]|0)+-1|0}function Ss(a,b){a=a|0;b=b|0;a=k[a>>2]|0;return Ks(a,Rs(b)|0)|0}function Ts(a){a=a|0;mj(a);return}function Us(a){a=a|0;if(a)Lb[k[(k[a>>2]|0)+4>>2]&255](a);return}function Vs(a){a=a|0;var b=0;b=k[11052]|0;k[11052]=b+1;k[a+4>>2]=b+1;return}function Ws(a){a=a|0;mj(a);return}function Xs(a,b,c){a=a|0;b=b|0;c=c|0;if(c>>>0<128){c=(Ys()|0)+(c<<1)|0;c=(j[c>>1]&b)<<16>>16!=0}else c=0;return c|0}function Ys(){var a=0,b=0;x=0;a=Da(7)|0;b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else return k[a>>2]|0;return 0}function Zs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=(c-b|0)>>>2;if((b|0)!=(c|0)){e=b;while(1){a=k[e>>2]|0;if(a>>>0<128){a=(Ys()|0)+(a<<1)|0;a=m[a>>1]|0}else a=0;j[d>>1]=a;e=e+4|0;if((e|0)==(c|0))break;else d=d+2|0}}return b+(f<<2)|0}function _s(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a:do{if((c|0)==(d|0))c=d;else while(1){a=k[c>>2]|0;if(a>>>0<128?(a=(Ys()|0)+(a<<1)|0,(j[a>>1]&b)<<16>>16!=0):0)break a;c=c+4|0;if((c|0)==(d|0)){c=d;break}}}while(0);return c|0}function $s(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a:do{if((c|0)==(d|0))c=d;else while(1){a=k[c>>2]|0;if(a>>>0>=128)break a;a=(Ys()|0)+(a<<1)|0;if(!((j[a>>1]&b)<<16>>16))break a;c=c+4|0;if((c|0)==(d|0)){c=d;break}}}while(0);return c|0}function at(a,b){a=a|0;b=b|0;if(b>>>0<128){b=(bt()|0)+(b<<2)|0;b=k[b>>2]|0}return b|0}function bt(){var a=0,b=0;x=0;a=Da(8)|0;b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else return k[a>>2]|0;return 0}function ct(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=(c-b|0)>>>2;if((b|0)!=(c|0)){d=b;do{a=k[d>>2]|0;if(a>>>0<128){a=(bt()|0)+(a<<2)|0;a=k[a>>2]|0}k[d>>2]=a;d=d+4|0}while((d|0)!=(c|0))}return b+(e<<2)|0}function dt(a,b){a=a|0;b=b|0;if(b>>>0<128){b=(et()|0)+(b<<2)|0;b=k[b>>2]|0}return b|0}function et(){var a=0,b=0;x=0;a=Da(9)|0;b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else return k[a>>2]|0;return 0}function ft(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=(c-b|0)>>>2;if((b|0)!=(c|0)){d=b;do{a=k[d>>2]|0;if(a>>>0<128){a=(et()|0)+(a<<2)|0;a=k[a>>2]|0}k[d>>2]=a;d=d+4|0}while((d|0)!=(c|0))}return b+(e<<2)|0}function gt(a,b){a=a|0;b=b|0;return b<<24>>24|0}function ht(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((b|0)!=(c|0))while(1){k[d>>2]=i[b>>0];b=b+1|0;if((b|0)==(c|0))break;else d=d+4|0}return c|0}function it(a,b,c){a=a|0;b=b|0;c=c|0;return(b>>>0<128?b&255:c)|0}function jt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=(c-b|0)>>>2;if((b|0)!=(c|0)){f=b;a=e;while(1){e=k[f>>2]|0;i[a>>0]=e>>>0<128?e&255:d;f=f+4|0;if((f|0)==(c|0))break;else a=a+1|0}}return b+(g<<2)|0}function kt(a){a=a|0;var b=0;k[a>>2]=44236;b=k[a+8>>2]|0;if((b|0)!=0?(i[a+12>>0]|0)!=0:0)nj(b);return}function lt(a){a=a|0;kt(a);mj(a);return}function mt(a,b){a=a|0;b=b|0;if(b<<24>>24>-1){b=(bt()|0)+((b&255)<<2)|0;b=k[b>>2]&255}return b|0}function nt(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=(c|0)){a=b;do{b=i[a>>0]|0;if(b<<24>>24>-1){b=(bt()|0)+(b<<24>>24<<2)|0;b=k[b>>2]&255}i[a>>0]=b;a=a+1|0}while((a|0)!=(c|0))}return c|0}function ot(a,b){a=a|0;b=b|0;if(b<<24>>24>-1){b=(et()|0)+(b<<24>>24<<2)|0;b=k[b>>2]&255}return b|0}function pt(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=(c|0)){a=b;do{b=i[a>>0]|0;if(b<<24>>24>-1){b=(et()|0)+(b<<24>>24<<2)|0;b=k[b>>2]&255}i[a>>0]=b;a=a+1|0}while((a|0)!=(c|0))}return c|0}function qt(a,b){a=a|0;b=b|0;return b|0}function rt(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((b|0)!=(c|0))while(1){i[d>>0]=i[b>>0]|0;b=b+1|0;if((b|0)==(c|0))break;else d=d+1|0}return c|0}function st(a,b,c){a=a|0;b=b|0;c=c|0;return(b<<24>>24>-1?b:c)|0}function tt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if((b|0)!=(c|0))while(1){a=i[b>>0]|0;i[e>>0]=a<<24>>24>-1?a:d;b=b+1|0;if((b|0)==(c|0))break;else e=e+1|0}return c|0}function ut(a){a=a|0;mj(a);return}function vt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;k[e>>2]=c;k[h>>2]=f;return 3}function wt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;k[e>>2]=c;k[h>>2]=f;return 3}function xt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;k[e>>2]=c;return 3}function yt(a){a=a|0;return 1}function zt(a){a=a|0;return 1}function At(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a=d-c|0;return(a>>>0>>0?a:e)|0}function Bt(a){a=a|0;return 1}function Ct(a,b){a=a|0;b=b|0;var c=0;k[a+4>>2]=b+-1;k[a>>2]=44304;x=0;b=Da(3)|0;c=x;x=0;if(c&1){c=Wa()|0;fb(c|0)}else{k[a+8>>2]=b;return}}function Dt(a){a=a|0;Gu(a);mj(a);return}function Hl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,m=0,n=0.0,o=0,q=0,s=0,u=0,v=0.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,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;ga=r;r=r+624|0;ba=ga+24|0;da=ga+16|0;ca=ga+588|0;Y=ga+576|0;aa=ga;V=ga+536|0;fa=ga+8|0;ea=ga+528|0;L=(a|0)!=0;N=V+40|0;U=N;V=V+39|0;W=fa+4|0;X=Y+12|0;Y=Y+11|0;Z=ca;_=X;$=_-Z|0;O=-2-Z|0;P=_+2|0;Q=ba+288|0;R=ca+9|0;S=R;T=ca+8|0;f=0;w=b;g=0;b=0;a:while(1){do{if((f|0)>-1)if((g|0)>(2147483647-f|0)){f=mk()|0;k[f>>2]=75;f=-1;break}else{f=g+f|0;break}}while(0);g=i[w>>0]|0;if(!(g<<24>>24)){K=245;break}else h=w;b:while(1){switch(g<<24>>24){case 37:{g=h;K=9;break b}case 0:{g=h;break b}default:{}}J=h+1|0;g=i[J>>0]|0;h=J}c:do{if((K|0)==9)while(1){K=0;if((i[g+1>>0]|0)!=37)break c;h=h+1|0;g=g+2|0;if((i[g>>0]|0)==37)K=9;else break}}while(0);y=h-w|0;if(L?(k[a>>2]&32|0)==0:0)fl(w,y,a)|0;if((h|0)!=(w|0)){w=g;g=y;continue}o=g+1|0;h=i[o>>0]|0;m=(h<<24>>24)+-48|0;if(m>>>0<10){J=(i[g+2>>0]|0)==36;o=J?g+3|0:o;h=i[o>>0]|0;u=J?m:-1;b=J?1:b}else u=-1;g=h<<24>>24;d:do{if((g&-32|0)==32){m=0;while(1){if(!(1<>24)+-32|m;o=o+1|0;h=i[o>>0]|0;g=h<<24>>24;if((g&-32|0)!=32){q=m;g=o;break}}}else{q=0;g=o}}while(0);do{if(h<<24>>24==42){m=g+1|0;h=(i[m>>0]|0)+-48|0;if(h>>>0<10?(i[g+2>>0]|0)==36:0){k[e+(h<<2)>>2]=10;b=1;g=g+3|0;h=k[d+((i[m>>0]|0)+-48<<3)>>2]|0}else{if(b){f=-1;break a}if(!L){x=q;g=m;b=0;J=0;break}b=(k[c>>2]|0)+(4-1)&~(4-1);h=k[b>>2]|0;k[c>>2]=b+4;b=0;g=m}if((h|0)<0){x=q|8192;J=0-h|0}else{x=q;J=h}}else{m=(h<<24>>24)+-48|0;if(m>>>0<10){h=0;do{h=(h*10|0)+m|0;g=g+1|0;m=(i[g>>0]|0)+-48|0}while(m>>>0<10);if((h|0)<0){f=-1;break a}else{x=q;J=h}}else{x=q;J=0}}}while(0);e:do{if((i[g>>0]|0)==46){m=g+1|0;h=i[m>>0]|0;if(h<<24>>24!=42){o=(h<<24>>24)+-48|0;if(o>>>0<10){g=m;h=0}else{g=m;o=0;break}while(1){h=(h*10|0)+o|0;g=g+1|0;o=(i[g>>0]|0)+-48|0;if(o>>>0>=10){o=h;break e}}}m=g+2|0;h=(i[m>>0]|0)+-48|0;if(h>>>0<10?(i[g+3>>0]|0)==36:0){k[e+(h<<2)>>2]=10;g=g+4|0;o=k[d+((i[m>>0]|0)+-48<<3)>>2]|0;break}if(b){f=-1;break a}if(L){g=(k[c>>2]|0)+(4-1)&~(4-1);o=k[g>>2]|0;k[c>>2]=g+4;g=m}else{g=m;o=0}}else o=-1}while(0);s=0;while(1){h=(i[g>>0]|0)+-65|0;if(h>>>0>57){f=-1;break a}m=g+1|0;h=i[56223+(s*58|0)+h>>0]|0;q=h&255;if((q+-1|0)>>>0<8){g=m;s=q}else{I=m;break}}if(!(h<<24>>24)){f=-1;break}m=(u|0)>-1;do{if(h<<24>>24==19)if(m){f=-1;break a}else K=52;else{if(m){k[e+(u<<2)>>2]=q;G=d+(u<<3)|0;H=k[G+4>>2]|0;K=aa;k[K>>2]=k[G>>2];k[K+4>>2]=H;K=52;break}if(!L){f=0;break a}Ml(aa,q,c)}}while(0);if((K|0)==52?(K=0,!L):0){w=I;g=y;continue}u=i[g>>0]|0;u=(s|0)!=0&(u&15|0)==3?u&-33:u;m=x&-65537;H=(x&8192|0)==0?x:m;f:do{switch(u|0){case 110:switch(s|0){case 0:{k[k[aa>>2]>>2]=f;w=I;g=y;continue a}case 1:{k[k[aa>>2]>>2]=f;w=I;g=y;continue a}case 2:{w=k[aa>>2]|0;k[w>>2]=f;k[w+4>>2]=((f|0)<0)<<31>>31;w=I;g=y;continue a}case 3:{j[k[aa>>2]>>1]=f;w=I;g=y;continue a}case 4:{i[k[aa>>2]>>0]=f;w=I;g=y;continue a}case 6:{k[k[aa>>2]>>2]=f;w=I;g=y;continue a}case 7:{w=k[aa>>2]|0;k[w>>2]=f;k[w+4>>2]=((f|0)<0)<<31>>31;w=I;g=y;continue a}default:{w=I;g=y;continue a}}case 112:{s=H|8;o=o>>>0>8?o:8;u=120;K=64;break}case 88:case 120:{s=H;K=64;break}case 111:{m=aa;h=k[m>>2]|0;m=k[m+4>>2]|0;if((h|0)==0&(m|0)==0)g=N;else{g=N;do{g=g+-1|0;i[g>>0]=h&7|48;h=uw(h|0,m|0,3)|0;m=M}while(!((h|0)==0&(m|0)==0))}if(!(H&8)){h=H;s=0;q=56703;K=77}else{s=U-g+1|0;h=H;o=(o|0)<(s|0)?s:o;s=0;q=56703;K=77}break}case 105:case 100:{h=aa;g=k[h>>2]|0;h=k[h+4>>2]|0;if((h|0)<0){g=rw(0,0,g|0,h|0)|0;h=M;m=aa;k[m>>2]=g;k[m+4>>2]=h;m=1;q=56703;K=76;break f}if(!(H&2048)){q=H&1;m=q;q=(q|0)==0?56703:56705;K=76}else{m=1;q=56704;K=76}break}case 117:{h=aa;g=k[h>>2]|0;h=k[h+4>>2]|0;m=0;q=56703;K=76;break}case 99:{i[V>>0]=k[aa>>2];w=V;h=1;s=0;u=56703;g=N;break}case 109:{g=mk()|0;g=nk(k[g>>2]|0)|0;K=82;break}case 115:{g=k[aa>>2]|0;g=(g|0)!=0?g:56713;K=82;break}case 67:{k[fa>>2]=k[aa>>2];k[W>>2]=0;k[aa>>2]=fa;o=-1;K=86;break}case 83:{if(!o){Ol(a,32,J,0,H);g=0;K=98}else K=86;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{n=+p[aa>>3];k[da>>2]=0;p[t>>3]=n;if((k[t+4>>2]|0)>=0)if(!(H&2048)){G=H&1;F=G;G=(G|0)==0?56721:56726}else{F=1;G=56723}else{n=-n;F=1;G=56720}p[t>>3]=n;E=k[t+4>>2]&2146435072;do{if(E>>>0<2146435072|(E|0)==2146435072&0<0){v=+Gk(n,da)*2.0;h=v!=0.0;if(h)k[da>>2]=(k[da>>2]|0)+-1;C=u|32;if((C|0)==97){w=u&32;y=(w|0)==0?G:G+9|0;x=F|2;g=12-o|0;do{if(!(o>>>0>11|(g|0)==0)){n=8.0;do{g=g+-1|0;n=n*16.0}while((g|0)!=0);if((i[y>>0]|0)==45){n=-(n+(-v-n));break}else{n=v+n-n;break}}else n=v}while(0);h=k[da>>2]|0;g=(h|0)<0?0-h|0:h;g=Nl(g,((g|0)<0)<<31>>31,X)|0;if((g|0)==(X|0)){i[Y>>0]=48;g=Y}i[g+-1>>0]=(h>>31&2)+43;s=g+-2|0;i[s>>0]=u+15;q=(o|0)<1;m=(H&8|0)==0;h=ca;while(1){G=~~n;g=h+1|0;i[h>>0]=l[56687+G>>0]|w;n=(n-+(G|0))*16.0;do{if((g-Z|0)==1){if(m&(q&n==0.0))break;i[g>>0]=46;g=h+2|0}}while(0);if(!(n!=0.0))break;else h=g}o=(o|0)!=0&(O+g|0)<(o|0)?P+o-s|0:$-s+g|0;m=o+x|0;Ol(a,32,J,m,H);if(!(k[a>>2]&32))fl(y,x,a)|0;Ol(a,48,J,m,H^65536);g=g-Z|0;if(!(k[a>>2]&32))fl(ca,g,a)|0;h=_-s|0;Ol(a,48,o-(g+h)|0,0,0);if(!(k[a>>2]&32))fl(s,h,a)|0;Ol(a,32,J,m,H^8192);g=(m|0)<(J|0)?J:m;break}g=(o|0)<0?6:o;if(h){h=(k[da>>2]|0)+-28|0;k[da>>2]=h;n=v*268435456.0}else{n=v;h=k[da>>2]|0}E=(h|0)<0?ba:Q;D=E;h=E;do{B=~~n>>>0;k[h>>2]=B;h=h+4|0;n=(n-+(B>>>0))*1.0e9}while(n!=0.0);m=h;h=k[da>>2]|0;if((h|0)>0){q=E;while(1){s=(h|0)>29?29:h;o=m+-4|0;do{if(o>>>0>>0)o=q;else{h=0;do{B=ww(k[o>>2]|0,0,s|0)|0;B=tw(B|0,M|0,h|0,0)|0;h=M;A=Fw(B|0,h|0,1e9,0)|0;k[o>>2]=A;h=Ew(B|0,h|0,1e9,0)|0;o=o+-4|0}while(o>>>0>=q>>>0);if(!h){o=q;break}o=q+-4|0;k[o>>2]=h}}while(0);while(1){if(m>>>0<=o>>>0)break;h=m+-4|0;if(!(k[h>>2]|0))m=h;else break}h=(k[da>>2]|0)-s|0;k[da>>2]=h;if((h|0)>0)q=o;else break}}else o=E;if((h|0)<0){y=((g+25|0)/9|0)+1|0;z=(C|0)==102;w=o;while(1){x=0-h|0;x=(x|0)>9?9:x;do{if(w>>>0>>0){h=(1<>>x;o=0;s=w;do{B=k[s>>2]|0;k[s>>2]=(B>>>x)+o;o=ia(B&h,q)|0;s=s+4|0}while(s>>>0>>0);h=(k[w>>2]|0)==0?w+4|0:w;if(!o){o=h;break}k[m>>2]=o;o=h;m=m+4|0}else o=(k[w>>2]|0)==0?w+4|0:w}while(0);h=z?E:o;m=(m-h>>2|0)>(y|0)?h+(y<<2)|0:m;h=(k[da>>2]|0)+x|0;k[da>>2]=h;if((h|0)>=0){w=o;break}else w=o}}else w=o;do{if(w>>>0>>0){h=(D-w>>2)*9|0;q=k[w>>2]|0;if(q>>>0<10)break;else o=10;do{o=o*10|0;h=h+1|0}while(q>>>0>=o>>>0)}else h=0}while(0);A=(C|0)==103;B=(g|0)!=0;o=g-((C|0)!=102?h:0)+((B&A)<<31>>31)|0;if((o|0)<(((m-D>>2)*9|0)+-9|0)){s=o+9216|0;z=(s|0)/9|0;o=E+(z+-1023<<2)|0;s=((s|0)%9|0)+1|0;if((s|0)<9){q=10;do{q=q*10|0;s=s+1|0}while((s|0)!=9)}else q=10;x=k[o>>2]|0;y=(x>>>0)%(q>>>0)|0;if((y|0)==0?(E+(z+-1022<<2)|0)==(m|0):0)q=w;else K=163;do{if((K|0)==163){K=0;v=(((x>>>0)/(q>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;s=(q|0)/2|0;do{if(y>>>0>>0)n=.5;else{if((y|0)==(s|0)?(E+(z+-1022<<2)|0)==(m|0):0){n=1.0;break}n=1.5}}while(0);do{if(F){if((i[G>>0]|0)!=45)break;v=-v;n=-n}}while(0);s=x-y|0;k[o>>2]=s;if(!(v+n!=v)){q=w;break}C=s+q|0;k[o>>2]=C;if(C>>>0>999999999){h=w;while(1){q=o+-4|0;k[o>>2]=0;if(q>>>0>>0){h=h+-4|0;k[h>>2]=0}C=(k[q>>2]|0)+1|0;k[q>>2]=C;if(C>>>0>999999999)o=q;else{w=h;o=q;break}}}h=(D-w>>2)*9|0;s=k[w>>2]|0;if(s>>>0<10){q=w;break}else q=10;do{q=q*10|0;h=h+1|0}while(s>>>0>=q>>>0);q=w}}while(0);C=o+4|0;w=q;m=m>>>0>C>>>0?C:m}y=0-h|0;while(1){if(m>>>0<=w>>>0){z=0;C=m;break}o=m+-4|0;if(!(k[o>>2]|0))m=o;else{z=1;C=m;break}}do{if(A){g=(B&1^1)+g|0;if((g|0)>(h|0)&(h|0)>-5){u=u+-1|0;g=g+-1-h|0}else{u=u+-2|0;g=g+-1|0}m=H&8;if(m)break;do{if(z){m=k[C+-4>>2]|0;if(!m){o=9;break}if(!((m>>>0)%10|0)){q=10;o=0}else{o=0;break}do{q=q*10|0;o=o+1|0}while(((m>>>0)%(q>>>0)|0|0)==0)}else o=9}while(0);m=((C-D>>2)*9|0)+-9|0;if((u|32|0)==102){m=m-o|0;m=(m|0)<0?0:m;g=(g|0)<(m|0)?g:m;m=0;break}else{m=m+h-o|0;m=(m|0)<0?0:m;g=(g|0)<(m|0)?g:m;m=0;break}}else m=H&8}while(0);x=g|m;q=(x|0)!=0&1;s=(u|32|0)==102;if(s){h=(h|0)>0?h:0;u=0}else{o=(h|0)<0?y:h;o=Nl(o,((o|0)<0)<<31>>31,X)|0;if((_-o|0)<2)do{o=o+-1|0;i[o>>0]=48}while((_-o|0)<2);i[o+-1>>0]=(h>>31&2)+43;D=o+-2|0;i[D>>0]=u;h=_-D|0;u=D}y=F+1+g+q+h|0;Ol(a,32,J,y,H);if(!(k[a>>2]&32))fl(G,F,a)|0;Ol(a,48,J,y,H^65536);do{if(s){o=w>>>0>E>>>0?E:w;h=o;do{m=Nl(k[h>>2]|0,0,R)|0;do{if((h|0)==(o|0)){if((m|0)!=(R|0))break;i[T>>0]=48;m=T}else{if(m>>>0<=ca>>>0)break;do{m=m+-1|0;i[m>>0]=48}while(m>>>0>ca>>>0)}}while(0);if(!(k[a>>2]&32))fl(m,S-m|0,a)|0;h=h+4|0}while(h>>>0<=E>>>0);do{if(x){if(k[a>>2]&32)break;fl(56755,1,a)|0}}while(0);if((g|0)>0&h>>>0>>0){m=h;while(1){h=Nl(k[m>>2]|0,0,R)|0;if(h>>>0>ca>>>0)do{h=h+-1|0;i[h>>0]=48}while(h>>>0>ca>>>0);if(!(k[a>>2]&32))fl(h,(g|0)>9?9:g,a)|0;m=m+4|0;h=g+-9|0;if(!((g|0)>9&m>>>0>>0)){g=h;break}else g=h}}Ol(a,48,g+9|0,9,0)}else{s=z?C:w+4|0;if((g|0)>-1){q=(m|0)==0;o=w;do{h=Nl(k[o>>2]|0,0,R)|0;if((h|0)==(R|0)){i[T>>0]=48;h=T}do{if((o|0)==(w|0)){m=h+1|0;if(!(k[a>>2]&32))fl(h,1,a)|0;if(q&(g|0)<1){h=m;break}if(k[a>>2]&32){h=m;break}fl(56755,1,a)|0;h=m}else{if(h>>>0<=ca>>>0)break;do{h=h+-1|0;i[h>>0]=48}while(h>>>0>ca>>>0)}}while(0);m=S-h|0;if(!(k[a>>2]&32))fl(h,(g|0)>(m|0)?m:g,a)|0;g=g-m|0;o=o+4|0}while(o>>>0>>0&(g|0)>-1)}Ol(a,48,g+18|0,18,0);if(k[a>>2]&32)break;fl(u,_-u|0,a)|0}}while(0);Ol(a,32,J,y,H^8192);g=(y|0)<(J|0)?J:y}else{s=(u&32|0)!=0;q=n!=n|0.0!=0.0;h=q?0:F;o=h+3|0;Ol(a,32,J,o,m);g=k[a>>2]|0;if(!(g&32)){fl(G,h,a)|0;g=k[a>>2]|0}if(!(g&32))fl(q?s?56747:56751:s?56739:56743,3,a)|0;Ol(a,32,J,o,H^8192);g=(o|0)<(J|0)?J:o}}while(0);w=I;continue a}default:{m=H;h=o;s=0;u=56703;g=N}}}while(0);g:do{if((K|0)==64){m=aa;h=k[m>>2]|0;m=k[m+4>>2]|0;q=u&32;if(!((h|0)==0&(m|0)==0)){g=N;do{g=g+-1|0;i[g>>0]=l[56687+(h&15)>>0]|q;h=uw(h|0,m|0,4)|0;m=M}while(!((h|0)==0&(m|0)==0));K=aa;if((s&8|0)==0|(k[K>>2]|0)==0&(k[K+4>>2]|0)==0){h=s;s=0;q=56703;K=77}else{h=s;s=2;q=56703+(u>>4)|0;K=77}}else{g=N;h=s;s=0;q=56703;K=77}}else if((K|0)==76){g=Nl(g,h,N)|0;h=H;s=m;K=77}else if((K|0)==82){K=0;H=tl(g,0,o)|0;G=(H|0)==0;w=g;h=G?o:H-g|0;s=0;u=56703;g=G?g+o|0:H}else if((K|0)==86){K=0;h=0;g=0;q=k[aa>>2]|0;while(1){m=k[q>>2]|0;if(!m)break;g=Sk(ea,m)|0;if((g|0)<0|g>>>0>(o-h|0)>>>0)break;h=g+h|0;if(o>>>0>h>>>0)q=q+4|0;else break}if((g|0)<0){f=-1;break a}Ol(a,32,J,h,H);if(!h){g=0;K=98}else{m=0;o=k[aa>>2]|0;while(1){g=k[o>>2]|0;if(!g){g=h;K=98;break g}g=Sk(ea,g)|0;m=g+m|0;if((m|0)>(h|0)){g=h;K=98;break g}if(!(k[a>>2]&32))fl(ea,g,a)|0;if(m>>>0>=h>>>0){g=h;K=98;break}else o=o+4|0}}}}while(0);if((K|0)==98){K=0;Ol(a,32,J,g,H^8192);w=I;g=(J|0)>(g|0)?J:g;continue}if((K|0)==77){K=0;m=(o|0)>-1?h&-65537:h;h=aa;h=(k[h>>2]|0)!=0|(k[h+4>>2]|0)!=0;if((o|0)!=0|h){h=(h&1^1)+(U-g)|0;w=g;h=(o|0)>(h|0)?o:h;u=q;g=N}else{w=N;h=0;u=q;g=N}}q=g-w|0;h=(h|0)<(q|0)?q:h;o=s+h|0;g=(J|0)<(o|0)?o:J;Ol(a,32,g,o,m);if(!(k[a>>2]&32))fl(u,s,a)|0;Ol(a,48,g,o,m^65536);Ol(a,48,h,q,0);if(!(k[a>>2]&32))fl(w,q,a)|0;Ol(a,32,g,o,m^8192);w=I}h:do{if((K|0)==245)if(!a)if(b){f=1;while(1){b=k[e+(f<<2)>>2]|0;if(!b)break;Ml(d+(f<<3)|0,b,c);f=f+1|0;if((f|0)>=10){f=1;break h}}if((f|0)<10)while(1){if(k[e+(f<<2)>>2]|0){f=-1;break h}f=f+1|0;if((f|0)>=10){f=1;break}}else f=1}else f=0}while(0);r=ga;return f|0}function Il(a,b,c){a=a|0;b=b|0;c=c|0;return $k(a,b,c)|0}function Jl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;h=r;r=r+112|0;g=h;e=g;f=e+112|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(f|0));e=g+4|0;k[e>>2]=a;f=g+8|0;k[f>>2]=-1;k[g+44>>2]=a;k[g+76>>2]=-1;qk(g,0);d=+ok(g,c,1);c=(k[e>>2]|0)-(k[f>>2]|0)+(k[g+108>>2]|0)|0;if(b)k[b>>2]=(c|0)!=0?a+c|0:a;r=h;return+d}function Kl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;i=r;r=r+112|0;h=i;k[h>>2]=0;f=h+4|0;k[f>>2]=a;k[h+44>>2]=a;g=h+8|0;k[g>>2]=(a|0)<0?-1:a+2147483647|0;k[h+76>>2]=-1;qk(h,0);d=pk(h,c,1,d,e)|0;if(b)k[b>>2]=a+((k[f>>2]|0)+(k[h+108>>2]|0)-(k[g>>2]|0));r=i;return d|0}function Ll(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=a+20|0;e=k[d>>2]|0;a=(k[a+16>>2]|0)-e|0;a=a>>>0>c>>>0?c:a;vw(e|0,b|0,a|0)|0;k[d>>2]=(k[d>>2]|0)+a;return c|0}function Ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0.0;a:do{if(b>>>0<=20)do{switch(b|0){case 9:{d=(k[c>>2]|0)+(4-1)&~(4-1);b=k[d>>2]|0;k[c>>2]=d+4;k[a>>2]=b;break a}case 10:{d=(k[c>>2]|0)+(4-1)&~(4-1);b=k[d>>2]|0;k[c>>2]=d+4;d=a;k[d>>2]=b;k[d+4>>2]=((b|0)<0)<<31>>31;break a}case 11:{d=(k[c>>2]|0)+(4-1)&~(4-1);b=k[d>>2]|0;k[c>>2]=d+4;d=a;k[d>>2]=b;k[d+4>>2]=0;break a}case 12:{d=(k[c>>2]|0)+(8-1)&~(8-1);b=d;e=k[b>>2]|0;b=k[b+4>>2]|0;k[c>>2]=d+8;d=a;k[d>>2]=e;k[d+4>>2]=b;break a}case 13:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;d=(d&65535)<<16>>16;e=a;k[e>>2]=d;k[e+4>>2]=((d|0)<0)<<31>>31;break a}case 14:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;e=a;k[e>>2]=d&65535;k[e+4>>2]=0;break a}case 15:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;d=(d&255)<<24>>24;e=a;k[e>>2]=d;k[e+4>>2]=((d|0)<0)<<31>>31;break a}case 16:{e=(k[c>>2]|0)+(4-1)&~(4-1);d=k[e>>2]|0;k[c>>2]=e+4;e=a;k[e>>2]=d&255;k[e+4>>2]=0;break a}case 17:{e=(k[c>>2]|0)+(8-1)&~(8-1);f=+p[e>>3];k[c>>2]=e+8;p[a>>3]=f;break a}case 18:{e=(k[c>>2]|0)+(8-1)&~(8-1);f=+p[e>>3];k[c>>2]=e+8;p[a>>3]=f;break a}default:break a}}while(0)}while(0);return}function Nl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(b>>>0>0|(b|0)==0&a>>>0>4294967295)while(1){d=Fw(a|0,b|0,10,0)|0;c=c+-1|0;i[c>>0]=d|48;d=Ew(a|0,b|0,10,0)|0;if(b>>>0>9|(b|0)==9&a>>>0>4294967295){a=d;b=M}else{a=d;break}}if(a)while(1){c=c+-1|0;i[c>>0]=(a>>>0)%10|0|48;if(a>>>0<10)break;else a=(a>>>0)/10|0}return c|0}function Ol(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=r;r=r+256|0;g=h;do{if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;sw(g|0,b|0,(e>>>0>256?256:e)|0)|0;b=k[a>>2]|0;f=(b&32|0)==0;if(e>>>0>255){d=c-d|0;do{if(f){fl(g,256,a)|0;b=k[a>>2]|0}e=e+-256|0;f=(b&32|0)==0}while(e>>>0>255);if(f)e=d&255;else break}else if(!f)break;fl(g,e,a)|0}}while(0);r=h;return}function Pl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=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;do{if(a>>>0<245){o=a>>>0<11?16:a+11&-8;a=o>>>3;h=k[10218]|0;c=h>>>a;if(c&3){a=(c&1^1)+a|0;d=a<<1;c=40912+(d<<2)|0;d=40912+(d+2<<2)|0;e=k[d>>2]|0;f=e+8|0;g=k[f>>2]|0;do{if((c|0)!=(g|0)){if(g>>>0<(k[10222]|0)>>>0)Pa();b=g+12|0;if((k[b>>2]|0)==(e|0)){k[b>>2]=c;k[d>>2]=g;break}else Pa()}else k[10218]=h&~(1<>2]=M|3;M=e+(M|4)|0;k[M>>2]=k[M>>2]|1;M=f;return M|0}g=k[10220]|0;if(o>>>0>g>>>0){if(c){d=2<>>12&16;d=d>>>i;e=d>>>5&8;d=d>>>e;f=d>>>2&4;d=d>>>f;c=d>>>1&2;d=d>>>c;a=d>>>1&1;a=(e|i|f|c|a)+(d>>>a)|0;d=a<<1;c=40912+(d<<2)|0;d=40912+(d+2<<2)|0;f=k[d>>2]|0;i=f+8|0;e=k[i>>2]|0;do{if((c|0)!=(e|0)){if(e>>>0<(k[10222]|0)>>>0)Pa();b=e+12|0;if((k[b>>2]|0)==(f|0)){k[b>>2]=c;k[d>>2]=e;j=k[10220]|0;break}else Pa()}else{k[10218]=h&~(1<>2]=o|3;h=f+o|0;k[f+(o|4)>>2]=g|1;k[f+M>>2]=g;if(j){e=k[10223]|0;c=j>>>3;b=c<<1;d=40912+(b<<2)|0;a=k[10218]|0;c=1<>2]|0;if(b>>>0<(k[10222]|0)>>>0)Pa();else{l=a;m=b}}else{k[10218]=a|c;l=40912+(b+2<<2)|0;m=d}k[l>>2]=e;k[m+12>>2]=e;k[e+8>>2]=m;k[e+12>>2]=d}k[10220]=g;k[10223]=h;M=i;return M|0}a=k[10219]|0;if(a){c=(a&0-a)+-1|0;L=c>>>12&16;c=c>>>L;K=c>>>5&8;c=c>>>K;M=c>>>2&4;c=c>>>M;a=c>>>1&2;c=c>>>a;d=c>>>1&1;d=k[41176+((K|L|M|a|d)+(c>>>d)<<2)>>2]|0;c=(k[d+4>>2]&-8)-o|0;a=d;while(1){b=k[a+16>>2]|0;if(!b){b=k[a+20>>2]|0;if(!b){i=c;break}}a=(k[b+4>>2]&-8)-o|0;M=a>>>0>>0;c=M?a:c;a=b;d=M?b:d}f=k[10222]|0;if(d>>>0>>0)Pa();h=d+o|0;if(d>>>0>=h>>>0)Pa();g=k[d+24>>2]|0;c=k[d+12>>2]|0;do{if((c|0)==(d|0)){a=d+20|0;b=k[a>>2]|0;if(!b){a=d+16|0;b=k[a>>2]|0;if(!b){n=0;break}}while(1){c=b+20|0;e=k[c>>2]|0;if(e){b=e;a=c;continue}c=b+16|0;e=k[c>>2]|0;if(!e)break;else{b=e;a=c}}if(a>>>0>>0)Pa();else{k[a>>2]=0;n=b;break}}else{e=k[d+8>>2]|0;if(e>>>0>>0)Pa();b=e+12|0;if((k[b>>2]|0)!=(d|0))Pa();a=c+8|0;if((k[a>>2]|0)==(d|0)){k[b>>2]=c;k[a>>2]=e;n=c;break}else Pa()}}while(0);do{if(g){b=k[d+28>>2]|0;a=41176+(b<<2)|0;if((d|0)==(k[a>>2]|0)){k[a>>2]=n;if(!n){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=g+16|0;if((k[b>>2]|0)==(d|0))k[b>>2]=n;else k[g+20>>2]=n;if(!n)break}a=k[10222]|0;if(n>>>0>>0)Pa();k[n+24>>2]=g;b=k[d+16>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[n+16>>2]=b;k[b+24>>2]=n;break}}while(0);b=k[d+20>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[n+20>>2]=b;k[b+24>>2]=n;break}}}while(0);if(i>>>0<16){M=i+o|0;k[d+4>>2]=M|3;M=d+(M+4)|0;k[M>>2]=k[M>>2]|1}else{k[d+4>>2]=o|3;k[d+(o|4)>>2]=i|1;k[d+(i+o)>>2]=i;b=k[10220]|0;if(b){f=k[10223]|0;c=b>>>3;b=c<<1;e=40912+(b<<2)|0;a=k[10218]|0;c=1<>2]|0;if(a>>>0<(k[10222]|0)>>>0)Pa();else{p=b;q=a}}else{k[10218]=a|c;p=40912+(b+2<<2)|0;q=e}k[p>>2]=f;k[q+12>>2]=f;k[f+8>>2]=q;k[f+12>>2]=e}k[10220]=i;k[10223]=h}M=d+8|0;return M|0}else q=o}else q=o}else if(a>>>0<=4294967231){a=a+11|0;m=a&-8;l=k[10219]|0;if(l){c=0-m|0;a=a>>>8;if(a)if(m>>>0>16777215)j=31;else{q=(a+1048320|0)>>>16&8;v=a<>>16&4;v=v<>>16&2;j=14-(p|q|j)+(v<>>15)|0;j=m>>>(j+7|0)&1|j<<1}else j=0;a=k[41176+(j<<2)>>2]|0;a:do{if(!a){e=0;a=0;v=86}else{g=c;e=0;h=m<<((j|0)==31?0:25-(j>>>1)|0);i=a;a=0;while(1){f=k[i+4>>2]&-8;c=f-m|0;if(c>>>0>>0)if((f|0)==(m|0)){f=i;a=i;v=90;break a}else a=i;else c=g;v=k[i+20>>2]|0;i=k[i+16+(h>>>31<<2)>>2]|0;e=(v|0)==0|(v|0)==(i|0)?e:v;if(!i){v=86;break}else{g=c;h=h<<1}}}}while(0);if((v|0)==86){if((e|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>n;l=a>>>5&8;a=a>>>l;p=a>>>2&4;a=a>>>p;q=a>>>1&2;a=a>>>q;e=a>>>1&1;e=k[41176+((l|n|p|q|e)+(a>>>e)<<2)>>2]|0;a=0}if(!e){h=c;i=a}else{f=e;v=90}}if((v|0)==90)while(1){v=0;q=(k[f+4>>2]&-8)-m|0;e=q>>>0>>0;c=e?q:c;a=e?f:a;e=k[f+16>>2]|0;if(e){f=e;v=90;continue}f=k[f+20>>2]|0;if(!f){h=c;i=a;break}else v=90}if((i|0)!=0?h>>>0<((k[10220]|0)-m|0)>>>0:0){e=k[10222]|0;if(i>>>0>>0)Pa();g=i+m|0;if(i>>>0>=g>>>0)Pa();f=k[i+24>>2]|0;c=k[i+12>>2]|0;do{if((c|0)==(i|0)){a=i+20|0;b=k[a>>2]|0;if(!b){a=i+16|0;b=k[a>>2]|0;if(!b){o=0;break}}while(1){c=b+20|0;d=k[c>>2]|0;if(d){b=d;a=c;continue}c=b+16|0;d=k[c>>2]|0;if(!d)break;else{b=d;a=c}}if(a>>>0>>0)Pa();else{k[a>>2]=0;o=b;break}}else{d=k[i+8>>2]|0;if(d>>>0>>0)Pa();b=d+12|0;if((k[b>>2]|0)!=(i|0))Pa();a=c+8|0;if((k[a>>2]|0)==(i|0)){k[b>>2]=c;k[a>>2]=d;o=c;break}else Pa()}}while(0);do{if(f){b=k[i+28>>2]|0;a=41176+(b<<2)|0;if((i|0)==(k[a>>2]|0)){k[a>>2]=o;if(!o){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=f+16|0;if((k[b>>2]|0)==(i|0))k[b>>2]=o;else k[f+20>>2]=o;if(!o)break}a=k[10222]|0;if(o>>>0>>0)Pa();k[o+24>>2]=f;b=k[i+16>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[o+16>>2]=b;k[b+24>>2]=o;break}}while(0);b=k[i+20>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[o+20>>2]=b;k[b+24>>2]=o;break}}}while(0);b:do{if(h>>>0>=16){k[i+4>>2]=m|3;k[i+(m|4)>>2]=h|1;k[i+(h+m)>>2]=h;b=h>>>3;if(h>>>0<256){a=b<<1;d=40912+(a<<2)|0;c=k[10218]|0;b=1<>2]|0;if(a>>>0<(k[10222]|0)>>>0)Pa();else{s=b;t=a}}else{k[10218]=c|b;s=40912+(a+2<<2)|0;t=d}k[s>>2]=g;k[t+12>>2]=g;k[i+(m+8)>>2]=t;k[i+(m+12)>>2]=d;break}b=h>>>8;if(b)if(h>>>0>16777215)d=31;else{L=(b+1048320|0)>>>16&8;M=b<>>16&4;M=M<>>16&2;d=14-(K|L|d)+(M<>>15)|0;d=h>>>(d+7|0)&1|d<<1}else d=0;b=41176+(d<<2)|0;k[i+(m+28)>>2]=d;k[i+(m+20)>>2]=0;k[i+(m+16)>>2]=0;a=k[10219]|0;c=1<>2]=g;k[i+(m+24)>>2]=b;k[i+(m+12)>>2]=g;k[i+(m+8)>>2]=g;break}b=k[b>>2]|0;c:do{if((k[b+4>>2]&-8|0)!=(h|0)){d=h<<((d|0)==31?0:25-(d>>>1)|0);while(1){a=b+16+(d>>>31<<2)|0;c=k[a>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(h|0)){y=c;break c}else{d=d<<1;b=c}}if(a>>>0<(k[10222]|0)>>>0)Pa();else{k[a>>2]=g;k[i+(m+24)>>2]=b;k[i+(m+12)>>2]=g;k[i+(m+8)>>2]=g;break b}}else y=b}while(0);b=y+8|0;a=k[b>>2]|0;M=k[10222]|0;if(a>>>0>=M>>>0&y>>>0>=M>>>0){k[a+12>>2]=g;k[b>>2]=g;k[i+(m+8)>>2]=a;k[i+(m+12)>>2]=y;k[i+(m+24)>>2]=0;break}else Pa()}else{M=h+m|0;k[i+4>>2]=M|3;M=i+(M+4)|0;k[M>>2]=k[M>>2]|1}}while(0);M=i+8|0;return M|0}else q=m}else q=m}else q=-1}while(0);c=k[10220]|0;if(c>>>0>=q>>>0){b=c-q|0;a=k[10223]|0;if(b>>>0>15){k[10223]=a+q;k[10220]=b;k[a+(q+4)>>2]=b|1;k[a+c>>2]=b;k[a+4>>2]=q|3}else{k[10220]=0;k[10223]=0;k[a+4>>2]=c|3;M=a+(c+4)|0;k[M>>2]=k[M>>2]|1}M=a+8|0;return M|0}a=k[10221]|0;if(a>>>0>q>>>0){L=a-q|0;k[10221]=L;M=k[10224]|0;k[10224]=M+q;k[M+(q+4)>>2]=L|1;k[M+4>>2]=q|3;M=M+8|0;return M|0}do{if(!(k[10336]|0)){a=hb(30)|0;if(!(a+-1&a)){k[10338]=a;k[10337]=a;k[10339]=-1;k[10340]=-1;k[10341]=0;k[10329]=0;y=(zb(0)|0)&-16^1431655768;k[10336]=y;break}else Pa()}}while(0);i=q+48|0;h=k[10338]|0;j=q+47|0;g=h+j|0;h=0-h|0;l=g&h;if(l>>>0<=q>>>0){M=0;return M|0}a=k[10328]|0;if((a|0)!=0?(t=k[10326]|0,y=t+l|0,y>>>0<=t>>>0|y>>>0>a>>>0):0){M=0;return M|0}d:do{if(!(k[10329]&4)){a=k[10224]|0;e:do{if(a){e=41320;while(1){c=k[e>>2]|0;if(c>>>0<=a>>>0?(r=e+4|0,(c+(k[r>>2]|0)|0)>>>0>a>>>0):0){f=e;a=r;break}e=k[e+8>>2]|0;if(!e){v=174;break e}}c=g-(k[10221]|0)&h;if(c>>>0<2147483647){e=bb(c|0)|0;y=(e|0)==((k[f>>2]|0)+(k[a>>2]|0)|0);a=y?c:0;if(y){if((e|0)!=(-1|0)){w=e;p=a;v=194;break d}}else v=184}else a=0}else v=174}while(0);do{if((v|0)==174){f=bb(0)|0;if((f|0)!=(-1|0)){a=f;c=k[10337]|0;e=c+-1|0;if(!(e&a))c=l;else c=l-a+(e+a&0-c)|0;a=k[10326]|0;e=a+c|0;if(c>>>0>q>>>0&c>>>0<2147483647){y=k[10328]|0;if((y|0)!=0?e>>>0<=a>>>0|e>>>0>y>>>0:0){a=0;break}e=bb(c|0)|0;y=(e|0)==(f|0);a=y?c:0;if(y){w=f;p=a;v=194;break d}else v=184}else a=0}else a=0}}while(0);f:do{if((v|0)==184){f=0-c|0;do{if(i>>>0>c>>>0&(c>>>0<2147483647&(e|0)!=(-1|0))?(u=k[10338]|0,u=j-c+u&0-u,u>>>0<2147483647):0)if((bb(u|0)|0)==(-1|0)){bb(f|0)|0;break f}else{c=u+c|0;break}}while(0);if((e|0)!=(-1|0)){w=e;p=c;v=194;break d}}}while(0);k[10329]=k[10329]|4;v=191}else{a=0;v=191}}while(0);if((((v|0)==191?l>>>0<2147483647:0)?(w=bb(l|0)|0,x=bb(0)|0,w>>>0>>0&((w|0)!=(-1|0)&(x|0)!=(-1|0))):0)?(z=x-w|0,A=z>>>0>(q+40|0)>>>0,A):0){p=A?z:a;v=194}if((v|0)==194){a=(k[10326]|0)+p|0;k[10326]=a;if(a>>>0>(k[10327]|0)>>>0)k[10327]=a;g=k[10224]|0;g:do{if(g){f=41320;do{a=k[f>>2]|0;c=f+4|0;e=k[c>>2]|0;if((w|0)==(a+e|0)){B=a;C=c;D=e;E=f;v=204;break}f=k[f+8>>2]|0}while((f|0)!=0);if(((v|0)==204?(k[E+12>>2]&8|0)==0:0)?g>>>0>>0&g>>>0>=B>>>0:0){k[C>>2]=D+p;M=(k[10221]|0)+p|0;L=g+8|0;L=(L&7|0)==0?0:0-L&7;K=M-L|0;k[10224]=g+L;k[10221]=K;k[g+(L+4)>>2]=K|1;k[g+(M+4)>>2]=40;k[10225]=k[10340];break}a=k[10222]|0;if(w>>>0>>0){k[10222]=w;a=w}c=w+p|0;f=41320;while(1){if((k[f>>2]|0)==(c|0)){e=f;c=f;v=212;break}f=k[f+8>>2]|0;if(!f){c=41320;break}}if((v|0)==212)if(!(k[c+12>>2]&8)){k[e>>2]=w;n=c+4|0;k[n>>2]=(k[n>>2]|0)+p;n=w+8|0;n=(n&7|0)==0?0:0-n&7;j=w+(p+8)|0;j=(j&7|0)==0?0:0-j&7;b=w+(j+p)|0;m=n+q|0;o=w+m|0;l=b-(w+n)-q|0;k[w+(n+4)>>2]=q|3;h:do{if((b|0)!=(g|0)){if((b|0)==(k[10223]|0)){M=(k[10220]|0)+l|0;k[10220]=M;k[10223]=o;k[w+(m+4)>>2]=M|1;k[w+(M+m)>>2]=M;break}h=p+4|0;c=k[w+(h+j)>>2]|0;if((c&3|0)==1){i=c&-8;f=c>>>3;i:do{if(c>>>0>=256){g=k[w+((j|24)+p)>>2]|0;d=k[w+(p+12+j)>>2]|0;do{if((d|0)==(b|0)){e=j|16;d=w+(h+e)|0;c=k[d>>2]|0;if(!c){d=w+(e+p)|0;c=k[d>>2]|0;if(!c){J=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;J=c;break}}else{e=k[w+((j|8)+p)>>2]|0;if(e>>>0>>0)Pa();a=e+12|0;if((k[a>>2]|0)!=(b|0))Pa();c=d+8|0;if((k[c>>2]|0)==(b|0)){k[a>>2]=d;k[c>>2]=e;J=d;break}else Pa()}}while(0);if(!g)break;a=k[w+(p+28+j)>>2]|0;c=41176+(a<<2)|0;do{if((b|0)!=(k[c>>2]|0)){if(g>>>0<(k[10222]|0)>>>0)Pa();a=g+16|0;if((k[a>>2]|0)==(b|0))k[a>>2]=J;else k[g+20>>2]=J;if(!J)break i}else{k[c>>2]=J;if(J)break;k[10219]=k[10219]&~(1<>>0>>0)Pa();k[J+24>>2]=g;b=j|16;a=k[w+(b+p)>>2]|0;do{if(a)if(a>>>0>>0)Pa();else{k[J+16>>2]=a;k[a+24>>2]=J;break}}while(0);b=k[w+(h+b)>>2]|0;if(!b)break;if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[J+20>>2]=b;k[b+24>>2]=J;break}}else{d=k[w+((j|8)+p)>>2]|0;e=k[w+(p+12+j)>>2]|0;c=40912+(f<<1<<2)|0;do{if((d|0)!=(c|0)){if(d>>>0>>0)Pa();if((k[d+12>>2]|0)==(b|0))break;Pa()}}while(0);if((e|0)==(d|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();a=e+8|0;if((k[a>>2]|0)==(b|0)){F=a;break}Pa()}}while(0);k[d+12>>2]=e;k[F>>2]=d}}while(0);b=w+((i|j)+p)|0;e=i+l|0}else e=l;b=b+4|0;k[b>>2]=k[b>>2]&-2;k[w+(m+4)>>2]=e|1;k[w+(e+m)>>2]=e;b=e>>>3;if(e>>>0<256){a=b<<1;d=40912+(a<<2)|0;c=k[10218]|0;b=1<>2]|0;if(a>>>0>=(k[10222]|0)>>>0){K=b;L=a;break}Pa()}}while(0);k[K>>2]=o;k[L+12>>2]=o;k[w+(m+8)>>2]=L;k[w+(m+12)>>2]=d;break}b=e>>>8;do{if(!b)d=0;else{if(e>>>0>16777215){d=31;break}K=(b+1048320|0)>>>16&8;L=b<>>16&4;L=L<>>16&2;d=14-(J|K|d)+(L<>>15)|0;d=e>>>(d+7|0)&1|d<<1}}while(0);b=41176+(d<<2)|0;k[w+(m+28)>>2]=d;k[w+(m+20)>>2]=0;k[w+(m+16)>>2]=0;a=k[10219]|0;c=1<>2]=o;k[w+(m+24)>>2]=b;k[w+(m+12)>>2]=o;k[w+(m+8)>>2]=o;break}b=k[b>>2]|0;j:do{if((k[b+4>>2]&-8|0)!=(e|0)){d=e<<((d|0)==31?0:25-(d>>>1)|0);while(1){a=b+16+(d>>>31<<2)|0;c=k[a>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(e|0)){M=c;break j}else{d=d<<1;b=c}}if(a>>>0<(k[10222]|0)>>>0)Pa();else{k[a>>2]=o;k[w+(m+24)>>2]=b;k[w+(m+12)>>2]=o;k[w+(m+8)>>2]=o;break h}}else M=b}while(0);b=M+8|0;a=k[b>>2]|0;L=k[10222]|0;if(a>>>0>=L>>>0&M>>>0>=L>>>0){k[a+12>>2]=o;k[b>>2]=o;k[w+(m+8)>>2]=a;k[w+(m+12)>>2]=M;k[w+(m+24)>>2]=0;break}else Pa()}else{M=(k[10221]|0)+l|0;k[10221]=M;k[10224]=o;k[w+(m+4)>>2]=M|1}}while(0);M=w+(n|8)|0;return M|0}else c=41320;while(1){a=k[c>>2]|0;if(a>>>0<=g>>>0?(b=k[c+4>>2]|0,d=a+b|0,d>>>0>g>>>0):0)break;c=k[c+8>>2]|0}e=a+(b+-39)|0;a=a+(b+-47+((e&7|0)==0?0:0-e&7))|0;e=g+16|0;a=a>>>0>>0?g:a;b=a+8|0;c=w+8|0;c=(c&7|0)==0?0:0-c&7;M=p+-40-c|0;k[10224]=w+c;k[10221]=M;k[w+(c+4)>>2]=M|1;k[w+(p+-36)>>2]=40;k[10225]=k[10340];c=a+4|0;k[c>>2]=27;k[b>>2]=k[10330];k[b+4>>2]=k[10331];k[b+8>>2]=k[10332];k[b+12>>2]=k[10333];k[10330]=w;k[10331]=p;k[10333]=0;k[10332]=b;b=a+28|0;k[b>>2]=7;if((a+32|0)>>>0>>0)do{M=b;b=b+4|0;k[b>>2]=7}while((M+8|0)>>>0>>0);if((a|0)!=(g|0)){f=a-g|0;k[c>>2]=k[c>>2]&-2;k[g+4>>2]=f|1;k[a>>2]=f;b=f>>>3;if(f>>>0<256){a=b<<1;d=40912+(a<<2)|0;c=k[10218]|0;b=1<>2]|0;if(a>>>0<(k[10222]|0)>>>0)Pa();else{G=b;H=a}}else{k[10218]=c|b;G=40912+(a+2<<2)|0;H=d}k[G>>2]=g;k[H+12>>2]=g;k[g+8>>2]=H;k[g+12>>2]=d;break}b=f>>>8;if(b)if(f>>>0>16777215)d=31;else{L=(b+1048320|0)>>>16&8;M=b<>>16&4;M=M<>>16&2;d=14-(K|L|d)+(M<>>15)|0;d=f>>>(d+7|0)&1|d<<1}else d=0;c=41176+(d<<2)|0;k[g+28>>2]=d;k[g+20>>2]=0;k[e>>2]=0;b=k[10219]|0;a=1<>2]=g;k[g+24>>2]=c;k[g+12>>2]=g;k[g+8>>2]=g;break}b=k[c>>2]|0;k:do{if((k[b+4>>2]&-8|0)!=(f|0)){d=f<<((d|0)==31?0:25-(d>>>1)|0);while(1){a=b+16+(d>>>31<<2)|0;c=k[a>>2]|0;if(!c)break;if((k[c+4>>2]&-8|0)==(f|0)){I=c;break k}else{d=d<<1;b=c}}if(a>>>0<(k[10222]|0)>>>0)Pa();else{k[a>>2]=g;k[g+24>>2]=b;k[g+12>>2]=g;k[g+8>>2]=g;break g}}else I=b}while(0);b=I+8|0;a=k[b>>2]|0;M=k[10222]|0;if(a>>>0>=M>>>0&I>>>0>=M>>>0){k[a+12>>2]=g;k[b>>2]=g;k[g+8>>2]=a;k[g+12>>2]=I;k[g+24>>2]=0;break}else Pa()}}else{M=k[10222]|0;if((M|0)==0|w>>>0>>0)k[10222]=w;k[10330]=w;k[10331]=p;k[10333]=0;k[10227]=k[10336];k[10226]=-1;b=0;do{M=b<<1;L=40912+(M<<2)|0;k[40912+(M+3<<2)>>2]=L;k[40912+(M+2<<2)>>2]=L;b=b+1|0}while((b|0)!=32);M=w+8|0;M=(M&7|0)==0?0:0-M&7;L=p+-40-M|0;k[10224]=w+M;k[10221]=L;k[w+(M+4)>>2]=L|1;k[w+(p+-36)>>2]=40;k[10225]=k[10340]}}while(0);b=k[10221]|0;if(b>>>0>q>>>0){L=b-q|0;k[10221]=L;M=k[10224]|0;k[10224]=M+q;k[M+(q+4)>>2]=L|1;k[M+4>>2]=q|3;M=M+8|0;return M|0}}M=mk()|0;k[M>>2]=12;M=0;return M|0}function Ql(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if(!a)return;b=a+-8|0;h=k[10222]|0;if(b>>>0>>0)Pa();c=k[a+-4>>2]|0;d=c&3;if((d|0)==1)Pa();o=c&-8;q=a+(o+-8)|0;do{if(!(c&1)){b=k[b>>2]|0;if(!d)return;i=-8-b|0;l=a+i|0;m=b+o|0;if(l>>>0>>0)Pa();if((l|0)==(k[10223]|0)){b=a+(o+-4)|0;c=k[b>>2]|0;if((c&3|0)!=3){u=l;f=m;break}k[10220]=m;k[b>>2]=c&-2;k[a+(i+4)>>2]=m|1;k[q>>2]=m;return}e=b>>>3;if(b>>>0<256){d=k[a+(i+8)>>2]|0;c=k[a+(i+12)>>2]|0;b=40912+(e<<1<<2)|0;if((d|0)!=(b|0)){if(d>>>0>>0)Pa();if((k[d+12>>2]|0)!=(l|0))Pa()}if((c|0)==(d|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();b=c+8|0;if((k[b>>2]|0)==(l|0))g=b;else Pa()}else g=c+8|0;k[d+12>>2]=c;k[g>>2]=d;u=l;f=m;break}g=k[a+(i+24)>>2]|0;d=k[a+(i+12)>>2]|0;do{if((d|0)==(l|0)){c=a+(i+20)|0;b=k[c>>2]|0;if(!b){c=a+(i+16)|0;b=k[c>>2]|0;if(!b){j=0;break}}while(1){d=b+20|0;e=k[d>>2]|0;if(e){b=e;c=d;continue}d=b+16|0;e=k[d>>2]|0;if(!e)break;else{b=e;c=d}}if(c>>>0>>0)Pa();else{k[c>>2]=0;j=b;break}}else{e=k[a+(i+8)>>2]|0;if(e>>>0>>0)Pa();b=e+12|0;if((k[b>>2]|0)!=(l|0))Pa();c=d+8|0;if((k[c>>2]|0)==(l|0)){k[b>>2]=d;k[c>>2]=e;j=d;break}else Pa()}}while(0);if(g){b=k[a+(i+28)>>2]|0;c=41176+(b<<2)|0;if((l|0)==(k[c>>2]|0)){k[c>>2]=j;if(!j){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=g+16|0;if((k[b>>2]|0)==(l|0))k[b>>2]=j;else k[g+20>>2]=j;if(!j){u=l;f=m;break}}c=k[10222]|0;if(j>>>0>>0)Pa();k[j+24>>2]=g;b=k[a+(i+16)>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[j+16>>2]=b;k[b+24>>2]=j;break}}while(0);b=k[a+(i+20)>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[j+20>>2]=b;k[b+24>>2]=j;u=l;f=m;break}else{u=l;f=m}}else{u=l;f=m}}else{u=b;f=o}}while(0);if(u>>>0>=q>>>0)Pa();b=a+(o+-4)|0;c=k[b>>2]|0;if(!(c&1))Pa();if(!(c&2)){if((q|0)==(k[10224]|0)){t=(k[10221]|0)+f|0;k[10221]=t;k[10224]=u;k[u+4>>2]=t|1;if((u|0)!=(k[10223]|0))return;k[10223]=0;k[10220]=0;return}if((q|0)==(k[10223]|0)){t=(k[10220]|0)+f|0;k[10220]=t;k[10223]=u;k[u+4>>2]=t|1;k[u+t>>2]=t;return}f=(c&-8)+f|0;e=c>>>3;do{if(c>>>0>=256){g=k[a+(o+16)>>2]|0;b=k[a+(o|4)>>2]|0;do{if((b|0)==(q|0)){c=a+(o+12)|0;b=k[c>>2]|0;if(!b){c=a+(o+8)|0;b=k[c>>2]|0;if(!b){p=0;break}}while(1){d=b+20|0;e=k[d>>2]|0;if(e){b=e;c=d;continue}d=b+16|0;e=k[d>>2]|0;if(!e)break;else{b=e;c=d}}if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[c>>2]=0;p=b;break}}else{c=k[a+o>>2]|0;if(c>>>0<(k[10222]|0)>>>0)Pa();d=c+12|0;if((k[d>>2]|0)!=(q|0))Pa();e=b+8|0;if((k[e>>2]|0)==(q|0)){k[d>>2]=b;k[e>>2]=c;p=b;break}else Pa()}}while(0);if(g){b=k[a+(o+20)>>2]|0;c=41176+(b<<2)|0;if((q|0)==(k[c>>2]|0)){k[c>>2]=p;if(!p){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=g+16|0;if((k[b>>2]|0)==(q|0))k[b>>2]=p;else k[g+20>>2]=p;if(!p)break}c=k[10222]|0;if(p>>>0>>0)Pa();k[p+24>>2]=g;b=k[a+(o+8)>>2]|0;do{if(b)if(b>>>0>>0)Pa();else{k[p+16>>2]=b;k[b+24>>2]=p;break}}while(0);b=k[a+(o+12)>>2]|0;if(b)if(b>>>0<(k[10222]|0)>>>0)Pa();else{k[p+20>>2]=b;k[b+24>>2]=p;break}}}else{d=k[a+o>>2]|0;c=k[a+(o|4)>>2]|0;b=40912+(e<<1<<2)|0;if((d|0)!=(b|0)){if(d>>>0<(k[10222]|0)>>>0)Pa();if((k[d+12>>2]|0)!=(q|0))Pa()}if((c|0)==(d|0)){k[10218]=k[10218]&~(1<>>0<(k[10222]|0)>>>0)Pa();b=c+8|0;if((k[b>>2]|0)==(q|0))n=b;else Pa()}else n=c+8|0;k[d+12>>2]=c;k[n>>2]=d}}while(0);k[u+4>>2]=f|1;k[u+f>>2]=f;if((u|0)==(k[10223]|0)){k[10220]=f;return}}else{k[b>>2]=c&-2;k[u+4>>2]=f|1;k[u+f>>2]=f}b=f>>>3;if(f>>>0<256){c=b<<1;e=40912+(c<<2)|0;d=k[10218]|0;b=1<>2]|0;if(c>>>0<(k[10222]|0)>>>0)Pa();else{r=b;s=c}}else{k[10218]=d|b;r=40912+(c+2<<2)|0;s=e}k[r>>2]=u;k[s+12>>2]=u;k[u+8>>2]=s;k[u+12>>2]=e;return}b=f>>>8;if(b)if(f>>>0>16777215)e=31;else{r=(b+1048320|0)>>>16&8;s=b<>>16&4;s=s<>>16&2;e=14-(q|r|e)+(s<>>15)|0;e=f>>>(e+7|0)&1|e<<1}else e=0;b=41176+(e<<2)|0;k[u+28>>2]=e;k[u+20>>2]=0;k[u+16>>2]=0;c=k[10219]|0;d=1<>2]|0;b:do{if((k[b+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(e>>>1)|0);while(1){c=b+16+(e>>>31<<2)|0;d=k[c>>2]|0;if(!d)break;if((k[d+4>>2]&-8|0)==(f|0)){t=d;break b}else{e=e<<1;b=d}}if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[c>>2]=u;k[u+24>>2]=b;k[u+12>>2]=u;k[u+8>>2]=u;break a}}else t=b}while(0);b=t+8|0;c=k[b>>2]|0;s=k[10222]|0;if(c>>>0>=s>>>0&t>>>0>=s>>>0){k[c+12>>2]=u;k[b>>2]=u;k[u+8>>2]=c;k[u+12>>2]=t;k[u+24>>2]=0;break}else Pa()}else{k[10219]=c|d;k[b>>2]=u;k[u+24>>2]=b;k[u+12>>2]=u;k[u+8>>2]=u}}while(0);u=(k[10226]|0)+-1|0;k[10226]=u;if(!u)b=41328;else return;while(1){b=k[b>>2]|0;if(!b)break;else b=b+8|0}k[10226]=-1;return}function Rl(a,b){a=a|0;b=b|0;var c=0;if(a){c=ia(b,a)|0;if((b|a)>>>0>65535)c=((c>>>0)/(a>>>0)|0|0)==(b|0)?c:-1}else c=0;b=Pl(c)|0;if(!b)return b|0;if(!(k[b+-4>>2]&3))return b|0;sw(b|0,0,c|0)|0;return b|0}function Sl(a,b){a=a|0;b=b|0;var c=0,d=0;if(!a){a=Pl(b)|0;return a|0}if(b>>>0>4294967231){a=mk()|0;k[a>>2]=12;a=0;return a|0}c=Tl(a+-8|0,b>>>0<11?16:b+11&-8)|0;if(c){a=c+8|0;return a|0}c=Pl(b)|0;if(!c){a=0;return a|0}d=k[a+-4>>2]|0;d=(d&-8)-((d&3|0)==0?8:4)|0;vw(c|0,a|0,(d>>>0>>0?d:b)|0)|0;Ql(a);a=c;return a|0}function Tl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;o=a+4|0;p=k[o>>2]|0;i=p&-8;l=a+i|0;h=k[10222]|0;c=p&3;if(!((c|0)!=1&a>>>0>=h>>>0&a>>>0>>0))Pa();d=a+(i|4)|0;e=k[d>>2]|0;if(!(e&1))Pa();if(!c){if(b>>>0<256){a=0;return a|0}if(i>>>0>=(b+4|0)>>>0?(i-b|0)>>>0<=k[10338]<<1>>>0:0)return a|0;a=0;return a|0}if(i>>>0>=b>>>0){c=i-b|0;if(c>>>0<=15)return a|0;k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=c|3;k[d>>2]=k[d>>2]|1;Ul(a+b|0,c);return a|0}if((l|0)==(k[10224]|0)){c=(k[10221]|0)+i|0;if(c>>>0<=b>>>0){a=0;return a|0}n=c-b|0;k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=n|1;k[10224]=a+b;k[10221]=n;return a|0}if((l|0)==(k[10223]|0)){d=(k[10220]|0)+i|0;if(d>>>0>>0){a=0;return a|0}c=d-b|0;if(c>>>0>15){k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=c|1;k[a+d>>2]=c;d=a+(d+4)|0;k[d>>2]=k[d>>2]&-2;d=a+b|0}else{k[o>>2]=p&1|d|2;d=a+(d+4)|0;k[d>>2]=k[d>>2]|1;d=0;c=0}k[10220]=c;k[10223]=d;return a|0}if(e&2){a=0;return a|0}m=(e&-8)+i|0;if(m>>>0>>0){a=0;return a|0}n=m-b|0;f=e>>>3;do{if(e>>>0>=256){g=k[a+(i+24)>>2]|0;f=k[a+(i+12)>>2]|0;do{if((f|0)==(l|0)){d=a+(i+20)|0;c=k[d>>2]|0;if(!c){d=a+(i+16)|0;c=k[d>>2]|0;if(!c){j=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;j=c;break}}else{e=k[a+(i+8)>>2]|0;if(e>>>0>>0)Pa();c=e+12|0;if((k[c>>2]|0)!=(l|0))Pa();d=f+8|0;if((k[d>>2]|0)==(l|0)){k[c>>2]=f;k[d>>2]=e;j=f;break}else Pa()}}while(0);if(g){c=k[a+(i+28)>>2]|0;d=41176+(c<<2)|0;if((l|0)==(k[d>>2]|0)){k[d>>2]=j;if(!j){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();c=g+16|0;if((k[c>>2]|0)==(l|0))k[c>>2]=j;else k[g+20>>2]=j;if(!j)break}d=k[10222]|0;if(j>>>0>>0)Pa();k[j+24>>2]=g;c=k[a+(i+16)>>2]|0;do{if(c)if(c>>>0>>0)Pa();else{k[j+16>>2]=c;k[c+24>>2]=j;break}}while(0);c=k[a+(i+20)>>2]|0;if(c)if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[j+20>>2]=c;k[c+24>>2]=j;break}}}else{e=k[a+(i+8)>>2]|0;d=k[a+(i+12)>>2]|0;c=40912+(f<<1<<2)|0;if((e|0)!=(c|0)){if(e>>>0>>0)Pa();if((k[e+12>>2]|0)!=(l|0))Pa()}if((d|0)==(e|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();c=d+8|0;if((k[c>>2]|0)==(l|0))g=c;else Pa()}else g=d+8|0;k[e+12>>2]=d;k[g>>2]=e}}while(0);if(n>>>0<16){k[o>>2]=m|p&1|2;b=a+(m|4)|0;k[b>>2]=k[b>>2]|1;return a|0}else{k[o>>2]=p&1|b|2;k[a+(b+4)>>2]=n|3;p=a+(m|4)|0;k[p>>2]=k[p>>2]|1;Ul(a+b|0,n);return a|0}return 0}function Ul(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;q=a+b|0;c=k[a+4>>2]|0;do{if(!(c&1)){j=k[a>>2]|0;if(!(c&3))return;n=a+(0-j)|0;m=j+b|0;i=k[10222]|0;if(n>>>0>>0)Pa();if((n|0)==(k[10223]|0)){d=a+(b+4)|0;c=k[d>>2]|0;if((c&3|0)!=3){t=n;g=m;break}k[10220]=m;k[d>>2]=c&-2;k[a+(4-j)>>2]=m|1;k[q>>2]=m;return}f=j>>>3;if(j>>>0<256){e=k[a+(8-j)>>2]|0;d=k[a+(12-j)>>2]|0;c=40912+(f<<1<<2)|0;if((e|0)!=(c|0)){if(e>>>0>>0)Pa();if((k[e+12>>2]|0)!=(n|0))Pa()}if((d|0)==(e|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();c=d+8|0;if((k[c>>2]|0)==(n|0))h=c;else Pa()}else h=d+8|0;k[e+12>>2]=d;k[h>>2]=e;t=n;g=m;break}h=k[a+(24-j)>>2]|0;e=k[a+(12-j)>>2]|0;do{if((e|0)==(n|0)){e=16-j|0;d=a+(e+4)|0;c=k[d>>2]|0;if(!c){d=a+e|0;c=k[d>>2]|0;if(!c){l=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;l=c;break}}else{f=k[a+(8-j)>>2]|0;if(f>>>0>>0)Pa();c=f+12|0;if((k[c>>2]|0)!=(n|0))Pa();d=e+8|0;if((k[d>>2]|0)==(n|0)){k[c>>2]=e;k[d>>2]=f;l=e;break}else Pa()}}while(0);if(h){c=k[a+(28-j)>>2]|0;d=41176+(c<<2)|0;if((n|0)==(k[d>>2]|0)){k[d>>2]=l;if(!l){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();c=h+16|0;if((k[c>>2]|0)==(n|0))k[c>>2]=l;else k[h+20>>2]=l;if(!l){t=n;g=m;break}}e=k[10222]|0;if(l>>>0>>0)Pa();k[l+24>>2]=h;c=16-j|0;d=k[a+c>>2]|0;do{if(d)if(d>>>0>>0)Pa();else{k[l+16>>2]=d;k[d+24>>2]=l;break}}while(0);c=k[a+(c+4)>>2]|0;if(c)if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[l+20>>2]=c;k[c+24>>2]=l;t=n;g=m;break}else{t=n;g=m}}else{t=n;g=m}}else{t=a;g=b}}while(0);i=k[10222]|0;if(q>>>0>>0)Pa();c=a+(b+4)|0;d=k[c>>2]|0;if(!(d&2)){if((q|0)==(k[10224]|0)){s=(k[10221]|0)+g|0;k[10221]=s;k[10224]=t;k[t+4>>2]=s|1;if((t|0)!=(k[10223]|0))return;k[10223]=0;k[10220]=0;return}if((q|0)==(k[10223]|0)){s=(k[10220]|0)+g|0;k[10220]=s;k[10223]=t;k[t+4>>2]=s|1;k[t+s>>2]=s;return}g=(d&-8)+g|0;f=d>>>3;do{if(d>>>0>=256){h=k[a+(b+24)>>2]|0;e=k[a+(b+12)>>2]|0;do{if((e|0)==(q|0)){d=a+(b+20)|0;c=k[d>>2]|0;if(!c){d=a+(b+16)|0;c=k[d>>2]|0;if(!c){p=0;break}}while(1){e=c+20|0;f=k[e>>2]|0;if(f){c=f;d=e;continue}e=c+16|0;f=k[e>>2]|0;if(!f)break;else{c=f;d=e}}if(d>>>0>>0)Pa();else{k[d>>2]=0;p=c;break}}else{f=k[a+(b+8)>>2]|0;if(f>>>0>>0)Pa();c=f+12|0;if((k[c>>2]|0)!=(q|0))Pa();d=e+8|0;if((k[d>>2]|0)==(q|0)){k[c>>2]=e;k[d>>2]=f;p=e;break}else Pa()}}while(0);if(h){c=k[a+(b+28)>>2]|0;d=41176+(c<<2)|0;if((q|0)==(k[d>>2]|0)){k[d>>2]=p;if(!p){k[10219]=k[10219]&~(1<>>0<(k[10222]|0)>>>0)Pa();c=h+16|0;if((k[c>>2]|0)==(q|0))k[c>>2]=p;else k[h+20>>2]=p;if(!p)break}d=k[10222]|0;if(p>>>0>>0)Pa();k[p+24>>2]=h;c=k[a+(b+16)>>2]|0;do{if(c)if(c>>>0>>0)Pa();else{k[p+16>>2]=c;k[c+24>>2]=p;break}}while(0);c=k[a+(b+20)>>2]|0;if(c)if(c>>>0<(k[10222]|0)>>>0)Pa();else{k[p+20>>2]=c;k[c+24>>2]=p;break}}}else{e=k[a+(b+8)>>2]|0;d=k[a+(b+12)>>2]|0;c=40912+(f<<1<<2)|0;if((e|0)!=(c|0)){if(e>>>0>>0)Pa();if((k[e+12>>2]|0)!=(q|0))Pa()}if((d|0)==(e|0)){k[10218]=k[10218]&~(1<>>0>>0)Pa();c=d+8|0;if((k[c>>2]|0)==(q|0))o=c;else Pa()}else o=d+8|0;k[e+12>>2]=d;k[o>>2]=e}}while(0);k[t+4>>2]=g|1;k[t+g>>2]=g;if((t|0)==(k[10223]|0)){k[10220]=g;return}}else{k[c>>2]=d&-2;k[t+4>>2]=g|1;k[t+g>>2]=g}c=g>>>3;if(g>>>0<256){d=c<<1;f=40912+(d<<2)|0;e=k[10218]|0;c=1<>2]|0;if(d>>>0<(k[10222]|0)>>>0)Pa();else{r=c;s=d}}else{k[10218]=e|c;r=40912+(d+2<<2)|0;s=f}k[r>>2]=t;k[s+12>>2]=t;k[t+8>>2]=s;k[t+12>>2]=f;return}c=g>>>8;if(c)if(g>>>0>16777215)f=31;else{r=(c+1048320|0)>>>16&8;s=c<>>16&4;s=s<>>16&2;f=14-(q|r|f)+(s<>>15)|0;f=g>>>(f+7|0)&1|f<<1}else f=0;c=41176+(f<<2)|0;k[t+28>>2]=f;k[t+20>>2]=0;k[t+16>>2]=0;d=k[10219]|0;e=1<>2]=t;k[t+24>>2]=c;k[t+12>>2]=t;k[t+8>>2]=t;return}c=k[c>>2]|0;a:do{if((k[c+4>>2]&-8|0)!=(g|0)){f=g<<((f|0)==31?0:25-(f>>>1)|0);while(1){d=c+16+(f>>>31<<2)|0;e=k[d>>2]|0;if(!e)break;if((k[e+4>>2]&-8|0)==(g|0)){c=e;break a}else{f=f<<1;c=e}}if(d>>>0<(k[10222]|0)>>>0)Pa();k[d>>2]=t;k[t+24>>2]=c;k[t+12>>2]=t;k[t+8>>2]=t;return}}while(0);d=c+8|0;e=k[d>>2]|0;s=k[10222]|0;if(!(e>>>0>=s>>>0&c>>>0>=s>>>0))Pa();k[e+12>>2]=t;k[d>>2]=t;k[t+8>>2]=e;k[t+12>>2]=c;k[t+24>>2]=0;return}function Vl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=k[9321]|0;Zl(42048,d,42104);k[10342]=42892;k[10344]=42912;k[10343]=0;a=k[10720]|0;x=0;ra(62,41368+a|0,42048);f=x;x=0;if(f&1){f=Wa()|0;qn(41376);fb(f|0)}k[41368+(a+72)>>2]=0;k[41368+(a+76)>>2]=-1;e=k[9322]|0;_l(42152,e,42112);k[10364]=42972;k[10365]=42992;c=k[10740]|0;x=0;ra(62,41456+c|0,42152);f=x;x=0;if(f&1){f=Wa()|0;qn(41460);fb(f|0)}a=c+72|0;k[41456+a>>2]=0;b=c+76|0;k[41456+b>>2]=-1;f=k[9320]|0;_l(42200,f,42120);k[10385]=42972;k[10386]=42992;x=0;ra(62,41540+c|0,42200);g=x;x=0;if(g&1){g=Wa()|0;qn(41544);fb(g|0)}k[41540+a>>2]=0;k[41540+b>>2]=-1;g=k[41540+((k[(k[10385]|0)+-12>>2]|0)+24)>>2]|0;k[10406]=42972;k[10407]=42992;x=0;ra(62,41624+c|0,g|0);g=x;x=0;if(g&1){g=Wa()|0;qn(41628);fb(g|0)}k[41624+a>>2]=0;k[41624+b>>2]=-1;k[41368+((k[(k[10342]|0)+-12>>2]|0)+72)>>2]=41456;a=41540+((k[(k[10385]|0)+-12>>2]|0)+4)|0;k[a>>2]=k[a>>2]|8192;k[41540+((k[(k[10385]|0)+-12>>2]|0)+72)>>2]=41456;$l(42248,d,42128);k[10427]=42932;k[10429]=42952;k[10428]=0;a=k[10730]|0;x=0;ra(62,41708+a|0,42248);g=x;x=0;if(g&1){g=Wa()|0;vn(41716);fb(g|0)}k[41708+(a+72)>>2]=0;k[41708+(a+76)>>2]=-1;am(42304,e,42136);k[10449]=43012;k[10450]=43032;c=k[10750]|0;x=0;ra(62,41796+c|0,42304);g=x;x=0;if(g&1){g=Wa()|0;vn(41800);fb(g|0)}a=c+72|0;k[41796+a>>2]=0;b=c+76|0;k[41796+b>>2]=-1;am(42352,f,42144);k[10470]=43012;k[10471]=43032;x=0;ra(62,41880+c|0,42352);g=x;x=0;if(g&1){g=Wa()|0;vn(41884);fb(g|0)}k[41880+a>>2]=0;k[41880+b>>2]=-1;g=k[41880+((k[(k[10470]|0)+-12>>2]|0)+24)>>2]|0;k[10491]=43012;k[10492]=43032;x=0;ra(62,41964+c|0,g|0);g=x;x=0;if(g&1){g=Wa()|0;vn(41968);fb(g|0)}else{k[41964+a>>2]=0;k[41964+b>>2]=-1;k[41708+((k[(k[10427]|0)+-12>>2]|0)+72)>>2]=41796;g=41880+((k[(k[10470]|0)+-12>>2]|0)+4)|0;k[g>>2]=k[g>>2]|8192;k[41880+((k[(k[10470]|0)+-12>>2]|0)+72)>>2]=41796;return}}function Wl(a){a=a|0;x=0;ta(70,41456)|0;a=x;x=0;if(((!(a&1)?(x=0,ta(70,41624)|0,a=x,x=0,!(a&1)):0)?(x=0,ta(71,41796)|0,a=x,x=0,!(a&1)):0)?(x=0,ta(71,41964)|0,a=x,x=0,!(a&1)):0)return;a=Wa(0)|0;oc(a)}function Xl(){Vl(0);tb(187,56757,w|0)|0;return}function Yl(){return}function Zl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;zn(a);k[a>>2]=42600;k[a+32>>2]=b;k[a+40>>2]=c;k[a+48>>2]=-1;i[a+52>>0]=0;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;ra(23,a|0,d|0);c=x;x=0;if(c&1){f=Wa()|0;Qs(d);xn(a);fb(f|0)}else{Qs(d);r=e;return}}function _l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;zn(a);k[a>>2]=42536;k[a+32>>2]=b;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;b=Aa(37,d|0,44280)|0;f=x;x=0;if(f&1){f=Wa()|0;Qs(d);xn(a);fb(f|0)}else{Qs(d);k[a+36>>2]=b;k[a+40>>2]=c;f=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=f;r=e;return}}function $l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;On(a);k[a>>2]=42472;k[a+32>>2]=b;k[a+40>>2]=c;k[a+48>>2]=-1;i[a+52>>0]=0;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;ra(21,a|0,d|0);c=x;x=0;if(c&1){f=Wa()|0;Qs(d);Mn(a);fb(f|0)}else{Qs(d);r=e;return}}function am(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+16|0;f=e+4|0;d=e;On(a);k[a>>2]=42408;k[a+32>>2]=b;Ps(f,a+4|0);k[d>>2]=k[f>>2];x=0;b=Aa(37,d|0,44288)|0;f=x;x=0;if(f&1){f=Wa()|0;Qs(d);Mn(a);fb(f|0)}else{Qs(d);k[a+36>>2]=b;k[a+40>>2]=c;f=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=f;r=e;return}}function bm(a){a=a|0;Mn(a);mj(a);return}function cm(a,b){a=a|0;b=b|0;Ob[k[(k[a>>2]|0)+24>>2]&127](a)|0;b=Ss(b,44288)|0;k[a+36>>2]=b;b=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=b;return}function dm(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j;c=a+36|0;d=a+40|0;e=h+8|0;f=h;b=a+32|0;a:while(1){a=k[c>>2]|0;a=Wb[k[(k[a>>2]|0)+20>>2]&31](a,k[d>>2]|0,h,e,g)|0;l=(k[g>>2]|0)-f|0;if((gl(h,1,l,k[b>>2]|0)|0)!=(l|0)){a=-1;break}switch(a|0){case 1:break;case 2:{a=-1;break a}default:{i=4;break a}}}if((i|0)==4)a=((dl(k[b>>2]|0)|0)!=0)<<31>>31;r=j;return a|0}function em(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:do{if(!(i[a+44>>0]|0))if((c|0)>0){d=b;b=0;while(1){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,k[d>>2]|0)|0)==-1)break a;b=b+1|0;if((b|0)<(c|0))d=d+4|0;else break}}else b=0;else b=gl(b,4,c,k[a+32>>2]|0)|0}while(0);return b|0}function fm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+32|0;o=s+16|0;c=s+8|0;n=s+4|0;m=s;p=(b|0)==-1;a:do{if(!p){k[c>>2]=b;if(i[a+44>>0]|0)if((gl(c,4,1,k[a+32>>2]|0)|0)==1){q=11;break}else{c=-1;break}k[n>>2]=o;j=c+4|0;l=a+36|0;e=a+40|0;f=o+8|0;g=o;h=a+32|0;while(1){a=k[l>>2]|0;a=ac[k[(k[a>>2]|0)+12>>2]&15](a,k[e>>2]|0,c,j,m,o,f,n)|0;if((k[m>>2]|0)==(c|0)){c=-1;break a}if((a|0)==3)break;d=(a|0)==1;if(a>>>0>=2){c=-1;break a}a=(k[n>>2]|0)-g|0;if((gl(o,1,a,k[h>>2]|0)|0)!=(a|0)){c=-1;break a}if(d)c=d?k[m>>2]|0:c;else{q=11;break a}}if((gl(c,1,1,k[h>>2]|0)|0)!=1)c=-1;else q=11}else q=11}while(0);if((q|0)==11)c=p?0:b;r=s;return c|0}function gm(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ss(b,44288)|0;c=a+36|0;k[c>>2]=d;d=Ob[k[(k[d>>2]|0)+24>>2]&127](d)|0;b=a+44|0;k[b>>2]=d;c=k[c>>2]|0;c=(Ob[k[(k[c>>2]|0)+28>>2]&127](c)|0)&1;i[a+53>>0]=c;if((k[b>>2]|0)>8)$r(56783);return}function hm(a){a=a|0;Mn(a);mj(a);return}function im(a){a=a|0;return lm(a,0)|0}function jm(a){a=a|0;return lm(a,1)|0}function km(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;j=l+16|0;h=l+8|0;d=l+4|0;e=l;f=a+52|0;c=(i[f>>0]|0)!=0;a:do{if((b|0)==-1)if(c)b=-1;else{b=k[a+48>>2]|0;i[f>>0]=(b|0)!=-1&1}else{g=a+48|0;b:do{if(c){k[d>>2]=k[g>>2];c=k[a+36>>2]|0;switch(ac[k[(k[c>>2]|0)+12>>2]&15](c,k[a+40>>2]|0,d,d+4|0,e,j,j+8|0,h)|0){case 1:case 2:{b=-1;break a}case 3:{i[j>>0]=k[g>>2];k[h>>2]=j+1;break}default:{}}c=a+32|0;while(1){d=k[h>>2]|0;if(d>>>0<=j>>>0)break b;a=d+-1|0;k[h>>2]=a;if((kl(i[a>>0]|0,k[c>>2]|0)|0)==-1){b=-1;break a}}}}while(0);k[g>>2]=b;i[f>>0]=1}}while(0);r=l;return b|0}function lm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;q=r;r=r+32|0;p=q+16|0;o=q+8|0;l=q+4|0;m=q;e=a+52|0;a:do{if(i[e>>0]|0){d=a+48|0;c=k[d>>2]|0;if(b){k[d>>2]=-1;i[e>>0]=0}}else{c=k[a+44>>2]|0;c=(c|0)>1?c:1;n=a+32|0;if((c|0)>0){e=0;do{d=hl(k[n>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[p+e>>0]=d;e=e+1|0}while((e|0)<(c|0))}b:do{if(!(i[a+53>>0]|0)){g=a+40|0;h=a+36|0;j=o+4|0;c:while(1){s=k[g>>2]|0;e=s;d=k[e>>2]|0;e=k[e+4>>2]|0;t=k[h>>2]|0;f=p+c|0;switch(ac[k[(k[t>>2]|0)+16>>2]&15](t,s,p,f,l,o,j,m)|0){case 2:{c=-1;break a}case 3:break c;case 1:break;default:break b}t=k[g>>2]|0;k[t>>2]=d;k[t+4>>2]=e;if((c|0)==8){c=-1;break a}d=hl(k[n>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[f>>0]=d;c=c+1|0}k[o>>2]=i[p>>0]}else k[o>>2]=i[p>>0]}while(0);if(b){c=k[o>>2]|0;k[a+48>>2]=c;break}while(1){if((c|0)<=0)break;c=c+-1|0;if((kl(i[p+c>>0]|0,k[n>>2]|0)|0)==-1){c=-1;break a}}c=k[o>>2]|0}}while(0);r=q;return c|0}function mm(a){a=a|0;xn(a);mj(a);return}function nm(a,b){a=a|0;b=b|0;Ob[k[(k[a>>2]|0)+24>>2]&127](a)|0;b=Ss(b,44280)|0;k[a+36>>2]=b;b=(Ob[k[(k[b>>2]|0)+28>>2]&127](b)|0)&1;i[a+44>>0]=b;return}function om(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0;j=r;r=r+16|0;h=j+8|0;g=j;c=a+36|0;d=a+40|0;e=h+8|0;f=h;b=a+32|0;a:while(1){a=k[c>>2]|0;a=Wb[k[(k[a>>2]|0)+20>>2]&31](a,k[d>>2]|0,h,e,g)|0;l=(k[g>>2]|0)-f|0;if((gl(h,1,l,k[b>>2]|0)|0)!=(l|0)){a=-1;break}switch(a|0){case 1:break;case 2:{a=-1;break a}default:{i=4;break a}}}if((i|0)==4)a=((dl(k[b>>2]|0)|0)!=0)<<31>>31;r=j;return a|0}function pm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:do{if(!(i[a+44>>0]|0))if((c|0)>0){d=b;b=0;while(1){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,l[d>>0]|0)|0)==-1)break a;b=b+1|0;if((b|0)<(c|0))d=d+1|0;else break}}else b=0;else b=gl(b,1,c,k[a+32>>2]|0)|0}while(0);return b|0}function qm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+32|0;o=s+16|0;c=s+8|0;n=s+4|0;m=s;p=(b|0)==-1;a:do{if(!p){i[c>>0]=b;if(i[a+44>>0]|0)if((gl(c,1,1,k[a+32>>2]|0)|0)==1){q=11;break}else{c=-1;break}k[n>>2]=o;l=c+1|0;e=a+36|0;f=a+40|0;g=o+8|0;h=o;j=a+32|0;while(1){a=k[e>>2]|0;a=ac[k[(k[a>>2]|0)+12>>2]&15](a,k[f>>2]|0,c,l,m,o,g,n)|0;if((k[m>>2]|0)==(c|0)){c=-1;break a}if((a|0)==3)break;d=(a|0)==1;if(a>>>0>=2){c=-1;break a}a=(k[n>>2]|0)-h|0;if((gl(o,1,a,k[j>>2]|0)|0)!=(a|0)){c=-1;break a}if(d)c=d?k[m>>2]|0:c;else{q=11;break a}}if((gl(c,1,1,k[j>>2]|0)|0)!=1)c=-1;else q=11}else q=11}while(0);if((q|0)==11)c=p?0:b;r=s;return c|0}function rm(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ss(b,44280)|0;c=a+36|0;k[c>>2]=d;d=Ob[k[(k[d>>2]|0)+24>>2]&127](d)|0;b=a+44|0;k[b>>2]=d;c=k[c>>2]|0;c=(Ob[k[(k[c>>2]|0)+28>>2]&127](c)|0)&1;i[a+53>>0]=c;if((k[b>>2]|0)>8)$r(56783);return}function sm(a){a=a|0;xn(a);mj(a);return}function tm(a){a=a|0;return wm(a,0)|0}function um(a){a=a|0;return wm(a,1)|0}function vm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;j=l+16|0;h=l+4|0;d=l+8|0;e=l;f=a+52|0;c=(i[f>>0]|0)!=0;a:do{if((b|0)==-1)if(c)b=-1;else{b=k[a+48>>2]|0;i[f>>0]=(b|0)!=-1&1}else{g=a+48|0;b:do{if(c){i[d>>0]=k[g>>2];c=k[a+36>>2]|0;switch(ac[k[(k[c>>2]|0)+12>>2]&15](c,k[a+40>>2]|0,d,d+1|0,e,j,j+8|0,h)|0){case 1:case 2:{b=-1;break a}case 3:{i[j>>0]=k[g>>2];k[h>>2]=j+1;break}default:{}}c=a+32|0;while(1){d=k[h>>2]|0;if(d>>>0<=j>>>0)break b;a=d+-1|0;k[h>>2]=a;if((kl(i[a>>0]|0,k[c>>2]|0)|0)==-1){b=-1;break a}}}}while(0);k[g>>2]=b;i[f>>0]=1}}while(0);r=l;return b|0}function wm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0;s=r;r=r+32|0;q=s+16|0;p=s+8|0;m=s+4|0;n=s;e=a+52|0;a:do{if(i[e>>0]|0){d=a+48|0;c=k[d>>2]|0;if(b){k[d>>2]=-1;i[e>>0]=0}}else{c=k[a+44>>2]|0;c=(c|0)>1?c:1;o=a+32|0;if((c|0)>0){e=0;do{d=hl(k[o>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[q+e>>0]=d;e=e+1|0}while((e|0)<(c|0))}b:do{if(!(i[a+53>>0]|0)){g=a+40|0;h=a+36|0;j=p+1|0;c:while(1){t=k[g>>2]|0;e=t;d=k[e>>2]|0;e=k[e+4>>2]|0;u=k[h>>2]|0;f=q+c|0;switch(ac[k[(k[u>>2]|0)+16>>2]&15](u,t,q,f,m,p,j,n)|0){case 2:{c=-1;break a}case 3:break c;case 1:break;default:break b}u=k[g>>2]|0;k[u>>2]=d;k[u+4>>2]=e;if((c|0)==8){c=-1;break a}d=hl(k[o>>2]|0)|0;if((d|0)==-1){c=-1;break a}i[f>>0]=d;c=c+1|0}i[p>>0]=i[q>>0]|0}else i[p>>0]=i[q>>0]|0}while(0);if(b){c=i[p>>0]|0;k[a+48>>2]=c&255}else{while(1){if((c|0)<=0)break;c=c+-1|0;if((kl(l[q+c>>0]|0,k[o>>2]|0)|0)==-1){c=-1;break a}}c=i[p>>0]|0}c=c&255}}while(0);r=s;return c|0}function xm(a){a=a|0;return}function ym(a){a=a|0;a=a+4|0;k[a>>2]=(k[a>>2]|0)+1;return}function zm(a){a=a|0;var b=0,c=0;c=a+4|0;b=k[c>>2]|0;k[c>>2]=b+-1;if(!b){Lb[k[(k[a>>2]|0)+8>>2]&255](a);a=1}else a=0;return a|0}function Am(a,b){a=a|0;b=b|0;k[a>>2]=36868;x=0;ra(86,a+4|0,((i[b>>0]&1)==0?b+1|0:k[b+8>>2]|0)|0);a=x;x=0;if(a&1){a=Wa()|0;fb(a|0)}else return}function Bm(a,b){a=a|0;b=b|0;k[a>>2]=36868;x=0;ra(86,a+4|0,b|0);a=x;x=0;if(a&1){a=Wa()|0;fb(a|0)}else return}function Cm(a,b){a=a|0;b=b|0;var c=0,d=0;d=xl(b)|0;c=lj(d+13|0)|0;k[c>>2]=d;k[c+4>>2]=d;k[c+8>>2]=0;c=c+12|0;vw(c|0,b|0,d+1|0)|0;k[a>>2]=c;return}function Dm(a,b,c){a=a|0;b=b|0;c=c|0;k[a>>2]=c;k[a+4>>2]=b;return}function Em(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+16|0;d=e;_b[k[(k[a>>2]|0)+12>>2]&15](d,a,b);if((k[d+4>>2]|0)==(k[c+4>>2]|0))d=(k[d>>2]|0)==(k[c>>2]|0);else d=0;r=e;return d|0}function Fm(a,b,c){a=a|0;b=b|0;c=c|0;return((k[b>>2]|0)==(c|0)?(k[b+4>>2]|0)==(a|0):0)|0}function Gm(a,b,c){a=a|0;b=b|0;c=c|0;b=nk(c)|0;Qm(a,b,xl(b)|0);return}function Hm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+16|0;f=g;d=k[b>>2]|0;do{if(d){e=i[c>>0]|0;if(!(e&1))e=(e&255)>>>1;else e=k[c+4>>2]|0;if(e){Zm(c,56990)|0;d=k[b>>2]|0}b=k[b+4>>2]|0;_b[k[(k[b>>2]|0)+24>>2]&15](f,b,d);b=i[f>>0]|0;e=(b&1)==0;x=0;va(30,c|0,(e?f+1|0:k[f+8>>2]|0)|0,(e?(b&255)>>>1:k[f+4>>2]|0)|0)|0;b=x;x=0;if(b&1){g=Wa()|0;Sm(f);fb(g|0)}else{Sm(f);break}}}while(0);k[a>>2]=k[c>>2];k[a+4>>2]=k[c+4>>2];k[a+8>>2]=k[c+8>>2];k[c>>2]=0;k[c+4>>2]=0;k[c+8>>2]=0;r=g;return}function Im(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+32|0;d=e+12|0;f=e;Qm(f,c,xl(c)|0);x=0;Fa(10,d|0,b|0,f|0);c=x;x=0;do{if(!(c&1)){x=0;ra(87,a|0,d|0);c=x;x=0;if(c&1){e=Wa()|0;Sm(d);d=e;break}else{Sm(d);Sm(f);k[a>>2]=42664;c=k[b+4>>2]|0;f=a+8|0;k[f>>2]=k[b>>2];k[f+4>>2]=c;r=e;return}}else d=Wa()|0}while(0);Sm(f);fb(d|0)}function Jm(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;f=r;r=r+48|0;e=f+24|0;h=f+16|0;g=f;k[h>>2]=b;k[h+4>>2]=c;Pm(g,d);x=0;Fa(10,e|0,h|0,g|0);d=x;x=0;do{if(!(d&1)){x=0;ra(87,a|0,e|0);h=x;x=0;if(h&1){h=Wa()|0;Sm(e);e=h;break}else{Sm(e);Sm(g);k[a>>2]=42664;k[a+8>>2]=b;k[a+12>>2]=c;r=f;return}}else e=Wa()|0}while(0);Sm(g);fb(e|0)}function Km(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=r;r=r+48|0;d=e+24|0;g=e+16|0;f=e;k[g>>2]=b;k[g+4>>2]=c;Qm(f,58898,0);x=0;Fa(10,d|0,g|0,f|0);g=x;x=0;do{if(!(g&1)){x=0;ra(87,a|0,d|0);g=x;x=0;if(g&1){g=Wa()|0;Sm(d);d=g;break}else{Sm(d);Sm(f);k[a>>2]=42664;k[a+8>>2]=b;k[a+12>>2]=c;r=e;return}}else d=Wa()|0}while(0);Sm(f);fb(d|0)}function Lm(a){a=a|0;wj(a);return}function Mm(a){a=a|0;wj(a);mj(a);return}function Nm(a){a=a|0;return}function Om(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;Ab(42676)|0;if((k[a>>2]|0)==1)do{Ma(42704,42676)|0}while((k[a>>2]|0)==1);do{if(!(k[a>>2]|0)){k[a>>2]=1;x=0;ta(72,42676)|0;d=x;x=0;if((((!(d&1)?(x=0,qa(c|0,b|0),d=x,x=0,!(d&1)):0)?(x=0,ta(73,42676)|0,d=x,x=0,!(d&1)):0)?(k[a>>2]=-1,x=0,ta(72,42676)|0,d=x,x=0,!(d&1)):0)?(x=0,ta(74,42704)|0,d=x,x=0,!(d&1)):0)break;d=Wa(0)|0;cb(d|0)|0;x=0;ta(73,42676)|0;d=x;x=0;if((!(d&1)?(k[a>>2]=0,x=0,ta(72,42676)|0,d=x,x=0,!(d&1)):0)?(x=0,ta(74,42704)|0,d=x,x=0,!(d&1)):0){x=0;Ga(5);x=0}b=Wa()|0;x=0;Ga(3);d=x;x=0;if(d&1){d=Wa(0)|0;oc(d)}else fb(b|0)}else lb(42676)|0}while(0);return}function Pm(a,b){a=a|0;b=b|0;if(!(i[b>>0]&1)){k[a>>2]=k[b>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2]}else Qm(a,k[b+8>>2]|0,k[b+4>>2]|0);return}function Qm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(c>>>0>4294967279)ij(a);if(c>>>0<11){i[a>>0]=c<<1;a=a+1|0}else{e=c+16&-16;d=lj(e)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=c;a=d}vw(a|0,b|0,c|0)|0;i[a+c>>0]=0;return}function Rm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(b>>>0>4294967279)ij(a);if(b>>>0<11){i[a>>0]=b<<1;a=a+1|0}else{e=b+16&-16;d=lj(e)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=b;a=d}sw(a|0,c|0,b|0)|0;i[a+b>>0]=0;return}function Sm(a){a=a|0;if(i[a>>0]&1)mj(k[a+8>>2]|0);return}function Tm(a,b){a=a|0;b=b|0;var c=0,d=0;if((a|0)!=(b|0)){c=i[b>>0]|0;d=(c&1)==0;Vm(a,d?b+1|0:k[b+8>>2]|0,d?(c&255)>>>1:k[b+4>>2]|0)|0}return a|0}function Um(a,b){a=a|0;b=b|0;return Vm(a,b,xl(b)|0)|0}function Vm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))f=10;else{d=k[a>>2]|0;f=(d&-2)+-1|0;d=d&255}e=(d&1)==0;do{if(f>>>0>=c>>>0){if(e)d=a+1|0;else d=k[a+8>>2]|0;xw(d|0,b|0,c|0)|0;i[d+c>>0]=0;if(!(i[a>>0]&1)){i[a>>0]=c<<1;break}else{k[a+4>>2]=c;break}}else{if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;an(a,f,c-f|0,d,0,d,c,b)}}while(0);return a|0}function Wm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=i[a>>0]|0;e=(d&1)==0;if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;do{if(d>>>0>=b>>>0)if(e){i[a+1+b>>0]=0;i[a>>0]=b<<1;break}else{i[(k[a+8>>2]|0)+b>>0]=0;k[a+4>>2]=b;break}else Xm(a,b-d|0,c)|0}while(0);return}function Xm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(b){d=i[a>>0]|0;if(!(d&1))e=10;else{d=k[a>>2]|0;e=(d&-2)+-1|0;d=d&255}if(!(d&1))f=(d&255)>>>1;else f=k[a+4>>2]|0;if((e-f|0)>>>0>>0){bn(a,e,b-e+f|0,f,f,0,0);d=i[a>>0]|0}if(!(d&1))e=a+1|0;else e=k[a+8>>2]|0;sw(e+f|0,c|0,b|0)|0;d=f+b|0;if(!(i[a>>0]&1))i[a>>0]=d<<1;else k[a+4>>2]=d;i[e+d>>0]=0}return a|0}function Ym(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if(b>>>0>4294967279)ij(a);c=i[a>>0]|0;if(!(c&1))d=10;else{c=k[a>>2]|0;d=(c&-2)+-1|0;c=c&255}if(!(c&1))h=(c&255)>>>1;else h=k[a+4>>2]|0;b=h>>>0>b>>>0?h:b;if(b>>>0<11)g=10;else g=(b+16&-16)+-1|0;a:do{if((g|0)!=(d|0)){do{if((g|0)!=10){b=g+1|0;if(g>>>0<=d>>>0){x=0;b=ta(67,b|0)|0;f=x;x=0;if(f&1){a=Wa(0)|0;cb(a|0)|0;eb();break a}}else b=lj(b)|0;if(!(c&1)){d=1;e=a+1|0;f=0;break}else{d=1;e=k[a+8>>2]|0;f=1;break}}else{b=a+1|0;d=0;e=k[a+8>>2]|0;f=1}}while(0);if(!(c&1))c=(c&255)>>>1;else c=k[a+4>>2]|0;vw(b|0,e|0,c+1|0)|0;if(f)mj(e);if(d){k[a>>2]=g+1|1;k[a+4>>2]=h;k[a+8>>2]=b;break}else{i[a>>0]=h<<1;break}}}while(0);return}function Zm(a,b){a=a|0;b=b|0;return $m(a,b,xl(b)|0)|0}function _m(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=i[a>>0]|0;d=(c&1)!=0;if(d){e=(k[a>>2]&-2)+-1|0;f=k[a+4>>2]|0}else{e=10;f=(c&255)>>>1}if((f|0)==(e|0)){bn(a,e,1,e,e,0,0);if(!(i[a>>0]&1))e=7;else e=8}else if(d)e=8;else e=7;if((e|0)==7){i[a>>0]=(f<<1)+2;c=a+1|0;d=f+1|0}else if((e|0)==8){c=k[a+8>>2]|0;d=f+1|0;k[a+4>>2]=d}i[c+f>>0]=b;i[c+d>>0]=0;return}function $m(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))e=10;else{d=k[a>>2]|0;e=(d&-2)+-1|0;d=d&255}if(!(d&1))f=(d&255)>>>1;else f=k[a+4>>2]|0;if((e-f|0)>>>0>=c>>>0){if(c){if(!(d&1))e=a+1|0;else e=k[a+8>>2]|0;vw(e+f|0,b|0,c|0)|0;d=f+c|0;if(!(i[a>>0]&1))i[a>>0]=d<<1;else k[a+4>>2]=d;i[e+d>>0]=0}}else an(a,e,c-e+f|0,f,f,0,c,b);return a|0}function an(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0;if((-18-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))m=a+1|0;else m=k[a+8>>2]|0;if(b>>>0<2147483623){j=c+b|0;l=b<<1;j=j>>>0>>0?l:j;j=j>>>0<11?11:j+16&-16}else j=-17;l=lj(j)|0;if(e)vw(l|0,m|0,e|0)|0;if(g)vw(l+e|0,h|0,g|0)|0;c=d-f|0;if((c|0)!=(e|0))vw(l+(g+e)|0,m+(f+e)|0,c-e|0)|0;if((b|0)!=10)mj(m);k[a+8>>2]=l;k[a>>2]=j|1;b=c+g|0;k[a+4>>2]=b;i[l+b>>0]=0;return}function bn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0;if((-17-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))l=a+1|0;else l=k[a+8>>2]|0;if(b>>>0<2147483623){h=c+b|0;j=b<<1;h=h>>>0>>0?j:h;h=h>>>0<11?11:h+16&-16}else h=-17;j=lj(h)|0;if(e)vw(j|0,l|0,e|0)|0;c=d-f|0;if((c|0)!=(e|0))vw(j+(g+e)|0,l+(f+e)|0,c-e|0)|0;if((b|0)!=10)mj(l);k[a+8>>2]=j;k[a>>2]=h|1;return}function cn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(c>>>0>1073741807)ij(a);if(c>>>0<2){i[a>>0]=c<<1;a=a+4|0}else{e=c+4&-4;d=lj(e<<2)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=c;a=d}Al(a,b,c)|0;k[a+(c<<2)>>2]=0;return}function dn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(b>>>0>1073741807)ij(a);if(b>>>0<2){i[a>>0]=b<<1;a=a+4|0}else{e=b+4&-4;d=lj(e<<2)|0;k[a+8>>2]=d;k[a>>2]=e|1;k[a+4>>2]=b;a=d}Cl(a,c,b)|0;k[a+(b<<2)>>2]=0;return}function en(a){a=a|0;if(i[a>>0]&1)mj(k[a+8>>2]|0);return}function fn(a,b){a=a|0;b=b|0;return gn(a,b,zl(b)|0)|0}function gn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=i[a>>0]|0;if(!(d&1))f=1;else{d=k[a>>2]|0;f=(d&-2)+-1|0;d=d&255}e=(d&1)==0;do{if(f>>>0>=c>>>0){if(e)d=a+4|0;else d=k[a+8>>2]|0;Bl(d,b,c)|0;k[d+(c<<2)>>2]=0;if(!(i[a>>0]&1)){i[a>>0]=c<<1;break}else{k[a+4>>2]=c;break}}else{if(e)d=(d&255)>>>1;else d=k[a+4>>2]|0;kn(a,f,c-f|0,d,0,d,c,b)}}while(0);return a|0}function hn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if(b>>>0>1073741807)ij(a);c=i[a>>0]|0;if(!(c&1))d=1;else{c=k[a>>2]|0;d=(c&-2)+-1|0;c=c&255}if(!(c&1))h=(c&255)>>>1;else h=k[a+4>>2]|0;b=h>>>0>b>>>0?h:b;if(b>>>0<2)g=1;else g=(b+4&-4)+-1|0;a:do{if((g|0)!=(d|0)){do{if((g|0)!=1){b=(g<<2)+4|0;if(g>>>0<=d>>>0){x=0;b=ta(67,b|0)|0;f=x;x=0;if(f&1){a=Wa(0)|0;cb(a|0)|0;eb();break a}}else b=lj(b)|0;if(!(c&1)){d=1;e=a+4|0;f=0;break}else{d=1;e=k[a+8>>2]|0;f=1;break}}else{b=a+4|0;d=0;e=k[a+8>>2]|0;f=1}}while(0);if(!(c&1))c=(c&255)>>>1;else c=k[a+4>>2]|0;Al(b,e,c+1|0)|0;if(f)mj(e);if(d){k[a>>2]=g+1|1;k[a+4>>2]=h;k[a+8>>2]=b;break}else{i[a>>0]=h<<1;break}}}while(0);return}function jn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=i[a>>0]|0;d=(c&1)!=0;if(d){e=(k[a>>2]&-2)+-1|0;f=k[a+4>>2]|0}else{e=1;f=(c&255)>>>1}if((f|0)==(e|0)){ln(a,e,1,e,e,0,0);if(!(i[a>>0]&1))e=7;else e=8}else if(d)e=8;else e=7;if((e|0)==7){i[a>>0]=(f<<1)+2;c=a+4|0;d=f+1|0}else if((e|0)==8){c=k[a+8>>2]|0;d=f+1|0;k[a+4>>2]=d}k[c+(f<<2)>>2]=b;k[c+(d<<2)>>2]=0;return}function kn(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0;if((1073741806-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))m=a+4|0;else m=k[a+8>>2]|0;if(b>>>0<536870887){j=c+b|0;l=b<<1;j=j>>>0>>0?l:j;j=j>>>0<2?2:j+4&-4}else j=1073741807;l=lj(j<<2)|0;if(e)Al(l,m,e)|0;if(g)Al(l+(e<<2)|0,h,g)|0;c=d-f|0;if((c|0)!=(e|0))Al(l+(g+e<<2)|0,m+(f+e<<2)|0,c-e|0)|0;if((b|0)!=1)mj(m);k[a+8>>2]=l;k[a>>2]=j|1;b=c+g|0;k[a+4>>2]=b;k[l+(b<<2)>>2]=0;return}function ln(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0;if((1073741807-b|0)>>>0>>0)ij(a);if(!(i[a>>0]&1))l=a+4|0;else l=k[a+8>>2]|0;if(b>>>0<536870887){h=c+b|0;j=b<<1;h=h>>>0>>0?j:h;h=h>>>0<2?2:h+4&-4}else h=1073741807;j=lj(h<<2)|0;if(e)Al(j,l,e)|0;c=d-f|0;if((c|0)!=(e|0))Al(j+(g+e<<2)|0,l+(f+e<<2)|0,c-e|0)|0;if((b|0)!=1)mj(l);k[a+8>>2]=j;k[a>>2]=h|1;return}function mn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=b;d=c-e|0;if(d>>>0>4294967279)ij(a);if(d>>>0<11){i[a>>0]=d<<1;f=a+1|0}else{g=d+16&-16;f=lj(g)|0;k[a+8>>2]=f;k[a>>2]=g|1;k[a+4>>2]=d}a=c-e|0;if((b|0)!=(c|0)){d=f;while(1){i[d>>0]=i[b>>0]|0;b=b+1|0;if((b|0)==(c|0))break;else d=d+1|0}}i[f+a>>0]=0;return}function nn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b;d=c-f|0;e=d>>2;if(e>>>0>1073741807)ij(a);if(e>>>0<2){i[a>>0]=d>>>1;a=a+4|0}else{g=e+4&-4;d=lj(g<<2)|0;k[a+8>>2]=d;k[a>>2]=g|1;k[a+4>>2]=e;a=d}e=(c-f|0)>>>2;if((b|0)!=(c|0)){d=a;while(1){k[d>>2]=k[b>>2];b=b+4|0;if((b|0)==(c|0))break;else d=d+4|0}}k[a+(e<<2)>>2]=0;return}function on(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=r;r=r+16|0;d=c;e=(k[a+24>>2]|0)==0;k[a+16>>2]=e&1|b;if(!((e&1|b)&k[a+20>>2])){r=c;return}b=Va(16)|0;Co()|0;k[d>>2]=1;k[d+4>>2]=43112;x=0;Fa(11,b|0,57437,d|0);e=x;x=0;if(e&1){e=Wa()|0;Ua(b|0);fb(e|0)}else ub(b|0,864,112)}function pn(a){a=a|0;var b=0;k[a>>2]=43068;x=0;ra(88,a|0,0);b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else{Qs(a+28|0);Ql(k[a+32>>2]|0);Ql(k[a+36>>2]|0);Ql(k[a+48>>2]|0);Ql(k[a+60>>2]|0);return}}function qn(a){a=a|0;pn(a);return}function rn(a){a=a|0;pn(a);mj(a);return}function sn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=k[a+40>>2]|0;d=a+32|0;e=a+36|0;if(c)do{c=c+-1|0;_b[k[(k[d>>2]|0)+(c<<2)>>2]&15](b,a,k[(k[e>>2]|0)+(c<<2)>>2]|0)}while((c|0)!=0);return}function tn(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;Ps(b,a+28|0);r=c;return k[b>>2]|0}function un(a,b){a=a|0;b=b|0;var c=0;k[a+24>>2]=b;k[a+16>>2]=(b|0)==0&1;k[a+20>>2]=0;k[a+4>>2]=4098;k[a+12>>2]=0;k[a+8>>2]=6;c=a+28|0;b=a+32|0;a=b+40|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(a|0));Os(c);return}function vn(a){a=a|0;pn(a);return}function wn(a){a=a|0;pn(a);mj(a);return}function xn(a){a=a|0;k[a>>2]=42760;Qs(a+4|0);return}function yn(a){a=a|0;k[a>>2]=42760;Qs(a+4|0);mj(a);return}function zn(a){a=a|0;k[a>>2]=42760;Os(a+4|0);a=a+8|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;return}function An(a,b){a=a|0;b=b|0;return}function Bn(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function Cn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function Dn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function En(a){a=a|0;return 0}function Fn(a){a=a|0;return 0}function Gn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+12|0;g=a+16|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0<(k[g>>2]|0)>>>0){k[f>>2]=d+1;d=i[d>>0]|0}else{d=Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;if((d|0)==-1)break a;d=d&255}i[e>>0]=d;b=b+1|0;if((b|0)<(c|0))e=e+1|0;else break}}else b=0}while(0);return b|0}function Hn(a){a=a|0;return-1}function In(a){a=a|0;var b=0;if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1)a=-1;else{b=a+12|0;a=k[b>>2]|0;k[b>>2]=a+1;a=l[a>>0]|0}return a|0}function Jn(a,b){a=a|0;b=b|0;return-1}function Kn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;f=a+24|0;g=a+28|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0>=(k[g>>2]|0)>>>0){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,l[e>>0]|0)|0)==-1)break a}else{h=i[e>>0]|0;k[f>>2]=d+1;i[d>>0]=h}b=b+1|0;if((b|0)<(c|0))e=e+1|0;else break}}else b=0}while(0);return b|0}function Ln(a,b){a=a|0;b=b|0;return-1}function Mn(a){a=a|0;k[a>>2]=42824;Qs(a+4|0);return}function Nn(a){a=a|0;k[a>>2]=42824;Qs(a+4|0);mj(a);return}function On(a){a=a|0;k[a>>2]=42824;Os(a+4|0);a=a+8|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;return}function Pn(a,b){a=a|0;b=b|0;return}function Qn(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function Rn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function Sn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=a;k[b>>2]=0;k[b+4>>2]=0;b=a+8|0;k[b>>2]=-1;k[b+4>>2]=-1;return}function Tn(a){a=a|0;return 0}function Un(a){a=a|0;return 0}function Vn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+12|0;g=a+16|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0>=(k[g>>2]|0)>>>0){d=Ob[k[(k[a>>2]|0)+40>>2]&127](a)|0;if((d|0)==-1)break a}else{k[f>>2]=d+4;d=k[d>>2]|0}k[e>>2]=d;b=b+1|0;if((b|0)<(c|0))e=e+4|0;else break}}else b=0}while(0);return b|0}function Wn(a){a=a|0;return-1}function Xn(a){a=a|0;var b=0;if((Ob[k[(k[a>>2]|0)+36>>2]&127](a)|0)==-1)a=-1;else{b=a+12|0;a=k[b>>2]|0;k[b>>2]=a+4;a=k[a>>2]|0}return a|0}function Yn(a,b){a=a|0;b=b|0;return-1}function Zn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;f=a+24|0;g=a+28|0;a:do{if((c|0)>0){e=b;b=0;while(1){d=k[f>>2]|0;if(d>>>0>=(k[g>>2]|0)>>>0){if((Vb[k[(k[a>>2]|0)+52>>2]&63](a,k[e>>2]|0)|0)==-1)break a}else{h=k[e>>2]|0;k[f>>2]=d+4;k[d>>2]=h}b=b+1|0;if((b|0)<(c|0))e=e+4|0;else break}}else b=0}while(0);return b|0}function _n(a,b){a=a|0;b=b|0;return-1}function $n(a){a=a|0;pn(a+8|0);return}function ao(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+8)|0);return}function bo(a){a=a|0;pn(a+8|0);mj(a);return}function co(a){a=a|0;bo(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function eo(a){a=a|0;var b=0,c=0,d=0,e=0;d=r;r=r+16|0;c=d;a:do{if(k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0){x=0;ra(65,c|0,a|0);b=x;x=0;b:do{if(b&1)b=Wa(0)|0;else{do{if(i[c>>0]|0){b=k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;e=x;x=0;if(!(e&1)){if((b|0)!=-1)break;e=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+e|0,k[a+(e+16)>>2]|1|0);e=x;x=0;if(!(e&1))break}b=Wa(0)|0;ro(c);break b}}while(0);ro(c);break a}}while(0);cb(b|0)|0;x=0;qa(181,a+(k[(k[a>>2]|0)+-12>>2]|0)|0);e=x;x=0;if(!(e&1)){eb();break}b=Wa()|0;x=0;Ga(3);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else fb(b|0)}}while(0);r=d;return a|0}function fo(a){a=a|0;var b=0;b=a+16|0;k[b>>2]=k[b>>2]|1;if(!(k[a+20>>2]&1))return;else vb()}function go(a){a=a|0;pn(a+8|0);return}function ho(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+8)|0);return}function io(a){a=a|0;pn(a+8|0);mj(a);return}function jo(a){a=a|0;io(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function ko(a){a=a|0;var b=0,c=0,d=0,e=0;d=r;r=r+16|0;c=d;a:do{if(k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0){x=0;ra(89,c|0,a|0);b=x;x=0;b:do{if(b&1)b=Wa(0)|0;else{do{if(i[c>>0]|0){b=k[a+((k[(k[a>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;e=x;x=0;if(!(e&1)){if((b|0)!=-1)break;e=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+e|0,k[a+(e+16)>>2]|1|0);e=x;x=0;if(!(e&1))break}b=Wa(0)|0;zo(c);break b}}while(0);zo(c);break a}}while(0);cb(b|0)|0;x=0;qa(181,a+(k[(k[a>>2]|0)+-12>>2]|0)|0);e=x;x=0;if(!(e&1)){eb();break}b=Wa()|0;x=0;Ga(3);e=x;x=0;if(e&1){e=Wa(0)|0;oc(e)}else fb(b|0)}}while(0);r=d;return a|0}function lo(a,b){a=a|0;b=b|0;return}function mo(a){a=a|0;pn(a+4|0);return}function no(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+4)|0);return}function oo(a){a=a|0;pn(a+4|0);mj(a);return}function po(a){a=a|0;oo(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function qo(a,b){a=a|0;b=b|0;var c=0;i[a>>0]=0;k[a+4>>2]=b;c=k[(k[b>>2]|0)+-12>>2]|0;if(!(k[b+(c+16)>>2]|0)){c=k[b+(c+72)>>2]|0;if(c)eo(c)|0;i[a>>0]=1}return}function ro(a){a=a|0;var b=0,c=0;a=a+4|0;c=k[a>>2]|0;b=k[(k[c>>2]|0)+-12>>2]|0;do{if((((k[c+(b+24)>>2]|0)!=0?(k[c+(b+16)>>2]|0)==0:0)?(k[c+(b+4)>>2]&8192|0)!=0:0)?!(gb()|0):0){b=k[a>>2]|0;b=k[b+((k[(k[b>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;c=x;x=0;if(!(c&1)){if((b|0)!=-1)break;b=k[a>>2]|0;c=k[(k[b>>2]|0)+-12>>2]|0;x=0;ra(66,b+c|0,k[b+(c+16)>>2]|1|0);c=x;x=0;if(!(c&1))break}c=Wa(0)|0;cb(c|0)|0;x=0;Ga(3);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}}}while(0);return}function so(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+32|0;h=o+20|0;j=o+16|0;m=o+8|0;c=o;x=0;ra(65,m|0,a|0);l=x;x=0;a:do{if(l&1){c=Wa(0)|0;d=a;e=a;n=19}else{do{if(i[m>>0]|0){l=tn(a+(k[(k[a>>2]|0)+-12>>2]|0)|0)|0;k[c>>2]=l;x=0;l=Aa(37,c|0,43392)|0;g=x;x=0;if(g&1){n=Wa(0)|0;Qs(c);c=n}else{Qs(c);e=k[(k[a>>2]|0)+-12>>2]|0;g=k[a+(e+24)>>2]|0;d=a+e|0;e=a+(e+76)|0;c=k[e>>2]|0;do{if((c|0)==-1){c=tn(d)|0;k[h>>2]=c;x=0;c=Aa(37,h|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,f=Aa(k[(k[c>>2]|0)+28>>2]|0,c|0,32)|0,p=x,x=0,!(p&1)):0){Qs(h);c=f<<24>>24;k[e>>2]=c;n=10;break}c=Wa(0)|0;Qs(h)}else n=10}while(0);if((n|0)==10){p=k[(k[l>>2]|0)+16>>2]|0;k[j>>2]=g;x=0;k[h>>2]=k[j>>2];c=Ba(p|0,l|0,h|0,d|0,c&255|0,b|0)|0;p=x;x=0;if(!(p&1)){if(c)break;p=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+p|0,k[a+(p+16)>>2]|5|0);p=x;x=0;if(!(p&1))break}c=Wa(0)|0}}ro(m);d=a;e=a;n=19;break a}}while(0);ro(m)}}while(0);do{if((n|0)==19){cb(c|0)|0;x=0;qa(181,d+(k[(k[e>>2]|0)+-12>>2]|0)|0);p=x;x=0;if(!(p&1)){eb();break}c=Wa()|0;x=0;Ga(3);p=x;x=0;if(p&1){p=Wa(0)|0;oc(p)}else fb(c|0)}}while(0);r=o;return a|0}function to(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+32|0;h=o+20|0;j=o+16|0;m=o+8|0;c=o;x=0;ra(65,m|0,a|0);l=x;x=0;a:do{if(l&1){c=Wa(0)|0;d=a;e=a;n=19}else{do{if(i[m>>0]|0){l=tn(a+(k[(k[a>>2]|0)+-12>>2]|0)|0)|0;k[c>>2]=l;x=0;l=Aa(37,c|0,43392)|0;g=x;x=0;if(g&1){n=Wa(0)|0;Qs(c);c=n}else{Qs(c);e=k[(k[a>>2]|0)+-12>>2]|0;g=k[a+(e+24)>>2]|0;d=a+e|0;e=a+(e+76)|0;c=k[e>>2]|0;do{if((c|0)==-1){c=tn(d)|0;k[h>>2]=c;x=0;c=Aa(37,h|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,f=Aa(k[(k[c>>2]|0)+28>>2]|0,c|0,32)|0,p=x,x=0,!(p&1)):0){Qs(h);c=f<<24>>24;k[e>>2]=c;n=10;break}c=Wa(0)|0;Qs(h)}else n=10}while(0);if((n|0)==10){p=k[(k[l>>2]|0)+24>>2]|0;k[j>>2]=g;x=0;k[h>>2]=k[j>>2];c=Ba(p|0,l|0,h|0,d|0,c&255|0,b|0)|0;p=x;x=0;if(!(p&1)){if(c)break;p=k[(k[a>>2]|0)+-12>>2]|0;x=0;ra(66,a+p|0,k[a+(p+16)>>2]|5|0);p=x;x=0;if(!(p&1))break}c=Wa(0)|0}}ro(m);d=a;e=a;n=19;break a}}while(0);ro(m)}}while(0);do{if((n|0)==19){cb(c|0)|0;x=0;qa(181,d+(k[(k[e>>2]|0)+-12>>2]|0)|0);p=x;x=0;if(!(p&1)){eb();break}c=Wa()|0;x=0;Ga(3);p=x;x=0;if(p&1){p=Wa(0)|0;oc(p)}else fb(c|0)}}while(0);r=o;return a|0}function uo(a){a=a|0;pn(a+4|0);return}function vo(a){a=a|0;pn(a+((k[(k[a>>2]|0)+-12>>2]|0)+4)|0);return}function wo(a){a=a|0;pn(a+4|0);mj(a);return}function xo(a){a=a|0;wo(a+(k[(k[a>>2]|0)+-12>>2]|0)|0);return}function yo(a,b){a=a|0;b=b|0;var c=0;i[a>>0]=0;k[a+4>>2]=b;c=k[(k[b>>2]|0)+-12>>2]|0;if(!(k[b+(c+16)>>2]|0)){c=k[b+(c+72)>>2]|0;if(c)ko(c)|0;i[a>>0]=1}return}function zo(a){a=a|0;var b=0,c=0;a=a+4|0;c=k[a>>2]|0;b=k[(k[c>>2]|0)+-12>>2]|0;do{if((((k[c+(b+24)>>2]|0)!=0?(k[c+(b+16)>>2]|0)==0:0)?(k[c+(b+4)>>2]&8192|0)!=0:0)?!(gb()|0):0){b=k[a>>2]|0;b=k[b+((k[(k[b>>2]|0)+-12>>2]|0)+24)>>2]|0;x=0;b=ta(k[(k[b>>2]|0)+24>>2]|0,b|0)|0;c=x;x=0;if(!(c&1)){if((b|0)!=-1)break;b=k[a>>2]|0;c=k[(k[b>>2]|0)+-12>>2]|0;x=0;ra(66,b+c|0,k[b+(c+16)>>2]|1|0);c=x;x=0;if(!(c&1))break}c=Wa(0)|0;cb(c|0)|0;x=0;Ga(3);c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}}}while(0);return}function Ao(a){a=a|0;return 57453}function Bo(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)!=1&(c|0)<257)Gm(a,b,c);else Qm(a,57462,35);return}function Co(){if((i[1048]|0)==0?(Qa(1048)|0)!=0:0){k[10778]=43084;tb(72,43112,w|0)|0;Ya(1048)}return 43112}function Do(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=r;r=r+16|0;e=d+8|0;f=d;h=c;g=k[h+4>>2]|0;c=f;k[c>>2]=k[h>>2];k[c+4>>2]=g;k[e>>2]=k[f>>2];k[e+4>>2]=k[f+4>>2];Im(a,e,b);k[a>>2]=43048;r=d;return}function Eo(a){a=a|0;Lm(a);return}function Fo(a){a=a|0;Lm(a);mj(a);return}function Go(a){a=a|0;pn(a);mj(a);return}function Ho(a){a=a|0;mj(a);return}function Io(a){a=a|0;return}function Jo(a){a=a|0;return}function Ko(a){a=a|0;mj(a);return}function Lo(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;a:do{if((d|0)==(e|0))g=6;else while(1){if((b|0)==(c|0)){b=-1;break a}a=i[b>>0]|0;f=i[d>>0]|0;if(a<<24>>24>24){b=-1;break a}if(f<<24>>24>24){b=1;break a}b=b+1|0;d=d+1|0;if((d|0)==(e|0)){g=6;break}}}while(0);if((g|0)==6)b=(b|0)!=(c|0)&1;return b|0}function Mo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;mn(a,c,d);return}function No(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)==(c|0))a=0;else{a=0;do{a=(i[b>>0]|0)+(a<<4)|0;d=a&-268435456;a=(d>>>24|d)^a;b=b+1|0}while((b|0)!=(c|0))}return a|0}function Oo(a){a=a|0;return}function Po(a){a=a|0;mj(a);return}function Qo(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;a:do{if((d|0)==(e|0))g=6;else while(1){if((b|0)==(c|0)){b=-1;break a}a=k[b>>2]|0;f=k[d>>2]|0;if((a|0)<(f|0)){b=-1;break a}if((f|0)<(a|0)){b=1;break a}b=b+4|0;d=d+4|0;if((d|0)==(e|0)){g=6;break}}}while(0);if((g|0)==6)b=(b|0)!=(c|0)&1;return b|0}function Ro(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;nn(a,c,d);return}function So(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)==(c|0))a=0;else{a=0;do{a=(k[b>>2]|0)+(a<<4)|0;d=a&-268435456;a=(d>>>24|d)^a;b=b+4|0}while((b|0)!=(c|0))}return a|0}function To(a){a=a|0;return}function Uo(a){a=a|0;mj(a);return}function Vo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;q=r;r=r+64|0;o=q+56|0;g=q+52|0;m=q+48|0;h=q+44|0;j=q+40|0;l=q+36|0;n=q+32|0;s=q+8|0;p=q;a:do{if(!(k[d+4>>2]&1)){k[m>>2]=-1;s=k[(k[a>>2]|0)+16>>2]|0;k[h>>2]=k[b>>2];k[j>>2]=k[c>>2];k[g>>2]=k[h>>2];k[o>>2]=k[j>>2];g=Nb[s&63](a,g,o,d,e,m)|0;k[b>>2]=g;switch(k[m>>2]|0){case 0:{i[f>>0]=0;break a}case 1:{i[f>>0]=1;break a}default:{i[f>>0]=1;k[e>>2]=4;break a}}}else{g=tn(d)|0;k[l>>2]=g;x=0;a=Aa(37,l|0,44220)|0;m=x;x=0;do{if(!(m&1)){zm(g)|0;g=tn(d)|0;k[n>>2]=g;x=0;j=Aa(37,n|0,44360)|0;n=x;x=0;if(n&1){s=Wa()|0;zm(g)|0;g=s;break}zm(g)|0;x=0;ra(k[(k[j>>2]|0)+24>>2]|0,s|0,j|0);n=x;x=0;if(!(n&1)){h=s+12|0;x=0;ra(k[(k[j>>2]|0)+28>>2]|0,h|0,j|0);n=x;x=0;if(!(n&1)){k[p>>2]=k[c>>2];x=0;k[o>>2]=k[p>>2];g=na(7,b|0,o|0,s|0,s+24|0,a|0,e|0,1)|0;e=x;x=0;if(e&1){g=Wa()|0;Sm(s+12|0);Sm(s);break}else{i[f>>0]=(g|0)==(s|0)&1;g=k[b>>2]|0;Sm(s+12|0);Sm(s);break a}}}else h=s;g=Wa()|0;j=M;if((s|0)!=(h|0))do{h=h+-12|0;Sm(h)}while((h|0)!=(s|0))}else{s=Wa()|0;zm(g)|0;g=s}}while(0);fb(g|0)}}while(0);r=q;return g|0}function Wo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Iu(a,i,h,d,e,f)|0;r=g;return a|0}function Xo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Ju(a,i,h,d,e,f)|0;r=g;return a|0}function Yo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Ku(a,i,h,d,e,f)|0;r=g;return a|0}function Zo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Lu(a,i,h,d,e,f)|0;r=g;return a|0}function _o(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Mu(a,i,h,d,e,f)|0;r=g;return a|0}function $o(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Nu(a,i,h,d,e,f)|0;r=g;return a|0}function ap(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Ou(a,i,h,d,e,f)|0;r=g;return a|0}function bp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Pu(a,i,h,d,e,f)|0;r=g;return a|0}function cp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Qu(a,i,h,d,e,f)|0;r=g;return a|0}function dp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;C=r;r=r+240|0;w=C;q=C+208|0;E=C+32|0;a=C+28|0;D=C+16|0;v=C+12|0;t=C+48|0;u=C+8|0;s=C+4|0;k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;x=0;d=ta(68,d|0)|0;p=x;x=0;do{if(p&1)a=Wa()|0;else{k[a>>2]=d;x=0;a=Aa(37,a|0,44220)|0;p=x;x=0;if(!(p&1)?(x=0,Ea(k[(k[a>>2]|0)+32>>2]|0,a|0,57498,57524,q|0)|0,p=x,x=0,!(p&1)):0){zm(d)|0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;if(!(i[D>>0]&1))a=10;else a=(k[D>>2]&-2)+-1|0;x=0;Fa(8,D|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){o=D+8|0;p=D+1|0;d=(i[D>>0]&1)==0?p:k[o>>2]|0;k[v>>2]=d;k[u>>2]=t;k[s>>2]=0;n=D+4|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){F=29;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){F=29;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;F=19;break}}else F=19}while(0);if((F|0)==19){F=0;if(h){g=0;break}else g=0}h=i[D>>0]|0;h=(h&1)==0?(h&255)>>>1:k[n>>2]|0;if((k[v>>2]|0)==(d+h|0)){x=0;Fa(8,D|0,h<<1|0,0);m=x;x=0;if(m&1){F=29;break}if(!(i[D>>0]&1))d=10;else d=(k[D>>2]&-2)+-1|0;x=0;Fa(8,D|0,d|0,0);m=x;x=0;if(m&1){F=29;break}d=(i[D>>0]&1)==0?p:k[o>>2]|0;k[v>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;G=x;x=0;if(G&1){F=29;break}}else h=l[h>>0]|0;if(ep(h&255,16,d,v,s,0,E,t,u,q)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;G=x;x=0;if(G&1){F=29;break}else continue}else{k[j>>2]=g+1;continue}}if((F|0)==29){a=Wa()|0;break}x=0;Fa(8,D|0,(k[v>>2]|0)-d|0,0);G=x;x=0;if((!(G&1)?(y=i[D>>0]|0,z=k[o>>2]|0,x=0,A=Da(3)|0,G=x,x=0,!(G&1)):0)?(x=0,k[w>>2]=f,B=Ea(16,((y&1)==0?p:z)|0,A|0,58882,w|0)|0,G=x,x=0,!(G&1)):0){if((B|0)!=1)k[e>>2]=4;if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;G=x;x=0;if(G&1){F=30;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;G=x;x=0;if(G&1){F=30;break a}if((a|0)==-1){k[c>>2]=0;F=55;break}}if(!d)F=56}else F=55}while(0);if((F|0)==55?d:0)F=56;if((F|0)==56)k[e>>2]=k[e>>2]|2;G=k[b>>2]|0;Sm(D);Sm(E);r=C;return G|0}else F=30}else F=30}while(0);if((F|0)==30)a=Wa()|0;Sm(D);break}a=Wa()|0;zm(d)|0}}while(0);Sm(E);fb(a|0);return 0}function ep(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0;o=k[d>>2]|0;p=(o|0)==(c|0);do{if(p){m=(i[l+24>>0]|0)==a<<24>>24;if(!m?(i[l+25>>0]|0)!=a<<24>>24:0){n=5;break}k[d>>2]=c+1;i[c>>0]=m?43:45;k[e>>2]=0;m=0}else n=5}while(0);a:do{if((n|0)==5){n=i[g>>0]|0;if(a<<24>>24==f<<24>>24?(((n&1)==0?(n&255)>>>1:k[g+4>>2]|0)|0)!=0:0){m=k[j>>2]|0;if((m-h|0)>=160){m=0;break}b=k[e>>2]|0;k[j>>2]=m+4;k[m>>2]=b;k[e>>2]=0;m=0;break}g=l+26|0;m=l;while(1){if((i[m>>0]|0)==a<<24>>24)break;m=m+1|0;if((m|0)==(g|0)){m=g;break}}m=m-l|0;if((m|0)>23)m=-1;else{switch(b|0){case 10:case 8:{if((m|0)>=(b|0)){m=-1;break a}break}case 16:{if((m|0)>=22){if(p){m=-1;break a}if((o-c|0)>=3){m=-1;break a}if((i[o+-1>>0]|0)!=48){m=-1;break a}k[e>>2]=0;m=i[57498+m>>0]|0;k[d>>2]=o+1;i[o>>0]=m;m=0;break a}break}default:{}}m=i[57498+m>>0]|0;k[d>>2]=o+1;i[o>>0]=m;k[e>>2]=(k[e>>2]|0)+1;m=0}}}while(0);return m|0}function fp(){var a=0,b=0;do{if((i[1968]|0)==0?(Qa(1968)|0)!=0:0){x=0;a=va(31,2147483647,58885,0)|0;b=x;x=0;if(b&1){b=Wa()|0;Bb(1968);fb(b|0)}else{k[11196]=a;Ya(1968);break}}}while(0);return k[11196]|0}function gp(a){a=a|0;return}function hp(a){a=a|0;mj(a);return}function ip(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;q=r;r=r+64|0;o=q+56|0;g=q+52|0;m=q+48|0;h=q+44|0;j=q+40|0;l=q+36|0;n=q+32|0;s=q+8|0;p=q;a:do{if(!(k[d+4>>2]&1)){k[m>>2]=-1;s=k[(k[a>>2]|0)+16>>2]|0;k[h>>2]=k[b>>2];k[j>>2]=k[c>>2];k[g>>2]=k[h>>2];k[o>>2]=k[j>>2];g=Nb[s&63](a,g,o,d,e,m)|0;k[b>>2]=g;switch(k[m>>2]|0){case 0:{i[f>>0]=0;break a}case 1:{i[f>>0]=1;break a}default:{i[f>>0]=1;k[e>>2]=4;break a}}}else{g=tn(d)|0;k[l>>2]=g;x=0;a=Aa(37,l|0,44212)|0;m=x;x=0;do{if(!(m&1)){zm(g)|0;g=tn(d)|0;k[n>>2]=g;x=0;j=Aa(37,n|0,44368)|0;n=x;x=0;if(n&1){s=Wa()|0;zm(g)|0;g=s;break}zm(g)|0;x=0;ra(k[(k[j>>2]|0)+24>>2]|0,s|0,j|0);n=x;x=0;if(!(n&1)){h=s+12|0;x=0;ra(k[(k[j>>2]|0)+28>>2]|0,h|0,j|0);n=x;x=0;if(!(n&1)){k[p>>2]=k[c>>2];x=0;k[o>>2]=k[p>>2];g=na(8,b|0,o|0,s|0,s+24|0,a|0,e|0,1)|0;e=x;x=0;if(e&1){g=Wa()|0;en(s+12|0);en(s);break}else{i[f>>0]=(g|0)==(s|0)&1;g=k[b>>2]|0;en(s+12|0);en(s);break a}}}else h=s;g=Wa()|0;j=M;if((s|0)!=(h|0))do{h=h+-12|0;en(h)}while((h|0)!=(s|0))}else{s=Wa()|0;zm(g)|0;g=s}}while(0);fb(g|0)}}while(0);r=q;return g|0}function jp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Tu(a,i,h,d,e,f)|0;r=g;return a|0}function kp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Uu(a,i,h,d,e,f)|0;r=g;return a|0}function lp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Vu(a,i,h,d,e,f)|0;r=g;return a|0}function mp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Wu(a,i,h,d,e,f)|0;r=g;return a|0}function np(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Xu(a,i,h,d,e,f)|0;r=g;return a|0}function op(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Yu(a,i,h,d,e,f)|0;r=g;return a|0}function pp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=Zu(a,i,h,d,e,f)|0;r=g;return a|0}function qp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=_u(a,i,h,d,e,f)|0;r=g;return a|0}function rp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0;g=r;r=r+16|0;h=g+12|0;i=g+8|0;l=g+4|0;j=g;k[l>>2]=k[b>>2];k[j>>2]=k[c>>2];k[i>>2]=k[l>>2];k[h>>2]=k[j>>2];a=$u(a,i,h,d,e,f)|0;r=g;return a|0}function sp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;B=r;r=r+320|0;v=B;p=B+208|0;D=B+32|0;a=B+28|0;C=B+16|0;u=B+12|0;s=B+48|0;t=B+8|0;q=B+4|0;k[D>>2]=0;k[D+4>>2]=0;k[D+8>>2]=0;x=0;d=ta(68,d|0)|0;o=x;x=0;do{if(o&1)a=Wa()|0;else{k[a>>2]=d;x=0;a=Aa(37,a|0,44212)|0;o=x;x=0;if(!(o&1)?(x=0,Ea(k[(k[a>>2]|0)+48>>2]|0,a|0,57498,57524,p|0)|0,o=x,x=0,!(o&1)):0){zm(d)|0;k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;if(!(i[C>>0]&1))a=10;else a=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,a|0,0);o=x;x=0;a:do{if(!(o&1)){n=C+8|0;o=C+1|0;a=(i[C>>0]&1)==0?o:k[n>>2]|0;k[u>>2]=a;k[t>>2]=s;k[q>>2]=0;m=C+4|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){E=30;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){E=30;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h){g=j;break}else{g=j;break b}else{k[c>>2]=0;E=20;break}}else E=20}while(0);if((E|0)==20){E=0;if(h){g=0;break}else g=0}h=i[C>>0]|0;h=(h&1)==0?(h&255)>>>1:k[m>>2]|0;if((k[u>>2]|0)==(a+h|0)){x=0;Fa(8,C|0,h<<1|0,0);l=x;x=0;if(l&1){E=30;break}if(!(i[C>>0]&1))a=10;else a=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,a|0,0);l=x;x=0;if(l&1){E=30;break}a=(i[C>>0]&1)==0?o:k[n>>2]|0;k[u>>2]=a+h}j=d+12|0;h=k[j>>2]|0;l=d+16|0;if((h|0)==(k[l>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;F=x;x=0;if(F&1){E=30;break}}else h=k[h>>2]|0;if(tp(h,16,a,u,q,0,D,s,t,p)|0)break;g=k[j>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;F=x;x=0;if(F&1){E=30;break}else{g=d;continue}}else{k[j>>2]=g+4;g=d;continue}}if((E|0)==30){a=Wa()|0;break}x=0;Fa(8,C|0,(k[u>>2]|0)-a|0,0);F=x;x=0;if((!(F&1)?(w=i[C>>0]|0,y=k[n>>2]|0,x=0,z=Da(3)|0,F=x,x=0,!(F&1)):0)?(x=0,k[v>>2]=f,A=Ea(16,((w&1)==0?o:y)|0,z|0,58882,v|0)|0,F=x,x=0,!(F&1)):0){if((A|0)!=1)k[e>>2]=4;if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;F=x;x=0;if(F&1){E=31;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;F=x;x=0;if(F&1){E=31;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{E=59;break}else{k[c>>2]=0;E=57;break}}else E=57}while(0);if((E|0)==57?d:0)E=59;if((E|0)==59)k[e>>2]=k[e>>2]|2;F=k[b>>2]|0;Sm(C);Sm(D);r=B;return F|0}else E=31}else E=31}while(0);if((E|0)==31)a=Wa()|0;Sm(C);break}a=Wa()|0;zm(d)|0}}while(0);Sm(D);fb(a|0);return 0}function tp(a,b,c,d,e,f,g,h,j,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0;o=k[d>>2]|0;p=(o|0)==(c|0);do{if(p){m=(k[l+96>>2]|0)==(a|0);if(!m?(k[l+100>>2]|0)!=(a|0):0){n=5;break}k[d>>2]=c+1;i[c>>0]=m?43:45;k[e>>2]=0;m=0}else n=5}while(0);a:do{if((n|0)==5){n=i[g>>0]|0;if((a|0)==(f|0)?(((n&1)==0?(n&255)>>>1:k[g+4>>2]|0)|0)!=0:0){m=k[j>>2]|0;if((m-h|0)>=160){m=0;break}b=k[e>>2]|0;k[j>>2]=m+4;k[m>>2]=b;k[e>>2]=0;m=0;break}g=l+104|0;m=l;while(1){if((k[m>>2]|0)==(a|0))break;m=m+4|0;if((m|0)==(g|0)){m=g;break}}m=m-l|0;g=m>>2;if((m|0)>92)m=-1;else{switch(b|0){case 10:case 8:{if((g|0)>=(b|0)){m=-1;break a}break}case 16:{if((m|0)>=88){if(p){m=-1;break a}if((o-c|0)>=3){m=-1;break a}if((i[o+-1>>0]|0)!=48){m=-1;break a}k[e>>2]=0;m=i[57498+g>>0]|0;k[d>>2]=o+1;i[o>>0]=m;m=0;break a}break}default:{}}m=i[57498+g>>0]|0;k[d>>2]=o+1;i[o>>0]=m;k[e>>2]=(k[e>>2]|0)+1;m=0}}}while(0);return m|0}function up(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,j=0,l=0;j=r;r=r+16|0;h=j;b=tn(b)|0;k[h>>2]=b;x=0;e=Aa(37,h|0,44220)|0;l=x;x=0;if((((!(l&1)?(x=0,Ea(k[(k[e>>2]|0)+32>>2]|0,e|0,57498,57524,c|0)|0,l=x,x=0,!(l&1)):0)?(x=0,g=Aa(37,h|0,44360)|0,l=x,x=0,!(l&1)):0)?(x=0,f=ta(k[(k[g>>2]|0)+16>>2]|0,g|0)|0,l=x,x=0,!(l&1)):0)?(i[d>>0]=f,x=0,ra(k[(k[g>>2]|0)+20>>2]|0,a|0,g|0),l=x,x=0,!(l&1)):0){zm(b)|0;r=j;return}l=Wa()|0;zm(b)|0;fb(l|0)}function vp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0;m=r;r=r+16|0;l=m;b=tn(b)|0;k[l>>2]=b;x=0;f=Aa(37,l|0,44220)|0;n=x;x=0;if(((((!(n&1)?(x=0,Ea(k[(k[f>>2]|0)+32>>2]|0,f|0,57498,57530,c|0)|0,n=x,x=0,!(n&1)):0)?(x=0,j=Aa(37,l|0,44360)|0,n=x,x=0,!(n&1)):0)?(x=0,g=ta(k[(k[j>>2]|0)+12>>2]|0,j|0)|0,n=x,x=0,!(n&1)):0)?(i[d>>0]=g,x=0,h=ta(k[(k[j>>2]|0)+16>>2]|0,j|0)|0,n=x,x=0,!(n&1)):0)?(i[e>>0]=h,x=0,ra(k[(k[j>>2]|0)+20>>2]|0,a|0,j|0),n=x,x=0,!(n&1)):0){zm(b)|0;r=m;return}n=Wa()|0;zm(b)|0;fb(n|0)}function wp(a,b,c,d,e,f,g,h,j,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;m=m|0;n=n|0;o=o|0;var p=0,q=0;a:do{if(a<<24>>24==f<<24>>24)if(i[b>>0]|0){i[b>>0]=0;c=k[e>>2]|0;k[e>>2]=c+1;i[c>>0]=46;c=i[h>>0]|0;if((((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0?(p=k[m>>2]|0,(p-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;p=0}else p=0}else p=-1;else{if(a<<24>>24==g<<24>>24?(g=i[h>>0]|0,(((g&1)==0?(g&255)>>>1:k[h+4>>2]|0)|0)!=0):0){if(!(i[b>>0]|0)){p=-1;break}p=k[m>>2]|0;if((p-j|0)>=160){p=0;break}j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;k[n>>2]=0;p=0;break}f=o+32|0;p=o;while(1){if((i[p>>0]|0)==a<<24>>24)break;p=p+1|0;if((p|0)==(f|0)){p=f;break}}f=p-o|0;if((f|0)>31)p=-1;else{g=i[57498+f>>0]|0;switch(f|0){case 24:case 25:{p=k[e>>2]|0;if((p|0)!=(d|0)?(l[p+-1>>0]&95|0)!=(l[c>>0]&127|0):0){p=-1;break a}k[e>>2]=p+1;i[p>>0]=g;p=0;break a}case 23:case 22:{i[c>>0]=80;p=k[e>>2]|0;k[e>>2]=p+1;i[p>>0]=g;p=0;break a}default:{p=g&95;if((((p|0)==(i[c>>0]|0)?(i[c>>0]=p|128,(i[b>>0]|0)!=0):0)?(i[b>>0]=0,c=i[h>>0]|0,(((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0):0)?(q=k[m>>2]|0,(q-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=q+4;k[q>>2]=j}m=k[e>>2]|0;k[e>>2]=m+1;i[m>>0]=g;if((f|0)>21){p=0;break a}k[n>>2]=(k[n>>2]|0)+1;p=0;break a}}}}}while(0);return p|0}function xp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=r;r=r+16|0;h=i;b=tn(b)|0;k[h>>2]=b;x=0;e=Aa(37,h|0,44212)|0;j=x;x=0;if((((!(j&1)?(x=0,Ea(k[(k[e>>2]|0)+48>>2]|0,e|0,57498,57524,c|0)|0,j=x,x=0,!(j&1)):0)?(x=0,g=Aa(37,h|0,44368)|0,j=x,x=0,!(j&1)):0)?(x=0,f=ta(k[(k[g>>2]|0)+16>>2]|0,g|0)|0,j=x,x=0,!(j&1)):0)?(k[d>>2]=f,x=0,ra(k[(k[g>>2]|0)+20>>2]|0,a|0,g|0),j=x,x=0,!(j&1)):0){zm(b)|0;r=i;return}j=Wa()|0;zm(b)|0;fb(j|0)}function yp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0;l=r;r=r+16|0;j=l;b=tn(b)|0;k[j>>2]=b;x=0;f=Aa(37,j|0,44212)|0;m=x;x=0;if(((((!(m&1)?(x=0,Ea(k[(k[f>>2]|0)+48>>2]|0,f|0,57498,57530,c|0)|0,m=x,x=0,!(m&1)):0)?(x=0,i=Aa(37,j|0,44368)|0,m=x,x=0,!(m&1)):0)?(x=0,g=ta(k[(k[i>>2]|0)+12>>2]|0,i|0)|0,m=x,x=0,!(m&1)):0)?(k[d>>2]=g,x=0,h=ta(k[(k[i>>2]|0)+16>>2]|0,i|0)|0,m=x,x=0,!(m&1)):0)?(k[e>>2]=h,x=0,ra(k[(k[i>>2]|0)+20>>2]|0,a|0,i|0),m=x,x=0,!(m&1)):0){zm(b)|0;r=l;return}m=Wa()|0;zm(b)|0;fb(m|0)}function zp(a,b,c,d,e,f,g,h,j,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;m=m|0;n=n|0;o=o|0;var p=0,q=0;a:do{if((a|0)==(f|0))if(i[b>>0]|0){i[b>>0]=0;c=k[e>>2]|0;k[e>>2]=c+1;i[c>>0]=46;c=i[h>>0]|0;if((((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0?(p=k[m>>2]|0,(p-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;p=0}else p=0}else p=-1;else{if((a|0)==(g|0)?(g=i[h>>0]|0,(((g&1)==0?(g&255)>>>1:k[h+4>>2]|0)|0)!=0):0){if(!(i[b>>0]|0)){p=-1;break}p=k[m>>2]|0;if((p-j|0)>=160){p=0;break}j=k[n>>2]|0;k[m>>2]=p+4;k[p>>2]=j;k[n>>2]=0;p=0;break}f=o+128|0;p=o;while(1){if((k[p>>2]|0)==(a|0))break;p=p+4|0;if((p|0)==(f|0)){p=f;break}}f=p-o|0;p=f>>2;if((f|0)<=124){g=i[57498+p>>0]|0;switch(p|0){case 24:case 25:{p=k[e>>2]|0;if((p|0)!=(d|0)?(l[p+-1>>0]&95|0)!=(l[c>>0]&127|0):0){p=-1;break a}k[e>>2]=p+1;i[p>>0]=g;p=0;break a}case 23:case 22:{i[c>>0]=80;break}default:{p=g&95;if((((p|0)==(i[c>>0]|0)?(i[c>>0]=p|128,(i[b>>0]|0)!=0):0)?(i[b>>0]=0,c=i[h>>0]|0,(((c&1)==0?(c&255)>>>1:k[h+4>>2]|0)|0)!=0):0)?(q=k[m>>2]|0,(q-j|0)<160):0){j=k[n>>2]|0;k[m>>2]=q+4;k[q>>2]=j}}}m=k[e>>2]|0;k[e>>2]=m+1;i[m>>0]=g;if((f|0)>84)p=0;else{k[n>>2]=(k[n>>2]|0)+1;p=0}}else p=-1}}while(0);return p|0}function Ap(a){a=a|0;return}function Bp(a){a=a|0;mj(a);return}function Cp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0;m=r;r=r+32|0;f=m+20|0;g=m+16|0;h=m+12|0;l=m;a:do{if(!(k[c+4>>2]&1)){l=k[(k[a>>2]|0)+24>>2]|0;k[g>>2]=k[b>>2];k[f>>2]=k[g>>2];f=Wb[l&31](a,f,c,d,e&1)|0}else{f=tn(c)|0;k[h>>2]=f;x=0;g=Aa(37,h|0,44360)|0;j=x;x=0;b:do{if(j&1){m=Wa()|0;zm(f)|0;f=m}else{zm(f)|0;f=k[g>>2]|0;if(e)Mb[k[f+24>>2]&127](l,g);else Mb[k[f+28>>2]&127](l,g);a=i[l>>0]|0;j=(a&1)==0;f=l+1|0;e=l+8|0;h=j?f:l+1|0;f=j?f:k[l+8>>2]|0;j=l+4|0;c=(a&1)==0;c:do{if((f|0)!=((c?h:k[e>>2]|0)+(c?(a&255)>>>1:k[j>>2]|0)|0)){d:while(1){g=i[f>>0]|0;d=k[b>>2]|0;do{if(d){c=d+24|0;a=k[c>>2]|0;if((a|0)!=(k[d+28>>2]|0)){k[c>>2]=a+1;i[a>>0]=g;break}x=0;g=Aa(k[(k[d>>2]|0)+52>>2]|0,d|0,g&255|0)|0;a=x;x=0;if(a&1)break d;if((g|0)==-1)k[b>>2]=0}}while(0);f=f+1|0;a=i[l>>0]|0;c=(a&1)==0;if((f|0)==((c?h:k[e>>2]|0)+(c?(a&255)>>>1:k[j>>2]|0)|0))break c}f=Wa()|0;Sm(l);break b}}while(0);f=k[b>>2]|0;Sm(l);break a}}while(0);fb(f|0)}}while(0);r=m;return f|0}function Dp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+64|0;f=m;o=m+56|0;p=m+44|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,1,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=md(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Ep(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if(d&2048){i[a>>0]=43;a=a+1|0}if(d&512){i[a>>0]=35;a=a+1|0}e=i[b>>0]|0;if(e<<24>>24){f=b;while(1){f=f+1|0;b=a+1|0;i[a>>0]=e;e=i[f>>0]|0;if(!(e<<24>>24)){a=b;break}else a=b}}a:do{switch(d&74|0){case 64:{i[a>>0]=111;break}case 8:if(!(d&16384)){i[a>>0]=120;break a}else{i[a>>0]=88;break a}default:if(c){i[a>>0]=100;break a}else{i[a>>0]=117;break a}}}while(0);return}function Fp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:do{switch(k[c+4>>2]&176|0){case 16:{c=i[a>>0]|0;switch(c<<24>>24){case 43:case 45:{a=a+1|0;break a}default:{}}if((b-a|0)>1&c<<24>>24==48){switch(i[a+1>>0]|0){case 88:case 120:break;default:{d=7;break a}}a=a+2|0}else d=7;break}case 32:{a=b;break}default:d=7}}while(0);return a|0}function Gp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+16|0;v=u;s=Ss(g,44220)|0;l=Ss(g,44360)|0;Mb[k[(k[l>>2]|0)+20>>2]&127](v,l);p=i[v>>0]|0;q=v+4|0;a:do{if(!(((p&1)==0?(p&255)>>>1:k[q>>2]|0)|0)){x=0;Ea(k[(k[s>>2]|0)+32>>2]|0,s|0,a|0,c|0,d|0)|0;t=x;x=0;if(t&1)t=5;else{g=d+(c-a)|0;k[f>>2]=g;t=29}}else{k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,g|0)|0;p=x;x=0;if(p&1){t=5;break a}j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=g;j=a+1|0;break}default:j=a}b:do{if((c-j|0)>1?(i[j>>0]|0)==48:0){g=j+1|0;switch(i[g>>0]|0){case 88:case 120:break;default:break b}x=0;h=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,48)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+1;i[p>>0]=h;x=0;g=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,i[g>>0]|0)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+1;i[p>>0]=g;j=j+2|0}}while(0);if((j|0)!=(c|0)?(m=c+-1|0,j>>>0>>0):0){h=j;g=m;do{p=i[h>>0]|0;i[h>>0]=i[g>>0]|0;i[g>>0]=p;h=h+1|0;g=g+-1|0}while(h>>>0>>0)}x=0;m=ta(k[(k[l>>2]|0)+16>>2]|0,l|0)|0;p=x;x=0;if(!(p&1)){n=v+8|0;o=v+1|0;c:do{if(j>>>0>>0){g=0;h=0;p=j;while(1){l=i[((i[v>>0]&1)==0?o:k[n>>2]|0)+h>>0]|0;if(l<<24>>24!=0&(g|0)==(l<<24>>24|0)){g=k[f>>2]|0;k[f>>2]=g+1;i[g>>0]=m;g=i[v>>0]|0;l=0;h=(h>>>0<(((g&1)==0?(g&255)>>>1:k[q>>2]|0)+-1|0)>>>0&1)+h|0}else l=g;x=0;g=Aa(k[(k[s>>2]|0)+28>>2]|0,s|0,i[p>>0]|0)|0;w=x;x=0;if(w&1)break;w=k[f>>2]|0;k[f>>2]=w+1;i[w>>0]=g;p=p+1|0;if(p>>>0>=c>>>0)break c;else g=l+1|0}g=Wa()|0;break a}}while(0);h=a;g=d+(j-h)|0;a=k[f>>2]|0;if((g|0)==(a|0)){a=h;t=29}else{a=a+-1|0;if(g>>>0>>0)do{w=i[g>>0]|0;i[g>>0]=i[a>>0]|0;i[a>>0]=w;g=g+1|0;a=a+-1|0}while(g>>>0>>0);a=h;g=k[f>>2]|0;t=29}}else t=5}}while(0);if((t|0)==5)g=Wa()|0;else if((t|0)==29){k[e>>2]=(b|0)==(c|0)?g:d+(b-a)|0;Sm(v);r=u;return}Sm(v);fb(g|0)}function Hp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+96|0;g=m+8|0;a=m;o=m+74|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,1,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,22,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=md(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Ip(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+64|0;f=m;o=m+56|0;p=m+44|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,0,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=md(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Jp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+112|0;g=m+8|0;a=m;o=m+75|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,0,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,23,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(1,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=md(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Kp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+176|0;t=z+84|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+88|0;s=z+80|0;h=z+118|0;y=z+76|0;w=z+72|0;u=z+68|0;v=z+64|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58898,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,k[n>>2]=k[c+8>>2],p[n+8>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<1)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(2,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(39,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function Lp(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;if(c&2048){i[a>>0]=43;a=a+1|0}if(c&1024){i[a>>0]=35;a=a+1|0}g=c&260;e=c>>>14;h=(g|0)==260;if(h)f=0;else{i[a>>0]=46;i[a+1>>0]=42;a=a+2|0;f=1}c=i[b>>0]|0;if(c<<24>>24){d=a;while(1){b=b+1|0;a=d+1|0;i[d>>0]=c;c=i[b>>0]|0;if(!(c<<24>>24))break;else d=a}}a:do{switch(g|0){case 4:if(!(e&1)){i[a>>0]=102;break a}else{i[a>>0]=70;break a}case 256:if(!(e&1)){i[a>>0]=101;break a}else{i[a>>0]=69;break a}default:{c=(e&1|0)!=0;if(h)if(c){i[a>>0]=65;break a}else{i[a>>0]=97;break a}else if(c){i[a>>0]=71;break a}else{i[a>>0]=103;break a}}}}while(0);return f|0}function Mp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0;z=r;r=r+16|0;A=z;y=Ss(g,44220)|0;v=Ss(g,44360)|0;Mb[k[(k[v>>2]|0)+20>>2]&127](A,v);k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,g|0)|0;w=x;x=0;if(w&1)u=8;else{m=k[f>>2]|0;k[f>>2]=m+1;i[m>>0]=g;m=a+1|0;u=10}break}default:{m=a;u=10}}a:do{if((u|0)==10){w=c;b:do{if((w-m|0)>1?(i[m>>0]|0)==48:0){j=m+1|0;switch(i[j>>0]|0){case 88:case 120:break;default:{u=11;break b}}x=0;g=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,48)|0;t=x;x=0;if(t&1){u=8;break a}t=k[f>>2]|0;k[f>>2]=t+1;i[t>>0]=g;m=m+2|0;x=0;g=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,i[j>>0]|0)|0;t=x;x=0;if(t&1){u=8;break a}t=k[f>>2]|0;k[f>>2]=t+1;i[t>>0]=g;if(m>>>0>>0){g=m;while(1){j=i[g>>0]|0;x=0;l=Da(3)|0;t=x;x=0;if(t&1)break;x=0;j=Aa(39,j<<24>>24|0,l|0)|0;t=x;x=0;if(t&1)break;if(!j){t=m;break b}g=g+1|0;if(g>>>0>=c>>>0){t=m;break b}}g=Wa()|0;break a}else{t=m;g=m}}else u=11}while(0);c:do{if((u|0)==11)if(m>>>0>>0){g=m;while(1){j=i[g>>0]|0;x=0;l=Da(3)|0;t=x;x=0;if(t&1)break;x=0;j=Aa(40,j<<24>>24|0,l|0)|0;t=x;x=0;if(t&1)break;if(!j){t=m;break c}g=g+1|0;if(g>>>0>=c>>>0){t=m;break c}}g=Wa()|0;break a}else{t=m;g=m}}while(0);q=i[A>>0]|0;s=A+4|0;if(((q&1)==0?(q&255)>>>1:k[s>>2]|0)|0){if((t|0)!=(g|0)?(n=g+-1|0,t>>>0>>0):0){l=t;j=n;do{q=i[l>>0]|0;i[l>>0]=i[j>>0]|0;i[j>>0]=q;l=l+1|0;j=j+-1|0}while(l>>>0>>0)}x=0;n=ta(k[(k[v>>2]|0)+16>>2]|0,v|0)|0;q=x;x=0;if(q&1){u=8;break}o=A+8|0;p=A+1|0;d:do{if(t>>>0>>0){j=0;l=0;q=t;while(1){m=i[((i[A>>0]&1)==0?p:k[o>>2]|0)+l>>0]|0;if(m<<24>>24>0&(j|0)==(m<<24>>24|0)){j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=n;j=i[A>>0]|0;m=0;l=(l>>>0<(((j&1)==0?(j&255)>>>1:k[s>>2]|0)+-1|0)>>>0&1)+l|0}else m=j;x=0;j=Aa(k[(k[y>>2]|0)+28>>2]|0,y|0,i[q>>0]|0)|0;B=x;x=0;if(B&1)break;B=k[f>>2]|0;k[f>>2]=B+1;i[B>>0]=j;q=q+1|0;if(q>>>0>=g>>>0)break d;else j=m+1|0}g=Wa()|0;break a}}while(0);j=d+(t-a)|0;l=k[f>>2]|0;if((j|0)!=(l|0)?(h=l+-1|0,j>>>0>>0):0){do{B=i[j>>0]|0;i[j>>0]=i[h>>0]|0;i[h>>0]=B;j=j+1|0;h=h+-1|0}while(j>>>0>>0);j=y}else j=y}else{x=0;Ea(k[(k[y>>2]|0)+32>>2]|0,y|0,t|0,g|0,k[f>>2]|0)|0;B=x;x=0;if(B&1){u=8;break}k[f>>2]=(k[f>>2]|0)+(g-t);j=y}e:do{if(g>>>0>>0){while(1){h=i[g>>0]|0;if(h<<24>>24==46)break;x=0;h=Aa(k[(k[j>>2]|0)+28>>2]|0,y|0,h|0)|0;B=x;x=0;if(B&1){u=4;break}B=k[f>>2]|0;k[f>>2]=B+1;i[B>>0]=h;g=g+1|0;if(g>>>0>=c>>>0)break e}if((u|0)==4){g=Wa()|0;break a}x=0;h=ta(k[(k[v>>2]|0)+12>>2]|0,v|0)|0;B=x;x=0;if(B&1){u=8;break a}B=k[f>>2]|0;k[f>>2]=B+1;i[B>>0]=h;g=g+1|0}}while(0);x=0;Ea(k[(k[y>>2]|0)+32>>2]|0,y|0,g|0,c|0,k[f>>2]|0)|0;B=x;x=0;if(B&1)u=8;else{B=(k[f>>2]|0)+(w-g)|0;k[f>>2]=B;k[e>>2]=(b|0)==(c|0)?B:d+(b-a)|0;Sm(A);r=z;return}}}while(0);if((u|0)==8)g=Wa()|0;Sm(A);fb(g|0)}function Np(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+176|0;t=z+76|0;n=z+48|0;m=z+32|0;i=z+24|0;f=z+8|0;l=z;q=z+80|0;s=z+72|0;h=z+110|0;y=z+68|0;w=z+64|0;u=z+60|0;v=z+56|0;j=l;k[j>>2]=37;k[j+4>>2]=0;j=Lp(l+1|0,58899,k[c+4>>2]|0)|0;k[s>>2]=q;a=fp()|0;if(j){k[f>>2]=k[c+8>>2];p[f+8>>3]=e;f=av(q,30,a,l,f)|0}else{p[i>>3]=e;f=av(q,30,a,l,i)|0}a:do{if((f|0)>29){x=0;a=Da(3)|0;f=x;x=0;f=f&1;if(j){if(!f?(x=0,k[m>>2]=k[c+8>>2],p[m+8>>3]=e,g=Ea(17,s|0,a|0,l|0,m|0)|0,o=x,x=0,!(o&1)):0)A=12}else if(!f?(x=0,p[n>>3]=e,o=Ea(17,s|0,a|0,l|0,n|0)|0,n=x,x=0,!(n&1)):0){g=o;A=12}do{if((A|0)==12){a=k[s>>2]|0;if(!a){x=0;Ga(6);o=x;x=0;if(o&1)break;f=k[s>>2]|0}else f=a;a=f;l=f;A=16;break a}}while(0);a=Wa()|0}else{a=k[s>>2]|0;l=0;g=f;A=16}}while(0);if((A|0)==16){i=a+g|0;j=Fp(a,i,c)|0;do{if((a|0)==(q|0)){a=q;f=0;A=22}else{g=Pl(g<<1)|0;if(!g){x=0;Ga(6);A=x;x=0;if(A&1){f=0;A=20;break}a=k[s>>2]|0}f=g;h=g;A=22}}while(0);do{if((A|0)==22){x=0;g=ta(68,c|0)|0;s=x;x=0;if(!(s&1)){k[u>>2]=g;x=0;ya(2,a|0,j|0,i|0,h|0,y|0,w|0,u|0);u=x;x=0;if(u&1){a=Wa()|0;zm(g)|0;break}zm(g)|0;k[v>>2]=k[b>>2];A=k[y>>2]|0;a=k[w>>2]|0;x=0;k[t>>2]=k[v>>2];a=sa(39,t|0,h|0,A|0,a|0,c|0,d|0)|0;A=x;x=0;if(!(A&1)){k[b>>2]=a;if(f)Ql(f);if(l)Ql(l);r=z;return a|0}else A=20}else A=20}}while(0);if((A|0)==20)a=Wa()|0;if(f)Ql(f);if(l)Ql(l)}fb(a|0);return 0}function Op(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;o=r;r=r+80|0;j=o;a=o+70|0;m=o+12|0;n=o+32|0;h=o+8|0;l=o+4|0;i[a>>0]=i[58901]|0;i[a+1>>0]=i[58902]|0;i[a+2>>0]=i[58903]|0;i[a+3>>0]=i[58904]|0;i[a+4>>0]=i[58905]|0;i[a+5>>0]=i[58906]|0;f=fp()|0;k[j>>2]=e;a=av(m,20,f,a,j)|0;e=m+a|0;f=Fp(m,e,c)|0;g=tn(c)|0;k[h>>2]=g;x=0;h=Aa(37,h|0,44220)|0;p=x;x=0;if(p&1){p=Wa()|0;zm(g)|0;fb(p|0)}else{zm(g)|0;Zb[k[(k[h>>2]|0)+32>>2]&31](h,m,e,n)|0;p=n+a|0;k[l>>2]=k[b>>2];k[j>>2]=k[l>>2];p=md(j,n,(f|0)==(e|0)?p:n+(f-m)|0,p,c,d)|0;r=o;return p|0}return 0}function Pp(a){a=a|0;return}function Qp(a){a=a|0;mj(a);return}function Rp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;f=l+20|0;g=l+16|0;h=l+12|0;j=l;a:do{if(!(k[c+4>>2]&1)){j=k[(k[a>>2]|0)+24>>2]|0;k[g>>2]=k[b>>2];k[f>>2]=k[g>>2];f=Wb[j&31](a,f,c,d,e&1)|0}else{f=tn(c)|0;k[h>>2]=f;x=0;g=Aa(37,h|0,44368)|0;h=x;x=0;b:do{if(h&1){l=Wa()|0;zm(f)|0;f=l}else{zm(f)|0;f=k[g>>2]|0;if(e)Mb[k[f+24>>2]&127](j,g);else Mb[k[f+28>>2]&127](j,g);a=i[j>>0]|0;c=(a&1)==0;f=j+4|0;e=j+8|0;h=c?f:j+4|0;f=c?f:k[j+8>>2]|0;c=(a&1)==0;c:do{if((f|0)!=((c?h:k[e>>2]|0)+((c?(a&255)>>>1:k[h>>2]|0)<<2)|0)){while(1){g=k[f>>2]|0;d=k[b>>2]|0;if(d){c=d+24|0;a=k[c>>2]|0;if((a|0)==(k[d+28>>2]|0)){x=0;g=Aa(k[(k[d>>2]|0)+52>>2]|0,d|0,g|0)|0;a=x;x=0;if(a&1)break}else{k[c>>2]=a+4;k[a>>2]=g}if((g|0)==-1)k[b>>2]=0}f=f+4|0;a=i[j>>0]|0;c=(a&1)==0;if((f|0)==((c?h:k[e>>2]|0)+((c?(a&255)>>>1:k[h>>2]|0)<<2)|0))break c}f=Wa()|0;en(j);break b}}while(0);f=k[b>>2]|0;en(j);break a}}while(0);fb(f|0)}}while(0);r=l;return f|0}function Sp(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;m=r;r=r+128|0;f=m;o=m+116|0;p=m+104|0;h=m+20|0;l=m+16|0;j=m+12|0;n=m+8|0;g=m+4|0;i[o>>0]=i[58887]|0;i[o+1>>0]=i[58888]|0;i[o+2>>0]=i[58889]|0;i[o+3>>0]=i[58890]|0;i[o+4>>0]=i[58891]|0;i[o+5>>0]=i[58892]|0;Ep(o+1|0,58893,1,k[c+4>>2]|0);a=fp()|0;k[f>>2]=e;e=p+(av(p,12,a,o,f)|0)|0;o=Fp(p,e,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,p|0,o|0,e|0,h|0,l|0,j|0,n|0);e=x;x=0;if(e&1){p=Wa()|0;zm(a)|0;fb(p|0)}else{zm(a)|0;k[g>>2]=k[b>>2];o=k[l>>2]|0;p=k[j>>2]|0;k[f>>2]=k[g>>2];p=cv(f,h,o,p,c,d)|0;r=m;return p|0}return 0}function Tp(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+16|0;v=u;s=Ss(g,44212)|0;l=Ss(g,44368)|0;Mb[k[(k[l>>2]|0)+20>>2]&127](v,l);p=i[v>>0]|0;q=v+4|0;a:do{if(!(((p&1)==0?(p&255)>>>1:k[q>>2]|0)|0)){x=0;Ea(k[(k[s>>2]|0)+48>>2]|0,s|0,a|0,c|0,d|0)|0;t=x;x=0;if(t&1)t=5;else{g=d+(c-a<<2)|0;k[f>>2]=g;t=28}}else{k[f>>2]=d;g=i[a>>0]|0;switch(g<<24>>24){case 43:case 45:{x=0;g=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,g|0)|0;p=x;x=0;if(p&1){t=5;break a}j=k[f>>2]|0;k[f>>2]=j+4;k[j>>2]=g;j=a+1|0;break}default:j=a}b:do{if((c-j|0)>1?(i[j>>0]|0)==48:0){g=j+1|0;switch(i[g>>0]|0){case 88:case 120:break;default:{p=j;break b}}x=0;h=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,48)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+4;k[p>>2]=h;x=0;g=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,i[g>>0]|0)|0;p=x;x=0;if(p&1){t=5;break a}p=k[f>>2]|0;k[f>>2]=p+4;k[p>>2]=g;p=j+2|0}else p=j}while(0);if((p|0)!=(c|0)?(m=c+-1|0,p>>>0>>0):0){h=p;g=m;do{o=i[h>>0]|0;i[h>>0]=i[g>>0]|0;i[g>>0]=o;h=h+1|0;g=g+-1|0}while(h>>>0>>0)}x=0;l=ta(k[(k[l>>2]|0)+16>>2]|0,l|0)|0;o=x;x=0;if(!(o&1)){m=v+8|0;n=v+1|0;c:do{if(p>>>0>>0){g=0;h=0;o=p;while(1){j=i[((i[v>>0]&1)==0?n:k[m>>2]|0)+h>>0]|0;if(j<<24>>24!=0&(g|0)==(j<<24>>24|0)){g=k[f>>2]|0;k[f>>2]=g+4;k[g>>2]=l;g=i[v>>0]|0;j=0;h=(h>>>0<(((g&1)==0?(g&255)>>>1:k[q>>2]|0)+-1|0)>>>0&1)+h|0}else j=g;x=0;g=Aa(k[(k[s>>2]|0)+44>>2]|0,s|0,i[o>>0]|0)|0;w=x;x=0;if(w&1)break;w=k[f>>2]|0;k[f>>2]=w+4;k[w>>2]=g;o=o+1|0;if(o>>>0>=c>>>0)break c;else g=j+1|0}g=Wa()|0;break a}}while(0);j=a;g=d+(p-j<<2)|0;h=k[f>>2]|0;if((g|0)!=(h|0)){a=h+-4|0;if(g>>>0>>0){do{w=k[g>>2]|0;k[g>>2]=k[a>>2];k[a>>2]=w;g=g+4|0;a=a+-4|0}while(g>>>0>>0);a=j;g=h;t=28}else{a=j;g=h;t=28}}else{a=j;t=28}}else t=5}}while(0);if((t|0)==5)g=Wa()|0;else if((t|0)==28){k[e>>2]=(b|0)==(c|0)?g:d+(b-a<<2)|0;Sm(v);r=u;return}Sm(v);fb(g|0)}function Up(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;m=r;r=r+224|0;g=m+8|0;a=m;o=m+196|0;i=m+32|0;l=m+28|0;j=m+24|0;n=m+20|0;h=m+16|0;p=a;k[p>>2]=37;k[p+4>>2]=0;Ep(a+1|0,58895,1,k[c+4>>2]|0);p=fp()|0;q=g;k[q>>2]=e;k[q+4>>2]=f;f=o+(av(o,22,p,a,g)|0)|0;e=Fp(o,f,c)|0;a=tn(c)|0;k[n>>2]=a;x=0;ya(3,o|0,e|0,f|0,i|0,l|0,j|0,n|0);f=x;x=0;if(f&1){q=Wa()|0;zm(a)|0;fb(q|0)}else{zm(a)|0;k[h>>2]=k[b>>2];p=k[l>>2]|0;q=k[j>>2]|0;k[g>>2]=k[h>>2];q=cv(g,i,p,q,c,d)|0;r=m;return q|0}return 0}function Et(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;t=r;r=r+16|0;q=t;o=t+8|0;a:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(k[j>>2]|0))break a;j=j+4|0;if((j|0)==(d|0)){j=d;break}}}}while(0);k[h>>2]=f;k[e>>2]=c;m=g;p=a+8|0;b:do{if(!((f|0)==(g|0)|(c|0)==(d|0))){a=f;l=j;c:while(1){v=b;f=k[v+4>>2]|0;j=q;k[j>>2]=k[v>>2];k[j+4>>2]=f;j=Ak(k[p>>2]|0)|0;x=0;f=Ba(21,a|0,e|0,l-c>>2|0,m-a|0,b|0)|0;v=x;x=0;if(v&1){u=9;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=8;break}switch(f|0){case 0:{n=1;break b}case-1:{j=a;u=14;break c}default:{}}j=(k[h>>2]|0)+f|0;k[h>>2]=j;if((j|0)==(g|0)){u=27;break}if((l|0)==(d|0)){c=k[e>>2]|0;a=j;j=d}else{j=Ak(k[p>>2]|0)|0;x=0;c=va(34,o|0,0,b|0)|0;v=x;x=0;if(v&1){u=35;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=34;break}if((c|0)==-1){n=2;break b}if(c>>>0>(m-(k[h>>2]|0)|0)>>>0){n=1;break b}if(c){j=o;while(1){l=i[j>>0]|0;v=k[h>>2]|0;k[h>>2]=v+1;i[v>>0]=l;c=c+-1|0;if(!c)break;else j=j+1|0}}c=(k[e>>2]|0)+4|0;k[e>>2]=c;d:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(k[j>>2]|0))break d;j=j+4|0;if((j|0)==(d|0)){j=d;break}}}}while(0);a=k[h>>2]|0}if((a|0)==(g|0)|(c|0)==(d|0)){u=47;break b}else l=j}if((u|0)==8){v=Wa(0)|0;oc(v)}else if((u|0)==9){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}else if((u|0)==14){k[h>>2]=j;e:do{if((c|0)!=(k[e>>2]|0)){while(1){v=k[c>>2]|0;a=Ak(k[p>>2]|0)|0;x=0;j=va(34,j|0,v|0,q|0)|0;v=x;x=0;if(v&1){s=a;break}if((a|0)!=0?(x=0,ta(75,a|0)|0,v=x,x=0,v&1):0){u=18;break}if((j|0)==-1)break e;j=(k[h>>2]|0)+j|0;k[h>>2]=j;c=c+4|0;if((c|0)==(k[e>>2]|0))break e}if((u|0)==18){v=Wa(0)|0;oc(v)}c=Wa()|0;if((s|0)!=0?(x=0,ta(75,s|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}}while(0);k[e>>2]=c;n=2;break}else if((u|0)==27){c=k[e>>2]|0;u=47;break}else if((u|0)==34){v=Wa(0)|0;oc(v)}else if((u|0)==35){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}}else u=47}while(0);if((u|0)==47)n=(c|0)!=(d|0)&1;r=t;return n|0}function Ft(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;t=r;r=r+16|0;s=t;a:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(i[j>>0]|0))break a;j=j+1|0;if((j|0)==(d|0)){j=d;break}}}}while(0);k[h>>2]=f;k[e>>2]=c;n=g;p=a+8|0;b:do{if(!((f|0)==(g|0)|(c|0)==(d|0))){a=f;m=j;c:while(1){l=b;j=k[l+4>>2]|0;f=s;k[f>>2]=k[l>>2];k[f+4>>2]=j;f=m;j=Ak(k[p>>2]|0)|0;x=0;l=Ba(22,a|0,e|0,f-c|0,n-a>>2|0,b|0)|0;v=x;x=0;if(v&1){u=9;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=8;break}switch(l|0){case 0:{o=2;break b}case-1:{j=a;u=14;break c}default:{}}a=(k[h>>2]|0)+(l<<2)|0;k[h>>2]=a;if((a|0)==(g|0)){u=31;break}c=k[e>>2]|0;if((m|0)==(d|0))j=d;else{j=Ak(k[p>>2]|0)|0;x=0;c=Ea(20,a|0,c|0,1,b|0)|0;v=x;x=0;if(v&1){u=38;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=37;break}if(c){o=2;break b}k[h>>2]=(k[h>>2]|0)+4;c=(k[e>>2]|0)+1|0;k[e>>2]=c;d:do{if((c|0)==(d|0))j=d;else{j=c;while(1){if(!(i[j>>0]|0))break d;j=j+1|0;if((j|0)==(d|0)){j=d;break}}}}while(0);a=k[h>>2]|0}if((a|0)==(g|0)|(c|0)==(d|0)){u=47;break b}else m=j}if((u|0)==8){v=Wa(0)|0;oc(v)}else if((u|0)==9){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}else if((u|0)==14){k[h>>2]=j;e:do{if((c|0)!=(k[e>>2]|0)){a=j;f:while(1){j=Ak(k[p>>2]|0)|0;x=0;a=Ea(20,a|0,c|0,f-c|0,s|0)|0;v=x;x=0;if(v&1){u=19;break}if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){u=18;break}switch(a|0){case-1:{u=25;break f}case-2:{u=26;break f}case 0:{c=c+1|0;break}default:c=c+a|0}a=(k[h>>2]|0)+4|0;k[h>>2]=a;if((c|0)==(k[e>>2]|0)){q=c;break e}}if((u|0)==18){v=Wa(0)|0;oc(v)}else if((u|0)==19){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}else if((u|0)==25){k[e>>2]=c;o=2;break b}else if((u|0)==26){k[e>>2]=c;o=1;break b}}else q=c}while(0);k[e>>2]=q;o=(q|0)!=(d|0)&1;break}else if((u|0)==31){c=k[e>>2]|0;u=47;break}else if((u|0)==37){v=Wa(0)|0;oc(v)}else if((u|0)==38){c=Wa()|0;if((j|0)!=0?(x=0,ta(75,j|0)|0,v=x,x=0,v&1):0){v=Wa(0)|0;oc(v)}fb(c|0)}}else u=47}while(0);if((u|0)==47)o=(c|0)!=(d|0)&1;r=t;return o|0}function Gt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=r;r=r+16|0;f=g;k[e>>2]=c;c=Ak(k[a+8>>2]|0)|0;x=0;a=va(34,f|0,0,b|0)|0;b=x;x=0;if(b&1){f=Wa()|0;if((c|0)!=0?(x=0,ta(75,c|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}fb(f|0)}if((c|0)!=0?(x=0,ta(75,c|0)|0,b=x,x=0,b&1):0){b=Wa(0)|0;oc(b)}switch(a|0){case 0:case-1:{f=2;break}default:{a=a+-1|0;if(a>>>0<=(d-(k[e>>2]|0)|0)>>>0)if(!a)f=0;else while(1){b=i[f>>0]|0;d=k[e>>2]|0;k[e>>2]=d+1;i[d>>0]=b;a=a+-1|0;if(!a){f=0;break}else f=f+1|0}else f=1}}r=g;return f|0}function Ht(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=a+8|0;x=0;c=ta(75,k[b>>2]|0)|0;d=x;x=0;do{if(d&1)e=16;else{x=0;d=va(35,0,0,4)|0;a=x;x=0;if(a&1){a=Wa(0)|0;if(!c)break;x=0;ta(75,c|0)|0;g=x;x=0;if(!(g&1))break;g=Wa(0)|0;oc(g)}if((c|0)!=0?(x=0,ta(75,c|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}if(!d){a=k[b>>2]|0;if(a){x=0;a=ta(75,a|0)|0;g=x;x=0;if(g&1){e=16;break}if((a|0)!=0?(x=0,ta(75,a|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}else f=0}else f=1}else f=-1;return f|0}}while(0);if((e|0)==16)a=Wa(0)|0;oc(a);return 0}function It(a){a=a|0;return 0}function Jt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;j=d;i=a+8|0;a:do{if((c|0)==(d|0)|(e|0)==0)a=0;else{a=0;h=0;while(1){g=Ak(k[i>>2]|0)|0;x=0;f=va(36,c|0,j-c|0,b|0)|0;n=x;x=0;if(n&1){m=g;break}if((g|0)!=0?(x=0,ta(75,g|0)|0,n=x,x=0,n&1):0){l=5;break}switch(f|0){case-2:case-1:break a;case 0:{c=c+1|0;f=1;break}default:c=c+f|0}a=f+a|0;h=h+1|0;if((c|0)==(d|0)|h>>>0>=e>>>0)break a}if((l|0)==5){n=Wa(0)|0;oc(n)}a=Wa()|0;if((m|0)!=0?(x=0,ta(75,m|0)|0,n=x,x=0,n&1):0){n=Wa(0)|0;oc(n)}fb(a|0)}}while(0);return a|0}function Kt(a){a=a|0;var b=0,c=0;a=k[a+8>>2]|0;if(a){x=0;a=ta(75,a|0)|0;c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}if((a|0)!=0?(x=0,ta(75,a|0)|0,c=x,x=0,c&1):0){c=Wa(0)|0;oc(c)}else b=4}else b=1;return b|0}function Lt(a){a=a|0;mj(a);return}function Mt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Rv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Nt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Sv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Ot(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;k[e>>2]=c;return 3}function Pt(a){a=a|0;return 0}function Qt(a){a=a|0;return 0}function Rt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Tv(c,d,e,1114111,0)|0}function St(a){a=a|0;return 4}function Tt(a){a=a|0;mj(a);return}function Ut(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Uv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Vt(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;a=r;r=r+16|0;i=a+4|0;b=a;k[i>>2]=c;k[b>>2]=f;g=Vv(c,d,i,f,g,b,1114111,0)|0;k[e>>2]=k[i>>2];k[h>>2]=k[b>>2];r=a;return g|0}function Wt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;k[e>>2]=c;return 3}function Xt(a){a=a|0;return 0}function Yt(a){a=a|0;return 0}function Zt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Wv(c,d,e,1114111,0)|0}function _t(a){a=a|0;return 4}function $t(a){a=a|0;mj(a);return}function au(a){a=a|0;mj(a);return}function bu(a,b){a=a|0;b=b|0;k[a+4>>2]=b+-1;k[a>>2]=44384;i[a+8>>0]=46;i[a+9>>0]=44;a=a+12|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function cu(a,b){a=a|0;b=b|0;k[a+4>>2]=b+-1;k[a>>2]=44424;k[a+8>>2]=46;k[a+12>>2]=44;a=a+16|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;return}function du(a){a=a|0;k[a>>2]=44384;Sm(a+12|0);return}function eu(a){a=a|0;du(a);mj(a);return}function fu(a){a=a|0;k[a>>2]=44424;Sm(a+16|0);return}function gu(a){a=a|0;fu(a);mj(a);return}function hu(a){a=a|0;return i[a+8>>0]|0}function iu(a){a=a|0;return k[a+8>>2]|0}function ju(a){a=a|0;return i[a+9>>0]|0}function ku(a){a=a|0;return k[a+12>>2]|0}function lu(a,b){a=a|0;b=b|0;Pm(a,b+12|0);return}function mu(a,b){a=a|0;b=b|0;Pm(a,b+16|0);return}function nu(a,b){a=a|0;b=b|0;Qm(a,59024,4);return}function ou(a,b){a=a|0;b=b|0;cn(a,44996,zl(44996)|0);return}function pu(a,b){a=a|0;b=b|0;Qm(a,59029,5);return}function qu(a,b){a=a|0;b=b|0;cn(a,45016,zl(45016)|0);return}function ru(a){a=a|0;switch(k[a+4>>2]&74|0){case 64:{a=8;break}case 8:{a=16;break}case 0:{a=0;break}default:a=10}return a|0}function su(a){a=a|0;do{if((i[2464]|0)==0?(Qa(2464)|0)!=0:0){if((i[2472]|0)==0?(Qa(2472)|0)!=0:0){a=45040;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=45208);tb(193,0,w|0)|0;Ya(2472)}x=0;Aa(41,45040,59035)|0;a=x;x=0;if(((((((((((((!(a&1)?(x=0,Aa(41,45052,59042)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45064,59049)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45076,59057)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45088,59067)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45100,59076)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45112,59083)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45124,59092)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45136,59096)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45148,59100)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45160,59104)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45172,59108)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45184,59112)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45196,59116)|0,a=x,x=0,!(a&1)):0){k[11302]=45040;Ya(2464);break}a=Wa()|0;Bb(2464);fb(a|0)}}while(0);return k[11302]|0}function tu(a){a=a|0;do{if((i[2480]|0)==0?(Qa(2480)|0)!=0:0){if((i[2488]|0)==0?(Qa(2488)|0)!=0:0){a=45212;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=45380);tb(194,0,w|0)|0;Ya(2488)}x=0;Aa(42,45212,45380)|0;a=x;x=0;if(((((((((((((!(a&1)?(x=0,Aa(42,45224,45408)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45236,45436)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45248,45468)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45260,45508)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45272,45544)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45284,45572)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45296,45608)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45308,45624)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45320,45640)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45332,45656)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45344,45672)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45356,45688)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,45368,45704)|0,a=x,x=0,!(a&1)):0){k[11430]=45212;Ya(2480);break}a=Wa()|0;Bb(2480);fb(a|0)}}while(0);return k[11430]|0}function uu(a){a=a|0;a:do{if((i[2496]|0)==0?(Qa(2496)|0)!=0:0){if((i[2504]|0)==0?(Qa(2504)|0)!=0:0){a=45724;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=46012);tb(195,0,w|0)|0;Ya(2504)}x=0;Aa(41,45724,59120)|0;a=x;x=0;do{if((((((((((((((!(a&1)?(x=0,Aa(41,45736,59128)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45748,59137)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45760,59143)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45772,59149)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45784,59153)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45796,59158)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45808,59163)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45820,59170)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45832,59180)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45844,59188)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45856,59197)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45868,59206)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45880,59210)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(41,45892,59214)|0,a=x,x=0,!(a&1)):0){x=0;Aa(41,45904,59218)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45916,59149)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45928,59222)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45940,59226)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45952,59230)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45964,59234)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45976,59238)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,45988,59242)|0;a=x;x=0;if(a&1)break;x=0;Aa(41,46e3,59246)|0;a=x;x=0;if(a&1)break;k[11503]=45724;Ya(2496);break a}}while(0);a=Wa()|0;Bb(2496);fb(a|0)}}while(0);return k[11503]|0}function vu(a){a=a|0;a:do{if((i[2512]|0)==0?(Qa(2512)|0)!=0:0){if((i[2520]|0)==0?(Qa(2520)|0)!=0:0){a=46016;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=46304);tb(196,0,w|0)|0;Ya(2520)}x=0;Aa(42,46016,46304)|0;a=x;x=0;do{if((((((((((((((!(a&1)?(x=0,Aa(42,46028,46336)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46040,46372)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46052,46396)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46064,46420)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46076,46436)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46088,46456)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46100,46476)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46112,46504)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46124,46544)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46136,46576)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46148,46612)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46160,46648)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46172,46664)|0,a=x,x=0,!(a&1)):0)?(x=0,Aa(42,46184,46680)|0,a=x,x=0,!(a&1)):0){x=0;Aa(42,46196,46696)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46208,46420)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46220,46712)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46232,46728)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46244,46744)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46256,46760)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46268,46776)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46280,46792)|0;a=x;x=0;if(a&1)break;x=0;Aa(42,46292,46808)|0;a=x;x=0;if(a&1)break;k[11706]=46016;Ya(2512);break a}}while(0);a=Wa()|0;Bb(2512);fb(a|0)}}while(0);return k[11706]|0}function wu(a){a=a|0;do{if((i[2528]|0)==0?(Qa(2528)|0)!=0:0){if((i[2536]|0)==0?(Qa(2536)|0)!=0:0){a=46828;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=47116);tb(197,0,w|0)|0;Ya(2536)}x=0;Aa(41,46828,59250)|0;a=x;x=0;if(!(a&1)?(x=0,Aa(41,46840,59253)|0,a=x,x=0,!(a&1)):0){k[11779]=46828;Ya(2528);break}a=Wa()|0;Bb(2528);fb(a|0)}}while(0);return k[11779]|0}function xu(a){a=a|0;do{if((i[2544]|0)==0?(Qa(2544)|0)!=0:0){if((i[2552]|0)==0?(Qa(2552)|0)!=0:0){a=47120;do{k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;a=a+12|0}while((a|0)!=47408);tb(198,0,w|0)|0;Ya(2552)}x=0;Aa(42,47120,47408)|0;a=x;x=0;if(!(a&1)?(x=0,Aa(42,47132,47420)|0,a=x,x=0,!(a&1)):0){k[11858]=47120;Ya(2544);break}a=Wa()|0;Bb(2544);fb(a|0)}}while(0);return k[11858]|0}function yu(a){a=a|0;do{if((i[2560]|0)==0?(Qa(2560)|0)!=0:0){x=0;Fa(5,47436,59256,8);a=x;x=0;if(a&1){a=Wa()|0;Bb(2560);fb(a|0)}else{tb(199,47436,w|0)|0;Ya(2560);break}}}while(0);return 47436}function zu(a){a=a|0;var b=0;do{if((i[2568]|0)==0?(Qa(2568)|0)!=0:0){x=0;a=ta(76,47448)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47484,47448,a|0),b=x,x=0,!(b&1)):0){tb(200,47484,w|0)|0;Ya(2568);break}b=Wa()|0;Bb(2568);fb(b|0)}}while(0);return 47484}function Au(a){a=a|0;do{if((i[2576]|0)==0?(Qa(2576)|0)!=0:0){x=0;Fa(5,47496,59265,8);a=x;x=0;if(a&1){a=Wa()|0;Bb(2576);fb(a|0)}else{tb(199,47496,w|0)|0;Ya(2576);break}}}while(0);return 47496}function Bu(a){a=a|0;var b=0;do{if((i[2584]|0)==0?(Qa(2584)|0)!=0:0){x=0;a=ta(76,47508)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47544,47508,a|0),b=x,x=0,!(b&1)):0){tb(200,47544,w|0)|0;Ya(2584);break}b=Wa()|0;Bb(2584);fb(b|0)}}while(0);return 47544}function Cu(a){a=a|0;do{if((i[2592]|0)==0?(Qa(2592)|0)!=0:0){x=0;Fa(5,47556,59274,20);a=x;x=0;if(a&1){a=Wa()|0;Bb(2592);fb(a|0)}else{tb(199,47556,w|0)|0;Ya(2592);break}}}while(0);return 47556}function Du(a){a=a|0;var b=0;do{if((i[2600]|0)==0?(Qa(2600)|0)!=0:0){x=0;a=ta(76,47568)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47652,47568,a|0),b=x,x=0,!(b&1)):0){tb(200,47652,w|0)|0;Ya(2600);break}b=Wa()|0;Bb(2600);fb(b|0)}}while(0);return 47652}function Eu(a){a=a|0;do{if((i[2608]|0)==0?(Qa(2608)|0)!=0:0){x=0;Fa(5,47664,59295,11);a=x;x=0;if(a&1){a=Wa()|0;Bb(2608);fb(a|0)}else{tb(199,47664,w|0)|0;Ya(2608);break}}}while(0);return 47664}function Fu(a){a=a|0;var b=0;do{if((i[2616]|0)==0?(Qa(2616)|0)!=0:0){x=0;a=ta(76,47676)|0;b=x;x=0;if(!(b&1)?(x=0,Fa(15,47724,47676,a|0),b=x,x=0,!(b&1)):0){tb(200,47724,w|0)|0;Ya(2616);break}b=Wa()|0;Bb(2616);fb(b|0)}}while(0);return 47724}function Gu(a){a=a|0;var b=0,c=0,d=0;k[a>>2]=44304;a=a+8|0;b=k[a>>2]|0;x=0;c=Da(3)|0;d=x;x=0;do{if(!(d&1)){if((b|0)!=(c|0)?(x=0,qa(188,k[a>>2]|0),d=x,x=0,d&1):0)break;return}}while(0);d=Wa(0)|0;oc(d)}function Hu(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0;z=r;r=r+112|0;j=z;n=(d-c|0)/12|0;do{if(n>>>0>100){j=Pl(n)|0;if((j|0)==0?(x=0,Ga(6),y=x,x=0,y&1):0){h=0;q=6;break}h=j;q=11}else{h=0;q=11}}while(0);a:do{if((q|0)==11){if((c|0)==(d|0))m=0;else{q=c;o=0;p=j;while(1){m=i[q>>0]|0;if(!(m&1))m=(m&255)>>>1;else m=k[q+4>>2]|0;if(!m){i[p>>0]=2;m=o+1|0;n=n+-1|0}else{i[p>>0]=1;m=o}q=q+12|0;if((q|0)==(d|0))break;else{o=m;p=p+1|0}}}w=(c|0)==(d|0);y=(c|0)==(d|0);v=0;s=m;b:while(1){m=k[a>>2]|0;do{if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;u=x;x=0;if(u&1){q=5;break b}if((m|0)==-1){k[a>>2]=0;m=0;break}else{m=k[a>>2]|0;break}}}else m=0}while(0);q=(m|0)==0;o=k[b>>2]|0;if(o){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;m=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;u=x;x=0;if(u&1){q=5;break}if((m|0)==-1){k[b>>2]=0;o=0}}}else o=0;p=(o|0)==0;m=k[a>>2]|0;if(!((n|0)!=0&(q^p))){q=64;break}o=k[m+12>>2]|0;if((o|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;u=x;x=0;if(u&1){q=5;break}}else m=l[o>>0]|0;m=m&255;if(!g){x=0;m=Aa(k[(k[e>>2]|0)+12>>2]|0,e|0,m|0)|0;u=x;x=0;if(u&1){q=5;break}}u=v+1|0;if(w){m=0;q=s}else{p=0;t=c;q=s;s=j;while(1){do{if((i[s>>0]|0)==1){if(!(i[t>>0]&1))o=t+1|0;else o=k[t+8>>2]|0;o=i[o+v>>0]|0;if(!g){x=0;o=Aa(k[(k[e>>2]|0)+12>>2]|0,e|0,o|0)|0;A=x;x=0;if(A&1){q=4;break b}}if(m<<24>>24!=o<<24>>24){i[s>>0]=0;o=p;n=n+-1|0;break}o=i[t>>0]|0;if(!(o&1))o=(o&255)>>>1;else o=k[t+4>>2]|0;if((o|0)==(u|0)){i[s>>0]=2;o=1;q=q+1|0;n=n+-1|0}else o=1}else o=p}while(0);t=t+12|0;if((t|0)==(d|0)){m=o;break}else{p=o;s=s+1|0}}}if(!m){v=u;s=q;continue}m=k[a>>2]|0;o=m+12|0;p=k[o>>2]|0;if((p|0)==(k[m+16>>2]|0)){x=0;ta(k[(k[m>>2]|0)+40>>2]|0,m|0)|0;A=x;x=0;if(A&1){q=5;break}}else k[o>>2]=p+1;if((q+n|0)>>>0<2|y){v=u;s=q;continue}else{m=c;p=q;q=j}while(1){if((i[q>>0]|0)==2){o=i[m>>0]|0;if(!(o&1))o=(o&255)>>>1;else o=k[m+4>>2]|0;if((o|0)!=(u|0)){i[q>>0]=0;p=p+-1|0}}m=m+12|0;if((m|0)==(d|0)){v=u;s=p;continue b}else q=q+1|0}}if((q|0)==4){c=Wa()|0;break}else if((q|0)==5){c=Wa()|0;break}else if((q|0)==64){do{if(m){if((k[m+12>>2]|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;A=x;x=0;if(A&1){q=6;break a}if((m|0)==-1){k[a>>2]=0;m=0;break}else{m=k[a>>2]|0;break}}}else m=0}while(0);n=(m|0)==0;do{if(!p){if((k[o+12>>2]|0)==(k[o+16>>2]|0)){x=0;m=ta(k[(k[o>>2]|0)+36>>2]|0,o|0)|0;A=x;x=0;if(A&1){q=6;break a}if((m|0)==-1){k[b>>2]=0;q=76;break}}if(!n)q=77}else q=76}while(0);if((q|0)==76?n:0)q=77;if((q|0)==77)k[f>>2]=k[f>>2]|2;c:do{if((c|0)==(d|0))q=81;else while(1){if((i[j>>0]|0)==2)break c;c=c+12|0;if((c|0)==(d|0)){q=81;break}else j=j+1|0}}while(0);if((q|0)==81){k[f>>2]=k[f>>2]|4;c=d}if(h)Ql(h);r=z;return c|0}}}while(0);if((q|0)==6)c=Wa()|0;if(h)Ql(h);fb(c|0);return 0}function Iu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(h){g=0;break}else g=0}h=i[B>>0]|0;h=(h&1)==0?(h&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+h|0)){x=0;Fa(8,B|0,h<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else h=l[h>>0]|0;if(ep(h&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(21,d|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){k[f>>2]=d;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Ju(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;g=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(g)break;else break b;x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(g)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(g){h=0;break}else h=0}g=i[B>>0]|0;g=(g&1)==0?(g&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+g|0)){x=0;Fa(8,B|0,g<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+g}j=a+12|0;g=k[j>>2]|0;m=a+16|0;if((g|0)==(k[m>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else g=l[g>>0]|0;if(ep(g&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(22,d|0,k[u>>2]|0,e|0,t|0)|0;g=M;E=x;x=0;if(!(E&1)){E=f;k[E>>2]=d;k[E+4>>2]=g;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Ku(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;B=r;r=r+240|0;t=B+202|0;g=B+200|0;D=B+24|0;C=B+12|0;v=B+8|0;z=B+40|0;A=B+4|0;w=B;u=ru(d)|0;up(D,d,t,g);k[C>>2]=0;k[C+4>>2]=0;k[C+8>>2]=0;if(!(i[C>>0]&1))a=10;else a=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,a|0,0);s=x;x=0;a:do{if(!(s&1)){p=C+8|0;q=C+1|0;d=(i[C>>0]&1)==0?q:k[p>>2]|0;k[v>>2]=d;k[A>>2]=z;k[w>>2]=0;s=C+4|0;o=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){E=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;m=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;n=x;x=0;if(n&1){E=24;break b}if((m|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;E=16;break}}else E=16}while(0);if((E|0)==16){E=0;if(h){g=0;break}else g=0}h=i[C>>0]|0;h=(h&1)==0?(h&255)>>>1:k[s>>2]|0;if((k[v>>2]|0)==(d+h|0)){x=0;Fa(8,C|0,h<<1|0,0);n=x;x=0;if(n&1){E=24;break}if(!(i[C>>0]&1))d=10;else d=(k[C>>2]&-2)+-1|0;x=0;Fa(8,C|0,d|0,0);n=x;x=0;if(n&1){E=24;break}d=(i[C>>0]&1)==0?q:k[p>>2]|0;k[v>>2]=d+h}m=a+12|0;h=k[m>>2]|0;n=a+16|0;if((h|0)==(k[n>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;F=x;x=0;if(F&1){E=24;break}}else h=l[h>>0]|0;if(ep(h&255,u,d,v,w,o,D,z,A,t)|0)break;g=k[m>>2]|0;if((g|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;F=x;x=0;if(F&1){E=24;break}else continue}else{k[m>>2]=g+1;continue}}if((E|0)==24){a=Wa()|0;break}F=i[D>>0]|0;if((((F&1)==0?(F&255)>>>1:k[D+4>>2]|0)|0)!=0?(y=k[A>>2]|0,(y-z|0)<160):0){F=k[w>>2]|0;k[A>>2]=y+4;k[y>>2]=F}x=0;d=Ea(23,d|0,k[v>>2]|0,e|0,u|0)|0;F=x;x=0;if(!(F&1)){j[f>>1]=d;cs(D,z,k[A>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;F=x;x=0;if(F&1){E=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;F=x;x=0;if(F&1){E=25;break a}if((a|0)==-1){k[c>>2]=0;E=49;break}}if(!d)E=50}else E=49}while(0);if((E|0)==49?d:0)E=50;if((E|0)==50)k[e>>2]=k[e>>2]|2;F=k[b>>2]|0;Sm(C);Sm(D);r=B;return F|0}else E=25}else E=25}while(0);if((E|0)==25)a=Wa()|0;Sm(C);Sm(D);fb(a|0);return 0}function Lu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(h){g=0;break}else g=0}h=i[B>>0]|0;h=(h&1)==0?(h&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+h|0)){x=0;Fa(8,B|0,h<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else h=l[h>>0]|0;if(ep(h&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(24,d|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){k[f>>2]=d;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Mu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;h=(a|0)==0;g=k[c>>2]|0;do{if(g){if((k[g+12>>2]|0)!=(k[g+16>>2]|0))if(h)break;else break b;x=0;j=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(h)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(h){g=0;break}else g=0}h=i[B>>0]|0;h=(h&1)==0?(h&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+h|0)){x=0;Fa(8,B|0,h<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+h}j=a+12|0;h=k[j>>2]|0;m=a+16|0;if((h|0)==(k[m>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else h=l[h>>0]|0;if(ep(h&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(25,d|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){k[f>>2]=d;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Nu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+240|0;s=A+202|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;up(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=i[g>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;m=x;x=0;if(m&1){D=24;break}if((g|0)==-1){k[b>>2]=0;a=0}}}else a=0;g=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(g)break;else break b;x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){D=24;break b}if((j|0)!=-1)if(g)break;else break b;else{k[c>>2]=0;D=16;break}}else D=16}while(0);if((D|0)==16){D=0;if(g){h=0;break}else h=0}g=i[B>>0]|0;g=(g&1)==0?(g&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(d+g|0)){x=0;Fa(8,B|0,g<<1|0,0);m=x;x=0;if(m&1){D=24;break}if(!(i[B>>0]&1))d=10;else d=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,d|0,0);m=x;x=0;if(m&1){D=24;break}d=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=d+g}j=a+12|0;g=k[j>>2]|0;m=a+16|0;if((g|0)==(k[m>>2]|0)){x=0;g=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}}else g=l[g>>0]|0;if(ep(g&255,t,d,u,v,n,C,y,z,s)|0)break;g=k[j>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=24;break}else continue}else{k[j>>2]=g+1;continue}}if((D|0)==24){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;d=Ea(26,d|0,k[u>>2]|0,e|0,t|0)|0;g=M;E=x;x=0;if(!(E&1)){E=f;k[E>>2]=d;k[E+4>>2]=g;cs(C,y,k[z>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;E=x;x=0;if(E&1){D=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;E=x;x=0;if(E&1){D=25;break a}if((a|0)==-1){k[c>>2]=0;D=49;break}}if(!d)D=50}else D=49}while(0);if((D|0)==49?d:0)D=50;if((D|0)==50)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=25}else D=25}while(0);if((D|0)==25)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Ou(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,j=0,m=0,n=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=r;r=r+240|0;v=E+208|0;h=E+203|0;j=E+202|0;G=E+24|0;F=E+12|0;y=E+8|0;C=E+40|0;D=E+4|0;z=E;A=E+201|0;w=E+200|0;vp(G,d,v,h,j);k[F>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;if(!(i[F>>0]&1))a=10;else a=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,a|0,0);u=x;x=0;a:do{if(!(u&1)){s=F+8|0;t=F+1|0;d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d;k[D>>2]=C;k[z>>2]=0;i[A>>0]=1;i[w>>0]=69;u=F+4|0;q=i[h>>0]|0;p=i[j>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){H=24;break}if((h|0)==-1){k[b>>2]=0;a=0}}}else a=0;j=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(j)break;else break b;x=0;m=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;n=x;x=0;if(n&1){H=24;break b}if((m|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;H=16;break}}else H=16}while(0);if((H|0)==16){H=0;if(j){h=0;break}else h=0}j=i[F>>0]|0;j=(j&1)==0?(j&255)>>>1:k[u>>2]|0;if((k[y>>2]|0)==(d+j|0)){x=0;Fa(8,F|0,j<<1|0,0);n=x;x=0;if(n&1){H=24;break}if(!(i[F>>0]&1))d=10;else d=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,d|0,0);n=x;x=0;if(n&1){H=24;break}d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d+j}m=a+12|0;j=k[m>>2]|0;n=a+16|0;if((j|0)==(k[n>>2]|0)){x=0;j=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}}else j=l[j>>0]|0;if(wp(j&255,A,w,d,y,q,p,G,C,D,z,v)|0)break;h=k[m>>2]|0;if((h|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}else continue}else{k[m>>2]=h+1;continue}}if((H|0)==24){a=Wa()|0;break}I=i[G>>0]|0;if(!((i[A>>0]|0)==0?1:(((I&1)==0?(I&255)>>>1:k[G+4>>2]|0)|0)==0)?(B=k[D>>2]|0,(B-C|0)<160):0){I=k[z>>2]|0;k[D>>2]=B+4;k[B>>2]=I}x=0;g=+Ca(1,d|0,k[y>>2]|0,e|0);I=x;x=0;if(!(I&1)){o[f>>2]=g;cs(G,C,k[D>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;I=x;x=0;if(I&1){H=25;break a}if((a|0)==-1){k[c>>2]=0;H=49;break}}if(!d)H=50}else H=49}while(0);if((H|0)==49?d:0)H=50;if((H|0)==50)k[e>>2]=k[e>>2]|2;I=k[b>>2]|0;Sm(F);Sm(G);r=E;return I|0}else H=25}else H=25}while(0);if((H|0)==25)a=Wa()|0;Sm(F);Sm(G);fb(a|0);return 0}function Pu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,j=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=r;r=r+240|0;v=E+208|0;h=E+203|0;j=E+202|0;G=E+24|0;F=E+12|0;y=E+8|0;C=E+40|0;D=E+4|0;z=E;A=E+201|0;w=E+200|0;vp(G,d,v,h,j);k[F>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;if(!(i[F>>0]&1))a=10;else a=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,a|0,0);u=x;x=0;a:do{if(!(u&1)){s=F+8|0;t=F+1|0;d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d;k[D>>2]=C;k[z>>2]=0;i[A>>0]=1;i[w>>0]=69;u=F+4|0;q=i[h>>0]|0;o=i[j>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){H=24;break}if((h|0)==-1){k[b>>2]=0;a=0}}}else a=0;j=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(j)break;else break b;x=0;m=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;n=x;x=0;if(n&1){H=24;break b}if((m|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;H=16;break}}else H=16}while(0);if((H|0)==16){H=0;if(j){h=0;break}else h=0}j=i[F>>0]|0;j=(j&1)==0?(j&255)>>>1:k[u>>2]|0;if((k[y>>2]|0)==(d+j|0)){x=0;Fa(8,F|0,j<<1|0,0);n=x;x=0;if(n&1){H=24;break}if(!(i[F>>0]&1))d=10;else d=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,d|0,0);n=x;x=0;if(n&1){H=24;break}d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d+j}m=a+12|0;j=k[m>>2]|0;n=a+16|0;if((j|0)==(k[n>>2]|0)){x=0;j=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}}else j=l[j>>0]|0;if(wp(j&255,A,w,d,y,q,o,G,C,D,z,v)|0)break;h=k[m>>2]|0;if((h|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}else continue}else{k[m>>2]=h+1;continue}}if((H|0)==24){a=Wa()|0;break}I=i[G>>0]|0;if(!((i[A>>0]|0)==0?1:(((I&1)==0?(I&255)>>>1:k[G+4>>2]|0)|0)==0)?(B=k[D>>2]|0,(B-C|0)<160):0){I=k[z>>2]|0;k[D>>2]=B+4;k[B>>2]=I}x=0;g=+Ca(2,d|0,k[y>>2]|0,e|0);I=x;x=0;if(!(I&1)){p[f>>3]=g;cs(G,C,k[D>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;I=x;x=0;if(I&1){H=25;break a}if((a|0)==-1){k[c>>2]=0;H=49;break}}if(!d)H=50}else H=49}while(0);if((H|0)==49?d:0)H=50;if((H|0)==50)k[e>>2]=k[e>>2]|2;I=k[b>>2]|0;Sm(F);Sm(G);r=E;return I|0}else H=25}else H=25}while(0);if((H|0)==25)a=Wa()|0;Sm(F);Sm(G);fb(a|0);return 0}function Qu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,j=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;E=r;r=r+240|0;v=E+208|0;h=E+203|0;j=E+202|0;G=E+24|0;F=E+12|0;y=E+8|0;C=E+40|0;D=E+4|0;z=E;A=E+201|0;w=E+200|0;vp(G,d,v,h,j);k[F>>2]=0;k[F+4>>2]=0;k[F+8>>2]=0;if(!(i[F>>0]&1))a=10;else a=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,a|0,0);u=x;x=0;a:do{if(!(u&1)){s=F+8|0;t=F+1|0;d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d;k[D>>2]=C;k[z>>2]=0;i[A>>0]=1;i[w>>0]=69;u=F+4|0;q=i[h>>0]|0;o=i[j>>0]|0;a=k[b>>2]|0;b:while(1){if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;h=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;n=x;x=0;if(n&1){H=24;break}if((h|0)==-1){k[b>>2]=0;a=0}}}else a=0;j=(a|0)==0;h=k[c>>2]|0;do{if(h){if((k[h+12>>2]|0)!=(k[h+16>>2]|0))if(j)break;else break b;x=0;m=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;n=x;x=0;if(n&1){H=24;break b}if((m|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;H=16;break}}else H=16}while(0);if((H|0)==16){H=0;if(j){h=0;break}else h=0}j=i[F>>0]|0;j=(j&1)==0?(j&255)>>>1:k[u>>2]|0;if((k[y>>2]|0)==(d+j|0)){x=0;Fa(8,F|0,j<<1|0,0);n=x;x=0;if(n&1){H=24;break}if(!(i[F>>0]&1))d=10;else d=(k[F>>2]&-2)+-1|0;x=0;Fa(8,F|0,d|0,0);n=x;x=0;if(n&1){H=24;break}d=(i[F>>0]&1)==0?t:k[s>>2]|0;k[y>>2]=d+j}m=a+12|0;j=k[m>>2]|0;n=a+16|0;if((j|0)==(k[n>>2]|0)){x=0;j=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}}else j=l[j>>0]|0;if(wp(j&255,A,w,d,y,q,o,G,C,D,z,v)|0)break;h=k[m>>2]|0;if((h|0)==(k[n>>2]|0)){x=0;ta(k[(k[a>>2]|0)+40>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=24;break}else continue}else{k[m>>2]=h+1;continue}}if((H|0)==24){a=Wa()|0;break}I=i[G>>0]|0;if(!((i[A>>0]|0)==0?1:(((I&1)==0?(I&255)>>>1:k[G+4>>2]|0)|0)==0)?(B=k[D>>2]|0,(B-C|0)<160):0){I=k[z>>2]|0;k[D>>2]=B+4;k[B>>2]=I}x=0;g=+Ca(3,d|0,k[y>>2]|0,e|0);I=x;x=0;if(!(I&1)){p[f>>3]=g;cs(G,C,k[D>>2]|0,e);if(a){if((k[a+12>>2]|0)==(k[a+16>>2]|0)){x=0;d=ta(k[(k[a>>2]|0)+36>>2]|0,a|0)|0;I=x;x=0;if(I&1){H=25;break}if((d|0)==-1){k[b>>2]=0;a=0}}}else a=0;d=(a|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;I=x;x=0;if(I&1){H=25;break a}if((a|0)==-1){k[c>>2]=0;H=49;break}}if(!d)H=50}else H=49}while(0);if((H|0)==49?d:0)H=50;if((H|0)==50)k[e>>2]=k[e>>2]|2;I=k[b>>2]|0;Sm(F);Sm(G);r=E;return I|0}else H=25}else H=25}while(0);if((H|0)==25)a=Wa()|0;Sm(F);Sm(G);fb(a|0);return 0}function Ru(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;d=Ak(b)|0;b=pl(a,c,f)|0;if((d|0)!=0?(x=0,ta(75,d|0)|0,f=x,x=0,f&1):0){f=Wa(0)|0;oc(f)}r=e;return b|0}function Su(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;y=r;r=r+112|0;j=y;m=(d-c|0)/12|0;do{if(m>>>0>100){j=Pl(m)|0;if((j|0)==0?(x=0,Ga(6),w=x,x=0,w&1):0){h=0;o=6;break}h=j;o=11}else{h=0;o=11}}while(0);a:do{if((o|0)==11){if((c|0)==(d|0))l=0;else{p=c;n=0;o=j;while(1){l=i[p>>0]|0;if(!(l&1))l=(l&255)>>>1;else l=k[p+4>>2]|0;if(!l){i[o>>0]=2;l=n+1|0;m=m+-1|0}else{i[o>>0]=1;l=n}p=p+12|0;if((p|0)==(d|0))break;else{n=l;o=o+1|0}}}v=(c|0)==(d|0);w=(c|0)==(d|0);u=0;q=m;b:while(1){m=k[a>>2]|0;do{if(m){n=k[m+12>>2]|0;if((n|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;t=x;x=0;if(t&1){o=5;break b}}else m=k[n>>2]|0;if((m|0)==-1){k[a>>2]=0;p=1;break}else{p=(k[a>>2]|0)==0;break}}else p=1}while(0);n=k[b>>2]|0;if(n){m=k[n+12>>2]|0;if((m|0)==(k[n+16>>2]|0)){x=0;m=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;t=x;x=0;if(t&1){o=5;break}}else m=k[m>>2]|0;if((m|0)==-1){k[b>>2]=0;n=0;o=1}else o=0}else{n=0;o=1}m=k[a>>2]|0;if(!((q|0)!=0&(p^o))){o=66;break}n=k[m+12>>2]|0;if((n|0)==(k[m+16>>2]|0)){x=0;m=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;t=x;x=0;if(t&1){o=5;break}}else m=k[n>>2]|0;if(!g){x=0;m=Aa(k[(k[e>>2]|0)+28>>2]|0,e|0,m|0)|0;t=x;x=0;if(t&1){o=5;break}}t=u+1|0;if(v){m=0;p=q}else{p=0;s=c;o=q;q=j;while(1){do{if((i[q>>0]|0)==1){if(!(i[s>>0]&1))n=s+4|0;else n=k[s+8>>2]|0;n=k[n+(u<<2)>>2]|0;if(!g){x=0;n=Aa(k[(k[e>>2]|0)+28>>2]|0,e|0,n|0)|0;z=x;x=0;if(z&1){o=4;break b}}if((m|0)!=(n|0)){i[q>>0]=0;n=p;o=o+-1|0;break}n=i[s>>0]|0;if(!(n&1))n=(n&255)>>>1;else n=k[s+4>>2]|0;if((n|0)==(t|0)){i[q>>0]=2;n=1;l=l+1|0;o=o+-1|0}else n=1}else n=p}while(0);s=s+12|0;if((s|0)==(d|0)){m=n;p=o;break}else{p=n;q=q+1|0}}}if(!m){u=t;q=p;continue}m=k[a>>2]|0;n=m+12|0;o=k[n>>2]|0;if((o|0)==(k[m+16>>2]|0)){x=0;ta(k[(k[m>>2]|0)+40>>2]|0,m|0)|0;z=x;x=0;if(z&1){o=5;break}}else k[n>>2]=o+4;if((l+p|0)>>>0<2|w){u=t;q=p;continue}else{m=c;o=j}while(1){if((i[o>>0]|0)==2){n=i[m>>0]|0;if(!(n&1))n=(n&255)>>>1;else n=k[m+4>>2]|0;if((n|0)!=(t|0)){i[o>>0]=0;l=l+-1|0}}m=m+12|0;if((m|0)==(d|0)){u=t;q=p;continue b}else o=o+1|0}}if((o|0)==4){c=Wa()|0;break}else if((o|0)==5){c=Wa()|0;break}else if((o|0)==66){do{if(m){l=k[m+12>>2]|0;if((l|0)==(k[m+16>>2]|0)){x=0;l=ta(k[(k[m>>2]|0)+36>>2]|0,m|0)|0;z=x;x=0;if(z&1){o=6;break a}}else l=k[l>>2]|0;if((l|0)==-1){k[a>>2]=0;m=1;break}else{m=(k[a>>2]|0)==0;break}}else m=1}while(0);do{if(n){l=k[n+12>>2]|0;if((l|0)==(k[n+16>>2]|0)){x=0;l=ta(k[(k[n>>2]|0)+36>>2]|0,n|0)|0;z=x;x=0;if(z&1){o=6;break a}}else l=k[l>>2]|0;if((l|0)!=-1)if(m)break;else{o=81;break}else{k[b>>2]=0;o=79;break}}else o=79}while(0);if((o|0)==79?m:0)o=81;if((o|0)==81)k[f>>2]=k[f>>2]|2;c:do{if((c|0)==(d|0))o=85;else while(1){if((i[j>>0]|0)==2)break c;c=c+12|0;if((c|0)==(d|0)){o=85;break}else j=j+1|0}}while(0);if((o|0)==85){k[f>>2]=k[f>>2]|4;c=d}if(h)Ql(h);r=y;return c|0}}}while(0);if((o|0)==6)c=Wa()|0;if(h)Ql(h);fb(c|0);return 0}function Tu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){C=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=j;break b}else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(h){g=0;break}else j=0}g=i[A>>0]|0;g=(g&1)==0?(g&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+g|0)){x=0;Fa(8,A|0,g<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+g}h=d+12|0;g=k[h>>2]|0;l=d+16|0;if((g|0)==(k[l>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}}else g=k[g>>2]|0;if(tp(g,s,a,t,u,m,B,w,y,q)|0){g=j;break}g=k[h>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(21,a|0,k[t>>2]|0,e|0,s|0)|0;D=x;x=0;if(!(D&1)){k[f>>2]=a;cs(B,w,k[y>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Uu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;g=0;j=1}else j=0}else{g=0;j=1}h=k[c>>2]|0;do{if(h){d=k[h+12>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;d=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;l=x;x=0;if(l&1){C=25;break b}}else d=k[d>>2]|0;if((d|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(j){h=0;break}else h=0}d=i[A>>0]|0;d=(d&1)==0?(d&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+d|0)){x=0;Fa(8,A|0,d<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+d}j=g+12|0;d=k[j>>2]|0;l=g+16|0;if((d|0)==(k[l>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}}else d=k[d>>2]|0;if(tp(d,s,a,t,u,m,B,w,y,q)|0)break;d=k[j>>2]|0;if((d|0)==(k[l>>2]|0)){x=0;ta(k[(k[g>>2]|0)+40>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}else continue}else{k[j>>2]=d+4;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(22,a|0,k[t>>2]|0,e|0,s|0)|0;d=M;D=x;x=0;if(!(D&1)){D=f;k[D>>2]=a;k[D+4>>2]=d;cs(B,w,k[y>>2]|0,e);if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Vu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;A=r;r=r+320|0;s=A+208|0;g=A+200|0;C=A+24|0;B=A+12|0;u=A+8|0;y=A+40|0;z=A+4|0;v=A;t=ru(d)|0;xp(C,d,s,g);k[B>>2]=0;k[B+4>>2]=0;k[B+8>>2]=0;if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);q=x;x=0;a:do{if(!(q&1)){o=B+8|0;p=B+1|0;a=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=a;k[z>>2]=y;k[v>>2]=0;q=B+4|0;n=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;m=x;x=0;if(m&1){D=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}l=k[c>>2]|0;do{if(l){g=k[l+12>>2]|0;if((g|0)==(k[l+16>>2]|0)){x=0;g=ta(k[(k[l>>2]|0)+36>>2]|0,l|0)|0;m=x;x=0;if(m&1){D=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=l;break b}else{k[c>>2]=0;D=17;break}}else D=17}while(0);if((D|0)==17){D=0;if(h){g=0;break}else l=0}g=i[B>>0]|0;g=(g&1)==0?(g&255)>>>1:k[q>>2]|0;if((k[u>>2]|0)==(a+g|0)){x=0;Fa(8,B|0,g<<1|0,0);m=x;x=0;if(m&1){D=25;break}if(!(i[B>>0]&1))a=10;else a=(k[B>>2]&-2)+-1|0;x=0;Fa(8,B|0,a|0,0);m=x;x=0;if(m&1){D=25;break}a=(i[B>>0]&1)==0?p:k[o>>2]|0;k[u>>2]=a+g}h=d+12|0;g=k[h>>2]|0;m=d+16|0;if((g|0)==(k[m>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;E=x;x=0;if(E&1){D=25;break}}else g=k[g>>2]|0;if(tp(g,t,a,u,v,n,C,y,z,s)|0){g=l;break}g=k[h>>2]|0;if((g|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;E=x;x=0;if(E&1){D=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((D|0)==25){a=Wa()|0;break}E=i[C>>0]|0;if((((E&1)==0?(E&255)>>>1:k[C+4>>2]|0)|0)!=0?(w=k[z>>2]|0,(w-y|0)<160):0){E=k[v>>2]|0;k[z>>2]=w+4;k[w>>2]=E}x=0;a=Ea(23,a|0,k[u>>2]|0,e|0,t|0)|0;E=x;x=0;if(!(E&1)){j[f>>1]=a;cs(C,y,k[z>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;E=x;x=0;if(E&1){D=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;E=x;x=0;if(E&1){D=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{D=53;break}else{k[c>>2]=0;D=51;break}}else D=51}while(0);if((D|0)==51?d:0)D=53;if((D|0)==53)k[e>>2]=k[e>>2]|2;E=k[b>>2]|0;Sm(B);Sm(C);r=A;return E|0}else D=26}else D=26}while(0);if((D|0)==26)a=Wa()|0;Sm(B);Sm(C);fb(a|0);return 0}function Wu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){C=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=j;break b}else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(h){g=0;break}else j=0}g=i[A>>0]|0;g=(g&1)==0?(g&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+g|0)){x=0;Fa(8,A|0,g<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+g}h=d+12|0;g=k[h>>2]|0;l=d+16|0;if((g|0)==(k[l>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}}else g=k[g>>2]|0;if(tp(g,s,a,t,u,m,B,w,y,q)|0){g=j;break}g=k[h>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(24,a|0,k[t>>2]|0,e|0,s|0)|0;D=x;x=0;if(!(D&1)){k[f>>2]=a;cs(B,w,k[y>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Xu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;d=0;h=1}else{d=g;h=0}}else{d=0;h=1}j=k[c>>2]|0;do{if(j){g=k[j+12>>2]|0;if((g|0)==(k[j+16>>2]|0)){x=0;g=ta(k[(k[j>>2]|0)+36>>2]|0,j|0)|0;l=x;x=0;if(l&1){C=25;break b}}else g=k[g>>2]|0;if((g|0)!=-1)if(h)break;else{g=j;break b}else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(h){g=0;break}else j=0}g=i[A>>0]|0;g=(g&1)==0?(g&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+g|0)){x=0;Fa(8,A|0,g<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+g}h=d+12|0;g=k[h>>2]|0;l=d+16|0;if((g|0)==(k[l>>2]|0)){x=0;g=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}}else g=k[g>>2]|0;if(tp(g,s,a,t,u,m,B,w,y,q)|0){g=j;break}g=k[h>>2]|0;if((g|0)==(k[l>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=25;break}else{g=d;continue}}else{k[h>>2]=g+4;g=d;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(25,a|0,k[t>>2]|0,e|0,s|0)|0;D=x;x=0;if(!(D&1)){k[f>>2]=a;cs(B,w,k[y>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Yu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;z=r;r=r+320|0;q=z+208|0;g=z+200|0;B=z+24|0;A=z+12|0;t=z+8|0;w=z+40|0;y=z+4|0;u=z;s=ru(d)|0;xp(B,d,q,g);k[A>>2]=0;k[A+4>>2]=0;k[A+8>>2]=0;if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);p=x;x=0;a:do{if(!(p&1)){n=A+8|0;o=A+1|0;a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a;k[y>>2]=w;k[u>>2]=0;p=A+4|0;m=k[g>>2]|0;g=k[b>>2]|0;b:while(1){if(g){d=k[g+12>>2]|0;if((d|0)==(k[g+16>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;l=x;x=0;if(l&1){C=25;break}}else d=k[d>>2]|0;if((d|0)==-1){k[b>>2]=0;g=0;j=1}else j=0}else{g=0;j=1}h=k[c>>2]|0;do{if(h){d=k[h+12>>2]|0;if((d|0)==(k[h+16>>2]|0)){x=0;d=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;l=x;x=0;if(l&1){C=25;break b}}else d=k[d>>2]|0;if((d|0)!=-1)if(j)break;else break b;else{k[c>>2]=0;C=17;break}}else C=17}while(0);if((C|0)==17){C=0;if(j){h=0;break}else h=0}d=i[A>>0]|0;d=(d&1)==0?(d&255)>>>1:k[p>>2]|0;if((k[t>>2]|0)==(a+d|0)){x=0;Fa(8,A|0,d<<1|0,0);l=x;x=0;if(l&1){C=25;break}if(!(i[A>>0]&1))a=10;else a=(k[A>>2]&-2)+-1|0;x=0;Fa(8,A|0,a|0,0);l=x;x=0;if(l&1){C=25;break}a=(i[A>>0]&1)==0?o:k[n>>2]|0;k[t>>2]=a+d}j=g+12|0;d=k[j>>2]|0;l=g+16|0;if((d|0)==(k[l>>2]|0)){x=0;d=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}}else d=k[d>>2]|0;if(tp(d,s,a,t,u,m,B,w,y,q)|0)break;d=k[j>>2]|0;if((d|0)==(k[l>>2]|0)){x=0;ta(k[(k[g>>2]|0)+40>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=25;break}else continue}else{k[j>>2]=d+4;continue}}if((C|0)==25){a=Wa()|0;break}D=i[B>>0]|0;if((((D&1)==0?(D&255)>>>1:k[B+4>>2]|0)|0)!=0?(v=k[y>>2]|0,(v-w|0)<160):0){D=k[u>>2]|0;k[y>>2]=v+4;k[v>>2]=D}x=0;a=Ea(26,a|0,k[t>>2]|0,e|0,s|0)|0;d=M;D=x;x=0;if(!(D&1)){D=f;k[D>>2]=a;k[D+4>>2]=d;cs(B,w,k[y>>2]|0,e);if(g){a=k[g+12>>2]|0;if((a|0)==(k[g+16>>2]|0)){x=0;a=ta(k[(k[g>>2]|0)+36>>2]|0,g|0)|0;D=x;x=0;if(D&1){C=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;D=x;x=0;if(D&1){C=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{C=53;break}else{k[c>>2]=0;C=51;break}}else C=51}while(0);if((C|0)==51?d:0)C=53;if((C|0)==53)k[e>>2]=k[e>>2]|2;D=k[b>>2]|0;Sm(A);Sm(B);r=z;return D|0}else C=26}else C=26}while(0);if((C|0)==26)a=Wa()|0;Sm(A);Sm(B);fb(a|0);return 0}function Zu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,j=0,l=0,m=0,n=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;D=r;r=r+352|0;u=D+208|0;h=D+40|0;j=D+36|0;F=D+24|0;E=D+12|0;w=D+8|0;B=D+48|0;C=D+4|0;y=D;z=D+337|0;v=D+336|0;yp(F,d,u,h,j);k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);t=x;x=0;a:do{if(!(t&1)){q=E+8|0;s=E+1|0;a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a;k[C>>2]=B;k[y>>2]=0;i[z>>0]=1;i[v>>0]=69;t=E+4|0;p=k[h>>2]|0;n=k[j>>2]|0;d=k[b>>2]|0;b:while(1){if(d){h=k[d+12>>2]|0;if((h|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;m=x;x=0;if(m&1){G=25;break}}else h=k[h>>2]|0;if((h|0)==-1){k[b>>2]=0;d=0;l=1}else l=0}else{d=0;l=1}h=k[c>>2]|0;do{if(h){j=k[h+12>>2]|0;if((j|0)==(k[h+16>>2]|0)){x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){G=25;break b}}else j=k[j>>2]|0;if((j|0)!=-1)if(l)break;else break b;else{k[c>>2]=0;G=17;break}}else G=17}while(0);if((G|0)==17){G=0;if(l){h=0;break}else h=0}j=i[E>>0]|0;j=(j&1)==0?(j&255)>>>1:k[t>>2]|0;if((k[w>>2]|0)==(a+j|0)){x=0;Fa(8,E|0,j<<1|0,0);m=x;x=0;if(m&1){G=25;break}if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);m=x;x=0;if(m&1){G=25;break}a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a+j}l=d+12|0;j=k[l>>2]|0;m=d+16|0;if((j|0)==(k[m>>2]|0)){x=0;j=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}}else j=k[j>>2]|0;if(zp(j,z,v,a,w,p,n,F,B,C,y,u)|0)break;h=k[l>>2]|0;if((h|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}else continue}else{k[l>>2]=h+4;continue}}if((G|0)==25){a=Wa()|0;break}H=i[F>>0]|0;if(!((i[z>>0]|0)==0?1:(((H&1)==0?(H&255)>>>1:k[F+4>>2]|0)|0)==0)?(A=k[C>>2]|0,(A-B|0)<160):0){H=k[y>>2]|0;k[C>>2]=A+4;k[A>>2]=H}x=0;g=+Ca(1,a|0,k[w>>2]|0,e|0);H=x;x=0;if(!(H&1)){o[f>>2]=g;cs(F,B,k[C>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;H=x;x=0;if(H&1){G=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{G=53;break}else{k[c>>2]=0;G=51;break}}else G=51}while(0);if((G|0)==51?d:0)G=53;if((G|0)==53)k[e>>2]=k[e>>2]|2;H=k[b>>2]|0;Sm(E);Sm(F);r=D;return H|0}else G=26}else G=26}while(0);if((G|0)==26)a=Wa()|0;Sm(E);Sm(F);fb(a|0);return 0}function _u(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;D=r;r=r+352|0;u=D+208|0;h=D+40|0;j=D+36|0;F=D+24|0;E=D+12|0;w=D+8|0;B=D+48|0;C=D+4|0;y=D;z=D+337|0;v=D+336|0;yp(F,d,u,h,j);k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);t=x;x=0;a:do{if(!(t&1)){q=E+8|0;s=E+1|0;a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a;k[C>>2]=B;k[y>>2]=0;i[z>>0]=1;i[v>>0]=69;t=E+4|0;o=k[h>>2]|0;n=k[j>>2]|0;d=k[b>>2]|0;b:while(1){if(d){h=k[d+12>>2]|0;if((h|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;m=x;x=0;if(m&1){G=25;break}}else h=k[h>>2]|0;if((h|0)==-1){k[b>>2]=0;d=0;l=1}else l=0}else{d=0;l=1}h=k[c>>2]|0;do{if(h){j=k[h+12>>2]|0;if((j|0)==(k[h+16>>2]|0)){x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){G=25;break b}}else j=k[j>>2]|0;if((j|0)!=-1)if(l)break;else break b;else{k[c>>2]=0;G=17;break}}else G=17}while(0);if((G|0)==17){G=0;if(l){h=0;break}else h=0}j=i[E>>0]|0;j=(j&1)==0?(j&255)>>>1:k[t>>2]|0;if((k[w>>2]|0)==(a+j|0)){x=0;Fa(8,E|0,j<<1|0,0);m=x;x=0;if(m&1){G=25;break}if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);m=x;x=0;if(m&1){G=25;break}a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a+j}l=d+12|0;j=k[l>>2]|0;m=d+16|0;if((j|0)==(k[m>>2]|0)){x=0;j=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}}else j=k[j>>2]|0;if(zp(j,z,v,a,w,o,n,F,B,C,y,u)|0)break;h=k[l>>2]|0;if((h|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}else continue}else{k[l>>2]=h+4;continue}}if((G|0)==25){a=Wa()|0;break}H=i[F>>0]|0;if(!((i[z>>0]|0)==0?1:(((H&1)==0?(H&255)>>>1:k[F+4>>2]|0)|0)==0)?(A=k[C>>2]|0,(A-B|0)<160):0){H=k[y>>2]|0;k[C>>2]=A+4;k[A>>2]=H}x=0;g=+Ca(2,a|0,k[w>>2]|0,e|0);H=x;x=0;if(!(H&1)){p[f>>3]=g;cs(F,B,k[C>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;H=x;x=0;if(H&1){G=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{G=53;break}else{k[c>>2]=0;G=51;break}}else G=51}while(0);if((G|0)==51?d:0)G=53;if((G|0)==53)k[e>>2]=k[e>>2]|2;H=k[b>>2]|0;Sm(E);Sm(F);r=D;return H|0}else G=26}else G=26}while(0);if((G|0)==26)a=Wa()|0;Sm(E);Sm(F);fb(a|0);return 0}function $u(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0.0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;D=r;r=r+352|0;u=D+208|0;h=D+40|0;j=D+36|0;F=D+24|0;E=D+12|0;w=D+8|0;B=D+48|0;C=D+4|0;y=D;z=D+337|0;v=D+336|0;yp(F,d,u,h,j);k[E>>2]=0;k[E+4>>2]=0;k[E+8>>2]=0;if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);t=x;x=0;a:do{if(!(t&1)){q=E+8|0;s=E+1|0;a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a;k[C>>2]=B;k[y>>2]=0;i[z>>0]=1;i[v>>0]=69;t=E+4|0;o=k[h>>2]|0;n=k[j>>2]|0;d=k[b>>2]|0;b:while(1){if(d){h=k[d+12>>2]|0;if((h|0)==(k[d+16>>2]|0)){x=0;h=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;m=x;x=0;if(m&1){G=25;break}}else h=k[h>>2]|0;if((h|0)==-1){k[b>>2]=0;d=0;l=1}else l=0}else{d=0;l=1}h=k[c>>2]|0;do{if(h){j=k[h+12>>2]|0;if((j|0)==(k[h+16>>2]|0)){x=0;j=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;m=x;x=0;if(m&1){G=25;break b}}else j=k[j>>2]|0;if((j|0)!=-1)if(l)break;else break b;else{k[c>>2]=0;G=17;break}}else G=17}while(0);if((G|0)==17){G=0;if(l){h=0;break}else h=0}j=i[E>>0]|0;j=(j&1)==0?(j&255)>>>1:k[t>>2]|0;if((k[w>>2]|0)==(a+j|0)){x=0;Fa(8,E|0,j<<1|0,0);m=x;x=0;if(m&1){G=25;break}if(!(i[E>>0]&1))a=10;else a=(k[E>>2]&-2)+-1|0;x=0;Fa(8,E|0,a|0,0);m=x;x=0;if(m&1){G=25;break}a=(i[E>>0]&1)==0?s:k[q>>2]|0;k[w>>2]=a+j}l=d+12|0;j=k[l>>2]|0;m=d+16|0;if((j|0)==(k[m>>2]|0)){x=0;j=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}}else j=k[j>>2]|0;if(zp(j,z,v,a,w,o,n,F,B,C,y,u)|0)break;h=k[l>>2]|0;if((h|0)==(k[m>>2]|0)){x=0;ta(k[(k[d>>2]|0)+40>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=25;break}else continue}else{k[l>>2]=h+4;continue}}if((G|0)==25){a=Wa()|0;break}H=i[F>>0]|0;if(!((i[z>>0]|0)==0?1:(((H&1)==0?(H&255)>>>1:k[F+4>>2]|0)|0)==0)?(A=k[C>>2]|0,(A-B|0)<160):0){H=k[y>>2]|0;k[C>>2]=A+4;k[A>>2]=H}x=0;g=+Ca(3,a|0,k[w>>2]|0,e|0);H=x;x=0;if(!(H&1)){p[f>>3]=g;cs(F,B,k[C>>2]|0,e);if(d){a=k[d+12>>2]|0;if((a|0)==(k[d+16>>2]|0)){x=0;a=ta(k[(k[d>>2]|0)+36>>2]|0,d|0)|0;H=x;x=0;if(H&1){G=26;break}}else a=k[a>>2]|0;if((a|0)==-1){k[b>>2]=0;d=1}else d=0}else d=1;do{if(h){a=k[h+12>>2]|0;if((a|0)==(k[h+16>>2]|0)){x=0;a=ta(k[(k[h>>2]|0)+36>>2]|0,h|0)|0;H=x;x=0;if(H&1){G=26;break a}}else a=k[a>>2]|0;if((a|0)!=-1)if(d)break;else{G=53;break}else{k[c>>2]=0;G=51;break}}else G=51}while(0);if((G|0)==51?d:0)G=53;if((G|0)==53)k[e>>2]=k[e>>2]|2;H=k[b>>2]|0;Sm(E);Sm(F);r=D;return H|0}else G=26}else G=26}while(0);if((G|0)==26)a=Wa()|0;Sm(E);Sm(F);fb(a|0);return 0}function av(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;f=r;r=r+16|0;g=f;k[g>>2]=e;e=Ak(c)|0;c=ol(a,b,d,g)|0;if((e|0)!=0?(x=0,ta(75,e|0)|0,g=x,x=0,g&1):0){g=Wa(0)|0;oc(g)}r=f;return c|0}function bv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;d=Ak(b)|0;x=0;b=va(37,a|0,c|0,f|0)|0;a=x;x=0;if(a&1){b=Wa()|0;if((d|0)!=0?(x=0,ta(75,d|0)|0,f=x,x=0,f&1):0){f=Wa(0)|0;oc(f)}fb(b|0)}else{if((d|0)!=0?(x=0,ta(75,d|0)|0,f=x,x=0,f&1):0){f=Wa(0)|0;oc(f)}r=e;return b|0}return 0}function cv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0;n=r;r=r+16|0;m=n;g=k[a>>2]|0;a:do{if(!g)g=0;else{o=b;j=d-o>>2;l=e+12|0;h=k[l>>2]|0;j=(h|0)>(j|0)?h-j|0:0;h=c;o=h-o|0;e=o>>2;if((o|0)>0?(Qb[k[(k[g>>2]|0)+48>>2]&63](g,b,e)|0)!=(e|0):0){k[a>>2]=0;g=0;break}do{if((j|0)>0){dn(m,j,f);x=0;e=va(k[(k[g>>2]|0)+48>>2]|0,g|0,((i[m>>0]&1)==0?m+4|0:k[m+8>>2]|0)|0,j|0)|0;o=x;x=0;if(o&1){o=Wa()|0;en(m);fb(o|0)}if((e|0)==(j|0)){en(m);break}else{k[a>>2]=0;en(m);g=0;break a}}}while(0);o=d-h|0;d=o>>2;if((o|0)>0?(Qb[k[(k[g>>2]|0)+48>>2]&63](g,c,d)|0)!=(d|0):0){k[a>>2]=0;g=0;break}k[l>>2]=0}}while(0);r=n;return g|0}function dv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,m=0,n=0,o=0,p=0,q=0,r=0;f=k[a>>2]|0;do{if(f){if((k[f+12>>2]|0)==(k[f+16>>2]|0))if((Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0)==-1){k[a>>2]=0;f=0;break}else{f=k[a>>2]|0;break}}else f=0}while(0);g=(f|0)==0;f=k[b>>2]|0;do{if(f){if((k[f+12>>2]|0)==(k[f+16>>2]|0)?(Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0)==-1:0){k[b>>2]=0;r=11;break}if(g)r=13;else r=12}else r=11}while(0);if((r|0)==11)if(g)r=12;else{f=0;r=13}a:do{if((r|0)==12){k[c>>2]=k[c>>2]|6;f=0}else if((r|0)==13){g=k[a>>2]|0;h=k[g+12>>2]|0;if((h|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=l[h>>0]|0;h=g&255;if(h<<24>>24>-1?(q=d+8|0,(j[(k[q>>2]|0)+(g<<24>>24<<1)>>1]&2048)!=0):0){m=(Qb[k[(k[d>>2]|0)+36>>2]&63](d,h,0)|0)<<24>>24;g=k[a>>2]|0;h=g+12|0;i=k[h>>2]|0;if((i|0)==(k[g+16>>2]|0)){Ob[k[(k[g>>2]|0)+40>>2]&127](g)|0;o=e;n=f;e=f;f=m}else{k[h>>2]=i+1;o=e;n=f;e=f;f=m}while(1){f=f+-48|0;p=o+-1|0;g=k[a>>2]|0;do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0))if((Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0)==-1){k[a>>2]=0;g=0;break}else{g=k[a>>2]|0;break}}else g=0}while(0);i=(g|0)==0;if(e)if((k[e+12>>2]|0)==(k[e+16>>2]|0))if((Ob[k[(k[e>>2]|0)+36>>2]&127](e)|0)==-1){k[b>>2]=0;h=0;e=0}else{h=n;e=n}else h=n;else{h=n;e=0}g=k[a>>2]|0;if(!((o|0)>1&(i^(e|0)==0)))break;i=k[g+12>>2]|0;if((i|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=l[i>>0]|0;i=g&255;if(i<<24>>24<=-1)break a;if(!(j[(k[q>>2]|0)+(g<<24>>24<<1)>>1]&2048))break a;f=((Qb[k[(k[d>>2]|0)+36>>2]&63](d,i,0)|0)<<24>>24)+(f*10|0)|0;g=k[a>>2]|0;i=g+12|0;m=k[i>>2]|0;if((m|0)==(k[g+16>>2]|0)){Ob[k[(k[g>>2]|0)+40>>2]&127](g)|0;o=p;n=h;continue}else{k[i>>2]=m+1;o=p;n=h;continue}}do{if(g){if((k[g+12>>2]|0)==(k[g+16>>2]|0))if((Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0)==-1){k[a>>2]=0;g=0;break}else{g=k[a>>2]|0;break}}else g=0}while(0);g=(g|0)==0;do{if(h){if((k[h+12>>2]|0)==(k[h+16>>2]|0)?(Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0)==-1:0){k[b>>2]=0;r=50;break}if(g)break a}else r=50}while(0);if((r|0)==50?!g:0)break;k[c>>2]=k[c>>2]|2;break}k[c>>2]=k[c>>2]|4;f=0}}while(0);return f|0}function ev(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;f=k[a>>2]|0;do{if(f){g=k[f+12>>2]|0;if((g|0)==(k[f+16>>2]|0))f=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else f=k[g>>2]|0;if((f|0)==-1){k[a>>2]=0;h=1;break}else{h=(k[a>>2]|0)==0;break}}else h=1}while(0);g=k[b>>2]|0;do{if(g){f=k[g+12>>2]|0;if((f|0)==(k[g+16>>2]|0))f=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else f=k[f>>2]|0;if((f|0)!=-1)if(h){o=17;break}else{o=16;break}else{k[b>>2]=0;o=14;break}}else o=14}while(0);if((o|0)==14)if(h)o=16;else{g=0;o=17}a:do{if((o|0)==16){k[c>>2]=k[c>>2]|6;f=0}else if((o|0)==17){f=k[a>>2]|0;h=k[f+12>>2]|0;if((h|0)==(k[f+16>>2]|0))f=Ob[k[(k[f>>2]|0)+36>>2]&127](f)|0;else f=k[h>>2]|0;if(!(Qb[k[(k[d>>2]|0)+12>>2]&63](d,2048,f)|0)){k[c>>2]=k[c>>2]|4;f=0;break}f=(Qb[k[(k[d>>2]|0)+52>>2]&63](d,f,0)|0)<<24>>24;h=k[a>>2]|0;i=h+12|0;j=k[i>>2]|0;if((j|0)==(k[h+16>>2]|0)){Ob[k[(k[h>>2]|0)+40>>2]&127](h)|0;m=e;l=g;i=g}else{k[i>>2]=j+4;m=e;l=g;i=g}while(1){f=f+-48|0;n=m+-1|0;g=k[a>>2]|0;do{if(g){h=k[g+12>>2]|0;if((h|0)==(k[g+16>>2]|0))g=Ob[k[(k[g>>2]|0)+36>>2]&127](g)|0;else g=k[h>>2]|0;if((g|0)==-1){k[a>>2]=0;j=1;break}else{j=(k[a>>2]|0)==0;break}}else j=1}while(0);do{if(i){g=k[i+12>>2]|0;if((g|0)==(k[i+16>>2]|0))g=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else g=k[g>>2]|0;if((g|0)==-1){k[b>>2]=0;i=0;e=0;g=1;break}else{i=l;e=l;g=(l|0)==0;break}}else{i=l;e=0;g=1}}while(0);h=k[a>>2]|0;if(!((m|0)>1&(j^g)))break;g=k[h+12>>2]|0;if((g|0)==(k[h+16>>2]|0))g=Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0;else g=k[g>>2]|0;if(!(Qb[k[(k[d>>2]|0)+12>>2]&63](d,2048,g)|0))break a;f=((Qb[k[(k[d>>2]|0)+52>>2]&63](d,g,0)|0)<<24>>24)+(f*10|0)|0;g=k[a>>2]|0;h=g+12|0;j=k[h>>2]|0;if((j|0)==(k[g+16>>2]|0)){Ob[k[(k[g>>2]|0)+40>>2]&127](g)|0;m=n;l=i;i=e;continue}else{k[h>>2]=j+4;m=n;l=i;i=e;continue}}do{if(h){g=k[h+12>>2]|0;if((g|0)==(k[h+16>>2]|0))g=Ob[k[(k[h>>2]|0)+36>>2]&127](h)|0;else g=k[g>>2]|0;if((g|0)==-1){k[a>>2]=0;h=1;break}else{h=(k[a>>2]|0)==0;break}}else h=1}while(0);do{if(i){g=k[i+12>>2]|0;if((g|0)==(k[i+16>>2]|0))g=Ob[k[(k[i>>2]|0)+36>>2]&127](i)|0;else g=k[g>>2]|0;if((g|0)!=-1)if(h)break a;else break;else{k[b>>2]=0;o=60;break}}else o=60}while(0);if((o|0)==60?!h:0)break;k[c>>2]=k[c>>2]|2}}while(0);return f|0}function fv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;d=(k[f>>2]|0)!=189;h=k[a>>2]|0;g=h;e=(k[c>>2]|0)-g|0;e=e>>>0<2147483647?e<<1:-1;g=(k[b>>2]|0)-g|0;h=Sl(d?h:0,e)|0;if(!h)ak();do{if(!d){d=k[a>>2]|0;k[a>>2]=h;if(d){x=0;qa(k[f>>2]|0,d|0);h=x;x=0;if(h&1){h=Wa(0)|0;oc(h)}else{i=k[a>>2]|0;break}}else i=h}else{k[a>>2]=h;i=h}}while(0);k[f>>2]=201;k[b>>2]=i+g;k[c>>2]=(k[a>>2]|0)+e;return}function gv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;d=(k[f>>2]|0)!=189;h=k[a>>2]|0;g=h;e=(k[c>>2]|0)-g|0;e=e>>>0<2147483647?e<<1:-1;g=(k[b>>2]|0)-g>>2;h=Sl(d?h:0,e)|0;if(!h)ak();do{if(!d){d=k[a>>2]|0;k[a>>2]=h;if(d){x=0;qa(k[f>>2]|0,d|0);h=x;x=0;if(h&1){h=Wa(0)|0;oc(h)}else{i=k[a>>2]|0;break}}else i=h}else{k[a>>2]=h;i=h}}while(0);k[f>>2]=201;k[b>>2]=i+(g<<2);k[c>>2]=(k[a>>2]|0)+(e>>>2<<2);return}function hv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;f=b;d=i[a>>0]|0;if(!(d&1)){e=10;j=(d&255)>>>1}else{d=k[a>>2]|0;e=(d&-2)+-1|0;j=k[a+4>>2]|0;d=d&255}h=c-f|0;do{if((c|0)!=(b|0)){if((e-j|0)>>>0>>0){bn(a,e,j+h-e|0,j,j,0,0);d=i[a>>0]|0}if(!(d&1))g=a+1|0;else g=k[a+8>>2]|0;f=c+(j-f)|0;if((b|0)!=(c|0)){d=b;e=g+j|0;while(1){i[e>>0]=i[d>>0]|0;d=d+1|0;if((d|0)==(c|0))break;else e=e+1|0}}i[g+f>>0]=0;d=j+h|0;if(!(i[a>>0]&1)){i[a>>0]=d<<1;break}else{k[a+4>>2]=d;break}}}while(0);return a|0}function iv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;d=(k[f>>2]|0)!=189;h=k[a>>2]|0;g=h;e=(k[c>>2]|0)-g|0;e=e>>>0<2147483647?e<<1:-1;g=(k[b>>2]|0)-g>>2;h=Sl(d?h:0,e)|0;if(!h)ak();do{if(!d){d=k[a>>2]|0;k[a>>2]=h;if(d){x=0;qa(k[f>>2]|0,d|0);h=x;x=0;if(h&1){h=Wa(0)|0;oc(h)}else{i=k[a>>2]|0;break}}else i=h}else{k[a>>2]=h;i=h}}while(0);k[f>>2]=201;k[b>>2]=i+(g<<2);k[c>>2]=(k[a>>2]|0)+(e>>>2<<2);return}function jv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0;f=b;d=i[a>>0]|0;if(!(d&1)){e=1;j=(d&255)>>>1}else{d=k[a>>2]|0;e=(d&-2)+-1|0;j=k[a+4>>2]|0;d=d&255}h=c-f>>2;do{if(h){if((e-j|0)>>>0>>0){ln(a,e,j+h-e|0,j,j,0,0);d=i[a>>0]|0}if(!(d&1))g=a+4|0;else g=k[a+8>>2]|0;f=j+((c-f|0)>>>2)|0;if((b|0)!=(c|0)){d=b;e=g+(j<<2)|0;while(1){k[e>>2]=k[d>>2];d=d+4|0;if((d|0)==(c|0))break;else e=e+4|0}}k[g+(f<<2)>>2]=0;d=j+h|0;if(!(i[a>>0]&1)){i[a>>0]=d<<1;break}else{k[a+4>>2]=d;break}}}while(0);return a|0}function kv(a,b){a=a|0;b=b|0;var c=0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;i[a+128>>0]=0;do{if(b){x=0;ra(125,a|0,b|0);c=x;x=0;if(c&1){c=Wa()|0;Nv(a);fb(c|0)}else{cw(a,b);break}}}while(0);return}function lv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43148)|0);return}function mv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43188)|0);return}function nv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44220)|0);return}function ov(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44212)|0);return}function pv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44280)|0);return}function qv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44288)|0);return}function rv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44344)|0);return}function sv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44352)|0);return}function tv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44360)|0);return}function uv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44368)|0);return}function vv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43260)|0);return}function wv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43332)|0);return}function xv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43392)|0);return}function yv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43452)|0);return}function zv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43764)|0);return}function Av(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43828)|0);return}function Bv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43892)|0);return}function Cv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43956)|0);return}function Dv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43992)|0);return}function Ev(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44028)|0);return}function Fv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44064)|0);return}function Gv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44100)|0);return}function Hv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43544)|0);return}function Iv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43636)|0);return}function Jv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43668)|0);return}function Kv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(43700)|0);return}function Lv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44140)|0);return}function Mv(a,b){a=a|0;b=b|0;Hs(a,b,Rs(44180)|0);return}function Nv(a){a=a|0;var b=0,c=0,d=0;c=k[a>>2]|0;do{if(c){d=a+4|0;b=k[d>>2]|0;if((b|0)!=(c|0)){do{b=b+-4|0}while((b|0)!=(c|0));k[d>>2]=b}if((a+16|0)==(c|0)){i[a+128>>0]=0;break}else{mj(c);break}}}while(0);return}function Ov(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;g=a+4|0;c=k[g>>2]|0;d=k[a>>2]|0;e=c-d>>2;if(e>>>0>=b>>>0){if(e>>>0>b>>>0?(f=d+(b<<2)|0,(c|0)!=(f|0)):0){do{c=c+-4|0}while((c|0)!=(f|0));k[g>>2]=c}}else bw(a,b-e|0);return}function Pv(a,b){a=a|0;b=b|0;var c=0;c=k[a+8>>2]|0;if((k[a+12>>2]|0)-c>>2>>>0>b>>>0)c=(k[c+(b<<2)>>2]|0)!=0;else c=0;return c|0}function Qv(a){a=a|0;var b=0,c=0;c=a+4|0;b=k[c>>2]|0;c=k[c+4>>2]|0;a=(k[a>>2]|0)+(c>>1)|0;if(c&1)b=k[(k[a>>2]|0)+b>>2]|0;Lb[b&255](a);return}function Rv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var l=0,n=0;k[c>>2]=a;k[f>>2]=d;if(h&2)if((e-d|0)<3)a=1;else{k[f>>2]=d+1;i[d>>0]=-17;l=k[f>>2]|0;k[f>>2]=l+1;i[l>>0]=-69;l=k[f>>2]|0;k[f>>2]=l+1;i[l>>0]=-65;l=4}else l=4;a:do{if((l|0)==4){n=b;a=k[c>>2]|0;if(a>>>0>>0)while(1){h=j[a>>1]|0;l=h&65535;if(l>>>0>g>>>0){a=2;break a}do{if((h&65535)<128){a=k[f>>2]|0;if((e-a|0)<1){a=1;break a}k[f>>2]=a+1;i[a>>0]=h}else{if((h&65535)<2048){a=k[f>>2]|0;if((e-a|0)<2){a=1;break a}k[f>>2]=a+1;i[a>>0]=l>>>6|192;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l&63|128;break}if((h&65535)<55296){a=k[f>>2]|0;if((e-a|0)<3){a=1;break a}k[f>>2]=a+1;i[a>>0]=l>>>12|224;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l>>>6&63|128;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l&63|128;break}if((h&65535)>=56320){if((h&65535)<57344){a=2;break a}a=k[f>>2]|0;if((e-a|0)<3){a=1;break a}k[f>>2]=a+1;i[a>>0]=l>>>12|224;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l>>>6&63|128;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l&63|128;break}if((n-a|0)<4){a=1;break a}a=a+2|0;h=m[a>>1]|0;if((h&64512|0)!=56320){a=2;break a}if((e-(k[f>>2]|0)|0)<4){a=1;break a}d=l&960;if(((d<<10)+65536|l<<10&64512|h&1023)>>>0>g>>>0){a=2;break a}k[c>>2]=a;a=(d>>>6)+1|0;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=a>>>2|240;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l>>>2&15|a<<4&48|128;d=k[f>>2]|0;k[f>>2]=d+1;i[d>>0]=l<<4&48|h>>>6&15|128;l=k[f>>2]|0;k[f>>2]=l+1;i[l>>0]=h&63|128}}while(0);a=(k[c>>2]|0)+2|0;k[c>>2]=a;if(a>>>0>=b>>>0){a=0;break}}else a=0}}while(0);return a|0}function Sv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var m=0,n=0,o=0,p=0,q=0,r=0;k[c>>2]=a;k[f>>2]=d;if(h&4){a=k[c>>2]|0;h=b;if((((h-a|0)>2?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)?(i[a+2>>0]|0)==-65:0){k[c>>2]=a+3;m=k[f>>2]|0}else m=d}else{m=d;h=b}q=e;d=k[c>>2]|0;a=d>>>0>>0;a:do{if(a&m>>>0>>0)while(1){a=i[d>>0]|0;o=a&255;if(o>>>0>g>>>0){a=2;break a}do{if(a<<24>>24>-1){j[m>>1]=a&255;k[c>>2]=d+1}else{if((a&255)<194){a=2;break a}if((a&255)<224){if((h-d|0)<2){a=1;break a}a=l[d+1>>0]|0;if((a&192|0)!=128){a=2;break a}a=a&63|o<<6&1984;if(a>>>0>g>>>0){a=2;break a}j[m>>1]=a;k[c>>2]=d+2;break}if((a&255)<240){if((h-d|0)<3){a=1;break a}n=i[d+1>>0]|0;a=i[d+2>>0]|0;switch(o|0){case 224:{if((n&-32)<<24>>24!=-96){a=2;break a}break}case 237:{if((n&-32)<<24>>24!=-128){a=2;break a}break}default:if((n&-64)<<24>>24!=-128){a=2;break a}}a=a&255;if((a&192|0)!=128){a=2;break a}a=(n&255)<<6&4032|o<<12|a&63;if((a&65535)>>>0>g>>>0){a=2;break a}j[m>>1]=a;k[c>>2]=d+3;break}if((a&255)>=245){a=2;break a}if((h-d|0)<4){a=1;break a}n=i[d+1>>0]|0;a=i[d+2>>0]|0;d=i[d+3>>0]|0;switch(o|0){case 240:{if((n+112&255)>=48){a=2;break a}break}case 244:{if((n&-16)<<24>>24!=-128){a=2;break a}break}default:if((n&-64)<<24>>24!=-128){a=2;break a}}p=a&255;if((p&192|0)!=128){a=2;break a}a=d&255;if((a&192|0)!=128){a=2;break a}if((q-m|0)<4){a=1;break a}o=o&7;d=n&255;n=p<<6;a=a&63;if((d<<12&258048|o<<18|n&4032|a)>>>0>g>>>0){a=2;break a}j[m>>1]=d<<2&60|p>>>4&3|((d>>>4&3|o<<2)<<6)+16320|55296;p=m+2|0;k[f>>2]=p;j[p>>1]=a|n&960|56320;k[c>>2]=(k[c>>2]|0)+4}}while(0);m=(k[f>>2]|0)+2|0;k[f>>2]=m;d=k[c>>2]|0;a=d>>>0>>0;if(!(a&m>>>0>>0)){r=39;break}}else r=39}while(0);if((r|0)==39)a=a&1;return a|0}function Tv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,m=0,n=0;n=b;if((((e&4|0)!=0?(n-a|0)>2:0)?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)e=(i[a+2>>0]|0)==-65?a+3|0:a;else e=a;a:do{if((c|0)!=0&e>>>0>>0){m=e;f=0;b:while(1){e=i[m>>0]|0;k=e&255;if(k>>>0>d>>>0){e=m;f=42;break a}do{if(e<<24>>24>-1)e=m+1|0;else{if((e&255)<194){e=m;f=42;break a}if((e&255)<224){if((n-m|0)<2){e=m;f=42;break a}e=l[m+1>>0]|0;if((e&192|0)!=128){e=m;f=42;break a}if((e&63|k<<6&1984)>>>0>d>>>0){e=m;f=42;break a}e=m+2|0;break}if((e&255)<240){e=m;if((n-e|0)<3){e=m;f=42;break a}h=i[m+1>>0]|0;g=i[m+2>>0]|0;switch(k|0){case 224:{if((h&-32)<<24>>24!=-96){f=20;break b}break}case 237:{if((h&-32)<<24>>24!=-128){f=22;break b}break}default:if((h&-64)<<24>>24!=-128){f=24;break b}}e=g&255;if((e&192|0)!=128){e=m;f=42;break a}if(((h&255)<<6&4032|k<<12&61440|e&63)>>>0>d>>>0){e=m;f=42;break a}e=m+3|0;break}if((e&255)>=245){e=m;f=42;break a}e=m;if((c-f|0)>>>0<2|(n-e|0)<4){e=m;f=42;break a}j=i[m+1>>0]|0;g=i[m+2>>0]|0;h=i[m+3>>0]|0;switch(k|0){case 240:{if((j+112&255)>=48){f=32;break b}break}case 244:{if((j&-16)<<24>>24!=-128){f=34;break b}break}default:if((j&-64)<<24>>24!=-128){f=36;break b}}g=g&255;if((g&192|0)!=128){e=m;f=42;break a}e=h&255;if((e&192|0)!=128){e=m;f=42;break a}if(((j&255)<<12&258048|k<<18&1835008|g<<6&4032|e&63)>>>0>d>>>0){e=m;f=42;break a}e=m+4|0;f=f+1|0}}while(0);f=f+1|0;if(!(f>>>0>>0&e>>>0>>0)){f=42;break a}else m=e}if((f|0)==20){e=e-a|0;break}else if((f|0)==22){e=e-a|0;break}else if((f|0)==24){e=e-a|0;break}else if((f|0)==32){e=e-a|0;break}else if((f|0)==34){e=e-a|0;break}else if((f|0)==36){e=e-a|0;break}}else f=42}while(0);if((f|0)==42)e=e-a|0;return e|0}function Uv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,l=0;k[c>>2]=a;k[f>>2]=d;l=e;if(h&2)if((l-d|0)<3)a=1;else{k[f>>2]=d+1;i[d>>0]=-17;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=-69;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=-65;j=4}else j=4;a:do{if((j|0)==4){a=k[c>>2]|0;if(a>>>0>>0)while(1){h=k[a>>2]|0;if(h>>>0>g>>>0|(h&-2048|0)==55296){a=2;break a}do{if(h>>>0>=128){if(h>>>0<2048){a=k[f>>2]|0;if((l-a|0)<2){a=1;break a}k[f>>2]=a+1;i[a>>0]=h>>>6|192;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h&63|128;break}a=k[f>>2]|0;e=l-a|0;if(h>>>0<65536){if((e|0)<3){a=1;break a}k[f>>2]=a+1;i[a>>0]=h>>>12|224;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h>>>6&63|128;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h&63|128;break}else{if((e|0)<4){a=1;break a}k[f>>2]=a+1;i[a>>0]=h>>>18|240;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h>>>12&63|128;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h>>>6&63|128;j=k[f>>2]|0;k[f>>2]=j+1;i[j>>0]=h&63|128;break}}else{a=k[f>>2]|0;if((l-a|0)<1){a=1;break a}k[f>>2]=a+1;i[a>>0]=h}}while(0);a=(k[c>>2]|0)+4|0;k[c>>2]=a;if(a>>>0>=b>>>0){a=0;break}}else a=0}}while(0);return a|0}function Vv(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,m=0,n=0,o=0,p=0,q=0;k[c>>2]=a;k[f>>2]=d;if(h&4){a=k[c>>2]|0;h=b;if((((h-a|0)>2?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)?(i[a+2>>0]|0)==-65:0){k[c>>2]=a+3;d=k[f>>2]|0;p=h}else p=h}else p=b;h=k[c>>2]|0;a=h>>>0>>0;a:do{if(a&d>>>0>>0)while(1){a=i[h>>0]|0;o=a&255;do{if(a<<24>>24>-1){if(o>>>0>g>>>0){a=2;break a}k[d>>2]=o;k[c>>2]=h+1}else{if((a&255)<194){a=2;break a}if((a&255)<224){if((p-h|0)<2){a=1;break a}a=l[h+1>>0]|0;if((a&192|0)!=128){a=2;break a}a=a&63|o<<6&1984;if(a>>>0>g>>>0){a=2;break a}k[d>>2]=a;k[c>>2]=h+2;break}if((a&255)<240){if((p-h|0)<3){a=1;break a}j=i[h+1>>0]|0;a=i[h+2>>0]|0;switch(o|0){case 224:{if((j&-32)<<24>>24!=-96){a=2;break a}break}case 237:{if((j&-32)<<24>>24!=-128){a=2;break a}break}default:if((j&-64)<<24>>24!=-128){a=2;break a}}a=a&255;if((a&192|0)!=128){a=2;break a}a=(j&255)<<6&4032|o<<12&61440|a&63;if(a>>>0>g>>>0){a=2;break a}k[d>>2]=a;k[c>>2]=h+3;break}if((a&255)>=245){a=2;break a}if((p-h|0)<4){a=1;break a}n=i[h+1>>0]|0;a=i[h+2>>0]|0;j=i[h+3>>0]|0;switch(o|0){case 240:{if((n+112&255)>=48){a=2;break a}break}case 244:{if((n&-16)<<24>>24!=-128){a=2;break a}break}default:if((n&-64)<<24>>24!=-128){a=2;break a}}m=a&255;if((m&192|0)!=128){a=2;break a}a=j&255;if((a&192|0)!=128){a=2;break a}a=(n&255)<<12&258048|o<<18&1835008|m<<6&4032|a&63;if(a>>>0>g>>>0){a=2;break a}k[d>>2]=a;k[c>>2]=h+4}}while(0);d=(k[f>>2]|0)+4|0;k[f>>2]=d;h=k[c>>2]|0;a=h>>>0>>0;if(!(a&d>>>0>>0)){q=38;break}}else q=38}while(0);if((q|0)==38)a=a&1;return a|0}function Wv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,m=0,n=0;n=b;if((((e&4|0)!=0?(n-a|0)>2:0)?(i[a>>0]|0)==-17:0)?(i[a+1>>0]|0)==-69:0)e=(i[a+2>>0]|0)==-65?a+3|0:a;else e=a;a:do{if((c|0)!=0&e>>>0>>0){k=e;m=0;b:while(1){e=i[k>>0]|0;j=e&255;do{if(e<<24>>24>-1){if(j>>>0>d>>>0){e=k;f=42;break a}e=k+1|0}else{if((e&255)<194){e=k;f=42;break a}if((e&255)<224){if((n-k|0)<2){e=k;f=42;break a}e=l[k+1>>0]|0;if((e&192|0)!=128){e=k;f=42;break a}if((e&63|j<<6&1984)>>>0>d>>>0){e=k;f=42;break a}e=k+2|0;break}if((e&255)<240){e=k;if((n-e|0)<3){e=k;f=42;break a}g=i[k+1>>0]|0;f=i[k+2>>0]|0;switch(j|0){case 224:{if((g&-32)<<24>>24!=-96){f=20;break b}break}case 237:{if((g&-32)<<24>>24!=-128){f=22;break b}break}default:if((g&-64)<<24>>24!=-128){f=24;break b}}e=f&255;if((e&192|0)!=128){e=k;f=42;break a}if(((g&255)<<6&4032|j<<12&61440|e&63)>>>0>d>>>0){e=k;f=42;break a}e=k+3|0;break}if((e&255)>=245){e=k;f=42;break a}e=k;if((n-e|0)<4){e=k;f=42;break a}h=i[k+1>>0]|0;f=i[k+2>>0]|0;g=i[k+3>>0]|0;switch(j|0){case 240:{if((h+112&255)>=48){f=32;break b}break}case 244:{if((h&-16)<<24>>24!=-128){f=34;break b}break}default:if((h&-64)<<24>>24!=-128){f=36;break b}}f=f&255;if((f&192|0)!=128){e=k;f=42;break a}e=g&255;if((e&192|0)!=128){e=k;f=42;break a}if(((h&255)<<12&258048|j<<18&1835008|f<<6&4032|e&63)>>>0>d>>>0){e=k;f=42;break a}e=k+4|0}}while(0);m=m+1|0;if(!(m>>>0>>0&e>>>0>>0)){f=42;break a}else k=e}if((f|0)==20){e=e-a|0;break}else if((f|0)==22){e=e-a|0;break}else if((f|0)==24){e=e-a|0;break}else if((f|0)==32){e=e-a|0;break}else if((f|0)==34){e=e-a|0;break}else if((f|0)==36){e=e-a|0;break}}else f=42}while(0);if((f|0)==42)e=e-a|0;return e|0}function Xv(a){a=a|0;Sm(45196);Sm(45184);Sm(45172);Sm(45160);Sm(45148);Sm(45136);Sm(45124);Sm(45112);Sm(45100);Sm(45088);Sm(45076);Sm(45064);Sm(45052);Sm(45040);return}function Yv(a){a=a|0;en(45368);en(45356);en(45344);en(45332);en(45320);en(45308);en(45296);en(45284);en(45272);en(45260);en(45248);en(45236);en(45224);en(45212);return}function Zv(a){a=a|0;Sm(46e3);Sm(45988);Sm(45976);Sm(45964);Sm(45952);Sm(45940);Sm(45928);Sm(45916);Sm(45904);Sm(45892);Sm(45880);Sm(45868);Sm(45856);Sm(45844);Sm(45832);Sm(45820);Sm(45808);Sm(45796);Sm(45784);Sm(45772);Sm(45760);Sm(45748);Sm(45736);Sm(45724);return}function _v(a){a=a|0;en(46292);en(46280);en(46268);en(46256);en(46244);en(46232);en(46220);en(46208);en(46196);en(46184);en(46172);en(46160);en(46148);en(46136);en(46124);en(46112);en(46100);en(46088);en(46076);en(46064);en(46052);en(46040);en(46028);en(46016);return}function $v(a){a=a|0;Sm(47104);Sm(47092);Sm(47080);Sm(47068);Sm(47056);Sm(47044);Sm(47032);Sm(47020);Sm(47008);Sm(46996);Sm(46984);Sm(46972);Sm(46960);Sm(46948);Sm(46936);Sm(46924);Sm(46912);Sm(46900);Sm(46888);Sm(46876);Sm(46864);Sm(46852);Sm(46840);Sm(46828);return}function aw(a){a=a|0;en(47396);en(47384);en(47372);en(47360);en(47348);en(47336);en(47324);en(47312);en(47300);en(47288);en(47276);en(47264);en(47252);en(47240);en(47228);en(47216);en(47204);en(47192);en(47180);en(47168);en(47156);en(47144);en(47132);en(47120);return}function bw(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=r;r=r+32|0;h=i;f=k[a+8>>2]|0;c=k[a+4>>2]|0;if(f-c>>2>>>0>>0){d=k[a>>2]|0;g=c-d>>2;e=g+b|0;if(e>>>0>1073741823)jj(a);c=f-d|0;if(c>>2>>>0<536870911){c=c>>1;c=c>>>0>>0?e:c}else c=1073741823;dw(h,c,g,a+16|0);g=h+8|0;f=k[g>>2]|0;sw(f|0,0,b<<2|0)|0;k[g>>2]=f+(b<<2);ew(a,h);fw(h)}else cw(a,b);r=i;return}function cw(a,b){a=a|0;b=b|0;var c=0;c=a+4|0;a=b;b=k[c>>2]|0;do{k[b>>2]=0;b=(k[c>>2]|0)+4|0;k[c>>2]=b;a=a+-1|0}while((a|0)!=0);return}function dw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;k[a+12>>2]=0;k[a+16>>2]=d;do{if(b){e=d+112|0;if(b>>>0<29&(i[e>>0]|0)==0){i[e>>0]=1;break}else{d=lj(b<<2)|0;break}}else d=0}while(0);k[a>>2]=d;c=d+(c<<2)|0;k[a+8>>2]=c;k[a+4>>2]=c;k[a+12>>2]=d+(b<<2);return}function ew(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;d=k[a>>2]|0;f=a+4|0;c=b+4|0;e=(k[f>>2]|0)-d|0;g=(k[c>>2]|0)+(0-(e>>2)<<2)|0;k[c>>2]=g;vw(g|0,d|0,e|0)|0;e=k[a>>2]|0;k[a>>2]=k[c>>2];k[c>>2]=e;e=b+8|0;d=k[f>>2]|0;k[f>>2]=k[e>>2];k[e>>2]=d;e=a+8|0;a=b+12|0;d=k[e>>2]|0;k[e>>2]=k[a>>2];k[a>>2]=d;k[b>>2]=k[c>>2];return}function fw(a){a=a|0;var b=0,c=0,d=0;c=k[a+4>>2]|0;d=a+8|0;b=k[d>>2]|0;if((b|0)!=(c|0)){do{b=b+-4|0}while((b|0)!=(c|0));k[d>>2]=b}c=k[a>>2]|0;do{if(c){b=k[a+16>>2]|0;if((b|0)==(c|0)){i[b+112>>0]=0;break}else{mj(c);break}}}while(0);return}function gw(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>1073741823)jj(a);c=a+128|0;if(b>>>0<29&(i[c>>0]|0)==0){i[c>>0]=1;c=a+16|0}else c=lj(b<<2)|0;k[a+4>>2]=c;k[a>>2]=c;k[a+8>>2]=c+(b<<2);return}function hw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;g=h;do{if((a|0)!=(b|0)){e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;d=+ql(a,g,fp()|0);a=k[e>>2]|0;if(!a)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0.0;break}if((a|0)==34)k[c>>2]=4}else{k[c>>2]=4;d=0.0}}while(0);r=h;return+d}function iw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;g=h;do{if((a|0)!=(b|0)){e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;d=+ql(a,g,fp()|0);a=k[e>>2]|0;if(!a)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0.0;break}if((a|0)==34)k[c>>2]=4}else{k[c>>2]=4;d=0.0}}while(0);r=h;return+d}function jw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;g=h;do{if((a|0)==(b|0)){k[c>>2]=4;d=0.0}else{e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;d=+ql(a,g,fp()|0);a=k[e>>2]|0;if(!a)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0.0;break}if((a|0)==34)k[c>>2]=4}}while(0);r=h;return+d}function kw(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;h=r;r=r+16|0;g=h;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;d=0;a=0;break}e=mk()|0;f=k[e>>2]|0;k[e>>2]=0;a=fk(a,g,d,fp()|0)|0;d=k[e>>2]|0;if(!d)k[e>>2]=f;if((k[g>>2]|0)!=(b|0)){k[c>>2]=4;d=0;a=0;break}if((d|0)==34){k[c>>2]=4;d=-1;a=-1}else d=M}else{k[c>>2]=4;d=0;a=0}}while(0);M=d;r=h;return a|0}function lw(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,j=0;j=r;r=r+16|0;h=j;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;a=0;break}f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=fk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}if(d>>>0>0|(d|0)==0&a>>>0>4294967295|(e|0)==34){k[c>>2]=4;a=-1;break}else break}else{k[c>>2]=4;a=0}}while(0);r=j;return a|0}function mw(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,j=0;j=r;r=r+16|0;h=j;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;a=0;break}f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=fk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}if(d>>>0>0|(d|0)==0&a>>>0>4294967295|(e|0)==34){k[c>>2]=4;a=-1;break}else break}else{k[c>>2]=4;a=0}}while(0);r=j;return a|0}function nw(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,j=0;j=r;r=r+16|0;h=j;do{if((a|0)!=(b|0)){if((i[a>>0]|0)==45){k[c>>2]=4;a=0;break}f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=fk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}if(d>>>0>0|(d|0)==0&a>>>0>65535|(e|0)==34){k[c>>2]=4;a=-1;break}else{a=a&65535;break}}else{k[c>>2]=4;a=0}}while(0);r=j;return a|0}function ow(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;i=r;r=r+16|0;h=i;do{if((a|0)!=(b|0)){f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=gk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;d=0;a=0;break}if((e|0)==34){k[c>>2]=4;h=(d|0)>0|(d|0)==0&a>>>0>0;M=h?2147483647:-2147483648;r=i;return(h?-1:0)|0}}else{k[c>>2]=4;d=0;a=0}}while(0);M=d;r=i;return a|0}function pw(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;i=r;r=r+16|0;h=i;a:do{if((a|0)==(b|0)){k[c>>2]=4;a=0}else{f=mk()|0;g=k[f>>2]|0;k[f>>2]=0;a=gk(a,h,d,fp()|0)|0;d=M;e=k[f>>2]|0;if(!e)k[f>>2]=g;if((k[h>>2]|0)!=(b|0)){k[c>>2]=4;a=0;break}do{if((e|0)==34){k[c>>2]=4;if((d|0)>0|(d|0)==0&a>>>0>0){a=2147483647;break a}}else{if((d|0)<-1|(d|0)==-1&a>>>0<2147483648){k[c>>2]=4;break}if((d|0)>0|(d|0)==0&a>>>0>2147483647){k[c>>2]=4;a=2147483647;break a}else break a}}while(0);a=-2147483648}}while(0);r=i;return a|0}function qw(){}function rw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return(M=d,a-c>>>0|0)|0}function sw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=a+c|0;if((c|0)>=20){b=b&255;f=a&3;g=b|b<<8|b<<16|b<<24;e=d&~3;if(f){f=a+4-f|0;while((a|0)<(f|0)){i[a>>0]=b;a=a+1|0}}while((a|0)<(e|0)){k[a>>2]=g;a=a+4|0}}while((a|0)<(d|0)){i[a>>0]=b;a=a+1|0}return a-c|0}function tw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return(M=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function uw(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){M=b>>>c;return a>>>c|(b&(1<>>c-32|0}function vw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)>=4096)return db(a|0,b|0,c|0)|0;d=a|0;if((a&3)==(b&3)){while(a&3){if(!c)return d|0;i[a>>0]=i[b>>0]|0;a=a+1|0;b=b+1|0;c=c-1|0}while((c|0)>=4){k[a>>2]=k[b>>2];a=a+4|0;b=b+4|0;c=c-4|0}}while((c|0)>0){i[a>>0]=i[b>>0]|0;a=a+1|0;b=b+1|0;c=c-1|0}return d|0}function ww(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){M=b<>>32-c;return a<0){a=a-1|0;b=b-1|0;c=c-1|0;i[a>>0]=i[b>>0]|0}a=d}else vw(a,b,c)|0;return a|0}function yw(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){M=b>>c;return a>>>c|(b&(1<>c-32|0}function zw(a){a=a|0;var b=0;b=i[v+(a&255)>>0]|0;if((b|0)<8)return b|0;b=i[v+(a>>8&255)>>0]|0;if((b|0)<8)return b+8|0;b=i[v+(a>>16&255)>>0]|0;if((b|0)<8)return b+16|0;return(i[v+(a>>>24)>>0]|0)+24|0}function Aw(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=ia(e,f)|0;d=a>>>16;a=(c>>>16)+(ia(e,d)|0)|0;e=b>>>16;b=ia(e,f)|0;return(M=(a>>>16)+(ia(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Bw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=rw(j^a,i^b,j,i)|0;g=M;a=f^j;b=e^i;return rw((Gw(h,g,rw(f^c,e^d,f,e)|0,M,0)|0)^a,M^b,a,b)|0}function Cw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=r;r=r+16|0;h=e|0;g=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;j=d>>31|((d|0)<0?-1:0)<<1;i=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;a=rw(g^a,f^b,g,f)|0;b=M;Gw(a,b,rw(j^c,i^d,j,i)|0,M,h)|0;d=rw(k[h>>2]^g,k[h+4>>2]^f,g,f)|0;c=M;r=e;return(M=c,d)|0}function Dw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Aw(e,f)|0;a=M;return(M=(ia(b,f)|0)+(ia(d,e)|0)+a|a&0,c|0|0)|0}function Ew(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Gw(a,b,c,d,0)|0}function Fw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=r;r=r+16|0;e=f|0;Gw(a,b,c,d,e)|0;r=f;return(M=k[e+4>>2]|0,k[e>>2]|0)|0}function Gw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;l=a;i=b;j=i;g=c;n=d;h=n;if(!j){f=(e|0)!=0;if(!h){if(f){k[e>>2]=(l>>>0)%(g>>>0);k[e+4>>2]=0}n=0;e=(l>>>0)/(g>>>0)>>>0;return(M=n,e)|0}else{if(!f){n=0;e=0;return(M=n,e)|0}k[e>>2]=a|0;k[e+4>>2]=b&0;n=0;e=0;return(M=n,e)|0}}f=(h|0)==0;do{if(g){if(!f){f=(ka(h|0)|0)-(ka(j|0)|0)|0;if(f>>>0<=31){m=f+1|0;h=31-f|0;b=f-31>>31;g=m;a=l>>>(m>>>0)&b|j<>>(m>>>0)&b;f=0;h=l<>2]=a|0;k[e+4>>2]=i|b&0;n=0;e=0;return(M=n,e)|0}f=g-1|0;if(f&g){h=(ka(g|0)|0)+33-(ka(j|0)|0)|0;p=64-h|0;m=32-h|0;i=m>>31;o=h-32|0;b=o>>31;g=h;a=m-1>>31&j>>>(o>>>0)|(j<>>(h>>>0))&b;b=b&j>>>(h>>>0);f=l<>>(o>>>0))&i|l<>31;break}if(e){k[e>>2]=f&l;k[e+4>>2]=0}if((g|0)==1){o=i|b&0;p=a|0|0;return(M=o,p)|0}else{p=zw(g|0)|0;o=j>>>(p>>>0)|0;p=j<<32-p|l>>>(p>>>0)|0;return(M=o,p)|0}}else{if(f){if(e){k[e>>2]=(j>>>0)%(g>>>0);k[e+4>>2]=0}o=0;p=(j>>>0)/(g>>>0)>>>0;return(M=o,p)|0}if(!l){if(e){k[e>>2]=0;k[e+4>>2]=(j>>>0)%(h>>>0)}o=0;p=(j>>>0)/(h>>>0)>>>0;return(M=o,p)|0}f=h-1|0;if(!(f&h)){if(e){k[e>>2]=a|0;k[e+4>>2]=f&j|b&0}o=0;p=j>>>((zw(h|0)|0)>>>0);return(M=o,p)|0}f=(ka(h|0)|0)-(ka(j|0)|0)|0;if(f>>>0<=30){b=f+1|0;h=31-f|0;g=b;a=j<>>(b>>>0);b=j>>>(b>>>0);f=0;h=l<>2]=a|0;k[e+4>>2]=i|b&0;o=0;p=0;return(M=o,p)|0}}while(0);if(!g){j=h;i=0;h=0}else{m=c|0|0;l=n|d&0;j=tw(m|0,l|0,-1,-1)|0;c=M;i=h;h=0;do{d=i;i=f>>>31|i<<1;f=h|f<<1;d=a<<1|d>>>31|0;n=a>>>31|b<<1|0;rw(j,c,d,n)|0;p=M;o=p>>31|((p|0)<0?-1:0)<<1;h=o&1;a=rw(d,n,o&m,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l)|0;b=M;g=g-1|0}while((g|0)!=0);j=i;i=0}g=0;if(e){k[e>>2]=a;k[e+4>>2]=b}o=(f|0)>>>31|(j|g)<<1|(g<<1|f>>>31)&0|i;p=(f<<1|0>>>31)&-2|h;return(M=o,p)|0}function Hw(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return Ib[a&15](b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function Iw(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Jb[a&15](b|0,c|0,d|0,e|0,f|0)}function Jw(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=+g;return Kb[a&3](b|0,c|0,d|0,e|0,f|0,+g)|0}function Kw(a,b){a=a|0;b=b|0;Lb[a&255](b|0)}function Lw(a,b,c){a=a|0;b=b|0;c=c|0;Mb[a&127](b|0,c|0)}function Mw(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Nb[a&63](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Nw(a,b){a=a|0;b=b|0;return Ob[a&127](b|0)|0}function Ow(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;return Pb[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0,l|0)|0}function Pw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Qb[a&63](b|0,c|0,d|0)|0}function Qw(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;Rb[a&3](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)}function Rw(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Sb[a&15](b|0,c|0,d|0,e|0,f|0,g|0)}function Sw(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;Tb[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function Tw(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;Ub[a&7](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function Uw(a,b,c){a=a|0;b=b|0;c=c|0;return Vb[a&63](b|0,c|0)|0}function Vw(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Wb[a&31](b|0,c|0,d|0,e|0,f|0)|0}function Ww(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return+Xb[a&3](b|0,c|0,d|0)}function Xw(a){a=a|0;return Yb[a&15]()|0}function Yw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Zb[a&31](b|0,c|0,d|0,e|0)|0}function Zw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;_b[a&15](b|0,c|0,d|0)}function _w(a){a=a|0;$b[a&7]()}function $w(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;return ac[a&15](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)|0}function ax(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;return bc[a&7](b|0,c|0,d|0,e|0,+f)|0}function bx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;cc[a&63](b|0,c|0,d|0,e|0)}function cx(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;la(0);return 0}function dx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;la(1)}function ex(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;la(2);return 0}function fx(a){a=a|0;la(3)}function gx(a,b){a=a|0;b=b|0;la(4)}function hx(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;la(5);return 0}function ix(a){a=a|0;la(6);return 0}function jx(a){a=a|0;return lb(a|0)|0}function kx(a){a=a|0;return Ab(a|0)|0}function lx(a){a=a|0;return qb(a|0)|0}function mx(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;la(7);return 0}function nx(a,b,c){a=a|0;b=b|0;c=c|0;la(8);return 0}function ox(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;la(9)}function px(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;la(10)}function qx(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;la(11)}function rx(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;la(12)}function sx(a,b){a=a|0;b=b|0;la(13);return 0}function tx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;la(14);return 0}function ux(a,b,c){a=a|0;b=b|0;c=c|0;la(15);return 0.0}function vx(){la(16);return 0}function wx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;la(17);return 0}function xx(a,b,c){a=a|0;b=b|0;c=c|0;la(18)}function yx(a,b,c){a=a|0;b=b|0;c=c|0;ub(a|0,b|0,c|0)}function zx(){la(19)}function Ax(){yb()}function Bx(){eb()}function Cx(){vb()}function Dx(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;la(20);return 0}function Ex(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;la(21);return 0}function Fx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;la(22)}function ni(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0;l=r;r=r+32|0;h=l;Oi(h,255,0);j=a+152|0;if(((k[h+4>>2]|0)==(k[j>>2]|0)?(k[h+8>>2]|0)==(k[a+156>>2]|0):0)?(k[h+12>>2]|0)==(k[a+160>>2]|0):0){j=k[8900]|0;k[a+4580>>2]=j+(((k[8901]|0)-j|0)>>>1);r=l;return}c=a+4584|0;d=a+4588|0;e=k[d>>2]|0;b=k[c>>2]|0;f=e-b|0;if(f>>>0>=512){if(f>>>0>512?(g=b+512|0,(e|0)!=(g|0)):0)k[d>>2]=g}else{se(c,512-f|0);b=k[c>>2]|0}h=a+4580|0;k[h>>2]=b+256;g=a+160|0;e=a+156|0;f=-256;while(1){b=k[g>>2]|0;if((f|0)>(0-b|0)){c=k[e>>2]|0;if((f|0)>(0-c|0)){d=k[j>>2]|0;if((f|0)>(0-d|0))if((f|0)>=0){if((f|0)<1){i[(k[h>>2]|0)+f>>0]=0;f=1;continue}if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1}else b=-1;else b=-2}else b=-3}else b=-4;i[(k[h>>2]|0)+f>>0]=b;f=f+1|0;if((f|0)==256)break}r=l;return}function oi(a){a=a|0;var b=0,c=0;k[a>>2]=35660;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}a=a+88|0;b=k[a>>2]|0;k[a>>2]=0;if(!b)return;Lb[k[(k[b>>2]|0)+4>>2]&255](b);return}function pi(a){a=a|0;var b=0,c=0;k[a>>2]=35660;b=k[a+4608>>2]|0;if(b){c=a+4612|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}k[a>>2]=36736;b=k[a+92>>2]|0;if(b){c=a+96|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b)}c=a+88|0;b=k[c>>2]|0;k[c>>2]=0;if(!b){mj(a);return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);mj(a);return}function qi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,y=0,z=0;u=r;r=r+352|0;v=u+328|0;y=u+192|0;c=u+343|0;d=u+342|0;e=u+341|0;f=u+340|0;o=u+176|0;h=u+168|0;j=u+160|0;l=u+152|0;t=u;q=u+136|0;if((k[a+28>>2]|0)!=0?(k[a+20>>2]|0)!=1:0){p=a+4|0;s=a+32|0;g=k[s>>2]|0;if(!g){a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[c>>0]|0;Ja(44,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}a=k[a+12>>2]|0;if((a|0)==8)switch(g|0){case 1:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[d>>0]|0;Ja(45,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[e>>0]|0;Ja(46,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(48)|0;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];i[v>>0]=i[f>>0]|0;Ja(47,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=y+56|0;e=y+4|0;k[y>>2]=36160;k[g>>2]=36180;x=0;ra(62,y+56|0,e|0);u=x;x=0;if(u&1){z=Wa()|0;qn(g);fb(z|0)}k[y+128>>2]=0;k[y+132>>2]=-1;k[y>>2]=36200;k[y+56>>2]=36220;x=0;qa(180,e|0);u=x;x=0;do{if(u&1)a=Wa()|0;else{k[e>>2]=36236;f=y+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[y+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);u=x;x=0;if(u&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,y|0,49007,21)|0;v=x;x=0;do{if((!(v&1)?(x=0,m=Aa(36,a|0,k[s>>2]|0)|0,v=x,x=0,!(v&1)):0)?(x=0,va(28,m|0,50997,18)|0,v=x,x=0,!(v&1)):0){d=Va(16)|0;x=0;ra(64,o|0,e|0);v=x;x=0;if(!(v&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,o|0);v=x;x=0;if(v&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(o);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=34}while(0);if((z|0)==34)a=Wa()|0;k[y>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}if((a|0)<=8){a=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,a|0,8,35648);z=x;x=0;if(!(z&1))ub(a|0,824,96);z=Wa()|0;Ua(a|0);fb(z|0)}c=16-a|0;switch(g|0){case 1:{a=lj(60)|0;k[h>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[h>>2];k[v+4>>2]=k[h+4>>2];Ja(41,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 2:{a=lj(60)|0;k[j>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[j>>2];k[v+4>>2]=k[j+4>>2];Ja(42,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}case 3:{a=lj(60)|0;k[l>>2]=c;x=0;k[y>>2]=k[b>>2];k[y+4>>2]=k[b+4>>2];k[y+8>>2]=k[b+8>>2];k[v>>2]=k[l>>2];k[v+4>>2]=k[l+4>>2];Ja(43,a|0,y|0,p|0,v|0);z=x;x=0;if(!(z&1)){z=a;r=u;return z|0}z=Wa()|0;mj(a);fb(z|0)}default:{g=t+56|0;e=t+4|0;k[t>>2]=36160;k[g>>2]=36180;x=0;ra(62,t+56|0,e|0);y=x;x=0;if(y&1){z=Wa()|0;qn(g);fb(z|0)}k[t+128>>2]=0;k[t+132>>2]=-1;k[t>>2]=36200;k[t+56>>2]=36220;x=0;qa(180,e|0);y=x;x=0;do{if(y&1)a=Wa()|0;else{k[e>>2]=36236;f=t+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[t+52>>2]=16;k[v>>2]=0;k[v+4>>2]=0;k[v+8>>2]=0;x=0;ra(63,e|0,v|0);y=x;x=0;if(y&1){a=Wa()|0;Sm(v);Sm(f);xn(e);break}Sm(v);x=0;a=va(28,t|0,49007,21)|0;y=x;x=0;do{if((!(y&1)?(x=0,n=Aa(36,a|0,k[s>>2]|0)|0,y=x,x=0,!(y&1)):0)?(x=0,va(28,n|0,50997,18)|0,y=x,x=0,!(y&1)):0){d=Va(16)|0;x=0;ra(64,q|0,e|0);y=x;x=0;if(!(y&1)){if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Ja(36,d|0,9,35648,q|0);y=x;x=0;if(y&1)c=1;else{x=0;Fa(6,d|0,824,96);x=0;c=0}a=Wa()|0;Sm(q);if(!c)break}else a=Wa()|0;Ua(d|0)}else z=64}while(0);if((z|0)==64)a=Wa()|0;k[t>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);z=a;fb(z|0)}}while(0);z=a;qn(g);fb(z|0)}}}c=k[b+4>>2]|0;d=lj(16)|0;a=k[a+16>>2]|0;if(!c){z=k[b>>2]|0;k[d>>2]=36132;k[d+4>>2]=z;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}else{k[d>>2]=36108;k[d+4>>2]=c;k[d+8>>2]=1;k[d+12>>2]=a;z=d;r=u;return z|0}return 0}function ri(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,l=0;g=r;r=r+32|0;l=g;Oi(l,k[a+128>>2]|0,k[a+136>>2]|0);h=k[b+4>>2]|0;f=k[b+8>>2]|0;f=(f|0)==0?k[l+8>>2]|0:f;e=k[b+12>>2]|0;e=(e|0)==0?k[l+12>>2]|0:e;c=k[b+16>>2]|0;d=k[l+16>>2]|0;k[a+176>>2]=(h|0)==0?k[l+4>>2]|0:h;k[a+180>>2]=f;k[a+184>>2]=e;zi(a);e=a+132|0;b=(k[e>>2]|0)+32|0;b=(b|0)<128?2:(b|0)/64|0;f=0;do{k[a+188+(f*12|0)>>2]=b;k[a+188+(f*12|0)+4>>2]=0;j[a+188+(f*12|0)+8>>1]=0;j[a+188+(f*12|0)+10>>1]=1;f=f+1|0}while((f|0)!=365);h=(k[e>>2]|0)+32|0;h=(h|0)<128?2:(h|0)/64|0;l=((c|0)==0?d:c)&255;k[a+4568>>2]=h;k[a+4572>>2]=0;i[a+4576>>0]=l;i[a+4577>>0]=1;i[a+4578>>0]=0;k[a+4580>>2]=h;k[a+4584>>2]=1;i[a+4588>>0]=l;i[a+4589>>0]=1;i[a+4590>>0]=0;k[a+4592>>2]=0;r=g;return}function si(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=a+88|0;f=k[b>>2]|0;k[b>>2]=0;b=k[g>>2]|0;k[g>>2]=f;if(b)Lb[k[(k[b>>2]|0)+4>>2]&255](b);g=d+4|0;f=k[g>>2]|0;i[a+4620>>0]=e&1;b=a+156|0;k[b>>2]=k[c>>2];k[b+4>>2]=k[c+4>>2];k[b+8>>2]=k[c+8>>2];k[b+12>>2]=k[c+12>>2];ee(a,d);ti(a);b=k[a+116>>2]|0;a=k[a+112>>2]|0;while(1){e=b+-1|0;c=(i[e>>0]|0)==-1?7:8;if((a|0)<(c|0))break;else{b=e;a=a-c|0}}b=b-f|0;e=k[g>>2]|0;if(!e)return;k[g>>2]=e+b;d=d+8|0;k[d>>2]=(k[d>>2]|0)-b;return}function ti(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0,D=0;A=r;r=r+32|0;C=A+12|0;z=A;h=a+172|0;y=(k[h>>2]|0)+4|0;if((k[a+28>>2]|0)==1)j=k[a+20>>2]|0;else j=1;b=ia(j<<1,y)|0;k[C>>2]=0;D=C+4|0;k[D>>2]=0;k[C+8>>2]=0;a:do{if(b){if(!((b|0)<0?(x=0,qa(178,C|0),B=x,x=0,B&1):0))w=6;if((w|0)==6?(x=0,c=ta(67,b|0)|0,B=x,x=0,!(B&1)):0){k[D>>2]=c;k[C>>2]=c;k[C+8>>2]=c+b;while(1){i[c>>0]=0;c=(k[D>>2]|0)+1|0;k[D>>2]=c;b=b+-1|0;if(!b)break a}}c=Wa()|0;b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}}while(0);k[z>>2]=0;B=z+4|0;k[B>>2]=0;k[z+8>>2]=0;do{if(!j)w=19;else{if(!(j>>>0>1073741823?(x=0,qa(178,z|0),v=x,x=0,v&1):0))w=17;if((w|0)==17?(d=j<<2,x=0,e=ta(67,d|0)|0,v=x,x=0,!(v&1)):0){k[z>>2]=e;w=e+(j<<2)|0;k[z+8>>2]=w;sw(e|0,0,d|0)|0;k[B>>2]=w;w=19;break}c=Wa()|0;b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}}while(0);if((w|0)==19){l=a+8|0;b=k[l>>2]|0;b:do{if((b|0)>0){m=a+4596|0;n=ia(j,y)|0;o=n+1|0;p=a+4600|0;q=a+160|0;s=a+168|0;t=a+164|0;u=a+156|0;v=a+88|0;g=a+4592|0;if((j|0)>0)f=0;else{f=0;while(1){e=k[C>>2]|0;c=e+1|0;k[m>>2]=c;d=e+o|0;k[p>>2]=d;if(!(f&1))c=o;else{k[m>>2]=d;k[p>>2]=c;c=1}j=k[q>>2]|0;if((j|0)<=(f|0)?(f|0)<((k[s>>2]|0)+j|0):0){j=k[v>>2]|0;x=0;Ja(k[(k[j>>2]|0)+8>>2]|0,j|0,e+(c+((k[u>>2]|0)-n))|0,k[t>>2]|0,y|0);j=x;x=0;if(j&1)break;b=k[l>>2]|0}f=f+1|0;if((f|0)>=(b|0)){w=50;break b}}c=Wa()|0;break}c:while(1){c=k[C>>2]|0;b=c+1|0;k[m>>2]=b;c=c+o|0;k[p>>2]=c;if(f&1){k[m>>2]=c;k[p>>2]=b;b=c}e=k[z>>2]|0;c=b;d=0;do{k[g>>2]=k[e+(d<<2)>>2];w=k[h>>2]|0;i[c+w>>0]=i[c+(w+-1)>>0]|0;i[(k[p>>2]|0)+-1>>0]=i[k[m>>2]>>0]|0;x=0;ra(83,a|0,0);w=x;x=0;if(w&1){w=38;break c}e=k[z>>2]|0;k[e+(d<<2)>>2]=k[g>>2];c=(k[m>>2]|0)+y|0;k[m>>2]=c;b=k[p>>2]|0;k[p>>2]=b+y;d=d+1|0}while((d|0)<(j|0));w=k[q>>2]|0;if(((w|0)<=(f|0)?(f|0)<((k[s>>2]|0)+w|0):0)?(w=k[v>>2]|0,x=0,Ja(k[(k[w>>2]|0)+8>>2]|0,w|0,b+(y+((k[u>>2]|0)-n))|0,k[t>>2]|0,y|0),w=x,x=0,w&1):0){w=30;break}f=f+1|0;if((f|0)>=(k[l>>2]|0)){w=50;break b}}if((w|0)==30){c=Wa()|0;break}else if((w|0)==38){c=Wa()|0;break}}else w=50}while(0);do{if((w|0)==50){x=0;qa(183,a|0);a=x;x=0;if(a&1){c=Wa()|0;break}b=k[z>>2]|0;c=b;if(b){d=k[B>>2]|0;if((d|0)!=(b|0))k[B>>2]=d+(~((d+-4-c|0)>>>2)<<2);mj(b)}b=k[C>>2]|0;if(!b){r=A;return}if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);r=A;return}}while(0);b=k[z>>2]|0;d=b;if(b){e=k[B>>2]|0;if((e|0)!=(b|0))k[B>>2]=e+(~((e+-4-d|0)>>>2)<<2);mj(b)}}b=k[C>>2]|0;if(!b)fb(c|0);if((k[D>>2]|0)!=(b|0))k[D>>2]=b;mj(b);fb(c|0)}function ui(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;p=a+4596|0;c=k[p>>2]|0;t=a+172|0;b=k[t>>2]|0;if((b|0)<=0)return;q=a+4600|0;r=a+4604|0;s=a+4592|0;h=c;f=l[c+-1>>0]|0;c=l[c>>0]|0;o=0;while(1){m=k[q>>2]|0;g=i[m+(o+-1)>>0]|0;n=g&255;e=o+1|0;d=l[h+e>>0]|0;j=k[r>>2]|0;h=c-f|0;f=f-n|0;j=((((i[j+(d-c)>>0]|0)*9|0)+(i[j+h>>0]|0)|0)*9|0)+(i[j+f>>0]|0)|0;m=m+o|0;if(!j){b=wi(a,g,m,b-o|0)|0;c=b+o|0;if((c|0)!=(k[t>>2]|0)){n=xi(a,n,l[(k[p>>2]|0)+c>>0]|0)|0;i[(k[q>>2]|0)+c>>0]=n;n=k[s>>2]|0;k[s>>2]=(n|0)<1?0:n+-1|0;b=b+1|0}e=b+o|0;d=k[p>>2]|0;c=l[d+(e+-1)>>0]|0;d=l[d+e>>0]|0}else{b=c-n>>31;if((b^f|0)<0)b=c;else b=n+((b^h|0)<0?0:h)|0;n=vi(a,j,l[m>>0]|0,b,0)|0;i[(k[q>>2]|0)+o>>0]=n}b=k[t>>2]|0;if((b|0)<=(e|0))break;h=k[p>>2]|0;f=c;c=d;o=e}return}function vi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=b>>31;l=(r^b)-r|0;p=a+188+(l*12|0)+10|0;c=j[p>>1]|0;o=a+188+(l*12|0)|0;e=k[o>>2]|0;if((c|0)<(e|0))if((c<<1|0)<(e|0))if((c<<2|0)<(e|0))if((c<<3|0)<(e|0))if((c<<4|0)<(e|0)){b=5;while(1)if((c<>1]^r)-r+d|0;q=a+128|0;e=k[q>>2]|0;if((c&e|0)==(c|0))m=c;else m=e&~(c>>31);c=a+112|0;if((k[c>>2]|0)<8)qe(a);e=a+108|0;d=k[e>>2]|0;f=d>>>24;g=k[2832+(b<<11)+(f<<3)+4>>2]|0;if(!g){h=k[a+148>>2]|0;e=k[a+140>>2]|0;c=Tg(a)|0;if((c|0)<(h+-1-e|0)){if(b)c=(Ug(a,b)|0)+(c<>31^c>>1;if((((c|0)>-1?c:0-c|0)|0)>65535){c=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,c|0,5,35648);a=x;x=0;if(a&1){a=Wa()|0;Ua(c|0);fb(a|0)}else ub(c|0,824,96)}}else{k[c>>2]=(k[c>>2]|0)-g;k[e>>2]=d<>2]|0}h=a+136|0;d=k[h>>2]|0;if(!b){if(!d)e=(k[a+188+(l*12|0)+4>>2]<<1)+-1+(j[p>>1]|0)>>31;else e=0;g=e^c}else g=c;b=k[a+152>>2]|0;e=(k[o>>2]|0)+((g|0)>-1?g:0-g|0)|0;f=a+188+(l*12|0)+4|0;c=(k[f>>2]|0)+(ia(d<<1|1,g)|0)|0;d=j[p>>1]|0;if((d|0)==(b|0)){e=e>>1;c=c>>1;d=b>>1}k[o>>2]=e;b=d+1|0;j[p>>1]=b;e=b+c|0;if((e|0)>=1){if((c|0)>0){c=c-b|0;p=j[n>>1]|0;j[n>>1]=(p<<16>>16<127&1)+(p&65535);c=(c|0)>0?0:c}}else{c=j[n>>1]|0;j[n>>1]=(c&65535)-(c<<16>>16>-128&1);c=(e|0)>(~d|0)?e:0-d|0}k[f>>2]=c;b=k[h>>2]|0;d=b<<1|1;e=(ia(d,(g^r)-r|0)|0)+m|0;if((e|0)>=(0-b|0)){c=k[q>>2]|0;if((c+b|0)<(e|0))e=e-(ia(k[a+132>>2]|0,d)|0)|0}else{e=(ia(k[a+132>>2]|0,d)|0)+e|0;c=k[q>>2]|0}if((e&c|0)==(e|0)){a=e;a=a&255;return a|0}a=c&~(e>>31);a=a&255;return a|0}function wi(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,j=0,l=0,m=0,n=0,o=0;h=a+112|0;j=a+108|0;l=a+4592|0;e=k[h>>2]|0;f=0;while(1){if((e|0)<1){qe(a);e=k[h>>2]|0}g=k[j>>2]|0;e=e+-1|0;k[h>>2]=e;k[j>>2]=g<<1;if((g|0)>=0){m=8;break}g=k[l>>2]|0;n=1<>2];o=d-f|0;o=(n|0)<(o|0)?n:o;f=o+f|0;if((o|0)==(n|0))k[l>>2]=(g|0)>30?31:g+1|0;if((f|0)==(d|0)){e=d;break}}if((m|0)==8)if((f|0)!=(d|0)){e=k[l>>2]|0;if((e+-4|0)>>>0<28)e=Ug(a,k[36476+(e<<2)>>2]|0)|0;else e=0;e=e+f|0;if((e|0)>(d|0)){e=Va(16)|0;if((i[8]|0)==0?(Qa(8)|0)!=0:0){tb(72,35648,w|0)|0;Ya(8)}x=0;Fa(7,e|0,5,35648);o=x;x=0;if(o&1){o=Wa()|0;Ua(e|0);fb(o|0)}else ub(e|0,824,96)}}else e=d;if((e|0)<=0)return e|0;sw(c|0,b|0,e|0)|0;return e|0}function xi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b-c|0;g=a+128|0;d=a+136|0;if((((f|0)>-1?f:0-f|0)|0)>(k[d>>2]|0)){b=ia(yi(a,a+4568|0)|0,c-b>>31|1)|0;e=k[d>>2]|0;f=e<<1|1;b=(ia(b,f)|0)+c|0;if((b|0)>=(0-e|0)){d=k[g>>2]|0;if((d+e|0)<(b|0))b=b-(ia(k[a+132>>2]|0,f)|0)|0}else{b=(ia(k[a+132>>2]|0,f)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&255;return a|0}a=d&~(b>>31);a=a&255;return a|0}else{c=yi(a,a+4580|0)|0;f=k[d>>2]|0;e=f<<1|1;b=(ia(e,c)|0)+b|0;if((b|0)>=(0-f|0)){d=k[g>>2]|0;if((d+f|0)<(b|0))b=b-(ia(k[a+132>>2]|0,e)|0)|0}else{b=(ia(k[a+132>>2]|0,e)|0)+b|0;d=k[g>>2]|0}if((b&d|0)==(b|0)){a=b;a=a&255;return a|0}a=d&~(b>>31);a=a&255;return a|0}return 0}function yi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,m=0;m=b+9|0;c=l[m>>0]|0;f=b+4|0;e=(ia(c>>>1,k[f>>2]|0)|0)+(k[b>>2]|0)|0;if((c|0)<(e|0)){d=0;do{c=c<<1;d=d+1|0}while((c|0)<(e|0))}else d=0;g=k[a+148>>2]|0;h=k[36476+(k[a+4592>>2]<<2)>>2]|0;c=k[a+140>>2]|0;e=Tg(a)|0;do{if((e|0)<(g+-2-h-c|0))if(!d){d=k[f>>2]|0;a=d+e|0;c=a&1;a=(c+a|0)/2|0;j=8;break}else{h=(Ug(a,d)|0)+(e<>2]|0;e=h+d|0;g=e&1;c=g;f=1;e=(g+e|0)/2|0;break}else{e=(Ug(a,c)|0)+1|0;g=k[f>>2]|0;a=e+g|0;c=a&1;a=(c+a|0)/2|0;if(!d){d=g;j=8}else{h=e;f=1;e=a;d=g}}}while(0);if((j|0)==8){h=e;f=l[b+10>>0]<<1>>>0>=(l[m>>0]|0)>>>0;e=a}e=(c|0)!=0^f?e:0-e|0;if((e|0)<0){j=b+10|0;i[j>>0]=(l[j>>0]|0)+1}c=(h+1-d>>1)+(k[b>>2]|0)|0;k[b>>2]=c;d=i[m>>0]|0;if(d<<24>>24!=(i[b+8>>0]|0)){b=d;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}k[b>>2]=c>>1;j=(d&255)>>>1;i[m>>0]=j;b=b+10|0;i[b>>0]=(l[b>>0]|0)>>>1;b=j;b=b&255;b=b+1|0;b=b&255;i[m>>0]=b;return e|0}function zi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0;o=r;r=r+32|0;d=o;n=a+136|0;a:do{if(!(k[n>>2]|0)){c=k[a+128>>2]|0;b=a+144|0;if((((c|0)==((1<>2])+-1|0)?(Oi(d,c,0),(k[d+4>>2]|0)==(k[a+176>>2]|0)):0)?(k[d+8>>2]|0)==(k[a+180>>2]|0):0)?(k[d+12>>2]|0)==(k[a+184>>2]|0):0)switch(k[b>>2]|0){case 8:{n=k[8900]|0;k[a+4604>>2]=n+(((k[8901]|0)-n|0)>>>1);r=o;return}case 10:{n=k[8903]|0;k[a+4604>>2]=n+(((k[8904]|0)-n|0)>>>1);r=o;return}case 12:{n=k[8906]|0;k[a+4604>>2]=n+(((k[8907]|0)-n|0)>>>1);r=o;return}case 16:{n=k[8909]|0;k[a+4604>>2]=n+(((k[8910]|0)-n|0)>>>1);r=o;return}default:break a}}else b=a+144|0}while(0);m=1<>2];c=a+4608|0;d=m<<1;e=a+4612|0;f=k[e>>2]|0;b=k[c>>2]|0;g=f-b|0;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+d|0,(f|0)!=(h|0)):0)k[e>>2]=h}else{se(c,d-g|0);b=k[c>>2]|0}l=a+4604|0;k[l>>2]=b+m;b=0-m|0;if((m|0)<=(b|0)){r=o;return}h=a+184|0;j=a+180|0;g=a+176|0;f=b;do{b=k[h>>2]|0;if((f|0)>(0-b|0)){c=k[j>>2]|0;if((f|0)>(0-c|0)){d=k[g>>2]|0;if((f|0)>(0-d|0)){e=k[n>>2]|0;if((f|0)>=(0-e|0))if((e|0)<(f|0))if((d|0)<=(f|0))if((c|0)>(f|0))b=2;else b=(b|0)>(f|0)?3:4;else b=1;else b=0;else b=-1}else b=-2}else b=-3}else b=-4;i[(k[l>>2]|0)+f>>0]=b;f=f+1|0}while((f|0)!=(m|0));r=o;return}function Ai(a){a=a|0;mj(a);return}function Bi(a){a=a|0;return 50767}function Ci(a,b,c){a=a|0;b=b|0;c=c|0;Qm(a,50754,12);return}function Di(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,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0;q=r;r=r+16|0;s=q;k[s>>2]=0;t=s+4|0;k[t>>2]=0;k[s+8>>2]=0;o=s+8|0;x=0;e=ta(67,1)|0;n=x;x=0;a:do{if((!(n&1)?(n=e+1|0,i[e>>0]=c,k[s>>2]=e,k[t>>2]=n,k[o>>2]=n,x=0,ra(84,s|0,b&65535|0),n=x,x=0,!(n&1)):0)?(x=0,ra(84,s|0,a&65535|0),n=x,x=0,!(n&1)):0){l=d&255;e=k[t>>2]|0;c=k[o>>2]|0;if(e>>>0>=c>>>0){b=k[s>>2]|0;a=b;g=e-a+1|0;if((g|0)<0){x=0;qa(178,s|0);n=x;x=0;if(n&1){p=52;break}a=k[s>>2]|0;c=k[o>>2]|0;b=a}j=b;e=c-j|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;c=k[t>>2]|0;h=c-j|0;if(!e){e=0;g=0}else p=12}else{h=k[t>>2]|0;e=2147483647;c=h;h=h-j|0;p=12}if((p|0)==12){x=0;g=ta(67,e|0)|0;n=x;x=0;if(n&1){p=52;break}}i[g+h>>0]=l;m=c-j|0;n=g+(h-m)|0;vw(n|0,b|0,m|0)|0;k[s>>2]=n;k[t>>2]=g+(h+1);k[o>>2]=g+e;if(a)mj(a)}else{i[e>>0]=l;k[t>>2]=(k[t>>2]|0)+1}b:do{if((d|0)>0){n=0;while(1){n=n+1|0;m=n&255;e=k[t>>2]|0;b=k[o>>2]|0;if(e>>>0>=b>>>0){a=k[s>>2]|0;c=a;g=e-c+1|0;if((g|0)<0){x=0;qa(178,s|0);l=x;x=0;if(l&1)break;a=k[s>>2]|0;c=a;b=k[o>>2]|0}l=a;e=b-l|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;b=k[t>>2]|0;h=b-l|0;if(!e){j=0;g=0}else p=25}else{h=k[t>>2]|0;e=2147483647;b=h;h=h-l|0;p=25}if((p|0)==25){p=0;x=0;g=ta(67,e|0)|0;j=x;x=0;if(j&1)break;else j=e}i[g+h>>0]=m;e=g+(h+1)|0;l=b-l|0;m=g+(h-l)|0;vw(m|0,a|0,l|0)|0;k[s>>2]=m;k[t>>2]=e;k[o>>2]=g+j;if(c){mj(c);e=k[t>>2]|0}}else{i[e>>0]=m;e=(k[t>>2]|0)+1|0;k[t>>2]=e}c=k[o>>2]|0;if(e>>>0>=c>>>0){b=k[s>>2]|0;a=b;g=e-a+1|0;if((g|0)<0){x=0;qa(178,s|0);m=x;x=0;if(m&1)break;a=k[s>>2]|0;c=k[o>>2]|0;b=a}l=b;e=c-l|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;g=k[t>>2]|0;h=g-l|0;if(!e){j=0;c=0}else p=36}else{h=k[t>>2]|0;e=2147483647;g=h;h=h-l|0;p=36}if((p|0)==36){p=0;x=0;c=ta(67,e|0)|0;m=x;x=0;if(m&1)break;else j=e}i[c+h>>0]=17;e=c+(h+1)|0;l=g-l|0;m=c+(h-l)|0;vw(m|0,b|0,l|0)|0;k[s>>2]=m;k[t>>2]=e;k[o>>2]=c+j;if(a){mj(a);e=k[t>>2]|0}}else{i[e>>0]=17;e=(k[t>>2]|0)+1|0;k[t>>2]=e}c=k[o>>2]|0;if(e>>>0>=c>>>0){b=k[s>>2]|0;a=b;g=e-a+1|0;if((g|0)<0){x=0;qa(178,s|0);m=x;x=0;if(m&1)break;a=k[s>>2]|0;c=k[o>>2]|0;b=a}j=b;e=c-j|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;c=k[t>>2]|0;h=c-j|0;if(!e){e=0;g=0}else p=48}else{h=k[t>>2]|0;e=2147483647;c=h;h=h-j|0;p=48}if((p|0)==48){p=0;x=0;g=ta(67,e|0)|0;m=x;x=0;if(m&1)break}i[g+h>>0]=0;l=c-j|0;m=g+(h-l)|0;vw(m|0,b|0,l|0)|0;k[s>>2]=m;k[t>>2]=g+(h+1);k[o>>2]=g+e;if(a)mj(a)}else{i[e>>0]=0;k[t>>2]=(k[t>>2]|0)+1}if((n|0)>=(d|0))break b}f=Wa()|0;break a}}while(0);x=0;h=ta(67,20)|0;d=x;x=0;if(!(d&1)){k[h>>2]=36800;i[h+4>>0]=-9;a=h+8|0;k[a>>2]=0;g=h+12|0;k[g>>2]=0;c=h+16|0;k[c>>2]=0;e=k[t>>2]|0;d=k[s>>2]|0;b=e-d|0;do{if((e|0)!=(d|0)){if(!((b|0)<0?(x=0,qa(178,a|0),d=x,x=0,d&1):0))p=62;if((p|0)==62?(x=0,f=ta(67,b|0)|0,d=x,x=0,!(d&1)):0){k[g>>2]=f;k[a>>2]=f;k[c>>2]=f+b;e=k[s>>2]|0;c=k[t>>2]|0;if((e|0)==(c|0))break;do{i[f>>0]=i[e>>0]|0;f=(k[g>>2]|0)+1|0;k[g>>2]=f;e=e+1|0}while((e|0)!=(c|0));e=k[s>>2]|0;break}f=Wa()|0;e=k[a>>2]|0;if(e){if((k[g>>2]|0)!=(e|0))k[g>>2]=e;mj(e)}mj(h);break a}}while(0);if(!e){r=q;return h|0}if((k[t>>2]|0)!=(e|0))k[t>>2]=e;mj(e);r=q;return h|0}else p=52}else p=52}while(0);if((p|0)==52)f=Wa()|0;e=k[s>>2]|0;if(!e)fb(f|0);if((k[t>>2]|0)!=(e|0))k[t>>2]=e;mj(e);fb(f|0);return 0}function Ei(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,y=0;t=r;r=r+32|0;p=t+28|0;v=t+16|0;s=t+4|0;q=t;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;n=lj(5)|0;k[v>>2]=n;o=v+8|0;k[o>>2]=n+5;i[n>>0]=74;i[n+1>>0]=70;i[n+2>>0]=73;i[n+3>>0]=70;i[n+4>>0]=0;k[w>>2]=n+5;x=0;ra(84,v|0,k[a>>2]&65535|0);n=x;x=0;a:do{if(!(n&1)){l=k[a+4>>2]&255;b=k[w>>2]|0;d=k[o>>2]|0;if(b>>>0>=d>>>0){e=k[v>>2]|0;f=e;g=b-f+1|0;if((g|0)<0){x=0;qa(178,v|0);n=x;x=0;if(n&1){u=43;break}f=k[v>>2]|0;d=k[o>>2]|0;e=f}j=e;b=d-j|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?g:b;d=k[w>>2]|0;h=d-j|0;if(!b){b=0;g=0}else u=10}else{h=k[w>>2]|0;b=2147483647;d=h;h=h-j|0;u=10}if((u|0)==10){x=0;g=ta(67,b|0)|0;n=x;x=0;if(n&1){u=43;break}}i[g+h>>0]=l;m=d-j|0;n=g+(h-m)|0;vw(n|0,e|0,m|0)|0;k[v>>2]=n;k[w>>2]=g+(h+1);k[o>>2]=g+b;if(f)mj(f)}else{i[b>>0]=l;k[w>>2]=(k[w>>2]|0)+1}x=0;ra(84,v|0,k[a+8>>2]&65535|0);n=x;x=0;if(!(n&1)?(x=0,ra(84,v|0,k[a+12>>2]&65535|0),n=x,x=0,!(n&1)):0){n=a+16|0;m=k[n>>2]&255;b=k[w>>2]|0;e=k[o>>2]|0;if(b>>>0>=e>>>0){f=k[v>>2]|0;d=f;g=b-d+1|0;if((g|0)<0){x=0;qa(178,v|0);l=x;x=0;if(l&1){u=43;break}f=k[v>>2]|0;d=f;e=k[o>>2]|0}l=f;b=e-l|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?g:b;g=k[w>>2]|0;h=g-l|0;if(!b){j=0;e=0}else u=23}else{h=k[w>>2]|0;b=2147483647;g=h;h=h-l|0;u=23}if((u|0)==23){x=0;e=ta(67,b|0)|0;j=x;x=0;if(j&1){u=43;break}else j=b}i[e+h>>0]=m;b=e+(h+1)|0;l=g-l|0;m=e+(h-l)|0;vw(m|0,f|0,l|0)|0;k[v>>2]=m;k[w>>2]=b;k[o>>2]=e+j;if(d){mj(d);b=k[w>>2]|0}}else{i[b>>0]=m;b=(k[w>>2]|0)+1|0;k[w>>2]=b}m=a+20|0;l=k[m>>2]&255;d=k[o>>2]|0;if(b>>>0>=d>>>0){e=k[v>>2]|0;f=e;g=b-f+1|0;if((g|0)<0){x=0;qa(178,v|0);j=x;x=0;if(j&1){u=43;break}f=k[v>>2]|0;d=k[o>>2]|0;e=f}j=e;b=d-j|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?g:b;d=k[w>>2]|0;h=d-j|0;if(!b){b=0;g=0}else u=34}else{h=k[w>>2]|0;b=2147483647;d=h;h=h-j|0;u=34}if((u|0)==34){x=0;g=ta(67,b|0)|0;y=x;x=0;if(y&1){u=43;break}}i[g+h>>0]=l;l=d-j|0;y=g+(h-l)|0;vw(y|0,e|0,l|0)|0;k[v>>2]=y;k[w>>2]=g+(h+1);k[o>>2]=g+b;if(f)mj(f)}else{i[b>>0]=l;k[w>>2]=(k[w>>2]|0)+1}b=k[n>>2]|0;do{if((b|0)>0){if(!(k[a+24>>2]|0)){k[q>>2]=k[w>>2];y=0+(ia(b*3|0,k[m>>2]|0)|0)|0;x=0;k[p>>2]=k[q>>2];Ea(15,v|0,p|0,0,y|0)|0;y=x;x=0;if(y&1){u=43;break a}else break}d=Va(16)|0;x=0;Fa(5,s|0,50792,57);y=x;x=0;if(!(y&1)){x=0;b=Da(1)|0;y=x;x=0;if(!(y&1)?(x=0,Ja(36,d|0,1,b|0,s|0),y=x,x=0,!(y&1)):0){x=0;Fa(6,d|0,824,96);x=0;c=0}else c=1;b=Wa()|0;Sm(s);if(!c){c=b;break a}}else b=Wa()|0;Ua(d|0);c=b;break a}}while(0);x=0;h=ta(67,20)|0;y=x;x=0;if(!(y&1)){k[h>>2]=36800;i[h+4>>0]=-32;f=h+8|0;k[f>>2]=0;g=h+12|0;k[g>>2]=0;d=h+16|0;k[d>>2]=0;b=k[w>>2]|0;y=k[v>>2]|0;e=b-y|0;do{if((b|0)!=(y|0)){if(!((e|0)<0?(x=0,qa(178,f|0),y=x,x=0,y&1):0))u=53;if((u|0)==53?(x=0,c=ta(67,e|0)|0,y=x,x=0,!(y&1)):0){k[g>>2]=c;k[f>>2]=c;k[d>>2]=c+e;b=k[v>>2]|0;d=k[w>>2]|0;if((b|0)==(d|0))break;do{i[c>>0]=i[b>>0]|0;c=(k[g>>2]|0)+1|0;k[g>>2]=c;b=b+1|0}while((b|0)!=(d|0));b=k[v>>2]|0;break}b=Wa()|0;c=k[f>>2]|0;if(c){if((k[g>>2]|0)!=(c|0))k[g>>2]=c;mj(c)}mj(h);u=44;break a}}while(0);if(!b){r=t;return h|0}if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);r=t;return h|0}else u=43}else u=43}else u=43}while(0);if((u|0)==43){b=Wa()|0;u=44}if((u|0)==44)c=b;b=k[v>>2]|0;if(!b)fb(c|0);if((k[w>>2]|0)!=(b|0))k[w>>2]=b;mj(b);fb(c|0);return 0}function Fi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0;h=r;r=r+16|0;l=h;k[l>>2]=0;m=l+4|0;k[m>>2]=0;k[l+8>>2]=0;x=0;b=ta(67,1)|0;g=x;x=0;a:do{if((((((!(g&1)?(g=b+1|0,i[b>>0]=1,k[l>>2]=b,k[m>>2]=g,k[l+8>>2]=g,x=0,ra(84,l|0,k[a>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+4>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+8>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+12>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,ra(84,l|0,k[a+16>>2]&65535|0),g=x,x=0,!(g&1)):0)?(x=0,j=ta(67,20)|0,g=x,x=0,!(g&1)):0){k[j>>2]=36800;i[j+4>>0]=-8;e=j+8|0;k[e>>2]=0;g=j+12|0;k[g>>2]=0;a=j+16|0;k[a>>2]=0;b=k[m>>2]|0;n=k[l>>2]|0;d=b-n|0;do{if((b|0)!=(n|0)){if(!((d|0)<0?(x=0,qa(178,e|0),n=x,x=0,n&1):0))f=11;if((f|0)==11?(x=0,c=ta(67,d|0)|0,n=x,x=0,!(n&1)):0){k[g>>2]=c;k[e>>2]=c;k[a>>2]=c+d;b=k[l>>2]|0;a=k[m>>2]|0;if((b|0)==(a|0))break;do{i[c>>0]=i[b>>0]|0;c=(k[g>>2]|0)+1|0;k[g>>2]=c;b=b+1|0}while((b|0)!=(a|0));b=k[l>>2]|0;break}c=Wa()|0;b=k[e>>2]|0;if(b){if((k[g>>2]|0)!=(b|0))k[g>>2]=b;mj(b)}mj(j);break a}}while(0);if(!b){r=h;return j|0}if((k[m>>2]|0)!=(b|0))k[m>>2]=b;mj(b);r=h;return j|0}else f=25}while(0);if((f|0)==25)c=Wa()|0;b=k[l>>2]|0;if(!b)fb(c|0);if((k[m>>2]|0)!=(b|0))k[m>>2]=b;mj(b);fb(c|0);return 0}function Gi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=lj(5)|0;i[f>>0]=109;i[f+1>>0]=114;i[f+2>>0]=102;i[f+3>>0]=120;i[f+4>>0]=a;x=0;e=ta(67,20)|0;d=x;x=0;if(d&1){e=Wa()|0;mj(f);fb(e|0)}k[e>>2]=36800;i[e+4>>0]=-24;a=e+8|0;k[a>>2]=0;b=e+12|0;k[b>>2]=0;c=e+16|0;k[c>>2]=0;x=0;d=ta(67,5)|0;g=x;x=0;if(!(g&1)){k[b>>2]=d;k[a>>2]=d;k[c>>2]=d+5;i[d>>0]=109;g=(k[b>>2]|0)+1|0;k[b>>2]=g;d=f+1|0;i[g>>0]=i[d>>0]|0;g=(k[b>>2]|0)+1|0;k[b>>2]=g;d=d+1|0;i[g>>0]=i[d>>0]|0;g=(k[b>>2]|0)+1|0;k[b>>2]=g;d=d+1|0;i[g>>0]=i[d>>0]|0;g=(k[b>>2]|0)+1|0;k[b>>2]=g;i[g>>0]=i[d+1>>0]|0;k[b>>2]=(k[b>>2]|0)+1;mj(f);return e|0}g=Wa()|0;mj(e);mj(f);fb(g|0);return 0}function Hi(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,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+16|0;v=u;k[v>>2]=0;w=v+4|0;k[w>>2]=0;k[v+8>>2]=0;s=v+8|0;x=0;e=ta(67,1)|0;q=x;x=0;a:do{if(!(q&1)){h=e+1|0;q=h;i[e>>0]=b;k[v>>2]=e;k[w>>2]=q;k[s>>2]=q;if((b|0)>0){g=h;q=0;do{p=q+a&255;if(g>>>0>=h>>>0){e=k[v>>2]|0;j=e;g=g-j+1|0;if((g|0)<0){x=0;qa(178,v|0);o=x;x=0;if(o&1){t=28;break}j=k[v>>2]|0;h=k[s>>2]|0;o=j}else o=e;n=o;e=h-n|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;h=k[w>>2]|0;l=h-n|0;if(!e){m=0;g=0}else t=13}else{l=k[w>>2]|0;e=2147483647;h=l;l=l-n|0;t=13}if((t|0)==13){t=0;x=0;g=ta(67,e|0)|0;m=x;x=0;if(m&1){t=28;break}else m=e}i[g+l>>0]=p;e=g+(l+1)|0;n=h-n|0;p=g+(l-n)|0;vw(p|0,o|0,n|0)|0;k[v>>2]=p;k[w>>2]=e;k[s>>2]=g+m;if(j){mj(j);e=k[w>>2]|0}}else{i[g>>0]=p;e=(k[w>>2]|0)+1|0;k[w>>2]=e}h=k[s>>2]|0;if(e>>>0>=h>>>0){j=k[v>>2]|0;g=j;l=e-g+1|0;if((l|0)<0){x=0;qa(178,v|0);p=x;x=0;if(p&1){t=28;break}j=k[v>>2]|0;g=j;h=k[s>>2]|0}n=j;e=h-n|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?l:e;l=k[w>>2]|0;h=l-n|0;if(!e){e=0;m=0}else t=24}else{h=k[w>>2]|0;e=2147483647;l=h;h=h-n|0;t=24}if((t|0)==24){t=0;x=0;m=ta(67,e|0)|0;p=x;x=0;if(p&1){t=28;break}}i[m+h>>0]=0;o=l-n|0;p=m+(h-o)|0;vw(p|0,j|0,o|0)|0;k[v>>2]=p;k[w>>2]=m+(h+1);k[s>>2]=m+e;if(g)mj(g)}else{i[e>>0]=0;k[w>>2]=(k[w>>2]|0)+1}q=q+1|0;g=k[w>>2]|0;h=k[s>>2]|0}while((q|0)<(b|0));if((t|0)==28){f=Wa()|0;break}e=c&255;if(g>>>0>>0){i[g>>0]=e;g=(k[w>>2]|0)+1|0;k[w>>2]=g}else t=37}else{g=h;e=c&255;t=37}if((t|0)==37){j=k[v>>2]|0;l=j;m=g-l+1|0;if((m|0)<0){x=0;qa(178,v|0);c=x;x=0;if(c&1){t=29;break}l=k[v>>2]|0;h=k[s>>2]|0;j=l}p=j;g=h-p|0;if(g>>>0<1073741823){g=g<<1;g=g>>>0>>0?m:g;m=k[w>>2]|0;n=m-p|0;if(!g){o=0;h=0}else t=43}else{n=k[w>>2]|0;g=2147483647;m=n;n=n-p|0;t=43}if((t|0)==43){x=0;h=ta(67,g|0)|0;c=x;x=0;if(c&1){t=29;break}else o=g}i[h+n>>0]=e;g=h+(n+1)|0;a=m-p|0;c=h+(n-a)|0;vw(c|0,j|0,a|0)|0;k[v>>2]=c;k[w>>2]=g;k[s>>2]=h+o;if(l){mj(l);g=k[w>>2]|0}}p=d&255;e=k[s>>2]|0;if(g>>>0>=e>>>0){h=k[v>>2]|0;j=h;g=g-j+1|0;if((g|0)<0){x=0;qa(178,v|0);d=x;x=0;if(d&1){t=29;break}j=k[v>>2]|0;e=k[s>>2]|0;h=j}o=h;e=e-o|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?g:e;l=k[w>>2]|0;m=l-o|0;if(!e){n=0;g=0}else t=54}else{m=k[w>>2]|0;e=2147483647;l=m;m=m-o|0;t=54}if((t|0)==54){x=0;g=ta(67,e|0)|0;d=x;x=0;if(d&1){t=29;break}else n=e}i[g+m>>0]=p;e=g+(m+1)|0;c=l-o|0;d=g+(m-c)|0;vw(d|0,h|0,c|0)|0;k[v>>2]=d;k[w>>2]=e;k[s>>2]=g+n;if(j){mj(j);e=k[w>>2]|0}}else{i[g>>0]=p;e=(k[w>>2]|0)+1|0;k[w>>2]=e}g=k[s>>2]|0;if(e>>>0>=g>>>0){h=k[v>>2]|0;j=h;l=e-j+1|0;if((l|0)<0){x=0;qa(178,v|0);d=x;x=0;if(d&1){t=29;break}j=k[v>>2]|0;g=k[s>>2]|0;h=j}n=h;e=g-n|0;if(e>>>0<1073741823){e=e<<1;e=e>>>0>>0?l:e;g=k[w>>2]|0;m=g-n|0;if(!e){e=0;l=0}else t=65}else{m=k[w>>2]|0;e=2147483647;g=m;m=m-n|0;t=65}if((t|0)==65){x=0;l=ta(67,e|0)|0;d=x;x=0;if(d&1){t=29;break}}i[l+m>>0]=0;c=g-n|0;d=l+(m-c)|0;vw(d|0,h|0,c|0)|0;k[v>>2]=d;k[w>>2]=l+(m+1);k[s>>2]=l+e;if(j)mj(j)}else{i[e>>0]=0;k[w>>2]=(k[w>>2]|0)+1}x=0;m=ta(67,20)|0;s=x;x=0;if(!(s&1)){k[m>>2]=36800;i[m+4>>0]=-38;j=m+8|0;k[j>>2]=0;l=m+12|0;k[l>>2]=0;g=m+16|0;k[g>>2]=0;e=k[w>>2]|0;s=k[v>>2]|0;h=e-s|0;do{if((e|0)!=(s|0)){if(!((h|0)<0?(x=0,qa(178,j|0),s=x,x=0,s&1):0))t=72;if((t|0)==72?(x=0,f=ta(67,h|0)|0,s=x,x=0,!(s&1)):0){k[l>>2]=f;k[j>>2]=f;k[g>>2]=f+h;e=k[v>>2]|0;g=k[w>>2]|0;if((e|0)==(g|0))break;do{i[f>>0]=i[e>>0]|0;f=(k[l>>2]|0)+1|0;k[l>>2]=f;e=e+1|0}while((e|0)!=(g|0));e=k[v>>2]|0;break}f=Wa()|0;e=k[j>>2]|0;if(e){if((k[l>>2]|0)!=(e|0))k[l>>2]=e;mj(e)}mj(m);break a}}while(0);if(!e){r=u;return m|0}if((k[w>>2]|0)!=(e|0))k[w>>2]=e;mj(e);r=u;return m|0}else t=29}else t=29}while(0);if((t|0)==29)f=Wa()|0;e=k[v>>2]|0;if(!e)fb(f|0);if((k[w>>2]|0)!=(e|0))k[w>>2]=e;mj(e);fb(f|0);return 0}function Ii(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;n=(b&65535)>>>8&255;o=a+4|0;c=k[o>>2]|0;p=a+8|0;d=k[p>>2]|0;if(c>>>0>=d>>>0){e=k[a>>2]|0;f=e;g=c-f+1|0;if((g|0)<0){jj(a);f=k[a>>2]|0;d=k[p>>2]|0;e=f}m=e;c=d-m|0;if(c>>>0<1073741823){c=c<<1;c=c>>>0>>0?g:c;g=k[o>>2]|0;d=g-m|0;if(!c){l=0;j=0;h=d;c=g}else q=8}else{d=k[o>>2]|0;c=2147483647;g=d;d=d-m|0;q=8}if((q|0)==8){l=c;j=lj(c)|0;h=d;c=g}i[j+h>>0]=n;d=j+(h+1)|0;m=c-m|0;n=j+(h-m)|0;vw(n|0,e|0,m|0)|0;k[a>>2]=n;k[o>>2]=d;k[p>>2]=j+l;if(f){mj(f);d=k[o>>2]|0}}else{i[c>>0]=n;d=(k[o>>2]|0)+1|0;k[o>>2]=d}m=b&255;c=k[p>>2]|0;if(d>>>0>>0){i[d>>0]=m;k[o>>2]=(k[o>>2]|0)+1;return}e=k[a>>2]|0;f=e;d=d-f+1|0;if((d|0)<0){jj(a);f=k[a>>2]|0;c=k[p>>2]|0;e=f}l=e;c=c-l|0;if(c>>>0<1073741823){c=c<<1;c=c>>>0>>0?d:c;g=k[o>>2]|0;d=g-l|0;if(!c){j=0;h=0;c=g}else q=18}else{d=k[o>>2]|0;c=2147483647;g=d;d=d-l|0;q=18}if((q|0)==18){j=c;h=lj(c)|0;c=g}i[h+d>>0]=m;b=c-l|0;q=h+(d-b)|0;vw(q|0,e|0,b|0)|0;k[a>>2]=q;k[o>>2]=h+(d+1);k[p>>2]=h+j;if(!f)return;mj(f);return}function Ji(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,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=k[a>>2]|0;q=k[b>>2]|0;p=q;j=e;n=c;l=d-n|0;if((l|0)<=0){r=q;return r|0}o=a+8|0;b=k[o>>2]|0;r=a+4|0;m=k[r>>2]|0;f=m;if((l|0)<=(b-f|0)){h=f-p|0;if((l|0)>(h|0)){g=c+h|0;if((g|0)==(d|0))b=m;else{f=g;b=m;do{i[b>>0]=i[f>>0]|0;b=(k[r>>2]|0)+1|0;k[r>>2]=b;f=f+1|0}while((f|0)!=(d|0))}if((h|0)>0)h=b;else{r=q;return r|0}}else{h=m;g=d}e=h-(e+(l-j+p))|0;b=q+e|0;if(b>>>0>>0){f=h;do{i[f>>0]=i[b>>0]|0;b=b+1|0;f=(k[r>>2]|0)+1|0;k[r>>2]=f}while((b|0)!=(m|0))}xw(h+(0-e)|0,q|0,e|0)|0;xw(q|0,c|0,g-n|0)|0;r=q;return r|0}f=f-j+l|0;if((f|0)<0){jj(a);b=k[o>>2]|0;e=k[a>>2]|0}g=e;b=b-g|0;if(b>>>0<1073741823){b=b<<1;b=b>>>0>>0?f:b;f=p-g|0;if(!b){g=0;l=0}else h=15}else{b=2147483647;f=p-g|0;h=15}if((h|0)==15){g=b;l=lj(b)|0}j=l+f|0;b=j;h=l+g|0;if((c|0)!=(d|0)){e=c;g=j;do{i[g>>0]=i[e>>0]|0;g=b+1|0;b=g;e=e+1|0}while((e|0)!=(d|0));e=k[a>>2]|0}c=p-e|0;d=l+(f-c)|0;vw(d|0,e|0,c|0)|0;p=(k[r>>2]|0)-p|0;c=b;vw(c|0,q|0,p|0)|0;b=k[a>>2]|0;k[a>>2]=d;k[r>>2]=c+p;k[o>>2]=h;if(!b){r=j;return r|0}mj(b);r=j;return r|0}function Ki(a){a=a|0;var b=0;k[a>>2]=36800;b=k[a+8>>2]|0;if(!b)return;a=a+12|0;if((k[a>>2]|0)!=(b|0))k[a>>2]=b;mj(b);return}function Li(a){a=a|0;var b=0,c=0;k[a>>2]=36800;b=k[a+8>>2]|0;if(!b){mj(a);return}c=a+12|0;if((k[c>>2]|0)!=(b|0))k[c>>2]=b;mj(b);mj(a);return}function Mi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;Ni(b,-1);Ni(b,i[a+4>>0]|0);e=a+12|0;d=a+8|0;a=(k[e>>2]|0)-(k[d>>2]|0)+2|0;Ni(b,(a&65535)>>>8&255);Ni(b,a&255);a=k[d>>2]|0;if((k[e>>2]|0)==(a|0))return;else c=0;do{Ni(b,i[a+c>>0]|0);c=c+1|0;a=k[d>>2]|0}while(c>>>0<((k[e>>2]|0)-a|0)>>>0);return}function Ni(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;e=k[a+4>>2]|0;if(e){c=e+24|0;d=k[c>>2]|0;if((d|0)==(k[e+28>>2]|0)){Vb[k[(k[e>>2]|0)+52>>2]&63](e,b&255)|0;return}else{k[c>>2]=d+1;i[d>>0]=b;return}}c=a+16|0;d=k[c>>2]|0;if(d>>>0<(k[a+12>>2]|0)>>>0){k[c>>2]=d+1;i[(k[a+8>>2]|0)+d>>0]=b;return}c=Va(16)|0;x=0;d=Da(1)|0;b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}x=0;Fa(7,c|0,4,d|0);b=x;x=0;if(b&1){b=Wa()|0;Ua(c|0);fb(b|0)}else ub(c|0,824,96)}function Oi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;e=(b|0)<4095?(b+128|0)/256|0:16;f=(c*3|0)+2+e|0;d=c+1|0;f=(f|0)<(d|0)|(f|0)>(b|0)?d:f;k[a+4>>2]=f;d=(e<<2|3)+(c*5|0)|0;d=(d|0)>(b|0)|(d|0)<(f|0)?f:d;k[a+8>>2]=d;c=(c*7|0)+4+(e*17|0)|0;k[a+12>>2]=(c|0)>(b|0)|(c|0)<(d|0)?d:c;k[a>>2]=b;k[a+16>>2]=64;return}function Pi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;l=r;r=r+128|0;h=l+100|0;d=l+16|0;c=l+112|0;j=l+4|0;m=l;e=d;f=a+20|0;g=e+84|0;do{k[e>>2]=k[f>>2];e=e+4|0;f=f+4|0}while((e|0)<(g|0));k[d+16>>2]=k[a+4>>2];f=zc(c,d,a+56|0)|0;c=k[(k[f>>2]|0)+16>>2]|0;a=a+8|0;x=0;k[h>>2]=k[a>>2];k[h+4>>2]=k[a+4>>2];k[h+8>>2]=k[a+8>>2];c=Aa(c|0,f|0,h|0)|0;a=x;x=0;do{if(a&1)c=Wa()|0;else{e=b+4|0;k[j>>2]=k[e>>2];k[j+4>>2]=k[e+4>>2];k[j+8>>2]=k[e+8>>2];e=b+16|0;a=k[e>>2]|0;h=j+8|0;k[h>>2]=(k[h>>2]|0)-a;h=j+4|0;k[h>>2]=(k[h>>2]|0)+a;h=k[(k[f>>2]|0)+12>>2]|0;k[m>>2]=c;x=0;c=Ea(h|0,f|0,m|0,j|0,((i[b>>0]|0)==0?0:(k[b+8>>2]|0)+a|0)|0)|0;j=x;x=0;if(j&1){c=Wa()|0;d=k[m>>2]|0;k[m>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}d=k[m>>2]|0;k[m>>2]=0;if(d)Lb[k[(k[d>>2]|0)+4>>2]&255](d);if(!(k[b+4>>2]|0))k[e>>2]=(k[e>>2]|0)+c;if(!f){r=l;return}Lb[k[(k[f>>2]|0)+4>>2]&255](f);r=l;return}}while(0);if(!f)fb(c|0);Lb[k[(k[f>>2]|0)+4>>2]&255](f);fb(c|0)}function Qi(a,b){a=a|0;b=b|0;k[a>>2]=k[b>>2];k[a+4>>2]=k[b+4>>2];k[a+8>>2]=k[b+8>>2];i[a+12>>0]=0;b=a+16|0;a=b+100|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function Ri(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0,w=0;u=r;r=r+32|0;t=u+4|0;o=u+16|0;v=u;Si(a);p=a+16|0;e=k[a+24>>2]|0;a:do{if((e+-2|0)>>>0<=14){q=a+40|0;c=k[q>>2]|0;if(c>>>0>2)c=5;else{s=a+32|0;f=k[s>>2]|0;switch(f|0){case 0:{c=1;break a}case 4:{if((c|0)==2){c=2;break a}break}case 3:break;default:if(c){c=2;break a}}n=a+100|0;c=a+108|0;d=k[c>>2]|0;if((d|0)<1){d=k[p>>2]|0;k[c>>2]=d;c=k[a+20>>2]|0;k[a+112>>2]=c}else c=k[a+112>>2]|0;j=Dw(c|0,((c|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;h=(e+7|0)/8|0;h=Dw(j|0,M|0,h|0,((h|0)<0)<<31>>31|0)|0;j=b+4|0;c=k[j>>2]|0;g=b+8|0;if((c|0)!=0?(l=k[g>>2]|0,m=Dw(f|0,((f|0)<0)<<31>>31|0,h|0,M|0)|0,e=M,0<(e|0)|0==(e|0)&l>>>0>>0):0){c=Va(16)|0;x=0;d=Da(1)|0;v=x;x=0;if(!(v&1)?(x=0,Fa(7,c|0,3,d|0),v=x,x=0,!(v&1)):0)ub(c|0,824,96);v=Wa()|0;Ua(c|0);fb(v|0)}l=a+52|0;m=a+12|0;if((f|0)>0)f=0;else{r=u;return}while(1){Ti(a,(f|0)==0);d=xc(o,p,l)|0;e=k[(k[d>>2]|0)+8>>2]|0;x=0;k[t>>2]=k[b>>2];k[t+4>>2]=k[b+4>>2];k[t+8>>2]=k[b+8>>2];e=Aa(e|0,d|0,t|0)|0;w=x;x=0;if(w&1){e=32;break}w=k[(k[d>>2]|0)+16>>2]|0;k[v>>2]=e;x=0;oa(w|0,d|0,v|0,n|0,a|0,(i[m>>0]|0)!=0|0);w=x;x=0;if(w&1){e=30;break}e=k[v>>2]|0;k[v>>2]=0;if(e)Lb[k[(k[e>>2]|0)+4>>2]&255](e);if(!c)c=0;else{c=c+h|0;k[j>>2]=c;k[g>>2]=(k[g>>2]|0)-h}e=(k[q>>2]|0)==0;f=(e&1)+f|0;if(d)Lb[k[(k[d>>2]|0)+4>>2]&255](d);if(!e){e=34;break}if((f|0)>=(k[s>>2]|0)){e=34;break}}if((e|0)==30){c=Wa()|0;e=k[v>>2]|0;k[v>>2]=0;if(e)Lb[k[(k[e>>2]|0)+4>>2]&255](e)}else if((e|0)==32){c=Wa()|0;if(!d){w=c;fb(w|0)}}else if((e|0)==34){r=u;return}Lb[k[(k[d>>2]|0)+4>>2]&255](d);w=c;fb(w|0)}}else c=2}while(0);d=Va(16)|0;x=0;e=Da(1)|0;w=x;x=0;if(!(w&1)?(x=0,Fa(7,d|0,c|0,e|0),w=x,x=0,!(w&1)):0)ub(d|0,824,96);w=Wa()|0;Ua(d|0);fb(w|0)}function Si(a){a=a|0;var b=0,c=0,d=0,e=0;if((Wi(a)|0)<<24>>24!=-40){b=Va(16)|0;x=0;c=Da(1)|0;e=x;x=0;if(!(e&1)?(x=0,Fa(7,b|0,5,c|0),e=x,x=0,!(e&1)):0)ub(b|0,824,96);e=Wa()|0;Ua(b|0);fb(e|0)}b=Wi(a)|0;if(b<<24>>24==-38)return;while(1){d=((Vi(a)|0)&255)<<8;d=d|(Vi(a)|0)&255;b=Xi(a,b)|0;c=-2-b+d|0;if((c|0)<0)break;if((c|0)>0){b=d+-2-b|0;c=0;do{Vi(a)|0;c=c+1|0}while((c|0)!=(b|0))}b=Wi(a)|0;if(b<<24>>24==-38){e=8;break}}if((e|0)==8)return;b=Va(16)|0;x=0;c=Da(1)|0;e=x;x=0;if(!(e&1)?(x=0,Fa(7,b|0,5,c|0),e=x,x=0,!(e&1)):0)ub(b|0,824,96);e=Wa()|0;Ua(b|0);fb(e|0)}function Ti(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;if(!b){if((Vi(a)|0)<<24>>24!=-1){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,12,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}if((Vi(a)|0)<<24>>24!=-38){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,5,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}}Vi(a)|0;Vi(a)|0;c=Vi(a)|0;d=c&255;do{if(c<<24>>24==1){Vi(a)|0;c=0;e=20}else{if((d|0)==(k[a+32>>2]|0)){b=Vi(a)|0;if(!(c<<24>>24))break;else{c=0;e=20;break}}b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,2,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}}while(0);if((e|0)==20)while(1){Vi(a)|0;c=c+1|0;b=Vi(a)|0;if((c|0)==(d|0))break;else e=20}k[a+36>>2]=b&255;e=Vi(a)|0;c=a+40|0;k[c>>2]=e&255;if((e&255)>=3){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,5,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}if((Vi(a)|0)<<24>>24){b=Va(16)|0;x=0;c=Da(1)|0;a=x;x=0;if(!(a&1)?(x=0,Fa(7,b|0,5,c|0),a=x,x=0,!(a&1)):0)ub(b|0,824,96);a=Wa()|0;Ua(b|0);fb(a|0)}d=a+28|0;if(k[d>>2]|0)return;b=k[a+108>>2]|0;if(!b)b=k[a+16>>2]|0;if(!(k[c>>2]|0))c=1;else c=k[a+32>>2]|0;e=ia(c,b)|0;a=ia(e,((k[a+24>>2]|0)+7|0)/8|0)|0;k[d>>2]=a;return}function Ui(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((c|0)<=0)return;n=b+4|0;o=b+8|0;q=0;do{p=Vi(a)|0;d=k[n>>2]|0;e=k[o>>2]|0;if(d>>>0>=e>>>0){f=k[b>>2]|0;g=f;h=d-g+1|0;if((h|0)<0){jj(b);g=k[b>>2]|0;e=k[o>>2]|0;f=g}m=f;d=e-m|0;if(d>>>0<1073741823){d=d<<1;d=d>>>0>>0?h:d;h=k[n>>2]|0;e=h-m|0;if(!d){l=0;j=0;d=h}else r=10}else{e=k[n>>2]|0;d=2147483647;h=e;e=e-m|0;r=10}if((r|0)==10){r=0;l=d;j=lj(d)|0;d=h}i[j+e>>0]=p;m=d-m|0;p=j+(e-m)|0;vw(p|0,f|0,m|0)|0;k[b>>2]=p;k[n>>2]=j+(e+1);k[o>>2]=j+l;if(g)mj(g)}else{i[d>>0]=p;k[n>>2]=(k[n>>2]|0)+1}q=q+1|0}while((q|0)!=(c|0));return}function Vi(a){a=a|0;var b=0,c=0,d=0,e=0;c=k[a>>2]|0;if(c){a=c+12|0;b=k[a>>2]|0;if((b|0)==(k[c+16>>2]|0))a=Ob[k[(k[c>>2]|0)+40>>2]&127](c)|0;else{k[a>>2]=b+1;a=l[b>>0]|0}e=a&255;return e|0}d=a+8|0;e=k[d>>2]|0;if(e){a=a+4|0;b=k[a>>2]|0;c=i[b>>0]|0;if(!b){e=c;return e|0}k[a>>2]=b+1;k[d>>2]=e+-1;e=c;return e|0}a=Va(16)|0;x=0;b=Da(1)|0;e=x;x=0;if(e&1){e=Wa()|0;Ua(a|0);fb(e|0)}x=0;Fa(7,a|0,4,b|0);e=x;x=0;if(e&1){e=Wa()|0;Ua(a|0);fb(e|0)}else ub(a|0,824,96);return 0}function Wi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=r;r=r+176|0;b=c+152|0;i=c+16|0;g=c;h=Vi(a)|0;d=h&255;if(h<<24>>24==-1){do{b=Vi(a)|0}while(b<<24>>24==-1);r=c;return b|0}h=i+56|0;f=i+4|0;k[i>>2]=36160;k[h>>2]=36180;x=0;ra(62,i+56|0,f|0);e=x;x=0;if(e&1){i=Wa()|0;qn(h);fb(i|0)}k[i+128>>2]=0;k[i+132>>2]=-1;k[i>>2]=36200;k[i+56>>2]=36220;x=0;qa(180,f|0);e=x;x=0;do{if(e&1)b=Wa()|0;else{k[f>>2]=36236;e=i+36|0;k[e>>2]=0;k[e+4>>2]=0;k[e+8>>2]=0;k[e+12>>2]=0;k[i+52>>2]=16;k[b>>2]=0;k[b+4>>2]=0;k[b+8>>2]=0;x=0;ra(63,f|0,b|0);c=x;x=0;if(c&1){i=Wa()|0;Sm(b);Sm(e);xn(f);b=i;break}Sm(b);k[i+((k[(k[i>>2]|0)+-12>>2]|0)+76)>>2]=48;x=0;b=va(28,i|0,50907,62)|0;c=x;x=0;if(!(c&1)?(c=b+((k[(k[b>>2]|0)+-12>>2]|0)+4)|0,k[c>>2]=k[c>>2]&-75|8,c=b+((k[(k[b>>2]|0)+-12>>2]|0)+4)|0,k[c>>2]=k[c>>2]|16384,k[b+((k[(k[b>>2]|0)+-12>>2]|0)+12)>>2]=2,x=0,Aa(38,b|0,d|0)|0,d=x,x=0,!(d&1)):0){c=Va(16)|0;x=0;ra(64,g|0,f|0);d=x;x=0;if(!(d&1)){x=0;b=Da(1)|0;d=x;x=0;if(!(d&1)?(x=0,Ja(36,c|0,12,b|0,g|0),d=x,x=0,!(d&1)):0){x=0;Fa(6,c|0,824,96);x=0;a=0}else a=1;b=Wa()|0;Sm(g);if(!a){g=b;k[i>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}else b=Wa()|0;Ua(c|0);g=b;k[i>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}g=Wa()|0;k[i>>2]=36200;k[h>>2]=36220;k[f>>2]=36236;Sm(e);xn(f);qn(h);fb(g|0)}}while(0);i=b;qn(h);fb(i|0);return 0}function Xi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;c=r;r=r+320|0;h=c+300|0;l=c+152|0;i=c+288|0;m=c+16|0;j=c;switch(b<<24>>24){case-9:{n=(Vi(a)|0)&255;k[a+24>>2]=n;n=((Vi(a)|0)&255)<<8|(Vi(a)|0)&255;m=((Vi(a)|0)&255)<<8|(Vi(a)|0)&255;k[a+16>>2]=m;k[a+20>>2]=n;n=(Vi(a)|0)&255;k[a+32>>2]=n;n=6;r=c;return n|0}case-8:{n=Yi(a)|0;r=c;return n|0}case-24:{n=Zi(a)|0;r=c;return n|0}case-53:case-54:case-55:case-57:case-58:case-59:case-61:case-62:case-63:case-64:{g=l+56|0;e=l+4|0;k[l>>2]=36160;k[g>>2]=36180;x=0;ra(62,l+56|0,e|0);m=x;x=0;if(m&1){n=Wa()|0;qn(g);fb(n|0)}k[l+128>>2]=0;k[l+132>>2]=-1;k[l>>2]=36200;k[l+56>>2]=36220;x=0;qa(180,e|0);m=x;x=0;do{if(m&1)a=Wa()|0;else{k[e>>2]=36236;f=l+36|0;k[f>>2]=0;k[f+4>>2]=0;k[f+8>>2]=0;k[f+12>>2]=0;k[l+52>>2]=16;k[h>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;x=0;ra(63,e|0,h|0);m=x;x=0;if(m&1){a=Wa()|0;Sm(h);Sm(f);xn(e);break}Sm(h);x=0;a=va(28,l|0,50970,26)|0;m=x;x=0;do{if((!(m&1)?(x=0,d=Aa(38,a|0,b&255|0)|0,m=x,x=0,!(m&1)):0)?(x=0,va(28,d|0,50997,18)|0,m=x,x=0,!(m&1)):0){d=Va(16)|0;x=0;ra(64,i|0,e|0);m=x;x=0;if(!(m&1)){x=0;a=Da(1)|0;m=x;x=0;if(!(m&1)?(x=0,Ja(36,d|0,10,a|0,i|0),m=x,x=0,!(m&1)):0){x=0;Fa(6,d|0,824,96);x=0;c=0}else c=1;a=Wa()|0;Sm(i);if(!c)break}else a=Wa()|0;Ua(d|0)}else n=20}while(0);if((n|0)==20)a=Wa()|0;k[l>>2]=36200;k[g>>2]=36220;k[e>>2]=36236;Sm(f);xn(e);qn(g);n=a;fb(n|0)}}while(0);n=a;qn(g);fb(n|0)}case-25:case-32:case-2:{n=0;r=c;return n|0}default:{i=m+56|0;f=m+4|0;k[m>>2]=36160;k[i>>2]=36180;x=0;ra(62,m+56|0,f|0);l=x;x=0;if(l&1){n=Wa()|0;qn(i);fb(n|0)}k[m+128>>2]=0;k[m+132>>2]=-1;k[m>>2]=36200;k[m+56>>2]=36220;x=0;qa(180,f|0);l=x;x=0;do{if(l&1)a=Wa()|0;else{k[f>>2]=36236;g=m+36|0;k[g>>2]=0;k[g+4>>2]=0;k[g+8>>2]=0;k[g+12>>2]=0;k[m+52>>2]=16;k[h>>2]=0;k[h+4>>2]=0;k[h+8>>2]=0;x=0;ra(63,f|0,h|0);l=x;x=0;if(l&1){a=Wa()|0;Sm(h);Sm(g);xn(f);break}Sm(h);x=0;a=va(28,m|0,51016,20)|0;l=x;x=0;do{if((!(l&1)?(x=0,e=Aa(38,a|0,b&255|0)|0,l=x,x=0,!(l&1)):0)?(x=0,va(28,e|0,51037,13)|0,l=x,x=0,!(l&1)):0){d=Va(16)|0;x=0;ra(64,j|0,f|0);l=x;x=0;if(!(l&1)){x=0;a=Da(1)|0;l=x;x=0;if(!(l&1)?(x=0,Ja(36,d|0,11,a|0,j|0),l=x,x=0,!(l&1)):0){x=0;Fa(6,d|0,824,96);x=0;c=0}else c=1;a=Wa()|0;Sm(j);if(!c)break}else a=Wa()|0;Ua(d|0)}else n=40}while(0);if((n|0)==40)a=Wa()|0;k[m>>2]=36200;k[i>>2]=36220;k[f>>2]=36236;Sm(g);xn(f);qn(i);n=a;fb(n|0)}}while(0);n=a;qn(i);fb(n|0)}}return 0}function Yi(a){a=a|0;var b=0;if((Vi(a)|0)<<24>>24!=1){a=1;return a|0}b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+52>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+56>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+60>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+64>>2]=b;b=((Vi(a)|0)&255)<<8;b=b|(Vi(a)|0)&255;k[a+68>>2]=b;a=11;return a|0}function Zi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=r;r=r+16|0;e=c;k[e>>2]=0;f=e+4|0;k[f>>2]=0;k[e+8>>2]=0;x=0;Fa(9,a|0,e|0,4);b=x;x=0;a:do{if(b&1)d=3;else{b=k[e>>2]|0;b:do{if(!(yl(b,51051,4)|0)){x=0;b=ta(69,a|0)|0;g=x;x=0;if(g&1){d=3;break a}b=b&255;switch(b|0){case 3:case 2:case 1:case 0:{k[a+44>>2]=b;a=5;b=k[e>>2]|0;break b}case 5:case 4:{b=Va(16)|0;x=0;a=Da(1)|0;g=x;x=0;if(!(g&1)?(x=0,Fa(7,b|0,7,a|0),g=x,x=0,!(g&1)):0){x=0;Fa(6,b|0,824,96);x=0;d=3;break a}a=Wa()|0;Ua(b|0);break a}default:{b=Va(16)|0;x=0;a=Da(1)|0;g=x;x=0;if(!(g&1)?(x=0,Fa(7,b|0,5,a|0),g=x,x=0,!(g&1)):0){x=0;Fa(6,b|0,824,96);x=0;d=3;break a}a=Wa()|0;Ua(b|0);break a}}}else a=4}while(0);if(!b){r=c;return a|0}if((k[f>>2]|0)!=(b|0))k[f>>2]=b;mj(b);r=c;return a|0}}while(0);if((d|0)==3)a=Wa()|0;b=k[e>>2]|0;if(!b)fb(a|0);if((k[f>>2]|0)!=(b|0))k[f>>2]=b;mj(b);fb(a|0);return 0}function _i(a){a=a|0;var b=0,c=0,d=0;d=k[(k[a>>2]|0)+-12>>2]|0;k[a+d>>2]=36200;b=a+(d+56)|0;k[b>>2]=36220;c=a+(d+4)|0;k[c>>2]=36236;Sm(a+(d+36)|0);xn(c);qn(b);return}function $i(a){a=a|0;return}function aj(a){a=a|0;mj(a);return}function bj(a){a=a|0;i[a>>0]=0;a=a+4|0;k[a>>2]=0;k[a+4>>2]=0;k[a+8>>2]=0;k[a+12>>2]=0;k[a+16>>2]=0;k[a+20>>2]=0;k[a+24>>2]=0;k[a+28>>2]=0;return}function cj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;e=r;r=r+16|0;f=e;b=Gi(b)|0;k[f>>2]=b;c=a+28|0;d=k[c>>2]|0;if(d>>>0<(k[a+32>>2]|0)>>>0){k[d>>2]=b;k[c>>2]=d+4;k[f>>2]=0;r=e;return}x=0;ra(57,a+24|0,f|0);a=x;x=0;if(a&1){b=Wa()|0;c=k[f>>2]|0;k[f>>2]=0;if(!c)fb(b|0);Lb[k[(k[c>>2]|0)+4>>2]&255](c);fb(b|0)}else{b=k[f>>2]|0;k[f>>2]=0;if(!b){r=e;return}Lb[k[(k[b>>2]|0)+4>>2]&255](b);r=e;return}}function dj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;d=a+4|0;k[d>>2]=k[b>>2];k[d+4>>2]=k[b+4>>2];k[d+8>>2]=k[b+8>>2];Ni(a,-1);Ni(a,-40);d=a+28|0;e=a+24|0;b=k[e>>2]|0;if((k[d>>2]|0)==(b|0)){Ni(a,-1);Ni(a,-39);a=a+16|0;a=k[a>>2]|0;return a|0}else c=0;do{f=k[b+(c<<2)>>2]|0;Mb[k[(k[f>>2]|0)+8>>2]&127](f,a);c=c+1|0;b=k[e>>2]|0}while(c>>>0<(k[d>>2]|0)-b>>2>>>0);Ni(a,-1);Ni(a,-39);f=a+16|0;f=k[f>>2]|0;return f|0}function ej(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;m=r;r=r+48|0;h=m+32|0;e=m+12|0;i=m+8|0;l=m+4|0;n=m;d=c+36|0;do{if(((((k[d>>2]|0)==0?(k[c+40>>2]|0)==0:0)?(k[c+44>>2]|0)==0:0)?(k[c+48>>2]|0)==0:0)?(k[c+52>>2]|0)==0:0){d=k[c+8>>2]|0;if((d|0)<=12){f=a+28|0;g=a+32|0;break}Oi(e,(1<>2]|0);d=Fi(e)|0;k[i>>2]=d;f=a+28|0;e=k[f>>2]|0;g=a+32|0;if(e>>>0<(k[g>>2]|0)>>>0){k[e>>2]=d;k[f>>2]=e+4;k[i>>2]=0;break}x=0;ra(57,a+24|0,i|0);h=x;x=0;if(!(h&1)){d=k[i>>2]|0;k[i>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}c=Wa()|0;d=k[i>>2]|0;k[i>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}else j=6}while(0);do{if((j|0)==6){d=Fi(d)|0;k[h>>2]=d;f=a+28|0;e=k[f>>2]|0;g=a+32|0;if(e>>>0<(k[g>>2]|0)>>>0){k[e>>2]=d;k[f>>2]=e+4;k[h>>2]=0;break}x=0;ra(57,a+24|0,h|0);j=x;x=0;if(!(j&1)){d=k[h>>2]|0;k[h>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}c=Wa()|0;d=k[h>>2]|0;k[h>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}}while(0);d=a+20|0;e=(k[d>>2]|0)+1|0;k[d>>2]=e;d=k[c+24>>2]|0;h=(d|0)==0?1:k[c+16>>2]|0;d=Hi(e,h,k[c+20>>2]|0,d)|0;k[l>>2]=d;e=k[f>>2]|0;do{if(e>>>0<(k[g>>2]|0)>>>0){k[e>>2]=d;k[f>>2]=e+4;k[l>>2]=0}else{x=0;ra(57,a+24|0,l|0);j=x;x=0;if(!(j&1)){d=k[l>>2]|0;k[l>>2]=0;if(!d)break;Lb[k[(k[d>>2]|0)+4>>2]&255](d);break}c=Wa()|0;d=k[l>>2]|0;k[l>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}}while(0);i=lj(104)|0;k[i>>2]=36820;k[i+4>>2]=h;e=i+8|0;k[e>>2]=k[b>>2];k[e+4>>2]=k[b+4>>2];k[e+8>>2]=k[b+8>>2];e=i+20|0;d=e+84|0;do{k[e>>2]=k[c>>2];e=e+4|0;c=c+4|0}while((e|0)<(d|0));k[n>>2]=i;c=k[f>>2]|0;if(c>>>0<(k[g>>2]|0)>>>0){k[c>>2]=i;k[f>>2]=c+4;k[n>>2]=0;r=m;return}x=0;ra(57,a+24|0,n|0);a=x;x=0;if(a&1){c=Wa()|0;d=k[n>>2]|0;k[n>>2]=0;if(!d){n=c;fb(n|0)}Lb[k[(k[d>>2]|0)+4>>2]&255](d);n=c;fb(n|0)}else{c=k[n>>2]|0;k[n>>2]=0;if(!c){r=m;return}Lb[k[(k[c>>2]|0)+4>>2]&255](c);r=m;return}}function fj(a,b,c,d,e,f,g,h,j,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,s=0,t=0,u=0;p=r;r=r+96|0;o=p;n=sc(a,b,o,0)|0;if(n){e=n;r=p;return e|0}i[o+32>>0]=0;s=k[o+8>>2]|0;u=k[o>>2]|0;t=k[o+4>>2]|0;n=ia(t,u)|0;q=k[o+16>>2]|0;n=ia(ia(n,(s|0)<9?1:2)|0,q)|0;k[d>>2]=n;n=Pl(n)|0;k[c>>2]=n;k[e>>2]=u;k[f>>2]=t;k[g>>2]=s;k[h>>2]=k[o+12>>2];k[j>>2]=q;k[l>>2]=k[o+20>>2];k[m>>2]=k[o+24>>2];e=tc(n,k[d>>2]|0,a,b,0,0)|0;r=p;return e|0}function gj(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,l=0,m=0,n=0;m=r;r=r+96|0;j=m+4|0;g=m;l=j;n=l+84|0;do{k[l>>2]=0;l=l+4|0}while((l|0)<(n|0));k[j+16>>2]=f;k[j+8>>2]=e;k[j>>2]=c;k[j+4>>2]=d;c=Pl(b)|0;k[h>>2]=c;k[g>>2]=0;c=rc(h,b,g,a,b,j,0)|0;k[i>>2]=k[g>>2];r=m;return c|0}function hj(a,b){a=a|0;b=b|0;var c=0;c=r;r=r+16|0;k[c>>2]=b;b=k[9320]|0;ml(b,a,c)|0;el(10,b)|0;Pa()}function ij(a){a=a|0;Ta(51337,51366,1164,51442)}function jj(a){a=a|0;Ta(51463,51486,303,51442)}function kj(){var a=0,b=0;a=r;r=r+16|0;if(!(mb(37024,4)|0)){b=ib(k[9255]|0)|0;r=a;return b|0}else hj(51562,a);return 0}function lj(a){a=a|0;var b=0;b=(a|0)==0?1:a;a=Pl(b)|0;a:do{if(!a){while(1){a=uj()|0;if(!a)break;$b[a&7]();a=Pl(b)|0;if(a)break a}b=Va(4)|0;k[b>>2]=36844;ub(b|0,592,78)}}while(0);return a|0}function mj(a){a=a|0;Ql(a);return}function nj(a){a=a|0;mj(a);return}function oj(a){a=a|0;k[a>>2]=36844;return}function pj(a){a=a|0;return}function qj(a){a=a|0;mj(a);return}function rj(a){a=a|0;return 51611}function sj(a){a=a|0;var b=0;b=r;r=r+16|0;x=0;Ga(a|0);a=x;x=0;if(!(a&1)){x=0;ra(85,51626,b|0);x=0}a=Wa(0)|0;cb(a|0)|0;x=0;ra(85,51666,b+8|0);x=0;a=Wa(0)|0;x=0;Ga(3);b=x;x=0;if(b&1){b=Wa(0)|0;oc(b)}else oc(a)}function tj(){var a=0,b=0,c=0;x=0;a=Da(2)|0;c=x;x=0;if(c&1){c=Wa(0)|0;oc(c)}if(((a|0)!=0?(b=k[a>>2]|0,(b|0)!=0):0)?(c=b+48|0,(k[c>>2]&-256|0)==1126902528?(k[c+4>>2]|0)==1129074247:0):0)sj(k[b+12>>2]|0);c=k[9208]|0;k[9208]=c+0;sj(c)}function uj(){var a=0;a=k[9214]|0;k[9214]=a+0;return a|0}function vj(a){a=a|0;return}function wj(a){a=a|0;k[a>>2]=36868;dk(a+4|0);return}function xj(a){a=a|0;wj(a);mj(a);return}function yj(a){a=a|0;return k[a+4>>2]|0}function zj(a){a=a|0;return}function Aj(a){a=a|0;k[a>>2]=36888;return}function Bj(a){a=a|0;return}function Cj(a){a=a|0;mj(a);return}function Dj(a){a=a|0;return 51716}function Ej(a){a=a|0;return}function Fj(a){a=a|0;return}function Gj(a){a=a|0;return}function Hj(a){a=a|0;mj(a);return}function Ij(a){a=a|0;mj(a);return}function Jj(a){a=a|0;mj(a);return}function Kj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+64|0;f=g;if((a|0)!=(b|0))if((b|0)!=0?(e=Qj(b,656,672,0)|0,(e|0)!=0):0){b=f;d=b+56|0;do{k[b>>2]=0;b=b+4|0}while((b|0)<(d|0));k[f>>2]=e;k[f+8>>2]=a;k[f+12>>2]=-1;k[f+48>>2]=1;cc[k[(k[e>>2]|0)+28>>2]&63](e,f,k[c>>2]|0,1);if((k[f+24>>2]|0)==1){k[c>>2]=k[f+16>>2];b=1}else b=0}else b=0;else b=1;r=g;return b|0}function Lj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;a=b+16|0;e=k[a>>2]|0;do{if(e){if((e|0)!=(c|0)){d=b+36|0;k[d>>2]=(k[d>>2]|0)+1;k[b+24>>2]=2;i[b+54>>0]=1;break}a=b+24|0;if((k[a>>2]|0)==2)k[a>>2]=d}else{k[a>>2]=c;k[b+24>>2]=d;k[b+36>>2]=1}}while(0);return}function Mj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)==(k[b+8>>2]|0))Lj(0,b,c,d);return}function Nj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((a|0)==(k[b+8>>2]|0))Lj(0,b,c,d);else{a=k[a+8>>2]|0;cc[k[(k[a>>2]|0)+28>>2]&63](a,b,c,d)}return}function Oj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;f=k[a+4>>2]|0;e=f>>8;if(f&1)e=k[(k[c>>2]|0)+e>>2]|0;a=k[a>>2]|0;cc[k[(k[a>>2]|0)+28>>2]&63](a,b,c+e|0,(f&2|0)!=0?d:2);return}function Pj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do{if((a|0)!=(k[b+8>>2]|0)){f=k[a+12>>2]|0;e=a+16+(f<<3)|0;Oj(a+16|0,b,c,d);if((f|0)>1){f=b+54|0;a=a+24|0;do{Oj(a,b,c,d);if(i[f>>0]|0)break a;a=a+8|0}while(a>>>0>>0)}}else Lj(0,b,c,d)}while(0);return}function Qj(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,l=0,m=0,n=0,o=0,p=0,q=0;q=r;r=r+64|0;p=q;o=k[a>>2]|0;n=a+(k[o+-8>>2]|0)|0;o=k[o+-4>>2]|0;k[p>>2]=c;k[p+4>>2]=a;k[p+8>>2]=b;k[p+12>>2]=d;d=p+16|0;a=p+20|0;b=p+24|0;e=p+28|0;f=p+32|0;g=p+40|0;h=(o|0)==(c|0);l=d;m=l+36|0;do{k[l>>2]=0;l=l+4|0}while((l|0)<(m|0));j[d+36>>1]=0;i[d+38>>0]=0;a:do{if(h){k[p+48>>2]=1;Sb[k[(k[c>>2]|0)+20>>2]&15](c,p,n,n,1,0);d=(k[b>>2]|0)==1?n:0}else{Jb[k[(k[o>>2]|0)+24>>2]&15](o,p,n,1,0);switch(k[p+36>>2]|0){case 0:{d=(k[g>>2]|0)==1&(k[e>>2]|0)==1&(k[f>>2]|0)==1?k[a>>2]|0:0;break a}case 1:break;default:{d=0;break a}}if((k[b>>2]|0)!=1?!((k[g>>2]|0)==0&(k[e>>2]|0)==1&(k[f>>2]|0)==1):0){d=0;break}d=k[d>>2]|0}}while(0);r=q;return d|0}function Rj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;i[b+53>>0]=1;do{if((k[b+4>>2]|0)==(d|0)){i[b+52>>0]=1;d=b+16|0;a=k[d>>2]|0;if(!a){k[d>>2]=c;k[b+24>>2]=e;k[b+36>>2]=1;if(!((e|0)==1?(k[b+48>>2]|0)==1:0))break;i[b+54>>0]=1;break}if((a|0)!=(c|0)){e=b+36|0;k[e>>2]=(k[e>>2]|0)+1;i[b+54>>0]=1;break}a=b+24|0;d=k[a>>2]|0;if((d|0)==2){k[a>>2]=e;d=e}if((d|0)==1?(k[b+48>>2]|0)==1:0)i[b+54>>0]=1}}while(0);return}function Sj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0;a:do{if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(f=b+28|0,(k[f>>2]|0)!=1):0)k[f>>2]=d}else{if((a|0)!=(k[b>>2]|0)){q=k[a+12>>2]|0;h=a+16+(q<<3)|0;Uj(a+16|0,b,c,d,e);f=a+24|0;if((q|0)<=1)break;g=k[a+8>>2]|0;if((g&2|0)==0?(j=b+36|0,(k[j>>2]|0)!=1):0){if(!(g&1)){g=b+54|0;while(1){if(i[g>>0]|0)break a;if((k[j>>2]|0)==1)break a;Uj(f,b,c,d,e);f=f+8|0;if(f>>>0>=h>>>0)break a}}g=b+24|0;a=b+54|0;while(1){if(i[a>>0]|0)break a;if((k[j>>2]|0)==1?(k[g>>2]|0)==1:0)break a;Uj(f,b,c,d,e);f=f+8|0;if(f>>>0>=h>>>0)break a}}g=b+54|0;while(1){if(i[g>>0]|0)break a;Uj(f,b,c,d,e);f=f+8|0;if(f>>>0>=h>>>0)break a}}if((k[b+16>>2]|0)!=(c|0)?(p=b+20|0,(k[p>>2]|0)!=(c|0)):0){k[b+32>>2]=d;m=b+44|0;if((k[m>>2]|0)==4)break;g=k[a+12>>2]|0;h=a+16+(g<<3)|0;j=b+52|0;d=b+53|0;n=b+54|0;l=a+8|0;o=b+24|0;b:do{if((g|0)>0){g=0;f=0;a=a+16|0;while(1){i[j>>0]=0;i[d>>0]=0;Tj(a,b,c,c,1,e);if(i[n>>0]|0){q=20;break b}do{if(i[d>>0]|0){if(!(i[j>>0]|0))if(!(k[l>>2]&1)){f=1;q=20;break b}else{f=1;break}if((k[o>>2]|0)==1)break b;if(!(k[l>>2]&2))break b;else{g=1;f=1}}}while(0);a=a+8|0;if(a>>>0>=h>>>0){q=20;break}}}else{g=0;f=0;q=20}}while(0);do{if((q|0)==20){if((!g?(k[p>>2]=c,c=b+40|0,k[c>>2]=(k[c>>2]|0)+1,(k[b+36>>2]|0)==1):0)?(k[o>>2]|0)==2:0){i[n>>0]=1;if(f)break}else q=24;if((q|0)==24?f:0)break;k[m>>2]=4;break a}}while(0);k[m>>2]=3;break}if((d|0)==1)k[b+32>>2]=1}}while(0);return}function Tj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;h=k[a+4>>2]|0;g=h>>8;if(h&1)g=k[(k[d>>2]|0)+g>>2]|0;a=k[a>>2]|0;Sb[k[(k[a>>2]|0)+20>>2]&15](a,b,c,d+g|0,(h&2|0)!=0?e:2,f);return}function Uj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=k[a+4>>2]|0;f=g>>8;if(g&1)f=k[(k[c>>2]|0)+f>>2]|0;a=k[a>>2]|0;Jb[k[(k[a>>2]|0)+24>>2]&15](a,b,c+f|0,(g&2|0)!=0?d:2,e);return}function Vj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;a:do{if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(f=b+28|0,(k[f>>2]|0)!=1):0)k[f>>2]=d}else{if((a|0)!=(k[b>>2]|0)){h=k[a+8>>2]|0;Jb[k[(k[h>>2]|0)+24>>2]&15](h,b,c,d,e);break}if((k[b+16>>2]|0)!=(c|0)?(g=b+20|0,(k[g>>2]|0)!=(c|0)):0){k[b+32>>2]=d;d=b+44|0;if((k[d>>2]|0)==4)break;f=b+52|0;i[f>>0]=0;j=b+53|0;i[j>>0]=0;a=k[a+8>>2]|0;Sb[k[(k[a>>2]|0)+20>>2]&15](a,b,c,c,1,e);if(i[j>>0]|0){if(!(i[f>>0]|0)){f=1;h=13}}else{f=0;h=13}do{if((h|0)==13){k[g>>2]=c;j=b+40|0;k[j>>2]=(k[j>>2]|0)+1;if((k[b+36>>2]|0)==1?(k[b+24>>2]|0)==2:0){i[b+54>>0]=1;if(f)break}else h=16;if((h|0)==16?f:0)break;k[d>>2]=4;break a}}while(0);k[d>>2]=3;break}if((d|0)==1)k[b+32>>2]=1}}while(0);return}function Wj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;do{if((a|0)==(k[b+8>>2]|0)){if((k[b+4>>2]|0)==(c|0)?(g=b+28|0,(k[g>>2]|0)!=1):0)k[g>>2]=d}else if((a|0)==(k[b>>2]|0)){if((k[b+16>>2]|0)!=(c|0)?(f=b+20|0,(k[f>>2]|0)!=(c|0)):0){k[b+32>>2]=d;k[f>>2]=c;e=b+40|0;k[e>>2]=(k[e>>2]|0)+1;if((k[b+36>>2]|0)==1?(k[b+24>>2]|0)==2:0)i[b+54>>0]=1;k[b+44>>2]=4;break}if((d|0)==1)k[b+32>>2]=1}}while(0);return}function Xj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0;if((a|0)==(k[b+8>>2]|0))Rj(0,b,c,d,e);else{m=b+52|0;n=i[m>>0]|0;o=b+53|0;p=i[o>>0]|0;l=k[a+12>>2]|0;g=a+16+(l<<3)|0;i[m>>0]=0;i[o>>0]=0;Tj(a+16|0,b,c,d,e,f);a:do{if((l|0)>1){h=b+24|0;j=a+8|0;l=b+54|0;a=a+24|0;do{if(i[l>>0]|0)break a;if(!(i[m>>0]|0)){if((i[o>>0]|0)!=0?(k[j>>2]&1|0)==0:0)break a}else{if((k[h>>2]|0)==1)break a;if(!(k[j>>2]&2))break a}i[m>>0]=0;i[o>>0]=0;Tj(a,b,c,d,e,f);a=a+8|0}while(a>>>0>>0)}}while(0);i[m>>0]=n;i[o>>0]=p}return}function Yj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((a|0)==(k[b+8>>2]|0))Rj(0,b,c,d,e);else{a=k[a+8>>2]|0;Sb[k[(k[a>>2]|0)+20>>2]&15](a,b,c,d,e,f)}return}function Zj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if((a|0)==(k[b+8>>2]|0))Rj(0,b,c,d,e);return}function _j(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+16|0;d=e;k[d>>2]=k[c>>2];a=Qb[k[(k[a>>2]|0)+16>>2]&63](a,b,d)|0;if(a)k[c>>2]=k[d>>2];r=e;return a&1|0}function $j(a){a=a|0;if(!a)a=0;else a=(Qj(a,656,704,0)|0)!=0;return a&1|0}function ak(){var a=0;a=Va(4)|0;oj(a);ub(a|0,592,78)}function bk(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=r;r=r+48|0;g=e+32|0;c=e+24|0;h=e+16|0;f=e;e=e+36|0;a=kj()|0;if((a|0)!=0?(d=k[a>>2]|0,(d|0)!=0):0){a=d+48|0;b=k[a>>2]|0;a=k[a+4>>2]|0;if(!((b&-256|0)==1126902528&(a|0)==1129074247)){k[c>>2]=k[9257];hj(51919,c)}if((b|0)==1126902529&(a|0)==1129074247)a=k[d+44>>2]|0;else a=d+80|0;k[e>>2]=a;d=k[d>>2]|0;a=k[d+4>>2]|0;if(Qb[k[(k[608>>2]|0)+16>>2]&63](608,d,e)|0){h=k[e>>2]|0;e=k[9257]|0;h=Ob[k[(k[h>>2]|0)+8>>2]&127](h)|0;k[f>>2]=e;k[f+4>>2]=a;k[f+8>>2]=h;hj(51833,f)}else{k[h>>2]=k[9257];k[h+4>>2]=a;hj(51878,h)}}hj(51957,g)}function ck(){var a=0;a=r;r=r+16|0;if(!(Oa(37020,184)|0)){r=a;return}else hj(51730,a)}function dk(a){a=a|0;var b=0,c=0;c=(k[a>>2]|0)+-4|0;b=k[c>>2]|0;k[c>>2]=b+-1;if((b+-1|0)<0)mj((k[a>>2]|0)+-12|0);return}function ek(a){a=a|0;var b=0;b=r;r=r+16|0;Ql(a);if(!(sb(k[9255]|0,0)|0)){r=b;return}else hj(51780,b)}function fk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=rl(a,b,c)|0;return a|0}function gk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=sl(a,b,c)|0;return a|0}function hk(){return 37296}function ik(){return 37300}function jk(){return 37304}function kk(a){a=a|0;return((a|0)==32|(a+-9|0)>>>0<5)&1|0}function lk(a){a=a|0;if((a+-48|0)>>>0<10)a=1;else a=((a|32)+-97|0)>>>0<6;return a&1|0}function mk(){var a=0;if(!(k[9258]|0))a=37308;else{a=(kb()|0)+60|0;a=k[a>>2]|0}return a|0}function nk(a){a=a|0;var b=0,c=0;b=0;while(1){if((l[51978+b>>0]|0)==(a|0)){c=2;break}b=b+1|0;if((b|0)==87){b=87;a=52066;c=5;break}}if((c|0)==2)if(!b)a=52066;else{a=52066;c=5}if((c|0)==5)while(1){c=a;while(1){a=c+1|0;if(!(i[c>>0]|0))break;else c=a}b=b+-1|0;if(!b)break;else c=5}return a|0}function ok(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0,f=0.0,g=0,h=0,j=0.0,m=0,n=0,o=0,p=0.0,q=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0;K=r;r=r+512|0;G=K;switch(b|0){case 0:{J=24;I=-149;y=4;break}case 1:{J=53;I=-1074;y=4;break}case 2:{J=53;I=-1074;y=4;break}default:d=0.0}a:do{if((y|0)==4){D=a+4|0;A=a+100|0;do{b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0}while((kk(b)|0)!=0);b:do{switch(b|0){case 43:case 45:{e=1-(((b|0)==45&1)<<1)|0;b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;H=e;break b}else{b=rk(a)|0;H=e;break b}}default:H=1}}while(0);e=b;b=0;do{if((e|32|0)!=(i[53870+b>>0]|0))break;do{if(b>>>0<7){e=k[D>>2]|0;if(e>>>0<(k[A>>2]|0)>>>0){k[D>>2]=e+1;e=l[e>>0]|0;break}else{e=rk(a)|0;break}}}while(0);b=b+1|0}while(b>>>0<8);c:do{switch(b|0){case 8:break;case 3:{y=23;break}default:{g=(c|0)!=0;if(g&b>>>0>3)if((b|0)==8)break c;else{y=23;break c}d:do{if(!b){b=0;do{if((e|32|0)!=(i[56747+b>>0]|0))break d;do{if(b>>>0<2){e=k[D>>2]|0;if(e>>>0<(k[A>>2]|0)>>>0){k[D>>2]=e+1;e=l[e>>0]|0;break}else{e=rk(a)|0;break}}}while(0);b=b+1|0}while(b>>>0<3)}}while(0);switch(b|0){case 3:{b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==40)b=1;else{if(!(k[A>>2]|0)){d=B;break a}k[D>>2]=(k[D>>2]|0)+-1;d=B;break a}while(1){e=k[D>>2]|0;if(e>>>0<(k[A>>2]|0)>>>0){k[D>>2]=e+1;e=l[e>>0]|0}else e=rk(a)|0;if(!((e+-48|0)>>>0<10|(e+-65|0)>>>0<26)?!((e|0)==95|(e+-97|0)>>>0<26):0)break;b=b+1|0}if((e|0)==41){d=B;break a}e=(k[A>>2]|0)==0;if(!e)k[D>>2]=(k[D>>2]|0)+-1;if(!g){J=mk()|0;k[J>>2]=22;qk(a,0);d=0.0;break a}if(!b){d=B;break a}while(1){b=b+-1|0;if(!e)k[D>>2]=(k[D>>2]|0)+-1;if(!b){d=B;break a}}}case 0:{do{if((e|0)==48){b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|32|0)!=120){if(!(k[A>>2]|0)){b=48;break}k[D>>2]=(k[D>>2]|0)+-1;b=48;break}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;g=0}else{b=rk(a)|0;g=0}e:while(1){switch(b|0){case 46:{y=74;break e}case 48:break;default:{w=0;h=0;v=0;e=0;m=g;n=0;u=0;j=1.0;g=0;d=0.0;break e}}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;g=1;continue}else{b=rk(a)|0;g=1;continue}}if((y|0)==74){b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==48){g=0;e=0;do{b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;g=tw(g|0,e|0,-1,-1)|0;e=M}while((b|0)==48);w=0;h=0;v=g;m=1;n=1;u=0;j=1.0;g=0;d=0.0}else{w=0;h=0;v=0;e=0;m=g;n=1;u=0;j=1.0;g=0;d=0.0}}while(1){s=b+-48|0;o=b|32;if(s>>>0>=10){t=(b|0)==46;if(!(t|(o+-97|0)>>>0<6)){o=v;s=w;break}if(t)if(!n){t=h;e=w;s=w;n=1;o=u;f=j}else{o=v;s=w;b=46;break}else y=86}else y=86;if((y|0)==86){y=0;b=(b|0)>57?o+-87|0:s;do{if(!((w|0)<0|(w|0)==0&h>>>0<8)){if((w|0)<0|(w|0)==0&h>>>0<14){q=j*.0625;o=u;f=q;d=d+q*+(b|0);break}if((u|0)!=0|(b|0)==0){o=u;f=j}else{o=1;f=j;d=d+j*.5}}else{o=u;f=j;g=b+(g<<4)|0}}while(0);h=tw(h|0,w|0,1,0)|0;t=v;s=M;m=1}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;w=s;v=t;b=l[b>>0]|0;u=o;j=f;continue}else{w=s;v=t;b=rk(a)|0;u=o;j=f;continue}}if(!m){b=(k[A>>2]|0)==0;if(!b)k[D>>2]=(k[D>>2]|0)+-1;if(c){if(!b?(x=k[D>>2]|0,k[D>>2]=x+-1,(n|0)!=0):0)k[D>>2]=x+-2}else qk(a,0);d=+(H|0)*0.0;break a}m=(n|0)==0;n=m?h:o;m=m?s:e;if((s|0)<0|(s|0)==0&h>>>0<8){e=s;do{g=g<<4;h=tw(h|0,e|0,1,0)|0;e=M}while((e|0)<0|(e|0)==0&h>>>0<8)}if((b|32|0)==112){e=Dl(a,c)|0;b=M;if((e|0)==0&(b|0)==-2147483648){if(!c){qk(a,0);d=0.0;break a}if(!(k[A>>2]|0)){e=0;b=0}else{k[D>>2]=(k[D>>2]|0)+-1;e=0;b=0}}}else if(!(k[A>>2]|0)){e=0;b=0}else{k[D>>2]=(k[D>>2]|0)+-1;e=0;b=0}G=ww(n|0,m|0,2)|0;G=tw(G|0,M|0,-32,-1)|0;b=tw(G|0,M|0,e|0,b|0)|0;e=M;if(!g){d=+(H|0)*0.0;break a}if((e|0)>0|(e|0)==0&b>>>0>(0-I|0)>>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break a}G=I+-106|0;F=((G|0)<0)<<31>>31;if((e|0)<(F|0)|(e|0)==(F|0)&b>>>0>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*2.2250738585072014e-308*2.2250738585072014e-308;break a}if((g|0)>-1){do{F=!(d>=.5);G=F&1|g<<1;g=G^1;d=d+(F?d:d+-1.0);b=tw(b|0,e|0,-1,-1)|0;e=M}while((G|0)>-1);h=b;j=d}else{h=b;j=d}b=rw(32,0,I|0,((I|0)<0)<<31>>31|0)|0;b=tw(h|0,e|0,b|0,M|0)|0;I=M;if(0>(I|0)|0==(I|0)&J>>>0>b>>>0)if((b|0)<0){b=0;y=127}else y=125;else{b=J;y=125}if((y|0)==125)if((b|0)<53)y=127;else{e=b;f=+(H|0);d=0.0}if((y|0)==127){d=+(H|0);e=b;f=d;d=+Ck(+Hk(1.0,84-b|0),d)}J=(g&1|0)==0&(j!=0.0&(e|0)<32);d=f*(J?0.0:j)+(d+f*+(((J&1)+g|0)>>>0))-d;if(!(d!=0.0)){J=mk()|0;k[J>>2]=34}d=+Ik(d,h);break a}else b=e}while(0);E=I+J|0;F=0-E|0;g=0;f:while(1){switch(b|0){case 46:{y=138;break f}case 48:break;default:{e=0;o=0;n=0;break f}}b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0;g=1;continue}else{b=rk(a)|0;g=1;continue}}if((y|0)==138){b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==48){e=0;b=0;while(1){e=tw(e|0,b|0,-1,-1)|0;g=M;b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if((b|0)==48)b=g;else{o=g;g=1;n=1;break}}}else{e=0;o=0;n=1}}k[G>>2]=0;m=b+-48|0;h=(b|0)==46;g:do{if(h|m>>>0<10){z=G+496|0;w=0;t=0;u=h;y=o;s=g;x=n;g=0;h=0;n=0;h:while(1){do{if(u)if(!x){e=w;o=t;x=1}else{o=y;b=w;m=t;break h}else{u=tw(w|0,t|0,1,0)|0;t=M;v=(b|0)!=48;if((h|0)>=125){if(!v){o=y;w=u;break}k[z>>2]=k[z>>2]|1;o=y;w=u;break}o=G+(h<<2)|0;if(g)m=b+-48+((k[o>>2]|0)*10|0)|0;k[o>>2]=m;g=g+1|0;m=(g|0)==9;o=y;w=u;s=1;g=m?0:g;h=(m&1)+h|0;n=v?u:n}}while(0);b=k[D>>2]|0;if(b>>>0<(k[A>>2]|0)>>>0){k[D>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;m=b+-48|0;u=(b|0)==46;if(!(u|m>>>0<10)){m=x;y=161;break g}else y=o}s=(s|0)!=0;y=169}else{w=0;t=0;s=g;m=n;g=0;h=0;n=0;y=161}}while(0);do{if((y|0)==161){z=(m|0)==0;e=z?w:e;o=z?t:o;s=(s|0)!=0;if(!((b|32|0)==101&s))if((b|0)>-1){b=w;m=t;y=169;break}else{b=w;m=t;y=171;break}m=Dl(a,c)|0;b=M;if((m|0)==0&(b|0)==-2147483648){if(!c){qk(a,0);d=0.0;break}if(!(k[A>>2]|0)){m=0;b=0}else{k[D>>2]=(k[D>>2]|0)+-1;m=0;b=0}}e=tw(m|0,b|0,e|0,o|0)|0;s=w;o=M;m=t;y=173}}while(0);if((y|0)==169)if(k[A>>2]|0){k[D>>2]=(k[D>>2]|0)+-1;if(s){s=b;y=173}else y=172}else y=171;if((y|0)==171)if(s){s=b;y=173}else y=172;do{if((y|0)==172){J=mk()|0;k[J>>2]=22;qk(a,0);d=0.0}else if((y|0)==173){b=k[G>>2]|0;if(!b){d=+(H|0)*0.0;break}if(((m|0)<0|(m|0)==0&s>>>0<10)&((e|0)==(s|0)&(o|0)==(m|0))?J>>>0>30|(b>>>J|0)==0:0){d=+(H|0)*+(b>>>0);break}a=(I|0)/-2|0;D=((a|0)<0)<<31>>31;if((o|0)>(D|0)|(o|0)==(D|0)&e>>>0>a>>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}a=I+-106|0;D=((a|0)<0)<<31>>31;if((o|0)<(D|0)|(o|0)==(D|0)&e>>>0>>0){J=mk()|0;k[J>>2]=34;d=+(H|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if(g){if((g|0)<9){m=G+(h<<2)|0;b=k[m>>2]|0;do{b=b*10|0;g=g+1|0}while((g|0)!=9);k[m>>2]=b}h=h+1|0}if((n|0)<9?(n|0)<=(e|0)&(e|0)<18:0){if((e|0)==9){d=+(H|0)*+((k[G>>2]|0)>>>0);break}if((e|0)<9){d=+(H|0)*+((k[G>>2]|0)>>>0)/+(k[37312+(8-e<<2)>>2]|0);break}a=J+27+(ia(e,-3)|0)|0;b=k[G>>2]|0;if((a|0)>30|(b>>>a|0)==0){d=+(H|0)*+(b>>>0)*+(k[37312+(e+-10<<2)>>2]|0);break}}b=(e|0)%9|0;if(!b){g=0;b=0}else{s=(e|0)>-1?b:b+9|0;m=k[37312+(8-s<<2)>>2]|0;if(h){n=1e9/(m|0)|0;g=0;b=0;o=0;do{A=G+(o<<2)|0;D=k[A>>2]|0;a=((D>>>0)/(m>>>0)|0)+b|0;k[A>>2]=a;b=ia((D>>>0)%(m>>>0)|0,n)|0;a=(o|0)==(g|0)&(a|0)==0;o=o+1|0;e=a?e+-9|0:e;g=a?o&127:g}while((o|0)!=(h|0));if(b){k[G+(h<<2)>>2]=b;h=h+1|0}}else{g=0;h=0}b=0;e=9-s+e|0}i:while(1){t=(e|0)<18;u=(e|0)==18;v=G+(g<<2)|0;do{if(!t){if(!u)break i;if((k[v>>2]|0)>>>0>=9007199){e=18;break i}}m=0;n=h+127|0;while(1){s=n&127;o=G+(s<<2)|0;n=ww(k[o>>2]|0,0,29)|0;n=tw(n|0,M|0,m|0,0)|0;m=M;if(m>>>0>0|(m|0)==0&n>>>0>1e9){a=Ew(n|0,m|0,1e9,0)|0;n=Fw(n|0,m|0,1e9,0)|0;m=a}else m=0;k[o>>2]=n;a=(s|0)==(g|0);h=(s|0)!=(h+127&127|0)|a?h:(n|0)==0?s:h;if(a)break;else n=s+-1|0}b=b+-29|0}while((m|0)==0);g=g+127&127;if((g|0)==(h|0)){a=h+127&127;h=G+((h+126&127)<<2)|0;k[h>>2]=k[h>>2]|k[G+(a<<2)>>2];h=a}k[G+(g<<2)>>2]=m;e=e+9|0}j:while(1){w=h+1&127;v=G+((h+127&127)<<2)|0;while(1){t=(e|0)==18;u=(e|0)>27?9:1;s=t^1;while(1){n=g&127;o=(n|0)==(h|0);do{if(!o){m=k[G+(n<<2)>>2]|0;if(m>>>0<9007199){y=219;break}if(m>>>0>9007199)break;m=g+1&127;if((m|0)==(h|0)){y=219;break}m=k[G+(m<<2)>>2]|0;if(m>>>0<254740991){y=219;break}if(!(m>>>0>254740991|s)){e=n;break j}}else y=219}while(0);if((y|0)==219?(y=0,t):0){y=220;break j}b=b+u|0;if((g|0)==(h|0))g=h;else break}s=(1<>>u;n=g;m=0;o=g;while(1){D=G+(o<<2)|0;a=k[D>>2]|0;g=(a>>>u)+m|0;k[D>>2]=g;m=ia(a&s,t)|0;g=(o|0)==(n|0)&(g|0)==0;o=o+1&127;e=g?e+-9|0:e;g=g?o:n;if((o|0)==(h|0))break;else n=g}if(!m)continue;if((w|0)!=(g|0))break;k[v>>2]=k[v>>2]|1}k[G+(h<<2)>>2]=m;h=w}if((y|0)==220)if(o){k[G+(w+-1<<2)>>2]=0;e=h;h=w}else e=n;d=+((k[G+(e<<2)>>2]|0)>>>0);e=g+1&127;if((e|0)==(h|0)){h=g+2&127;k[G+(h+-1<<2)>>2]=0}q=+(H|0);f=q*(d*1.0e9+ +((k[G+(e<<2)>>2]|0)>>>0));t=b+53|0;o=t-I|0;s=(o|0)<(J|0);e=s&1;n=s?(o|0)<0?0:o:J;if((n|0)<53){L=+Ck(+Hk(1.0,105-n|0),f);j=+Ek(f,+Hk(1.0,53-n|0));p=L;d=j;j=L+(f-j)}else{p=0.0;d=0.0;j=f}m=g+2&127;do{if((m|0)==(h|0))f=d;else{m=k[G+(m<<2)>>2]|0;do{if(m>>>0>=5e8){if(m>>>0>5e8){d=q*.75+d;break}if((g+3&127|0)==(h|0)){d=q*.5+d;break}else{d=q*.75+d;break}}else{if((m|0)==0?(g+3&127|0)==(h|0):0)break;d=q*.25+d}}while(0);if((53-n|0)<=1){f=d;break}if(+Ek(d,1.0)!=0.0){f=d;break}f=d+1.0}}while(0);d=j+f-p;do{if((t&2147483647|0)>(-2-E|0)){if(+X(+d)>=9007199254740992.0){e=s&(n|0)==(o|0)?0:e;b=b+1|0;d=d*.5}if((b+50|0)<=(F|0)?!(f!=0.0&(e|0)!=0):0)break;J=mk()|0;k[J>>2]=34}}while(0);d=+Ik(d,b)}}while(0);break a}default:{if(k[A>>2]|0)k[D>>2]=(k[D>>2]|0)+-1;J=mk()|0;k[J>>2]=22;qk(a,0);d=0.0;break a}}}}}while(0);if((y|0)==23){e=(k[A>>2]|0)==0;if(!e)k[D>>2]=(k[D>>2]|0)+-1;if((c|0)!=0&b>>>0>3)do{if(!e)k[D>>2]=(k[D>>2]|0)+-1;b=b+-1|0}while(b>>>0>3)}d=+(H|0)*C}}while(0);r=K;return+d}function pk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0;a:do{if(b>>>0>36){e=mk()|0;k[e>>2]=22;e=0;d=0}else{r=a+4|0;q=a+100|0;do{f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0}while((kk(f)|0)!=0);b:do{switch(f|0){case 43:case 45:{g=((f|0)==45)<<31>>31;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0;p=g;break b}else{f=rk(a)|0;p=g;break b}}default:p=0}}while(0);g=(b|0)==0;do{if((b&-17|0)==0&(f|0)==48){f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;if((f|32|0)!=120)if(g){b=8;n=46;break}else{n=32;break}b=k[r>>2]|0;if(b>>>0<(k[q>>2]|0)>>>0){k[r>>2]=b+1;f=l[b>>0]|0}else f=rk(a)|0;if((l[53879+(f+1)>>0]|0)>15){d=(k[q>>2]|0)==0;if(!d)k[r>>2]=(k[r>>2]|0)+-1;if(!c){qk(a,0);e=0;d=0;break a}if(d){e=0;d=0;break a}k[r>>2]=(k[r>>2]|0)+-1;e=0;d=0;break a}else{b=16;n=46}}else{b=g?10:b;if((l[53879+(f+1)>>0]|0)>>>0>>0)n=32;else{if(k[q>>2]|0)k[r>>2]=(k[r>>2]|0)+-1;qk(a,0);e=mk()|0;k[e>>2]=22;e=0;d=0;break a}}}while(0);if((n|0)==32)if((b|0)==10){b=f+-48|0;if(b>>>0<10){f=0;while(1){g=(f*10|0)+b|0;b=k[r>>2]|0;if(b>>>0<(k[q>>2]|0)>>>0){k[r>>2]=b+1;f=l[b>>0]|0}else f=rk(a)|0;b=f+-48|0;if(!(b>>>0<10&g>>>0<429496729)){b=g;break}else f=g}g=0}else{b=0;g=0}c=f+-48|0;if(c>>>0<10){while(1){h=Dw(b|0,g|0,10,0)|0;j=M;m=((c|0)<0)<<31>>31;o=~m;if(j>>>0>o>>>0|(j|0)==(o|0)&h>>>0>~c>>>0){h=b;break}b=tw(h|0,j|0,c|0,m|0)|0;g=M;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;c=f+-48|0;if(!(c>>>0<10&(g>>>0<429496729|(g|0)==429496729&b>>>0<2576980378))){h=b;break}}if(c>>>0>9){f=h;b=p}else{b=10;n=72}}else{f=b;b=p}}else n=46;c:do{if((n|0)==46){if(!(b+-1&b)){n=i[54136+((b*23|0)>>>5&7)>>0]|0;g=i[53879+(f+1)>>0]|0;c=g&255;if(c>>>0>>0){f=0;while(1){h=c|f<>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;c=g&255;if(!(h>>>0<134217728&c>>>0>>0))break;else f=h}c=0}else{c=0;h=0}j=uw(-1,-1,n|0)|0;m=M;if((g&255)>>>0>=b>>>0|(c>>>0>m>>>0|(c|0)==(m|0)&h>>>0>j>>>0)){g=c;n=72;break}else f=c;while(1){h=ww(h|0,f|0,n|0)|0;c=M;h=g&255|h;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;if((g&255)>>>0>=b>>>0|(c>>>0>m>>>0|(c|0)==(m|0)&h>>>0>j>>>0)){g=c;n=72;break c}else f=c}}g=i[53879+(f+1)>>0]|0;c=g&255;if(c>>>0>>0){f=0;while(1){h=c+(ia(f,b)|0)|0;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;c=g&255;if(!(h>>>0<119304647&c>>>0>>0))break;else f=h}c=0}else{h=0;c=0}if((g&255)>>>0>>0){n=Ew(-1,-1,b|0,0)|0;o=M;m=c;while(1){if(m>>>0>o>>>0|(m|0)==(o|0)&h>>>0>n>>>0){g=m;n=72;break c}c=Dw(h|0,m|0,b|0,0)|0;j=M;g=g&255;if(j>>>0>4294967295|(j|0)==-1&c>>>0>~g>>>0){g=m;n=72;break c}h=tw(g|0,0,c|0,j|0)|0;c=M;f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;g=i[53879+(f+1)>>0]|0;if((g&255)>>>0>=b>>>0){g=c;n=72;break}else m=c}}else{g=c;n=72}}}while(0);if((n|0)==72)if((l[53879+(f+1)>>0]|0)>>>0>>0){do{f=k[r>>2]|0;if(f>>>0<(k[q>>2]|0)>>>0){k[r>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0}while((l[53879+(f+1)>>0]|0)>>>0>>0);g=mk()|0;k[g>>2]=34;g=e;f=d;b=(d&1|0)==0&0==0?p:0}else{f=h;b=p}if(k[q>>2]|0)k[r>>2]=(k[r>>2]|0)+-1;if(!(g>>>0>>0|(g|0)==(e|0)&f>>>0>>0)){if(!((d&1|0)!=0|0!=0|(b|0)!=0)){r=mk()|0;k[r>>2]=34;d=tw(d|0,e|0,-1,-1)|0;e=M;break}if(g>>>0>e>>>0|(g|0)==(e|0)&f>>>0>d>>>0){r=mk()|0;k[r>>2]=34;break}}d=((b|0)<0)<<31>>31;d=rw(f^b|0,g^d|0,b|0,d|0)|0;e=M}}while(0);M=e;return d|0}function qk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;k[a+104>>2]=b;c=k[a+4>>2]|0;d=k[a+8>>2]|0;e=d-c|0;k[a+108>>2]=e;if((b|0)!=0&(e|0)>(b|0))k[a+100>>2]=c+b;else k[a+100>>2]=d;return}function rk(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=a+104|0;f=k[c>>2]|0;if((f|0)!=0?(k[a+108>>2]|0)>=(f|0):0)g=4;else{b=cl(a)|0;if((b|0)>=0){e=k[c>>2]|0;c=a+8|0;if(e){d=k[c>>2]|0;f=k[a+4>>2]|0;c=d;e=e-(k[a+108>>2]|0)+-1|0;if((c-f|0)>(e|0))k[a+100>>2]=f+e;else g=9}else{d=k[c>>2]|0;c=d;g=9}if((g|0)==9)k[a+100>>2]=c;c=k[a+4>>2]|0;if(d){a=a+108|0;k[a>>2]=d+1-c+(k[a>>2]|0)}c=c+-1|0;if((l[c>>0]|0|0)!=(b|0))i[c>>0]=b}else g=4}if((g|0)==4){k[a+100>>2]=0;b=-1}return b|0}function sk(a){a=a|0;var b=0;if(a>>>0>4294963200){b=mk()|0;k[b>>2]=0-a;a=-1}return a|0}function tk(a){a=a|0;return 0}function uk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return d|0}function vk(a,b){a=a|0;b=b|0;return-1|0}function wk(a){a=a|0;Ql(a);return}function xk(a,b){a=a|0;b=b|0;return(a+-48|0)>>>0<10|0}function yk(a,b){a=a|0;b=b|0;return lk(a)|0}function zk(a,b,c){a=a|0;b=b|0;c=c|0;if(((i[b>>0]|0)!=0?(vl(b,58885)|0)!=0:0)?(vl(b,54145)|0)!=0:0)c=0;else if(!c)c=Rl(1,4)|0;return c|0}function Ak(a){a=a|0;var b=0,c=0;b=(kb()|0)+176|0;c=k[b>>2]|0;if(a)k[b>>2]=a;return c|0}function Bk(a,b){a=+a;b=+b;var c=0,d=0;p[t>>3]=a;d=k[t>>2]|0;c=k[t+4>>2]|0;p[t>>3]=b;c=k[t+4>>2]&-2147483648|c&2147483647;k[t>>2]=d;k[t+4>>2]=c;return+ +p[t>>3]}function Ck(a,b){a=+a;b=+b;return+ +Bk(a,b)}function Dk(a,b){a=+a;b=+b;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;p[t>>3]=a;c=k[t>>2]|0;j=k[t+4>>2]|0;p[t>>3]=b;l=k[t>>2]|0;m=k[t+4>>2]|0;d=uw(c|0,j|0,52)|0;d=d&2047;h=uw(l|0,m|0,52)|0;h=h&2047;n=j&-2147483648;g=ww(l|0,m|0,1)|0;i=M;a:do{if(!((g|0)==0&(i|0)==0)?(f=m&2147483647,!(f>>>0>2146435072|(f|0)==2146435072&l>>>0>0|(d|0)==2047)):0){e=ww(c|0,j|0,1)|0;f=M;if(!(f>>>0>i>>>0|(f|0)==(i|0)&e>>>0>g>>>0))return+((e|0)==(g|0)&(f|0)==(i|0)?a*0.0:a);if(!d){d=ww(c|0,j|0,12)|0;e=M;if((e|0)>-1|(e|0)==-1&d>>>0>4294967295){f=d;d=0;do{d=d+-1|0;f=ww(f|0,e|0,1)|0;e=M}while((e|0)>-1|(e|0)==-1&f>>>0>4294967295)}else d=0;c=ww(c|0,j|0,1-d|0)|0;e=M}else e=j&1048575|1048576;if(!h){f=ww(l|0,m|0,12)|0;g=M;if((g|0)>-1|(g|0)==-1&f>>>0>4294967295){h=0;do{h=h+-1|0;f=ww(f|0,g|0,1)|0;g=M}while((g|0)>-1|(g|0)==-1&f>>>0>4294967295)}else h=0;l=ww(l|0,m|0,1-h|0)|0;j=M}else j=m&1048575|1048576;i=rw(c|0,e|0,l|0,j|0)|0;g=M;f=(g|0)>-1|(g|0)==-1&i>>>0>4294967295;b:do{if((d|0)>(h|0)){while(1){if(f)if((c|0)==(l|0)&(e|0)==(j|0))break;else{c=i;e=g}c=ww(c|0,e|0,1)|0;e=M;d=d+-1|0;i=rw(c|0,e|0,l|0,j|0)|0;g=M;f=(g|0)>-1|(g|0)==-1&i>>>0>4294967295;if((d|0)<=(h|0))break b}b=a*0.0;break a}}while(0);if(f)if((c|0)==(l|0)&(e|0)==(j|0)){b=a*0.0;break}else{e=g;c=i}if(e>>>0<1048576|(e|0)==1048576&c>>>0<0)do{c=ww(c|0,e|0,1)|0;e=M;d=d+-1|0}while(e>>>0<1048576|(e|0)==1048576&c>>>0<0);if((d|0)>0){m=tw(c|0,e|0,0,-1048576)|0;c=M;d=ww(d|0,0,52)|0;c=c|M;d=m|d}else{d=uw(c|0,e|0,1-d|0)|0;c=M}k[t>>2]=d;k[t+4>>2]=c|n;b=+p[t>>3]}else o=3}while(0);if((o|0)==3){b=a*b;b=b/b}return+b}function Ek(a,b){a=+a;b=+b;return+ +Dk(a,b)}function Fk(a,b){a=+a;b=b|0;var c=0,d=0,e=0;p[t>>3]=a;c=k[t>>2]|0;d=k[t+4>>2]|0;e=uw(c|0,d|0,52)|0;e=e&2047;switch(e|0){case 0:{if(a!=0.0){a=+Fk(a*18446744073709551616.0,b);c=(k[b>>2]|0)+-64|0}else c=0;k[b>>2]=c;break}case 2047:break;default:{k[b>>2]=e+-1022;k[t>>2]=c;k[t+4>>2]=d&-2146435073|1071644672;a=+p[t>>3]}}return+a}function Gk(a,b){a=+a;b=b|0;return+ +Fk(a,b)}function Hk(a,b){a=+a;b=b|0;var c=0;if((b|0)>1023){a=a*8988465674311579538646525.0e283;c=b+-1023|0;if((c|0)>1023){c=b+-2046|0;c=(c|0)>1023?1023:c;a=a*8988465674311579538646525.0e283}}else if((b|0)<-1022){a=a*2.2250738585072014e-308;c=b+1022|0;if((c|0)<-1022){c=b+2044|0;c=(c|0)<-1022?-1022:c;a=a*2.2250738585072014e-308}}else c=b;c=ww(c+1023|0,0,52)|0;b=M;k[t>>2]=c;k[t+4>>2]=b;return+(a*+p[t>>3])}function Ik(a,b){a=+a;b=b|0;return+ +Hk(a,b)}function Jk(a,b,c){a=a|0;b=b|0;c=c|0;return Kk(0,a,b,(c|0)!=0?c:37344)|0}function Kk(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,j=0,l=0;j=r;r=r+16|0;e=j;g=(d|0)==0?37348:d;d=k[g>>2]|0;a:do{if(!b)if(!d)d=0;else h=15;else{f=(a|0)==0?e:a;if(!c)d=-2;else{if(!d){d=i[b>>0]|0;e=d&255;if(d<<24>>24>-1){k[f>>2]=e;d=d<<24>>24!=0&1;break}d=e+-194|0;if(d>>>0>50){h=15;break}d=k[37076+(d<<2)>>2]|0;e=c+-1|0;if(e){b=b+1|0;h=9}}else{e=c;h=9}b:do{if((h|0)==9){a=i[b>>0]|0;l=(a&255)>>>3;if((l+-16|l+(d>>26))>>>0>7){h=15;break a}while(1){b=b+1|0;d=(a&255)+-128|d<<6;e=e+-1|0;if((d|0)>=0)break;if(!e)break b;a=i[b>>0]|0;if((a&-64)<<24>>24!=-128){h=15;break a}}k[g>>2]=0;k[f>>2]=d;d=c-e|0;break a}}while(0);k[g>>2]=d;d=-2}}}while(0);if((h|0)==15){k[g>>2]=0;d=mk()|0;k[d>>2]=84;d=-1}r=j;return d|0}function Lk(a){a=a|0;if(!a)a=1;else a=(k[a>>2]|0)==0;return a&1|0}function Mk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0;n=r;r=r+1040|0;j=n+8|0;m=n;i=k[b>>2]|0;k[m>>2]=i;l=(a|0)!=0;d=l?d:256;a=l?a:j;f=i;a:do{if((d|0)!=0&(i|0)!=0){h=d;i=f;d=0;while(1){f=c>>>2;g=f>>>0>=h>>>0;if(!(c>>>0>131|g)){f=i;break a}f=g?h:f;c=c-f|0;f=Nk(a,m,f,e)|0;if((f|0)==-1){d=c;break}o=(a|0)==(j|0);i=o?0:f;g=h-i|0;a=o?a:a+(f<<2)|0;d=f+d|0;f=k[m>>2]|0;if((h|0)!=(i|0)&(f|0)!=0){h=g;i=f}else{h=g;break a}}c=d;h=0;f=k[m>>2]|0;d=-1}else{h=d;d=0}}while(0);b:do{if((f|0)!=0?(h|0)!=0&(c|0)!=0:0){g=f;f=a;while(1){a=Kk(f,g,c,e)|0;if((a+2|0)>>>0<3)break;g=(k[m>>2]|0)+a|0;k[m>>2]=g;h=h+-1|0;d=d+1|0;if(!((h|0)!=0&(c|0)!=(a|0)))break b;else{c=c-a|0;f=f+4|0}}switch(a|0){case-1:{d=-1;break b}case 0:{k[m>>2]=0;break b}default:{k[e>>2]=0;break b}}}}while(0);if(l)k[b>>2]=k[m>>2];r=n;return d|0}function Nk(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,j=0,m=0;e=k[b>>2]|0;if((d|0)!=0?(f=k[d>>2]|0,(f|0)!=0):0)if(!a){d=c;g=e;m=16}else{k[d>>2]=0;j=a;d=c;h=f;m=37}else if(!a){d=c;m=7}else{f=a;d=c;m=6}a:while(1)if((m|0)==6){if(!d){m=26;break}else a=f;while(1){f=i[e>>0]|0;do{if(((f&255)+-1|0)>>>0<127?d>>>0>4&(e&3|0)==0:0){g=e;while(1){e=k[g>>2]|0;if((e+-16843009|e)&-2139062144){f=e;e=g;m=32;break}k[a>>2]=e&255;k[a+4>>2]=l[g+1>>0];k[a+8>>2]=l[g+2>>0];e=g+4|0;f=a+16|0;k[a+12>>2]=l[g+3>>0];d=d+-4|0;if(d>>>0>4){a=f;g=e}else{m=31;break}}if((m|0)==31){a=f;f=i[e>>0]|0;break}else if((m|0)==32){f=f&255;break}}}while(0);f=f&255;if((f+-1|0)>>>0>=127)break;e=e+1|0;k[a>>2]=f;d=d+-1|0;if(!d){m=26;break a}else a=a+4|0}f=f+-194|0;if(f>>>0>50){m=48;break}j=a;h=k[37076+(f<<2)>>2]|0;e=e+1|0;m=37;continue}else if((m|0)==7){f=i[e>>0]|0;if(((f&255)+-1|0)>>>0<127?(e&3|0)==0:0){f=k[e>>2]|0;if(!((f+-16843009|f)&-2139062144))do{e=e+4|0;d=d+-4|0;f=k[e>>2]|0}while(((f+-16843009|f)&-2139062144|0)==0);f=f&255}f=f&255;if((f+-1|0)>>>0<127){d=d+-1|0;e=e+1|0;m=7;continue}f=f+-194|0;if(f>>>0>50){m=48;break}f=k[37076+(f<<2)>>2]|0;g=e+1|0;m=16;continue}else if((m|0)==16){m=(l[g>>0]|0)>>>3;if((m+-16|m+(f>>26))>>>0>7){m=17;break}e=g+1|0;if(f&33554432){if((i[e>>0]&-64)<<24>>24!=-128){m=20;break}e=g+2|0;if(f&524288){if((i[e>>0]&-64)<<24>>24!=-128){m=23;break}e=g+3|0}}d=d+-1|0;m=7;continue}else if((m|0)==37){f=l[e>>0]|0;m=f>>>3;if((m+-16|m+(h>>26))>>>0>7){m=38;break}g=e+1|0;a=f+-128|h<<6;if((a|0)<0){f=l[g>>0]|0;if((f&192|0)!=128){m=41;break}g=e+2|0;a=f+-128|a<<6;if((a|0)<0){f=l[g>>0]|0;if((f&192|0)!=128){m=44;break}a=f+-128|a<<6;e=e+3|0}else e=g}else e=g;k[j>>2]=a;f=j+4|0;d=d+-1|0;m=6;continue}if((m|0)==17){e=g+-1|0;m=47}else if((m|0)==20){e=g+-1|0;m=47}else if((m|0)==23){e=g+-1|0;m=47}else if((m|0)==26)k[b>>2]=e;else if((m|0)==38){a=j;f=h;e=e+-1|0;m=47}else if((m|0)==41){d=j;c=e+-1|0;m=52}else if((m|0)==44){d=j;c=e+-1|0;m=52}if((m|0)==47)if(!f)m=48;else{d=a;c=e;m=52}if((m|0)==48)if(!(i[e>>0]|0)){if(a){k[a>>2]=0;k[b>>2]=0}c=c-d|0}else{d=a;c=e;m=52}if((m|0)==52){m=mk()|0;k[m>>2]=84;if(!d)c=-1;else{k[b>>2]=c;c=-1}}return c|0}function Ok(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;g=r;r=r+16|0;d=g;a:do{if(!b)d=0;else{do{if(c){f=(a|0)==0?d:a;d=i[b>>0]|0;a=d&255;if(d<<24>>24>-1){k[f>>2]=a;d=d<<24>>24!=0&1;break a}d=a+-194|0;if(d>>>0<=50){a=b+1|0;e=k[37076+(d<<2)>>2]|0;if(c>>>0<4?(e&-2147483648>>>((c*6|0)+-6|0)|0)!=0:0)break;d=l[a>>0]|0;c=d>>>3;if((c+-16|c+(e>>26))>>>0<=7){d=d+-128|e<<6;if((d|0)>=0){k[f>>2]=d;d=2;break a}a=l[b+2>>0]|0;if((a&192|0)==128){a=a+-128|d<<6;if((a|0)>=0){k[f>>2]=a;d=3;break a}d=l[b+3>>0]|0;if((d&192|0)==128){k[f>>2]=d+-128|a<<6;d=4;break a}}}}}}while(0);d=mk()|0;k[d>>2]=84;d=-1}}while(0);r=g;return d|0}function Pk(a,b,c){a=a|0;b=b|0;c=c|0;do{if(a){if(b>>>0<128){i[a>>0]=b;a=1;break}if(b>>>0<2048){i[a>>0]=b>>>6|192;i[a+1>>0]=b&63|128;a=2;break}if(b>>>0<55296|(b&-8192|0)==57344){i[a>>0]=b>>>12|224;i[a+1>>0]=b>>>6&63|128;i[a+2>>0]=b&63|128;a=3;break}if((b+-65536|0)>>>0<1048576){i[a>>0]=b>>>18|240;i[a+1>>0]=b>>>12&63|128;i[a+2>>0]=b>>>6&63|128;i[a+3>>0]=b&63|128;a=4;break}else{a=mk()|0;k[a>>2]=84;a=-1;break}}else a=1}while(0);return a|0}function Qk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0;l=r;r=r+272|0;h=l+8|0;j=l;g=k[b>>2]|0;k[j>>2]=g;i=(a|0)!=0;e=i?d:256;d=i?a:h;a=g;a:do{if((e|0)!=0&(g|0)!=0){g=e;f=a;e=0;while(1){a=c>>>0>=g>>>0;if(!(a|c>>>0>32)){a=f;break a}a=a?g:c;c=c-a|0;a=Rk(d,j,a,0)|0;if((a|0)==-1){e=c;break}n=(d|0)==(h|0);m=n?0:a;f=g-m|0;d=n?d:d+a|0;e=a+e|0;a=k[j>>2]|0;if((g|0)!=(m|0)&(a|0)!=0){g=f;f=a}else{g=f;break a}}c=e;g=0;a=k[j>>2]|0;e=-1}else{g=e;e=0}}while(0);b:do{if((a|0)!=0?(g|0)!=0&(c|0)!=0:0){f=a;a=d;while(1){d=Pk(a,k[f>>2]|0,0)|0;if((d+1|0)>>>0<2)break;f=(k[j>>2]|0)+4|0;k[j>>2]=f;c=c+-1|0;e=e+1|0;if(!((g|0)!=(d|0)&(c|0)!=0))break b;else{g=g-d|0;a=a+d|0}}if(!d)k[j>>2]=0;else e=-1}}while(0);if(i)k[b>>2]=k[j>>2];r=l;return e|0}function Rk(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;h=r;r=r+16|0;g=h;a:do{if(!a){a=k[b>>2]|0;d=k[a>>2]|0;if(!d)c=0;else{c=0;do{if(d>>>0>127){d=Pk(g,d,0)|0;if((d|0)==-1){c=-1;break a}}else d=1;c=d+c|0;a=a+4|0;d=k[a>>2]|0}while((d|0)!=0)}}else{b:do{if(c>>>0>3){d=c;e=k[b>>2]|0;while(1){f=k[e>>2]|0;if((f+-1|0)>>>0>126){if(!f)break;f=Pk(a,f,0)|0;if((f|0)==-1){c=-1;break a}a=a+f|0;d=d-f|0}else{i[a>>0]=f;a=a+1|0;d=d+-1|0;e=k[b>>2]|0}e=e+4|0;k[b>>2]=e;if(d>>>0<=3)break b}i[a>>0]=0;k[b>>2]=0;c=c-d|0;break a}else d=c}while(0);if(d){e=k[b>>2]|0;while(1){f=k[e>>2]|0;if((f+-1|0)>>>0>126){if(!f){e=19;break}f=Pk(g,f,0)|0;if((f|0)==-1){c=-1;break a}if(d>>>0>>0){e=22;break}Pk(a,k[e>>2]|0,0)|0;a=a+f|0;d=d-f|0}else{i[a>>0]=f;a=a+1|0;d=d+-1|0;e=k[b>>2]|0}e=e+4|0;k[b>>2]=e;if(!d)break a}if((e|0)==19){i[a>>0]=0;k[b>>2]=0;c=c-d|0;break}else if((e|0)==22){c=c-d|0;break}}}}while(0);r=h;return c|0}function Sk(a,b){a=a|0;b=b|0;if(!a)a=0;else a=Pk(a,b,0)|0;return a|0}function Tk(a){a=a|0;return 0}function Uk(a){a=a|0;return}function Vk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;j=r;r=r+16|0;h=j;g=b&255;i[h>>0]=g;d=a+16|0;e=k[d>>2]|0;if(!e)if(!(bl(a)|0)){e=k[d>>2]|0;f=4}else c=-1;else f=4;do{if((f|0)==4){d=a+20|0;f=k[d>>2]|0;if(f>>>0>>0?(c=b&255,(c|0)!=(i[a+75>>0]|0)):0){k[d>>2]=f+1;i[f>>0]=g;break}if((Qb[k[a+36>>2]&63](a,h,1)|0)==1)c=l[h>>0]|0;else c=-1}}while(0);r=j;return c|0}function Wk(a){a=a|0;var b=0,c=0;b=r;r=r+16|0;c=b;k[c>>2]=k[a+60>>2];a=sk(wb(6,c|0)|0)|0;r=b;return a|0}function Xk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0;l=r;r=r+48|0;f=l+16|0;e=l;d=l+32|0;k[d>>2]=b;g=d+4|0;j=a+48|0;m=k[j>>2]|0;k[g>>2]=c-((m|0)!=0&1);h=a+44|0;k[d+8>>2]=k[h>>2];k[d+12>>2]=m;if(!(k[9258]|0)){k[f>>2]=k[a+60>>2];k[f+4>>2]=d;k[f+8>>2]=2;d=sk(Eb(145,f|0)|0)|0}else{xb(185,a|0);k[e>>2]=k[a+60>>2];k[e+4>>2]=d;k[e+8>>2]=2;d=sk(Eb(145,e|0)|0)|0;pb(0)}if((d|0)>=1){g=k[g>>2]|0;if(d>>>0>g>>>0){f=k[h>>2]|0;e=a+4|0;k[e>>2]=f;k[a+8>>2]=f+(d-g);if(!(k[j>>2]|0))d=c;else{k[e>>2]=f+1;i[b+(c+-1)>>0]=i[f>>0]|0;d=c}}}else{k[a>>2]=k[a>>2]|d&48^16;k[a+8>>2]=0;k[a+4>>2]=0}r=l;return d|0}function Yk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;e=r;r=r+32|0;f=e;d=e+20|0;k[f>>2]=k[a+60>>2];k[f+4>>2]=0;k[f+8>>2]=b;k[f+12>>2]=d;k[f+16>>2]=c;if((sk(Db(140,f|0)|0)|0)<0){k[d>>2]=-1;a=-1}else a=k[d>>2]|0;r=e;return a|0}function Zk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0;p=r;r=r+48|0;m=p+16|0;l=p;d=p+32|0;n=a+28|0;e=k[n>>2]|0;k[d>>2]=e;o=a+20|0;e=(k[o>>2]|0)-e|0;k[d+4>>2]=e;k[d+8>>2]=b;k[d+12>>2]=c;i=a+60|0;j=a+44|0;b=2;e=e+c|0;while(1){if(!(k[9258]|0)){k[m>>2]=k[i>>2];k[m+4>>2]=d;k[m+8>>2]=b;g=sk(Fb(146,m|0)|0)|0}else{xb(186,a|0);k[l>>2]=k[i>>2];k[l+4>>2]=d;k[l+8>>2]=b;g=sk(Fb(146,l|0)|0)|0;pb(0)}if((e|0)==(g|0)){e=6;break}if((g|0)<0){e=8;break}e=e-g|0;f=k[d+4>>2]|0;if(g>>>0<=f>>>0)if((b|0)==2){k[n>>2]=(k[n>>2]|0)+g;h=f;b=2}else h=f;else{h=k[j>>2]|0;k[n>>2]=h;k[o>>2]=h;h=k[d+12>>2]|0;g=g-f|0;d=d+8|0;b=b+-1|0}k[d>>2]=(k[d>>2]|0)+g;k[d+4>>2]=h-g}if((e|0)==6){m=k[j>>2]|0;k[a+16>>2]=m+(k[a+48>>2]|0);a=m;k[n>>2]=a;k[o>>2]=a}else if((e|0)==8){k[a+16>>2]=0;k[n>>2]=0;k[o>>2]=0;k[a>>2]=k[a>>2]|32;if((b|0)==2)c=0;else c=c-(k[d+4>>2]|0)|0}r=p;return c|0}function _k(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=r;r=r+80|0;d=e;k[a+36>>2]=8;if((k[a>>2]&64|0)==0?(k[d>>2]=k[a+60>>2],k[d+4>>2]=21505,k[d+8>>2]=e+12,(nb(54,d|0)|0)!=0):0)i[a+75>>0]=-1;d=Zk(a,b,c)|0;r=e;return d|0}function $k(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=a+84|0;f=k[d>>2]|0;g=c+256|0;e=tl(f,0,g)|0;e=(e|0)==0?g:e-f|0;c=e>>>0>>0?e:c;vw(b|0,f|0,c|0)|0;k[a+4>>2]=f+c;b=f+e|0;k[a+8>>2]=b;k[d>>2]=b;return c|0}function al(a){a=a|0;var b=0,c=0;b=a+74|0;c=i[b>>0]|0;i[b>>0]=c+255|c;b=a+20|0;c=a+44|0;if((k[b>>2]|0)>>>0>(k[c>>2]|0)>>>0)Qb[k[a+36>>2]&63](a,0,0)|0;k[a+16>>2]=0;k[a+28>>2]=0;k[b>>2]=0;b=k[a>>2]|0;if(b&20)if(!(b&4))b=-1;else{k[a>>2]=b|32;b=-1}else{b=k[c>>2]|0;k[a+8>>2]=b;k[a+4>>2]=b;b=0}return b|0}function bl(a){a=a|0;var b=0,c=0;b=a+74|0;c=i[b>>0]|0;i[b>>0]=c+255|c;b=k[a>>2]|0;if(!(b&8)){k[a+8>>2]=0;k[a+4>>2]=0;b=k[a+44>>2]|0;k[a+28>>2]=b;k[a+20>>2]=b;k[a+16>>2]=b+(k[a+48>>2]|0);b=0}else{k[a>>2]=b|32;b=-1}return b|0}function cl(a){a=a|0;var b=0,c=0;c=r;r=r+16|0;b=c;if((k[a+8>>2]|0)==0?(al(a)|0)!=0:0)b=-1;else if((Qb[k[a+32>>2]&63](a,b,1)|0)==1)b=l[b>>0]|0;else b=-1;r=c;return b|0}function dl(a){a=a|0;var b=0,c=0;do{if(a){if((k[a+76>>2]|0)<=-1){b=Gl(a)|0;break}c=(Tk(a)|0)==0;b=Gl(a)|0;if(!c)Uk(a)}else{if(!(k[9323]|0))b=0;else b=dl(k[9323]|0)|0;Na(37060);a=k[9264]|0;if(a)do{if((k[a+76>>2]|0)>-1)c=Tk(a)|0;else c=0;if((k[a+20>>2]|0)>>>0>(k[a+28>>2]|0)>>>0)b=Gl(a)|0|b;if(c)Uk(a);a=k[a+56>>2]|0}while((a|0)!=0);ob(37060)}}while(0);return b|0}function el(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;if((k[b+76>>2]|0)>=0?(Tk(b)|0)!=0:0){if((i[b+75>>0]|0)!=(a|0)?(d=b+20|0,e=k[d>>2]|0,e>>>0<(k[b+16>>2]|0)>>>0):0){k[d>>2]=e+1;i[e>>0]=a;c=a&255}else c=Vk(b,a)|0;Uk(b)}else g=3;do{if((g|0)==3){if((i[b+75>>0]|0)!=(a|0)?(f=b+20|0,c=k[f>>2]|0,c>>>0<(k[b+16>>2]|0)>>>0):0){k[f>>2]=c+1;i[c>>0]=a;c=a&255;break}c=Vk(b,a)|0}}while(0);return c|0}function fl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=c+16|0;e=k[d>>2]|0;if(!e)if(!(bl(c)|0)){e=k[d>>2]|0;f=4}else d=0;else f=4;a:do{if((f|0)==4){g=c+20|0;f=k[g>>2]|0;if((e-f|0)>>>0>>0){d=Qb[k[c+36>>2]&63](c,a,b)|0;break}b:do{if((i[c+75>>0]|0)>-1){d=b;while(1){if(!d){e=f;d=0;break b}e=d+-1|0;if((i[a+e>>0]|0)==10)break;else d=e}if((Qb[k[c+36>>2]&63](c,a,d)|0)>>>0>>0)break a;b=b-d|0;a=a+d|0;e=k[g>>2]|0}else{e=f;d=0}}while(0);vw(e|0,a|0,b|0)|0;k[g>>2]=(k[g>>2]|0)+b;d=d+b|0}}while(0);return d|0}function gl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=ia(c,b)|0;if((k[d+76>>2]|0)>-1){f=(Tk(d)|0)==0;a=fl(a,e,d)|0;if(!f)Uk(d)}else a=fl(a,e,d)|0;if((a|0)!=(e|0))c=(a>>>0)/(b>>>0)|0;return c|0}function hl(a){a=a|0;var b=0,c=0,d=0;if((k[a+76>>2]|0)>=0?(Tk(a)|0)!=0:0){b=a+4|0;c=k[b>>2]|0;if(c>>>0<(k[a+8>>2]|0)>>>0){k[b>>2]=c+1;b=l[c>>0]|0}else b=cl(a)|0}else d=3;do{if((d|0)==3){b=a+4|0;c=k[b>>2]|0;if(c>>>0<(k[a+8>>2]|0)>>>0){k[b>>2]=c+1;b=l[c>>0]|0;break}else{b=cl(a)|0;break}}}while(0);return b|0}function il(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=r;r=r+16|0;f=e;k[f>>2]=d;d=ol(a,b,c,f)|0;r=e;return d|0}function jl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=r;r=r+16|0;e=d;k[e>>2]=c;c=pl(a,b,e)|0;r=d;return c|0}function kl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;do{if((a|0)!=-1){if((k[b+76>>2]|0)>-1)e=Tk(b)|0;else e=0;if(!((k[b+8>>2]|0)==0?(al(b)|0)!=0:0))f=6;if((f|0)==6?(c=b+4|0,d=k[c>>2]|0,d>>>0>((k[b+44>>2]|0)+-8|0)>>>0):0){f=d+-1|0;k[c>>2]=f;i[f>>0]=a;k[b>>2]=k[b>>2]&-17;if(!e)break;Uk(b);break}if(e){Uk(b);a=-1}else a=-1}else a=-1}while(0);return a|0}function ll(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;h=r;r=r+16|0;d=h;e=Pl(240)|0;do{if(e){k[d>>2]=k[c>>2];d=ol(e,240,b,d)|0;if(d>>>0<240){b=Sl(e,d+1|0)|0;k[a>>2]=(b|0)!=0?b:e;break}Ql(e);if((d|0)>=0?(g=d+1|0,f=Pl(g)|0,k[a>>2]=f,(f|0)!=0):0)d=ol(f,g,b,c)|0;else d=-1}else d=-1}while(0);r=h;return d|0}function ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0;s=r;r=r+224|0;n=s+80|0;q=s+96|0;p=s;o=s+136|0;d=q;e=d+40|0;do{k[d>>2]=0;d=d+4|0}while((d|0)<(e|0));k[n>>2]=k[c>>2];if((Hl(0,b,n,p,q)|0)<0)c=-1;else{if((k[a+76>>2]|0)>-1)l=Tk(a)|0;else l=0;c=k[a>>2]|0;m=c&32;if((i[a+74>>0]|0)<1)k[a>>2]=c&-33;c=a+48|0;if(!(k[c>>2]|0)){e=a+44|0;f=k[e>>2]|0;k[e>>2]=o;g=a+28|0;k[g>>2]=o;h=a+20|0;k[h>>2]=o;k[c>>2]=80;j=a+16|0;k[j>>2]=o+80;d=Hl(a,b,n,p,q)|0;if(f){Qb[k[a+36>>2]&63](a,0,0)|0;d=(k[h>>2]|0)==0?-1:d;k[e>>2]=f;k[c>>2]=0;k[j>>2]=0;k[g>>2]=0;k[h>>2]=0}}else d=Hl(a,b,n,p,q)|0;c=k[a>>2]|0;k[a>>2]=c|m;if(l)Uk(a);c=(c&32|0)==0?d:-1}r=s;return c|0}function nl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,m=0.0,n=0,q=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,N=0,O=0,P=0,Q=0;P=r;r=r+304|0;G=P+16|0;I=P+8|0;H=P+33|0;J=P;y=P+32|0;if((k[a+76>>2]|0)>-1)O=Tk(a)|0;else O=0;d=i[b>>0]|0;a:do{if(d<<24>>24){K=a+4|0;L=a+100|0;F=a+108|0;z=a+8|0;A=H+10|0;B=H+33|0;C=I+4|0;D=H+46|0;E=H+94|0;f=d;d=0;g=b;s=0;e=0;b=0;b:while(1){c:do{if(!(kk(f&255)|0)){f=(i[g>>0]|0)==37;d:do{if(f){n=g+1|0;h=i[n>>0]|0;e:do{switch(h<<24>>24){case 37:break d;case 42:{x=0;h=g+2|0;break}default:{h=(h&255)+-48|0;if(h>>>0<10?(i[g+2>>0]|0)==36:0){k[G>>2]=k[c>>2];while(1){x=(k[G>>2]|0)+(4-1)&~(4-1);f=k[x>>2]|0;k[G>>2]=x+4;if(h>>>0>1)h=h+-1|0;else break}x=f;h=g+3|0;break e}h=(k[c>>2]|0)+(4-1)&~(4-1);x=k[h>>2]|0;k[c>>2]=h+4;h=n}}}while(0);f=i[h>>0]|0;g=f&255;if((g+-48|0)>>>0<10){f=0;while(1){n=(f*10|0)+-48+g|0;h=h+1|0;f=i[h>>0]|0;g=f&255;if((g+-48|0)>>>0>=10)break;else f=n}}else n=0;if(f<<24>>24==109){h=h+1|0;q=i[h>>0]|0;f=(x|0)!=0&1;e=0;b=0}else{q=f;f=0}g=h+1|0;switch(q&255|0){case 104:{w=(i[g>>0]|0)==104;g=w?h+2|0:g;h=w?-2:-1;break}case 108:{w=(i[g>>0]|0)==108;g=w?h+2|0:g;h=w?3:1;break}case 106:{h=3;break}case 116:case 122:{h=1;break}case 76:{h=2;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:{g=h;h=0;break}default:{N=152;break b}}q=l[g>>0]|0;t=(q&47|0)==3;q=t?q|32:q;t=t?1:h;switch(q|0){case 99:{w=s;v=(n|0)<1?1:n;break}case 91:{w=s;v=n;break}case 110:{if(!x){h=s;break c}switch(t|0){case-2:{i[x>>0]=s;h=s;break c}case-1:{j[x>>1]=s;h=s;break c}case 0:{k[x>>2]=s;h=s;break c}case 1:{k[x>>2]=s;h=s;break c}case 3:{h=x;k[h>>2]=s;k[h+4>>2]=((s|0)<0)<<31>>31;h=s;break c}default:{h=s;break c}}}default:{qk(a,0);do{h=k[K>>2]|0;if(h>>>0<(k[L>>2]|0)>>>0){k[K>>2]=h+1;h=l[h>>0]|0}else h=rk(a)|0}while((kk(h)|0)!=0);h=k[K>>2]|0;if(k[L>>2]|0){h=h+-1|0;k[K>>2]=h}w=(k[F>>2]|0)+s+h-(k[z>>2]|0)|0;v=n}}qk(a,v);h=k[K>>2]|0;n=k[L>>2]|0;if(h>>>0>>0)k[K>>2]=h+1;else{if((rk(a)|0)<0){N=152;break b}n=k[L>>2]|0}if(n)k[K>>2]=(k[K>>2]|0)+-1;f:do{switch(q|0){case 91:case 99:case 115:{u=(q|0)==99;g:do{if((q&239|0)==99){sw(H|0,-1,257)|0;i[H>>0]=0;if((q|0)==115){i[B>>0]=0;i[A>>0]=0;i[A+1>>0]=0;i[A+2>>0]=0;i[A+3>>0]=0;i[A+4>>0]=0}}else{Q=g+1|0;s=(i[Q>>0]|0)==94;h=s&1;q=s?Q:g;g=s?g+2|0:Q;sw(H|0,s&1|0,257)|0;i[H>>0]=0;switch(i[g>>0]|0){case 45:{s=(h^1)&255;i[D>>0]=s;g=q+2|0;break}case 93:{s=(h^1)&255;i[E>>0]=s;g=q+2|0;break}default:s=(h^1)&255}while(1){h=i[g>>0]|0;h:do{switch(h<<24>>24){case 0:{N=152;break b}case 93:break g;case 45:{q=g+1|0;h=i[q>>0]|0;switch(h<<24>>24){case 93:case 0:{h=45;break h}default:{}}g=i[g+-1>>0]|0;if((g&255)<(h&255)){g=g&255;do{g=g+1|0;i[H+g>>0]=s;h=i[q>>0]|0}while((g|0)<(h&255|0));g=q}else g=q;break}default:{}}}while(0);i[H+((h&255)+1)>>0]=s;g=g+1|0}}}while(0);q=u?v+1|0:31;s=(t|0)==1;t=(f|0)!=0;i:do{if(s){if(t){b=Pl(q<<2)|0;if(!b){e=0;N=152;break b}}else b=x;k[I>>2]=0;k[C>>2]=0;e=0;j:while(1){n=(b|0)==0;do{k:while(1){h=k[K>>2]|0;if(h>>>0<(k[L>>2]|0)>>>0){k[K>>2]=h+1;h=l[h>>0]|0}else h=rk(a)|0;if(!(i[H+(h+1)>>0]|0))break j;i[y>>0]=h;switch(Kk(J,y,1,I)|0){case-1:{e=0;N=152;break b}case-2:break;default:break k}}if(!n){k[b+(e<<2)>>2]=k[J>>2];e=e+1|0}}while(!(t&(e|0)==(q|0)));e=q<<1|1;h=Sl(b,e<<2)|0;if(!h){e=0;N=152;break b}Q=q;q=e;b=h;e=Q}if(!(Lk(I)|0)){e=0;N=152;break b}else{n=e;e=0}}else{if(t){e=Pl(q)|0;if(!e){e=0;b=0;N=152;break b}else h=0;while(1){do{b=k[K>>2]|0;if(b>>>0<(k[L>>2]|0)>>>0){k[K>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if(!(i[H+(b+1)>>0]|0)){n=h;b=0;break i}i[e+h>>0]=b;h=h+1|0}while((h|0)!=(q|0));b=q<<1|1;h=Sl(e,b)|0;if(!h){b=0;N=152;break b}else{Q=q;q=b;e=h;h=Q}}}if(!x){e=n;while(1){b=k[K>>2]|0;if(b>>>0>>0){k[K>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if(!(i[H+(b+1)>>0]|0)){n=0;e=0;b=0;break i}e=k[L>>2]|0}}else{e=0;while(1){b=k[K>>2]|0;if(b>>>0>>0){k[K>>2]=b+1;b=l[b>>0]|0}else b=rk(a)|0;if(!(i[H+(b+1)>>0]|0)){n=e;e=x;b=0;break i}i[x+e>>0]=b;n=k[L>>2]|0;e=e+1|0}}}}while(0);h=k[K>>2]|0;if(k[L>>2]|0){h=h+-1|0;k[K>>2]=h}h=h-(k[z>>2]|0)+(k[F>>2]|0)|0;if(!h)break b;if(!((h|0)==(v|0)|u^1))break b;do{if(t)if(s){k[x>>2]=b;break}else{k[x>>2]=e;break}}while(0);if(!u){if(b)k[b+(n<<2)>>2]=0;if(!e){e=0;break f}i[e+n>>0]=0}break}case 120:case 88:case 112:{h=16;N=134;break}case 111:{h=8;N=134;break}case 117:case 100:{h=10;N=134;break}case 105:{h=0;N=134;break}case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:{m=+ok(a,t,0);if((k[F>>2]|0)==((k[z>>2]|0)-(k[K>>2]|0)|0))break b;if(x)switch(t|0){case 0:{o[x>>2]=m;break f}case 1:{p[x>>3]=m;break f}case 2:{p[x>>3]=m;break f}default:break f}break}default:{}}}while(0);l:do{if((N|0)==134){N=0;h=pk(a,h,0,-1,-1)|0;if((k[F>>2]|0)==((k[z>>2]|0)-(k[K>>2]|0)|0))break b;if((x|0)!=0&(q|0)==112){k[x>>2]=h;break}if(x)switch(t|0){case-2:{i[x>>0]=h;break l}case-1:{j[x>>1]=h;break l}case 0:{k[x>>2]=h;break l}case 1:{k[x>>2]=h;break l}case 3:{Q=x;k[Q>>2]=h;k[Q+4>>2]=M;break l}default:break l}}}while(0);d=((x|0)!=0&1)+d|0;h=(k[F>>2]|0)+w+(k[K>>2]|0)-(k[z>>2]|0)|0;break c}}while(0);g=g+(f&1)|0;qk(a,0);f=k[K>>2]|0;if(f>>>0<(k[L>>2]|0)>>>0){k[K>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0;if((f|0)!=(l[g>>0]|0)){N=21;break b}h=s+1|0}else{while(1){f=g+1|0;if(!(kk(l[f>>0]|0)|0))break;else g=f}qk(a,0);do{f=k[K>>2]|0;if(f>>>0<(k[L>>2]|0)>>>0){k[K>>2]=f+1;f=l[f>>0]|0}else f=rk(a)|0}while((kk(f)|0)!=0);f=k[K>>2]|0;if(k[L>>2]|0){f=f+-1|0;k[K>>2]=f}h=(k[F>>2]|0)+s+f-(k[z>>2]|0)|0}}while(0);g=g+1|0;f=i[g>>0]|0;if(!(f<<24>>24))break a;else s=h}if((N|0)==21){if(k[L>>2]|0)k[K>>2]=(k[K>>2]|0)+-1;if((d|0)!=0|(f|0)>-1)break;else{d=0;N=153}}else if((N|0)==152)if(!d){d=f;N=153}if((N|0)==153){f=d;d=-1}if(f){Ql(e);Ql(b)}}else d=0}while(0);if(O)Uk(a);r=P;return d|0}function ol(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,j=0,l=0,m=0;m=r;r=r+128|0;e=m+112|0;l=m;f=l;g=37352;h=f+112|0;do{k[f>>2]=k[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));if((b+-1|0)>>>0>2147483646)if(!b){b=1;j=4}else{b=mk()|0;k[b>>2]=75;b=-1}else{e=a;j=4}if((j|0)==4){j=-2-e|0;j=b>>>0>j>>>0?j:b;k[l+48>>2]=j;a=l+20|0;k[a>>2]=e;k[l+44>>2]=e;b=e+j|0;e=l+16|0;k[e>>2]=b;k[l+28>>2]=b;b=ml(l,c,d)|0;if(j){c=k[a>>2]|0;i[c+(((c|0)==(k[e>>2]|0))<<31>>31)>>0]=0}}r=m;return b|0}function pl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=r;r=r+112|0;d=f;e=d;g=e+112|0;do{k[e>>2]=0;e=e+4|0}while((e|0)<(g|0));k[d+32>>2]=29;k[d+44>>2]=a;k[d+76>>2]=-1;k[d+84>>2]=a;g=nl(d,b,c)|0;r=f;return g|0}function ql(a,b,c){a=a|0;b=b|0;c=c|0;return+ +Jl(a,b,2)}function rl(a,b,c){a=a|0;b=b|0;c=c|0;a=Kl(a,b,c,-1,-1)|0;return a|0}function sl(a,b,c){a=a|0;b=b|0;c=c|0;a=Kl(a,b,c,0,-2147483648)|0;return a|0}function tl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=b&255;d=(c|0)!=0;a:do{if(d&(a&3|0)!=0){e=b&255;while(1){if((i[a>>0]|0)==e<<24>>24){g=6;break a}a=a+1|0;c=c+-1|0;d=(c|0)!=0;if(!(d&(a&3|0)!=0)){g=5;break}}}else g=5}while(0);if((g|0)==5)if(d)g=6;else c=0;b:do{if((g|0)==6){e=b&255;if((i[a>>0]|0)!=e<<24>>24){d=ia(f,16843009)|0;c:do{if(c>>>0>3)while(1){f=k[a>>2]^d;if((f&-2139062144^-2139062144)&f+-16843009)break;a=a+4|0;c=c+-4|0;if(c>>>0<=3){g=11;break c}}else g=11}while(0);if((g|0)==11)if(!c){c=0;break}while(1){if((i[a>>0]|0)==e<<24>>24)break b;a=a+1|0;c=c+-1|0;if(!c){c=0;break}}}}}while(0);return((c|0)!=0?a:0)|0}function ul(a,b){a=a|0;b=b|0;var c=0,d=0;c=b;a:do{if(!((c^a)&3)){if(c&3)do{c=i[b>>0]|0;i[a>>0]=c;if(!(c<<24>>24))break a;b=b+1|0;a=a+1|0}while((b&3|0)!=0);c=k[b>>2]|0;if(!((c&-2139062144^-2139062144)&c+-16843009)){d=a;while(1){b=b+4|0;a=d+4|0;k[d>>2]=c;c=k[b>>2]|0;if((c&-2139062144^-2139062144)&c+-16843009)break;else d=a}}d=8}else d=8}while(0);if((d|0)==8){d=i[b>>0]|0;i[a>>0]=d;if(d<<24>>24)do{b=b+1|0;a=a+1|0;d=i[b>>0]|0;i[a>>0]=d}while(d<<24>>24!=0)}return a|0}function vl(a,b){a=a|0;b=b|0;var c=0,d=0;d=i[a>>0]|0;c=i[b>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=c<<24>>24)b=d;else{do{a=a+1|0;b=b+1|0;d=i[a>>0]|0;c=i[b>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=c<<24>>24));b=d}return(b&255)-(c&255)|0}function wl(a,b){a=a|0;b=b|0;ul(a,b)|0;return a|0}function xl(a){a=a|0;var b=0,c=0,d=0;d=a;a:do{if(!(d&3))c=4;else{b=a;a=d;while(1){if(!(i[b>>0]|0))break a;b=b+1|0;a=b;if(!(a&3)){a=b;c=4;break}}}}while(0);if((c|0)==4){while(1){b=k[a>>2]|0;if(!((b&-2139062144^-2139062144)&b+-16843009))a=a+4|0;else break}if((b&255)<<24>>24)do{a=a+1|0}while((i[a>>0]|0)!=0)}return a-d|0}function yl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if(!c)b=0;else{d=i[a>>0]|0;a:do{if(!(d<<24>>24))d=0;else while(1){c=c+-1|0;e=i[b>>0]|0;if(!(d<<24>>24==e<<24>>24&((c|0)!=0&e<<24>>24!=0)))break a;a=a+1|0;b=b+1|0;d=i[a>>0]|0;if(!(d<<24>>24)){d=0;break}}}while(0);b=(d&255)-(l[b>>0]|0)|0}return b|0}function zl(a){a=a|0;var b=0;b=a;while(1)if(!(k[b>>2]|0))break;else b=b+4|0;return b-a>>2|0}function Al(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(c){d=a;while(1){c=c+-1|0;k[d>>2]=k[b>>2];if(!c)break;else{b=b+4|0;d=d+4|0}}}return a|0}function Bl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=(c|0)==0;if(a-b>>2>>>0>>0){if(!d)do{c=c+-1|0;k[a+(c<<2)>>2]=k[b+(c<<2)>>2]}while((c|0)!=0)}else if(!d){d=b;b=a;while(1){c=c+-1|0;k[b>>2]=k[d>>2];if(!c)break;else{d=d+4|0;b=b+4|0}}}return a|0}function Cl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if(c){d=a;while(1){c=c+-1|0;k[d>>2]=b;if(!c)break;else d=d+4|0}}return a|0}function Dl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;g=a+4|0;c=k[g>>2]|0;h=a+100|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0;switch(c|0){case 43:case 45:{d=(c|0)==45&1;c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0;if((b|0)!=0&(c+-48|0)>>>0>9?(k[h>>2]|0)!=0:0){k[g>>2]=(k[g>>2]|0)+-1;f=d}else f=d;break}default:f=0}if((c+-48|0)>>>0>9)if(!(k[h>>2]|0)){d=-2147483648;c=0}else{k[g>>2]=(k[g>>2]|0)+-1;d=-2147483648;c=0}else{d=0;do{d=c+-48+(d*10|0)|0;c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0}while((c+-48|0)>>>0<10&(d|0)<214748364);b=((d|0)<0)<<31>>31;if((c+-48|0)>>>0<10){do{b=Dw(d|0,b|0,10,0)|0;d=M;c=tw(c|0,((c|0)<0)<<31>>31|0,-48,-1)|0;d=tw(c|0,M|0,b|0,d|0)|0;b=M;c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0}while((c+-48|0)>>>0<10&((b|0)<21474836|(b|0)==21474836&d>>>0<2061584302));e=d}else e=d;if((c+-48|0)>>>0<10)do{c=k[g>>2]|0;if(c>>>0<(k[h>>2]|0)>>>0){k[g>>2]=c+1;c=l[c>>0]|0}else c=rk(a)|0}while((c+-48|0)>>>0<10);if(k[h>>2]|0)k[g>>2]=(k[g>>2]|0)+-1;a=(f|0)!=0;c=rw(0,0,e|0,b|0)|0;d=a?M:b;c=a?c:e}M=d;return c|0}function El(a){a=a|0;if(!(k[a+68>>2]|0))Uk(a);return}function Fl(a){a=a|0;if(!(k[a+68>>2]|0))Uk(a);return}function Gl(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=a+20|0;f=a+28|0;if((k[b>>2]|0)>>>0>(k[f>>2]|0)>>>0?(Qb[k[a+36>>2]&63](a,0,0)|0,(k[b>>2]|0)==0):0)b=-1;else{g=a+4|0;c=k[g>>2]|0;d=a+8|0;e=k[d>>2]|0;if(c>>>0>>0)Qb[k[a+40>>2]&63](a,c-e|0,1)|0;k[a+16>>2]=0;k[f>>2]=0;k[b>>2]=0;k[d>>2]=0;k[g>>2]=0;b=0}return b|0}var Ib=[cx,_q,cr,Yr,as,fs,hs,Hu,Su,cx,cx,cx,cx,cx,cx,cx];var Jb=[dx,si,gi,Wh,Kh,yh,mh,ah,Lg,Wj,Vj,Sj,dx,dx,dx,dx];var Kb=[ex,ls,rs,ex];var Lb=[fx,oi,pi,ci,di,Sh,Th,Gh,Hh,uh,vh,ih,jh,Yg,Zg,Hg,Ig,ug,vg,ig,jg,Yf,Zf,Mf,Nf,Af,Bf,Ie,Je,ve,we,Dc,Ec,Zd,be,_d,mo,oo,no,po,ud,vd,_i,wd,nd,od,Sc,Tc,_c,$c,fd,gd,xd,yd,Ed,Fd,Ld,Md,Sd,Td,te,ue,Re,Se,Ye,Ze,df,ef,lf,mf,Wg,Xg,Nm,Ai,Ki,Li,$i,aj,pj,qj,wj,xj,Bj,Cj,Ej,Hj,Fj,Gj,Ij,Jj,Mn,bm,hm,xn,mm,sm,Lm,Mm,yn,Nn,$n,bo,ao,co,go,io,ho,jo,uo,wo,vo,xo,Eo,Fo,pn,Go,Ho,Io,Ko,Us,Oo,Po,To,Uo,gp,hp,Ap,Bp,Pp,Qp,aq,bq,zq,Aq,Xq,Zq,ar,br,er,fr,pr,qr,Ar,Br,Lr,Mr,Wr,Xr,ds,es,js,ks,ps,qs,vs,ws,As,Bs,Is,Js,kt,lt,Gu,Dt,du,eu,fu,gu,Jo,Ts,Ws,ut,Lt,Tt,$t,au,bj,Si,jj,Cc,zn,fo,ie,Og,ek,El,Fl,Wl,wk,Zr,$r,Vs,Qv,Xv,Yv,Zv,_v,$v,aw,Sm,en,Ql,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx,fx];var Mb=[gx,ri,fi,Vh,Jh,xh,lh,$g,Kg,wg,kg,_f,Of,Cf,Ke,xe,Fc,An,Mi,Pi,cm,gm,nm,rm,Pn,ir,jr,kr,lr,nr,or,tr,ur,vr,wr,yr,zr,Er,Fr,Gr,Hr,Jr,Kr,Pr,Qr,Rr,Sr,Ur,Vr,zs,Es,lu,nu,pu,mu,ou,qu,uc,cj,Qi,Ri,Ti,un,Mc,Oc,qo,on,_m,he,Be,tf,Gf,Sf,cg,og,Ag,Ng,ch,oh,Ah,Mh,Yh,ii,ui,Ii,hj,Cm,Am,sn,yo,Bm,Ym,jn,hn,kv,lv,mv,nv,ov,pv,Ct,qv,rv,sv,tv,uv,vv,wv,xv,yv,zv,Av,Bv,Cv,Dv,Ev,Fv,Gv,Hv,Iv,Jv,Kv,Lv,Mv,Ov,gw,gx,gx];var Nb=[hx,Vo,Wo,Xo,Yo,Zo,_o,$o,ap,bp,cp,dp,ip,jp,kp,lp,mp,np,op,pp,qp,rp,sp,Hp,Jp,Up,Wp,dq,eq,fq,hq,jq,Cq,Dq,Eq,Gq,Iq,os,us,md,cv,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx,hx];var Ob=[ix,En,Fn,rd,In,Bi,rj,yj,Dj,Wk,dm,Un,Wn,Xn,Tn,im,jm,om,Hn,tm,um,Ao,cq,su,uu,wu,Cu,Eu,yu,Au,Bq,tu,vu,xu,Du,Fu,zu,Bu,gr,hr,mr,rr,sr,xr,Cr,Dr,Ir,Nr,Or,Tr,Ht,It,Kt,hu,ju,iu,ku,yt,zt,Bt,Pt,Qt,St,Xt,Yt,_t,Ei,lj,tn,Vi,eo,ko,jx,kx,lx,Ak,zl,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix,ix];var Pb=[mx,_r,gs,mx];var Qb=[nx,Bn,Gn,Kn,Em,Fm,Kj,Ll,Zk,Yk,Xk,_k,Qn,Vn,em,Zn,pm,No,So,xs,Cs,nt,pt,st,Xs,ct,ft,it,Nc,Il,$m,zk,hv,jv,Pk,Ok,Jk,ll,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx,nx];var Rb=[ox,ns,ts,ox];var Sb=[px,pd,Zj,Yj,Xj,Rn,Cn,ys,Ds,px,px,px,px,px,px,px];var Tb=[qx,Gp,Mp,Tp,Yp,qx,qx,qx];var Ub=[rx,bs,is,ms,ss,rx,rx,rx];var Vb=[sx,qi,ei,Uh,Ih,wh,kh,_g,Jg,yg,mg,ag,Qf,Ef,Me,ze,Hc,sd,td,Yn,fm,km,_n,Jn,qm,vm,Ln,mt,ot,qt,at,dt,gt,dj,yc,Ac,so,Ss,to,yk,xk,Um,fn,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx,sx];var Wb=[tx,Lo,Qo,Cp,Dp,Ip,Op,Rp,Sp,Vp,_p,tt,Gt,Jt,jt,xt,At,Ot,Rt,Wt,Zt,Qk,Mk,tx,tx,tx,tx,tx,tx,tx,tx,tx];var Xb=[ux,jw,iw,hw];var Yb=[vx,vc,kj,fp,Ls,Ms,Ns,hk,jk,ik,vx,vx,vx,vx,vx,vx];var Zb=[wx,xg,lg,$f,Pf,Df,Le,ye,Gc,rt,Zs,_s,$s,ht,Di,Ji,Ru,bv,Nk,uk,Kk,pw,ow,nw,mw,lw,kw,wx,wx,wx,wx,wx];var _b=[xx,Dm,Ci,Bo,ej,Qm,yx,Km,Wm,Ui,Hm,Do,fv,gv,iv,cn];var $b=[zx,Ax,bk,Bx,ck,Cx,ak,zx];var ac=[Dx,lq,Kq,Et,Ft,vt,wt,Mt,Nt,Ut,Vt,Dx,Dx,Dx,Dx,Dx];var bc=[Ex,Kp,Np,Xp,Zp,Ex,Ex,Ex];var cc=[Fx,ce,de,$d,ae,qd,Uc,Vc,ad,bd,hd,id,zd,Ad,Gd,Hd,Nd,Od,Ud,Vd,Te,Ue,_e,$e,ff,gf,nf,of,Mj,Nj,Pj,Sn,Dn,Mo,Ro,nc,Jm,Ic,Jc,Kc,Lc,Pc,Qc,Rc,Ne,Oe,Pe,Qe,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx,Fx];return{_jpegls_encode:gj,___cxa_can_catch:_j,_free:Ql,_jpegls_decode:fj,___cxa_is_pointer_type:$j,_i64Add:tw,_memmove:xw,_i64Subtract:rw,_memset:sw,_malloc:Pl,_memcpy:vw,_bitshift64Lshr:uw,_bitshift64Shl:ww,__GLOBAL__I_000101:Xl,__GLOBAL__sub_I_jpegls_cpp:Bc,__GLOBAL__sub_I_iostream_cpp:Yl,runPostSets:qw,_emscripten_replace_memory:Hb,stackAlloc:dc,stackSave:ec,stackRestore:fc,establishStackSpace:gc,setThrew:hc,setTempRet0:kc,getTempRet0:lc,dynCall_iiiiiiii:Hw,dynCall_viiiii:Iw,dynCall_iiiiiid:Jw,dynCall_vi:Kw,dynCall_vii:Lw,dynCall_iiiiiii:Mw,dynCall_ii:Nw,dynCall_iiiiiiiiiiii:Ow,dynCall_iiii:Pw,dynCall_viiiiiiiiiiiiiii:Qw,dynCall_viiiiii:Rw,dynCall_viiiiiii:Sw,dynCall_viiiiiiiiii:Tw,dynCall_iii:Uw,dynCall_iiiiii:Vw,dynCall_diii:Ww,dynCall_i:Xw,dynCall_iiiii:Yw,dynCall_viii:Zw,dynCall_v:_w,dynCall_iiiiiiiii:$w,dynCall_iiiiid:ax,dynCall_viiii:bx}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _jpegls_encode=Module["_jpegls_encode"]=asm["_jpegls_encode"];var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var _free=Module["_free"]=asm["_free"];var _jpegls_decode=Module["_jpegls_decode"]=asm["_jpegls_decode"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _memmove=Module["_memmove"]=asm["_memmove"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _memset=Module["_memset"]=asm["_memset"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var __GLOBAL__sub_I_iostream_cpp=Module["__GLOBAL__sub_I_iostream_cpp"]=asm["__GLOBAL__sub_I_iostream_cpp"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var __GLOBAL__sub_I_jpegls_cpp=Module["__GLOBAL__sub_I_jpegls_cpp"]=asm["__GLOBAL__sub_I_jpegls_cpp"];var __GLOBAL__I_000101=Module["__GLOBAL__I_000101"]=asm["__GLOBAL__I_000101"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var dynCall_iiiiiiii=Module["dynCall_iiiiiiii"]=asm["dynCall_iiiiiiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_iiiiiid=Module["dynCall_iiiiiid"]=asm["dynCall_iiiiiid"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iiiiiiiiiiii=Module["dynCall_iiiiiiiiiiii"]=asm["dynCall_iiiiiiiiiiii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiiiiiiiiiiiii=Module["dynCall_viiiiiiiiiiiiiii"]=asm["dynCall_viiiiiiiiiiiiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_viiiiiii=Module["dynCall_viiiiiii"]=asm["dynCall_viiiiiii"];var dynCall_viiiiiiiiii=Module["dynCall_viiiiiiiiii"]=asm["dynCall_viiiiiiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiiiii=Module["dynCall_iiiiii"]=asm["dynCall_iiiiii"];var dynCall_diii=Module["dynCall_diii"]=asm["dynCall_diii"];var dynCall_i=Module["dynCall_i"]=asm["dynCall_i"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_iiiiiiiii=Module["dynCall_iiiiiiiii"]=asm["dynCall_iiiiiiiii"];var dynCall_iiiiid=Module["dynCall_iiiiid"]=asm["dynCall_iiiiid"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.establishStackSpace=asm["establishStackSpace"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){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;i0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["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;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach(function(decorator){output=decorator(output,what)})}throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run();return Module};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=CharLS}}).call(this)}).call(this,require("_process"),"/lib")},{_process:20,fs:6,path:19}],2:[function(require,module,exports){var ColorSpace={Unkown:0,Grayscale:1,AdobeRGB:2,RGB:3,CYMK:4};var JpegImage=function jpegImage(){"use strict";var dctZigZag=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);var dctCos1=4017;var dctSin1=799;var dctCos3=3406;var dctSin3=2276;var dctCos6=1567;var dctSin6=3784;var dctSqrt2=5793;var dctSqrt1d2=2896;function constructor(){}function buildHuffmanTable(codeLengths,values){var k=0,code=[],i,j,length=16;while(length>0&&!codeLengths[length-1])length--;code.push({children:[],index:0});var p=code[0],q;for(i=0;i0){p=code.pop()}p.index++;code.push(p);while(code.length<=i){code.push(q={children:[],index:0});p.children[p.index]=q.children;p=q}k++}if(i+10){bitsCount--;return bitsData>>bitsCount&1}bitsData=data[offset++];if(bitsData==255){var nextByte=data[offset++];if(nextByte){throw"unexpected marker: "+(bitsData<<8|nextByte).toString(16)}}bitsCount=7;return bitsData>>>7}function decodeHuffman(tree){var node=tree;var bit;while((bit=readBit())!==null){node=node[bit];if(typeof node==="number")return node;if(typeof node!=="object")throw"invalid huffman sequence"}return null}function receive(length){var n=0;while(length>0){var bit=readBit();if(bit===null)return;n=n<<1|bit;length--}return n}function receiveAndExtend(length){var n=receive(length);if(n>=1<>4;if(s===0){if(r<15)break;k+=16;continue}k+=r;var z=dctZigZag[k];component.blockData[offset+z]=receiveAndExtend(s);k++}}function decodeDCFirst(component,offset){var t=decodeHuffman(component.huffmanTableDC);var diff=t===0?0:receiveAndExtend(t)<0){eobrun--;return}var k=spectralStart,e=spectralEnd;while(k<=e){var rs=decodeHuffman(component.huffmanTableAC);var s=rs&15,r=rs>>4;if(s===0){if(r<15){eobrun=receive(r)+(1<>4;if(s===0){if(r<15){eobrun=receive(r)+(1<=65488&&marker<=65495){offset+=2}else{break}}return offset-startOffset}function quantizeAndInverse(component,blockBufferOffset,p){var qt=component.quantizationTable;var v0,v1,v2,v3,v4,v5,v6,v7,t;var i;for(i=0;i<64;i++){p[i]=component.blockData[blockBufferOffset+i]*qt[i]}for(i=0;i<8;++i){var row=8*i;if(p[1+row]===0&&p[2+row]===0&&p[3+row]===0&&p[4+row]===0&&p[5+row]===0&&p[6+row]===0&&p[7+row]===0){t=dctSqrt2*p[0+row]+512>>10;p[0+row]=t;p[1+row]=t;p[2+row]=t;p[3+row]=t;p[4+row]=t;p[5+row]=t;p[6+row]=t;p[7+row]=t;continue}v0=dctSqrt2*p[0+row]+128>>8;v1=dctSqrt2*p[4+row]+128>>8;v2=p[2+row];v3=p[6+row];v4=dctSqrt1d2*(p[1+row]-p[7+row])+128>>8;v7=dctSqrt1d2*(p[1+row]+p[7+row])+128>>8;v5=p[3+row]<<4;v6=p[5+row]<<4;t=v0-v1+1>>1;v0=v0+v1+1>>1;v1=t;t=v2*dctSin6+v3*dctCos6+128>>8;v2=v2*dctCos6-v3*dctSin6+128>>8;v3=t;t=v4-v6+1>>1;v4=v4+v6+1>>1;v6=t;t=v7+v5+1>>1;v5=v7-v5+1>>1;v7=t;t=v0-v3+1>>1;v0=v0+v3+1>>1;v3=t;t=v1-v2+1>>1;v1=v1+v2+1>>1;v2=t;t=v4*dctSin3+v7*dctCos3+2048>>12;v4=v4*dctCos3-v7*dctSin3+2048>>12;v7=t;t=v5*dctSin1+v6*dctCos1+2048>>12;v5=v5*dctCos1-v6*dctSin1+2048>>12;v6=t;p[0+row]=v0+v7;p[7+row]=v0-v7;p[1+row]=v1+v6;p[6+row]=v1-v6;p[2+row]=v2+v5;p[5+row]=v2-v5;p[3+row]=v3+v4;p[4+row]=v3-v4}for(i=0;i<8;++i){var col=i;if(p[1*8+col]===0&&p[2*8+col]===0&&p[3*8+col]===0&&p[4*8+col]===0&&p[5*8+col]===0&&p[6*8+col]===0&&p[7*8+col]===0){t=dctSqrt2*p[i+0]+8192>>14;p[0*8+col]=t;p[1*8+col]=t;p[2*8+col]=t;p[3*8+col]=t;p[4*8+col]=t;p[5*8+col]=t;p[6*8+col]=t;p[7*8+col]=t;continue}v0=dctSqrt2*p[0*8+col]+2048>>12;v1=dctSqrt2*p[4*8+col]+2048>>12;v2=p[2*8+col];v3=p[6*8+col];v4=dctSqrt1d2*(p[1*8+col]-p[7*8+col])+2048>>12;v7=dctSqrt1d2*(p[1*8+col]+p[7*8+col])+2048>>12;v5=p[3*8+col];v6=p[5*8+col];t=v0-v1+1>>1;v0=v0+v1+1>>1;v1=t;t=v2*dctSin6+v3*dctCos6+2048>>12;v2=v2*dctCos6-v3*dctSin6+2048>>12;v3=t;t=v4-v6+1>>1;v4=v4+v6+1>>1;v6=t;t=v7+v5+1>>1;v5=v7-v5+1>>1;v7=t;t=v0-v3+1>>1;v0=v0+v3+1>>1;v3=t;t=v1-v2+1>>1;v1=v1+v2+1>>1;v2=t;t=v4*dctSin3+v7*dctCos3+2048>>12;v4=v4*dctCos3-v7*dctSin3+2048>>12;v7=t;t=v5*dctSin1+v6*dctCos1+2048>>12;v5=v5*dctCos1-v6*dctSin1+2048>>12;v6=t;p[0*8+col]=v0+v7;p[7*8+col]=v0-v7;p[1*8+col]=v1+v6;p[6*8+col]=v1-v6;p[2*8+col]=v2+v5;p[5*8+col]=v2-v5;p[3*8+col]=v3+v4;p[4*8+col]=v3-v4}for(i=0;i<64;++i){var index=blockBufferOffset+i;var q=p[i];q=q<=-2056/component.bitConversion?0:q>=2024/component.bitConversion?255/component.bitConversion:q+2056/component.bitConversion>>4;component.blockData[index]=q}}function buildComponentData(frame,component){var lines=[];var blocksPerLine=component.blocksPerLine;var blocksPerColumn=component.blocksPerColumn;var samplesPerLine=blocksPerLine<<3;var computationBuffer=new Int32Array(64);var i,j,ll=0;for(var blockRow=0;blockRow=255?255:a|0}constructor.prototype={load:function load(path){var handleData=function(data){this.parse(data);if(this.onload)this.onload()}.bind(this);if(path.indexOf("data:")>-1){var offset=path.indexOf("base64,")+7;var data=atob(path.substring(offset));var arr=new Uint8Array(data.length);for(var i=data.length-1;i>=0;i--){arr[i]=data.charCodeAt(i)}handleData(data)}else{var xhr=new XMLHttpRequest;xhr.open("GET",path,true);xhr.responseType="arraybuffer";xhr.onload=function(){var data=new Uint8Array(xhr.response);handleData(data)}.bind(this);xhr.send(null)}},parse:function parse(data){function readUint16(){var value=data[offset]<<8|data[offset+1];offset+=2;return value}function readDataBlock(){var length=readUint16();var array=data.subarray(offset,offset+length-2);offset+=array.length;return array}function prepareComponents(frame){var mcusPerLine=Math.ceil(frame.samplesPerLine/8/frame.maxH);var mcusPerColumn=Math.ceil(frame.scanLines/8/frame.maxV);for(var i=0;i>4===0){for(j=0;j<64;j++){var z=dctZigZag[j];tableData[z]=data[offset++]}}else if(quantizationTableSpec>>4===1){for(j=0;j<64;j++){var zz=dctZigZag[j];tableData[zz]=readUint16()}}else throw"DQT: invalid table spec";quantizationTables[quantizationTableSpec&15]=tableData}break;case 65472:case 65473:case 65474:if(frame){throw"Only single frame JPEGs supported"}readUint16();frame={};frame.extended=fileMarker===65473;frame.progressive=fileMarker===65474;frame.precision=data[offset++];frame.scanLines=readUint16();frame.samplesPerLine=readUint16();frame.components=[];frame.componentIds={};var componentsCount=data[offset++],componentId;var maxH=0,maxV=0;for(i=0;i>4;var v=data[offset+1]&15;if(maxH>4===0?huffmanTablesDC:huffmanTablesAC)[huffmanTableSpec&15]=buildHuffmanTable(codeLengths,huffmanValues)}break;case 65501:readUint16();resetInterval=readUint16();break;case 65498:var scanLength=readUint16();var selectorsCount=data[offset++];var components=[],component;for(i=0;i>4];component.huffmanTableAC=huffmanTablesAC[tableSpec&15];components.push(component)}var spectralStart=data[offset++];var spectralEnd=data[offset++];var successiveApproximation=data[offset++];var processed=decodeScan(data,offset,frame,components,resetInterval,spectralStart,spectralEnd,successiveApproximation>>4,successiveApproximation&15);offset+=processed;break;default:if(data[offset-3]==255&&data[offset-2]>=192&&data[offset-2]<=254){offset-=3;break}throw"unknown JPEG marker "+fileMarker.toString(16)}fileMarker=readUint16()}this.width=frame.samplesPerLine;this.height=frame.scanLines;this.jfif=jfif;this.adobe=adobe;this.components=[];switch(frame.components.length){case 1:this.colorspace=ColorSpace.Grayscale;break;case 3:if(this.adobe)this.colorspace=ColorSpace.AdobeRGB;else this.colorspace=ColorSpace.RGB;break;case 4:this.colorspace=ColorSpace.CYMK;break;default:this.colorspace=ColorSpace.Unknown}for(var i=0;i>24&255,tbox>>16&255,tbox>>8&255,tbox&255);warn("Unsupported header type "+tbox+" ("+headerType+")");break}if(jumpDataLength){position+=dataLength}}},parseImageProperties:function JpxImage_parseImageProperties(stream){var newByte=stream.getByte();while(newByte>=0){var oldByte=newByte;newByte=stream.getByte();var code=oldByte<<8|newByte;if(code===65361){stream.skip(4);var Xsiz=stream.getInt32()>>>0;var Ysiz=stream.getInt32()>>>0;var XOsiz=stream.getInt32()>>>0;var YOsiz=stream.getInt32()>>>0;stream.skip(16);var Csiz=stream.getUint16();this.width=Xsiz-XOsiz;this.height=Ysiz-YOsiz;this.componentsCount=Csiz;this.bitsPerComponent=8;return}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function JpxImage_parseCodestream(data,start,end){var context={};try{var doNotRecover=false;var position=start;while(position+1>5;spqcds=[];while(j>3;spqcd.mu=0}else{spqcd.epsilon=data[j]>>3;spqcd.mu=(data[j]&7)<<8|data[j+1];j+=2}spqcds.push(spqcd)}qcd.SPqcds=spqcds;if(context.mainHeader){context.QCD=qcd}else{context.currentTile.QCD=qcd;context.currentTile.QCC=[]}break;case 65373:length=readUint16(data,position);var qcc={};j=position+2;var cqcc;if(context.SIZ.Csiz<257){cqcc=data[j++]}else{cqcc=readUint16(data,j);j+=2}sqcd=data[j++];switch(sqcd&31){case 0:spqcdSize=8;scalarExpounded=true;break;case 1:spqcdSize=16;scalarExpounded=false;break;case 2:spqcdSize=16;scalarExpounded=true;break;default:throw new Error("JPX Error: Invalid SQcd value "+sqcd)}qcc.noQuantization=spqcdSize===8;qcc.scalarExpounded=scalarExpounded;qcc.guardBits=sqcd>>5;spqcds=[];while(j>3;spqcd.mu=0}else{spqcd.epsilon=data[j]>>3;spqcd.mu=(data[j]&7)<<8|data[j+1];j+=2}spqcds.push(spqcd)}qcc.SPqcds=spqcds;if(context.mainHeader){context.QCC[cqcc]=qcc}else{context.currentTile.QCC[cqcc]=qcc}break;case 65362:length=readUint16(data,position);var cod={};j=position+2;var scod=data[j++];cod.entropyCoderWithCustomPrecincts=!!(scod&1);cod.sopMarkerUsed=!!(scod&2);cod.ephMarkerUsed=!!(scod&4);cod.progressionOrder=data[j++];cod.layersCount=readUint16(data,j);j+=2;cod.multipleComponentTransform=data[j++];cod.decompositionLevelsCount=data[j++];cod.xcb=(data[j++]&15)+2;cod.ycb=(data[j++]&15)+2;var blockStyle=data[j++];cod.selectiveArithmeticCodingBypass=!!(blockStyle&1);cod.resetContextProbabilities=!!(blockStyle&2);cod.terminationOnEachCodingPass=!!(blockStyle&4);cod.verticalyStripe=!!(blockStyle&8);cod.predictableTermination=!!(blockStyle&16);cod.segmentationSymbolUsed=!!(blockStyle&32);cod.reversibleTransformation=data[j++];if(cod.entropyCoderWithCustomPrecincts){var precinctsSizes=[];while(j>4})}cod.precinctsSizes=precinctsSizes}var unsupported=[];if(cod.selectiveArithmeticCodingBypass){unsupported.push("selectiveArithmeticCodingBypass")}if(cod.resetContextProbabilities){unsupported.push("resetContextProbabilities")}if(cod.terminationOnEachCodingPass){unsupported.push("terminationOnEachCodingPass")}if(cod.verticalyStripe){unsupported.push("verticalyStripe")}if(cod.predictableTermination){unsupported.push("predictableTermination")}if(unsupported.length>0){doNotRecover=true;throw new Error("JPX Error: Unsupported COD options ("+unsupported.join(", ")+")")}if(context.mainHeader){context.COD=cod}else{context.currentTile.COD=cod;context.currentTile.COC=[]}break;case 65424:length=readUint16(data,position);tile={};tile.index=readUint16(data,position+2);tile.length=readUint32(data,position+4);tile.dataEnd=tile.length+position-2;tile.partIndex=data[position+8];tile.partsCount=data[position+9];context.mainHeader=false;if(tile.partIndex===0){tile.COD=context.COD;tile.COC=context.COC.slice(0);tile.QCD=context.QCD;tile.QCC=context.QCC.slice(0)}context.currentTile=tile;break;case 65427:tile=context.currentTile;if(tile.partIndex===0){initializeTile(context,tile.index);buildPackets(context)}length=tile.dataEnd-position;parseTilePackets(context,data,position,length);break;case 65365:case 65367:case 65368:case 65380:length=readUint16(data,position);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is "+"not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+code.toString(16))}position+=length}}catch(e){if(doNotRecover||this.failOnCorruptedImage){throw e}else{warn("Trying to recover from "+e.message)}}this.tiles=transformComponents(context);this.width=context.SIZ.Xsiz-context.SIZ.XOsiz;this.height=context.SIZ.Ysiz-context.SIZ.YOsiz;this.componentsCount=context.SIZ.Csiz}};function calculateComponentDimensions(component,siz){component.x0=Math.ceil(siz.XOsiz/component.XRsiz);component.x1=Math.ceil(siz.Xsiz/component.XRsiz);component.y0=Math.ceil(siz.YOsiz/component.YRsiz);component.y1=Math.ceil(siz.Ysiz/component.YRsiz);component.width=component.x1-component.x0;component.height=component.y1-component.y0}function calculateTileGrids(context,components){var siz=context.SIZ;var tile,tiles=[];var numXtiles=Math.ceil((siz.Xsiz-siz.XTOsiz)/siz.XTsiz);var numYtiles=Math.ceil((siz.Ysiz-siz.YTOsiz)/siz.YTsiz);for(var q=0;q0?Math.min(codOrCoc.xcb,result.PPx-1):Math.min(codOrCoc.xcb,result.PPx);result.ycb_=r>0?Math.min(codOrCoc.ycb,result.PPy-1):Math.min(codOrCoc.ycb,result.PPy);return result}function buildPrecincts(context,resolution,dimensions){var precinctWidth=1<resolution.trx0?Math.ceil(resolution.trx1/precinctWidth)-Math.floor(resolution.trx0/precinctWidth):0;var numprecinctshigh=resolution.try1>resolution.try0?Math.ceil(resolution.try1/precinctHeight)-Math.floor(resolution.try0/precinctHeight):0;var numprecincts=numprecinctswide*numprecinctshigh;resolution.precinctParameters={precinctWidth:precinctWidth,precinctHeight:precinctHeight,numprecinctswide:numprecinctswide,numprecinctshigh:numprecinctshigh,numprecincts:numprecincts,precinctWidthInSubband:precinctWidthInSubband,precinctHeightInSubband:precinctHeightInSubband}}function buildCodeblocks(context,subband,dimensions){var xcb_=dimensions.xcb_;var ycb_=dimensions.ycb_;var codeblockWidth=1<>xcb_;var cby0=subband.tby0>>ycb_;var cbx1=subband.tbx1+codeblockWidth-1>>xcb_;var cby1=subband.tby1+codeblockHeight-1>>ycb_;var precinctParameters=subband.resolution.precinctParameters;var codeblocks=[];var precincts=[];var i,j,codeblock,precinctNumber;for(j=cby0;jprecinct.cbxMax){precinct.cbxMax=i}if(jprecinct.cbyMax){precinct.cbyMax=j}}else{precincts[precinctNumber]=precinct={cbxMin:i,cbyMin:j,cbxMax:i,cbyMax:j}}codeblock.precinct=precinct}}subband.codeblockParameters={codeblockWidth:xcb_,codeblockHeight:ycb_,numcodeblockwide:cbx1-cbx0+1,numcodeblockhigh:cby1-cby0+1};subband.codeblocks=codeblocks;subband.precincts=precincts}function createPacket(resolution,precinctNumber,layerNumber){var precinctCodeblocks=[];var subbands=resolution.subbands;for(var i=0,ii=subbands.length;icomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;for(;kcomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;for(;kcomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;if(p>=numprecincts){continue}for(;l=0;--r){var resolution=component.resolutions[r];var widthCurrentResolution=scale*resolution.precinctParameters.precinctWidth;var heightCurrentResolution=scale*resolution.precinctParameters.precinctHeight;minWidthCurrentComponent=Math.min(minWidthCurrentComponent,widthCurrentResolution);minHeightCurrentComponent=Math.min(minHeightCurrentComponent,heightCurrentResolution);maxNumWideCurrentComponent=Math.max(maxNumWideCurrentComponent,resolution.precinctParameters.numprecinctswide);maxNumHighCurrentComponent=Math.max(maxNumHighCurrentComponent,resolution.precinctParameters.numprecinctshigh);sizePerResolution[r]={width:widthCurrentResolution,height:heightCurrentResolution};scale<<=1}minWidth=Math.min(minWidth,minWidthCurrentComponent);minHeight=Math.min(minHeight,minHeightCurrentComponent);maxNumWide=Math.max(maxNumWide,maxNumWideCurrentComponent);maxNumHigh=Math.max(maxNumHigh,maxNumHighCurrentComponent);sizePerComponent[c]={resolutions:sizePerResolution,minWidth:minWidthCurrentComponent,minHeight:minHeightCurrentComponent,maxNumWide:maxNumWideCurrentComponent,maxNumHigh:maxNumHighCurrentComponent}}return{components:sizePerComponent,minWidth:minWidth,minHeight:minHeight,maxNumWide:maxNumWide,maxNumHigh:maxNumHigh}}function buildPackets(context){var siz=context.SIZ;var tileIndex=context.currentTile.index;var tile=context.tiles[tileIndex];var componentsCount=siz.Csiz;for(var c=0;c=data.length){throw new Error("Unexpected EOF")}var b=data[offset+position];position++;if(skipNextBit){buffer=buffer<<7|b;bufferSize+=7;skipNextBit=false}else{buffer=buffer<<8|b;bufferSize+=8}if(b===255){skipNextBit=true}}bufferSize-=count;return buffer>>>bufferSize&(1<=data.length){return}if(inclusionTree.isAboveThreshold()){break}if(inclusionTree.isKnown()){inclusionTree.nextLevel();continue}if(readBits(1)){inclusionTree.setKnown();if(inclusionTree.isLeaf()){codeblock.included=true;codeblockIncluded=firstTimeInclusion=true;break}else{inclusionTree.nextLevel()}}else{inclusionTree.incrementValue()}}}if(!codeblockIncluded){continue}if(firstTimeInclusion){zeroBitPlanesTree=precinct.zeroBitPlanesTree;zeroBitPlanesTree.reset(codeblockColumn,codeblockRow);while(true){if(position>=data.length){return}if(readBits(1)){valueReady=!zeroBitPlanesTree.nextLevel();if(valueReady){break}}else{zeroBitPlanesTree.incrementValue()}}codeblock.zeroBitPlanes=zeroBitPlanesTree.value}var codingpasses=readCodingpasses();while(readBits(1)){codeblock.Lblock++}var codingpassesLog2=log2(codingpasses);var bits=(codingpasses<1<0){var packetItem=queue.shift();codeblock=packetItem.codeblock;if(codeblock["data"]===undefined){codeblock.data=[]}codeblock.data.push({data:data,start:offset+position,end:offset+position+packetItem.dataLength,codingpasses:packetItem.codingpasses});position+=packetItem.dataLength}}catch(e){return}}return position}function copyCoefficients(coefficients,levelWidth,levelHeight,subband,delta,mb,reversible,segmentationSymbolUsed){var x0=subband.tbx0;var y0=subband.tby0;var width=subband.tbx1-subband.tbx0;var codeblocks=subband.codeblocks;var right=subband.type.charAt(0)==="H"?1:0;var bottom=subband.type.charAt(1)==="H"?levelWidth:0;for(var i=0,ii=codeblocks.length;i=mb){coefficients[pos]=n}else{coefficients[pos]=n*(1<0?1-i:0)}else{mu=spqcds[b].mu;epsilon=spqcds[b].epsilon;b++}var subband=resolution.subbands[j];var gainLog2=SubbandsGainLog2[subband.type];var delta=reversible?1:Math.pow(2,precision+gainLog2-epsilon)*(1+mu/2048);var mb=guardBits+epsilon-1;copyCoefficients(coefficients,width,height,subband,delta,mb,reversible,segmentationSymbolUsed)}subbandCoefficients.push({width:width,height:height,items:coefficients})}var result=transform.calculate(subbandCoefficients,component.tcx0,component.tcy0);return{left:component.tcx0,top:component.tcy0,width:result.width,height:result.height,items:result.items}}function transformComponents(context){var siz=context.SIZ;var components=context.components;var componentsCount=siz.Csiz;var resultImages=[];for(var i=0,ii=context.tiles.length;i=max?255:r>>shift;out[pos++]=g<=0?0:g>=max?255:g>>shift;out[pos++]=b<=0?0:b>=max?255:b>>shift}}else{for(j=0;j>2);r=g+y2;b=g+y1;out[pos++]=r<=0?0:r>=max?255:r>>shift;out[pos++]=g<=0?0:g>=max?255:g>>shift;out[pos++]=b<=0?0:b>=max?255:b>>shift}}if(fourComponents){for(j=0,pos=3;j=maxK?255:k+offset>>shift}}}else{for(c=0;c=max?255:val+offset>>shift;pos+=componentsCount}}else{var isSigned=components[c].isSigned;var items=transformedTiles[c].items;if(isSigned){for(pos=c,j=0,jj=items.length;j>=1;j>>=1;currentLevel++}currentLevel--;level=this.levels[currentLevel];level.items[level.index]=value;this.currentLevel=currentLevel;delete this.value},incrementValue:function TagTree_incrementValue(){var level=this.levels[this.currentLevel];level.items[level.index]++},nextLevel:function TagTree_nextLevel(){var currentLevel=this.currentLevel;var level=this.levels[currentLevel];var value=level.items[level.index];currentLevel--;if(currentLevel<0){this.value=value;return false}this.currentLevel=currentLevel;level=this.levels[currentLevel];level.items[level.index]=value;return true}};return TagTree}();var InclusionTree=function InclusionTreeClosure(){function InclusionTree(width,height){var levelsLength=log2(Math.max(width,height))+1;this.levels=[];for(var i=0;i>=1;j>>=1;currentLevel++}this.currentLevel=this.levels.length-1;this.minValue=this.levels[this.currentLevel].items[0];return},incrementValue:function InclusionTree_incrementValue(){var level=this.levels[this.currentLevel];level.items[level.index]=level.items[level.index]+1;if(level.items[level.index]>this.minValue){this.minValue=level.items[level.index]}},nextLevel:function InclusionTree_nextLevel(){var currentLevel=this.currentLevel;currentLevel--;if(currentLevel<0){return false}else{this.currentLevel=currentLevel;var level=this.levels[currentLevel];if(level.items[level.index]this.minValue){this.minValue=level.items[level.index]}return true}},isLeaf:function InclusionTree_isLeaf(){return this.currentLevel===0},isAboveThreshold:function InclusionTree_isAboveThreshold(){var levelindex=this.currentLevel;var level=this.levels[levelindex];return level.items[level.index]>this.currentStopValue},isKnown:function InclusionTree_isKnown(){var levelindex=this.currentLevel;var level=this.levels[levelindex];return level.status[level.index]>0},setKnown:function InclusionTree_setKnown(){var levelindex=this.currentLevel;var level=this.levels[levelindex];level.status[level.index]=1;return}};return InclusionTree}();var BitModel=function BitModelClosure(){var UNIFORM_CONTEXT=17;var RUNLENGTH_CONTEXT=18;var LLAndLHContextsLabel=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]);var HLContextLabel=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]);var HHContextLabel=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function BitModel(width,height,subband,zeroBitPlanes,mb){this.width=width;this.height=height;this.contextLabelTable=subband==="HH"?HHContextLabel:subband==="HL"?HLContextLabel:LLAndLHContextsLabel;var coefficientCount=width*height;this.neighborsSignificance=new Uint8Array(coefficientCount);this.coefficentsSign=new Uint8Array(coefficientCount);this.coefficentsMagnitude=mb>14?new Uint32Array(coefficientCount):mb>6?new Uint16Array(coefficientCount):new Uint8Array(coefficientCount);this.processingFlags=new Uint8Array(coefficientCount);var bitsDecoded=new Uint8Array(coefficientCount);if(zeroBitPlanes!==0){for(var i=0;i0;var right=column+10){i=index-width;if(left){neighborsSignificance[i-1]+=16}if(right){neighborsSignificance[i+1]+=16}neighborsSignificance[i]+=4}if(row+1=height){break}processingFlags[index]&=processedInverseMask;if(coefficentsMagnitude[index]||!neighborsSignificance[index]){continue}var contextLabel=labels[neighborsSignificance[index]];var decision=decoder.readBit(contexts,contextLabel);if(decision){var sign=this.decodeSignBit(i,j,index);coefficentsSign[index]=sign;coefficentsMagnitude[index]=1;this.setNeighborsSignificance(i,j,index);processingFlags[index]|=firstMagnitudeBitMask}bitsDecoded[index]++;processingFlags[index]|=processedMask}}}},decodeSignBit:function BitModel_decodeSignBit(row,column,index){var width=this.width,height=this.height;var coefficentsMagnitude=this.coefficentsMagnitude;var coefficentsSign=this.coefficentsSign;var contribution,sign0,sign1,significance1;var contextLabel,decoded;significance1=column>0&&coefficentsMagnitude[index-1]!==0;if(column+10&&coefficentsMagnitude[index-width]!==0;if(row+1=0){contextLabel=9+contribution;decoded=this.decoder.readBit(this.contexts,contextLabel)}else{contextLabel=9-contribution;decoded=this.decoder.readBit(this.contexts,contextLabel)^1}return decoded},runMagnitudeRefinementPass:function BitModel_runMagnitudeRefinementPass(){var decoder=this.decoder;var width=this.width,height=this.height;var coefficentsMagnitude=this.coefficentsMagnitude;var neighborsSignificance=this.neighborsSignificance;var contexts=this.contexts;var bitsDecoded=this.bitsDecoded;var processingFlags=this.processingFlags;var processedMask=1;var firstMagnitudeBitMask=2;var length=width*height;var width4=width*4;for(var index0=0,indexNext;index0>1;offset=offset|0;var j,n,current,next;var alpha=-1.586134342059924;var beta=-.052980118572961;var gamma=.882911075530934;var delta=.443506852043971;var K=1.230174104914001;var K_=1/K;j=offset-3;for(n=len+4;n--;j+=2){x[j]*=K_}j=offset-2;current=delta*x[j-1];for(n=len+3;n--;j+=2){next=delta*x[j+1];x[j]=K*x[j]-current-next;if(n--){j+=2;current=delta*x[j+1];x[j]=K*x[j]-current-next}else{break}}j=offset-1;current=gamma*x[j-1];for(n=len+2;n--;j+=2){next=gamma*x[j+1];x[j]-=current+next;if(n--){j+=2;current=gamma*x[j+1];x[j]-=current+next}else{break}}j=offset;current=beta*x[j-1];for(n=len+1;n--;j+=2){next=beta*x[j+1];x[j]-=current+next;if(n--){j+=2;current=beta*x[j+1];x[j]-=current+next}else{break}}if(len!==0){j=offset+1;current=alpha*x[j-1];for(n=len;n--;j+=2){next=alpha*x[j+1];x[j]-=current+next;if(n--){j+=2;current=alpha*x[j+1];x[j]-=current+next}else{break}}}};return IrreversibleTransform}();var ReversibleTransform=function ReversibleTransformClosure(){function ReversibleTransform(){Transform.call(this)}ReversibleTransform.prototype=Object.create(Transform.prototype);ReversibleTransform.prototype.filter=function reversibleTransformFilter(x,offset,length){var len=length>>1;offset=offset|0;var j,n;for(j=offset,n=len+1;n--;j+=2){x[j]-=x[j-1]+x[j+1]+2>>2}for(j=offset+1,n=len;n--;j+=2){x[j]+=x[j-1]+x[j+1]>>1}};return ReversibleTransform}();return JpxImage}();"use strict";var ArithmeticDecoder=function ArithmeticDecoderClosure(){var QeTable=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];function ArithmeticDecoder(data,start,end){this.data=data;this.bp=start;this.dataEnd=end;this.chigh=data[start];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}ArithmeticDecoder.prototype={byteIn:function ArithmeticDecoder_byteIn(){var data=this.data;var bp=this.bp;if(data[bp]===255){var b1=data[bp+1];if(b1>143){this.clow+=65280;this.ct=8}else{bp++;this.clow+=data[bp]<<9;this.ct=7;this.bp=bp}}else{bp++;this.clow+=bp65535){this.chigh+=this.clow>>16;this.clow&=65535}},readBit:function ArithmeticDecoder_readBit(contexts,pos){var cx_index=contexts[pos]>>1,cx_mps=contexts[pos]&1;var qeTableIcx=QeTable[cx_index];var qeIcx=qeTableIcx.qe;var d;var a=this.a-qeIcx;if(this.chigh>15&1;this.clow=this.clow<<1&65535;this.ct--}while((a&32768)===0);this.a=a;contexts[pos]=cx_index<<1|cx_mps;return d}};return ArithmeticDecoder}();"use strict";var globalScope=typeof window==="undefined"?this:window;var isWorker=typeof window==="undefined";var FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];var TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};var ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};var AnnotationType={WIDGET:1,TEXT:2,LINK:3};var StreamType={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9};var FontType={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};if(!globalScope.PDFJS){globalScope.PDFJS={}}var PDFJS=PDFJS||{};PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var OPS=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};function info(msg){if(PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos){console.log("Info: "+msg)}}function warn(msg){if(PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings){console.log("Warning: "+msg)}}function error(msg){if(arguments.length>1){var logArguments=["Error:"];logArguments.push.apply(logArguments,arguments);console.log.apply(console,logArguments);msg=[].join.call(arguments," ")}else{console.log("Error: "+msg)}console.log(backtrace());UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);throw new Error(msg)}function backtrace(){try{throw new Error}catch(e){return e.stack?e.stack.split("\n").slice(2).join("\n"):""}}function assert(cond,msg){if(!cond){error(msg)}}var UNSUPPORTED_FEATURES=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"};var UnsupportedManager=PDFJS.UnsupportedManager=function UnsupportedManagerClosure(){var listeners=[];return{listen:function(cb){listeners.push(cb)},notify:function(featureId){warn('Unsupported feature "'+featureId+'"');for(var i=0,ii=listeners.length;i=0?i:pathLength;i=baseUrl.lastIndexOf("?",pathLength);pathLength=i>=0?i:pathLength;var prefixLength=baseUrl.lastIndexOf("/",pathLength);return baseUrl.substring(0,prefixLength+1)+url}}function isValidUrl(url,allowRelative){if(!url){return false}var protocol=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(url);if(!protocol){return allowRelative}protocol=protocol[0].toLowerCase();switch(protocol){case"http":case"https":case"ftp":case"mailto":case"tel":return true;default:return false}}PDFJS.isValidUrl=isValidUrl;function shadow(obj,prop,value){Object.defineProperty(obj,prop,{value:value,enumerable:true,configurable:true,writable:false});return value}PDFJS.shadow=shadow;var PasswordResponses=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var PasswordException=function PasswordExceptionClosure(){function PasswordException(msg,code){this.name="PasswordException";this.message=msg;this.code=code}PasswordException.prototype=new Error;PasswordException.constructor=PasswordException;return PasswordException}();PDFJS.PasswordException=PasswordException;var UnknownErrorException=function UnknownErrorExceptionClosure(){function UnknownErrorException(msg,details){this.name="UnknownErrorException";this.message=msg;this.details=details}UnknownErrorException.prototype=new Error;UnknownErrorException.constructor=UnknownErrorException;return UnknownErrorException}();PDFJS.UnknownErrorException=UnknownErrorException;var InvalidPDFException=function InvalidPDFExceptionClosure(){function InvalidPDFException(msg){this.name="InvalidPDFException";this.message=msg}InvalidPDFException.prototype=new Error;InvalidPDFException.constructor=InvalidPDFException;return InvalidPDFException}();PDFJS.InvalidPDFException=InvalidPDFException;var MissingPDFException=function MissingPDFExceptionClosure(){function MissingPDFException(msg){this.name="MissingPDFException";this.message=msg}MissingPDFException.prototype=new Error;MissingPDFException.constructor=MissingPDFException;return MissingPDFException}();PDFJS.MissingPDFException=MissingPDFException;var UnexpectedResponseException=function UnexpectedResponseExceptionClosure(){function UnexpectedResponseException(msg,status){this.name="UnexpectedResponseException";this.message=msg;this.status=status}UnexpectedResponseException.prototype=new Error;UnexpectedResponseException.constructor=UnexpectedResponseException;return UnexpectedResponseException}();PDFJS.UnexpectedResponseException=UnexpectedResponseException;var NotImplementedException=function NotImplementedExceptionClosure(){function NotImplementedException(msg){this.message=msg}NotImplementedException.prototype=new Error;NotImplementedException.prototype.name="NotImplementedException";NotImplementedException.constructor=NotImplementedException;return NotImplementedException}();var MissingDataException=function MissingDataExceptionClosure(){function MissingDataException(begin,end){this.begin=begin;this.end=end;this.message="Missing data ["+begin+", "+end+")"}MissingDataException.prototype=new Error;MissingDataException.prototype.name="MissingDataException";MissingDataException.constructor=MissingDataException;return MissingDataException}();var XRefParseException=function XRefParseExceptionClosure(){function XRefParseException(msg){this.message=msg}XRefParseException.prototype=new Error;XRefParseException.prototype.name="XRefParseException";XRefParseException.constructor=XRefParseException;return XRefParseException}();function bytesToString(bytes){assert(bytes!==null&&typeof bytes==="object"&&bytes.length!==undefined,"Invalid argument for bytesToString");var length=bytes.length;var MAX_ARGUMENT_COUNT=8192;if(length>24&255,value>>16&255,value>>8&255,value&255)}function log2(x){var n=1,i=0;while(x>n){n<<=1;i++}return i}function readInt8(data,start){return data[start]<<24>>24}function readUint16(data,offset){return data[offset]<<8|data[offset+1]}function readUint32(data,offset){return(data[offset]<<24|data[offset+1]<<16|data[offset+2]<<8|data[offset+3])>>>0}function isLittleEndian(){var buffer8=new Uint8Array(2);buffer8[0]=1;var buffer16=new Uint16Array(buffer8.buffer);return buffer16[0]===1}Object.defineProperty(PDFJS,"isLittleEndian",{configurable:true,get:function PDFJS_isLittleEndian(){return shadow(PDFJS,"isLittleEndian",isLittleEndian())}});function hasCanvasTypedArrays(){var canvas=document.createElement("canvas");canvas.width=canvas.height=1;var ctx=canvas.getContext("2d");var imageData=ctx.createImageData(1,1);return typeof imageData.data.buffer!=="undefined"}Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:true,get:function PDFJS_hasCanvasTypedArrays(){return shadow(PDFJS,"hasCanvasTypedArrays",hasCanvasTypedArrays())}});var Uint32ArrayView=function Uint32ArrayViewClosure(){function Uint32ArrayView(buffer,length){this.buffer=buffer;this.byteLength=buffer.length;this.length=length===undefined?this.byteLength>>2:length;ensureUint32ArrayViewProps(this.length)}Uint32ArrayView.prototype=Object.create(null);var uint32ArrayViewSetters=0;function createUint32ArrayProp(index){return{get:function(){var buffer=this.buffer,offset=index<<2;return(buffer[offset]|buffer[offset+1]<<8|buffer[offset+2]<<16|buffer[offset+3]<<24)>>>0},set:function(value){var buffer=this.buffer,offset=index<<2;buffer[offset]=value&255;buffer[offset+1]=value>>8&255;buffer[offset+2]=value>>16&255;buffer[offset+3]=value>>>24&255}}}function ensureUint32ArrayViewProps(length){while(uint32ArrayViewSettersrect[2]){r[0]=rect[2];r[2]=rect[0]}if(rect[1]>rect[3]){r[1]=rect[3];r[3]=rect[1]}return r};Util.intersect=function Util_intersect(rect1,rect2){function compare(a,b){return a-b}var orderedX=[rect1[0],rect1[2],rect2[0],rect2[2]].sort(compare),orderedY=[rect1[1],rect1[3],rect2[1],rect2[3]].sort(compare),result=[];rect1=Util.normalizeRect(rect1);rect2=Util.normalizeRect(rect2);if(orderedX[0]===rect1[0]&&orderedX[1]===rect2[0]||orderedX[0]===rect2[0]&&orderedX[1]===rect1[0]){result[0]=orderedX[1];result[2]=orderedX[2]}else{return false}if(orderedY[0]===rect1[1]&&orderedY[1]===rect2[1]||orderedY[0]===rect2[1]&&orderedY[1]===rect1[1]){result[1]=orderedY[1];result[3]=orderedY[2]}else{return false}return result};Util.sign=function Util_sign(num){return num<0?-1:1};Util.appendToArray=function Util_appendToArray(arr1,arr2){Array.prototype.push.apply(arr1,arr2)};Util.prependToArray=function Util_prependToArray(arr1,arr2){Array.prototype.unshift.apply(arr1,arr2)};Util.extendObj=function extendObj(obj1,obj2){for(var key in obj2){obj1[key]=obj2[key]}};Util.getInheritableProperty=function Util_getInheritableProperty(dict,name){while(dict&&!dict.has(name)){dict=dict.get("Parent")}if(!dict){return null}return dict.get(name)};Util.inherit=function Util_inherit(sub,base,prototype){sub.prototype=Object.create(base.prototype);sub.prototype.constructor=sub;for(var prop in prototype){sub.prototype[prop]=prototype[prop]}};Util.loadScript=function Util_loadScript(src,callback){var script=document.createElement("script");var loaded=false;script.setAttribute("src",src);if(callback){script.onload=function(){if(!loaded){callback()}loaded=true}}document.getElementsByTagName("head")[0].appendChild(script)};return Util}();var PageViewport=PDFJS.PageViewport=function PageViewportClosure(){function PageViewport(viewBox,scale,rotation,offsetX,offsetY,dontFlip){this.viewBox=viewBox;this.scale=scale;this.rotation=rotation;this.offsetX=offsetX;this.offsetY=offsetY;var centerX=(viewBox[2]+viewBox[0])/2;var centerY=(viewBox[3]+viewBox[1])/2;var rotateA,rotateB,rotateC,rotateD;rotation=rotation%360;rotation=rotation<0?rotation+360:rotation;switch(rotation){case 180:rotateA=-1;rotateB=0;rotateC=0;rotateD=1;break;case 90:rotateA=0;rotateB=1;rotateC=1;rotateD=0;break;case 270:rotateA=0;rotateB=-1;rotateC=-1;rotateD=0;break;default:rotateA=1;rotateB=0;rotateC=0;rotateD=-1;break}if(dontFlip){rotateC=-rotateC;rotateD=-rotateD}var offsetCanvasX,offsetCanvasY;var width,height;if(rotateA===0){offsetCanvasX=Math.abs(centerY-viewBox[1])*scale+offsetX;offsetCanvasY=Math.abs(centerX-viewBox[0])*scale+offsetY;width=Math.abs(viewBox[3]-viewBox[1])*scale;height=Math.abs(viewBox[2]-viewBox[0])*scale}else{offsetCanvasX=Math.abs(centerX-viewBox[0])*scale+offsetX;offsetCanvasY=Math.abs(centerY-viewBox[1])*scale+offsetY;width=Math.abs(viewBox[2]-viewBox[0])*scale;height=Math.abs(viewBox[3]-viewBox[1])*scale}this.transform=[rotateA*scale,rotateB*scale,rotateC*scale,rotateD*scale,offsetCanvasX-rotateA*scale*centerX-rotateC*scale*centerY,offsetCanvasY-rotateB*scale*centerX-rotateD*scale*centerY];this.width=width;this.height=height;this.fontScale=scale}PageViewport.prototype={clone:function PageViewPort_clone(args){args=args||{};var scale="scale"in args?args.scale:this.scale;var rotation="rotation"in args?args.rotation:this.rotation;return new PageViewport(this.viewBox.slice(),scale,rotation,this.offsetX,this.offsetY,args.dontFlip)},convertToViewportPoint:function PageViewport_convertToViewportPoint(x,y){return Util.applyTransform([x,y],this.transform)},convertToViewportRectangle:function PageViewport_convertToViewportRectangle(rect){var tl=Util.applyTransform([rect[0],rect[1]],this.transform);var br=Util.applyTransform([rect[2],rect[3]],this.transform);return[tl[0],tl[1],br[0],br[1]]},convertToPdfPoint:function PageViewport_convertToPdfPoint(x,y){return Util.applyInverseTransform([x,y],this.transform)}};return PageViewport}();var PDFStringTranslateTable=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToPDFString(str){var i,n=str.length,strBuf=[];if(str[0]==="þ"&&str[1]==="ÿ"){for(i=2;i0){var handler=this.handlers.shift();var nextStatus=handler.thisPromise._status;var nextValue=handler.thisPromise._value;try{if(nextStatus===STATUS_RESOLVED){if(typeof handler.onResolve==="function"){nextValue=handler.onResolve(nextValue)}}else if(typeof handler.onReject==="function"){nextValue=handler.onReject(nextValue);nextStatus=STATUS_RESOLVED;if(handler.thisPromise._unhandledRejection){this.removeUnhandeledRejection(handler.thisPromise)}}}catch(ex){nextStatus=STATUS_REJECTED;nextValue=ex}handler.nextPromise._updateStatus(nextStatus,nextValue);if(Date.now()>=timeoutAt){break}}if(this.handlers.length>0){setTimeout(this.runHandlers.bind(this),0);return}this.running=false},addUnhandledRejection:function addUnhandledRejection(promise){this.unhandledRejections.push({promise:promise,time:Date.now()});this.scheduleRejectionCheck()},removeUnhandeledRejection:function removeUnhandeledRejection(promise){promise._unhandledRejection=false;for(var i=0;iREJECTION_TIMEOUT){var unhandled=this.unhandledRejections[i].promise._value;var msg="Unhandled rejection: "+unhandled;if(unhandled.stack){msg+="\n"+unhandled.stack}warn(msg);this.unhandledRejections.splice(i);i--}}if(this.unhandledRejections.length){this.scheduleRejectionCheck()}}.bind(this),REJECTION_TIMEOUT)}};function Promise(resolver){this._status=STATUS_PENDING;this._handlers=[];try{resolver.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(e){this._reject(e)}}Promise.all=function Promise_all(promises){var resolveAll,rejectAll;var deferred=new Promise(function(resolve,reject){resolveAll=resolve;rejectAll=reject});var unresolved=promises.length;var results=[];if(unresolved===0){resolveAll(results);return deferred}function reject(reason){if(deferred._status===STATUS_REJECTED){return}results=[];rejectAll(reason)}for(var i=0,ii=promises.length;ilongest){longest=name.length}}for(i=0,ii=times.length;i>2,d2=(b1&3)<<4|b2>>4;var d3=i+1>6:64;var d4=i+2{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{characterSets:()=>i,convertBytes:()=>function(e,n,t){return g(y,r,e,n,t)},convertBytesPromise:()=>function(e,n,t){return g(P,m,e,n,t)}});var n={codeElement:"G0",escapeSequence:[27,40,66],encoding:"windows-1252",isASCII:!0,bytesPerCodePoint:1},i={"ISO_IR 6":{encoding:"utf-8"},"ISO_IR 100":{encoding:"windows-1252"},"ISO_IR 101":{encoding:"iso-8859-2"},"ISO_IR 109":{encoding:"iso-8859-3"},"ISO_IR 110":{encoding:"iso-8859-4"},"ISO_IR 144":{encoding:"iso-8859-5"},"ISO_IR 127":{encoding:"iso-8859-6"},"ISO_IR 126":{encoding:"iso-8859-7"},"ISO_IR 138":{encoding:"iso-8859-8"},"ISO_IR 148":{encoding:"windows-1254"},"ISO_IR 13":{encoding:"shift-jis"},"ISO_IR 166":{encoding:"tis-620"},"ISO 2022 IR 6":{extension:!0,elements:[n]},"ISO 2022 IR 100":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,65],encoding:"windows-1252",bytesPerCodePoint:1}]},"ISO 2022 IR 101":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,66],encoding:"iso-8859-2",bytesPerCodePoint:1}]},"ISO 2022 IR 109":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,67],encoding:"iso-8859-3",bytesPerCodePoint:1}]},"ISO 2022 IR 110":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,68],encoding:"iso-8859-4",bytesPerCodePoint:1}]},"ISO 2022 IR 144":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,76],encoding:"iso-8859-5",bytesPerCodePoint:1}]},"ISO 2022 IR 127":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,71],encoding:"iso-8859-6",bytesPerCodePoint:1}]},"ISO 2022 IR 126":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,70],encoding:"iso-8859-7",bytesPerCodePoint:1}]},"ISO 2022 IR 138":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,72],encoding:"iso-8859-8",bytesPerCodePoint:1}]},"ISO 2022 IR 148":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,77],encoding:"windows-1254",bytesPerCodePoint:1}]},"ISO 2022 IR 13":{extension:!0,elements:[{codeElement:"G0",escapeSequence:[27,40,74],encoding:"shift-jis",bytesPerCodePoint:1},{codeElement:"G1",escapeSequence:[27,41,73],encoding:"shift-jis",bytesPerCodePoint:1}]},"ISO 2022 IR 166":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,84],encoding:"tis-620",bytesPerCodePoint:1}]},"ISO 2022 IR 87":{extension:!0,multiByte:!0,elements:[{codeElement:"G0",escapeSequence:[27,36,66],encoding:"euc-jp",setHighBit:!0,bytesPerCodePoint:2}]},"ISO 2022 IR 159":{extension:!0,multiByte:!0,elements:[{codeElement:"G0",escapeSequence:[27,36,40,68],encoding:"euc-jp",isJISX0212:!0,bytesPerCodePoint:2}]},"ISO 2022 IR 149":{extension:!0,multiByte:!0,elements:[{codeElement:"G1",escapeSequence:[27,36,41,67],encoding:"euc-kr",bytesPerCodePoint:2}]},"ISO 2022 IR 58":{extension:!0,multiByte:!0,elements:[{codeElement:"G1",escapeSequence:[27,36,41,65],encoding:"gb18030",bytesPerCodePoint:2}]},"ISO_IR 192":{encoding:"utf-8",multiByte:!0},GB18030:{encoding:"gb18030",multiByte:!0},GBK:{encoding:"gbk",multiByte:!0}},l=27,c=10,s=12,u=13,d=9,a=92,f=61,I=94;function S(e){return e.replace(/~/g,"‾").replace(/\\/g,"¥")}function r(e,n,t,o,r){r=b(n,t,o,r);return e+y(n.encoding,r)}function m(e,t,n,o,r){var i=b(t,n,o,r);return(""===e?Promise.resolve(""):e).then(function(n){return P(t.encoding,i).then(function(e){return n+e})})}function g(e,n,t,o,r){!function(e,n){if(n&&!(n instanceof Uint8Array))throw new Error("bytes must be a Uint8Array");if(e&&"string"!=typeof e)throw new Error("specificCharacterSet must be a string")}(t,o);t=function(e){e=e?e.split("\\").map(function(e){return e.trim().toUpperCase()}):[""];""===e[0]&&(e[0]=1=n.length)return!1;if(n[t+o]!==e[o])return!1}return!0}(c.escapeSequence,e,n))return c}throw new Error("Unknown escape sequence encountered at byte "+n)}(n,d,e),c[a.codeElement]=a,s+=a.escapeSequence.length)}return r}(t.map(function(e){return i[e]}),o,function(e){var n=(e||"").trim().toUpperCase(),e=[c,s,u,d];["UT","ST","LT"].includes(n)||e.push(a);"PN"===n&&(e.push(f),e.push(I));return e}(r.vr),n)}var p={};function y(e,n){var t=p[e];return t||(t=new TextDecoder(e),p[e]=t="shift-jis"===e?{textDecoder:t,decode:function(e){return S(t.decode(e))}}:t),t.decode(n)}function P(o,r){return new Promise(function(e){var n=new FileReader;n.onload="shift-jis"===o?function(){return e(S(n.result))}:function(){return e(n.result)};var t=new Blob([r]);n.readAsText(t,o)})}function h(e,n){return 127>>1|(i&21845)<<1;x=(x&52428)>>>2|(x&13107)<<2;x=(x&61680)>>>4|(x&3855)<<4;rev[i]=((x&65280)>>>8|(x&255)<<8)>>>1}var hMap=function(cd,mb,r){var s=cd.length;var i=0;var l=new u16(mb);for(;i>>rvb]=sv}}}}else{co=new u16(s);for(i=0;i>>15-cd[i]}}}return co};var flt=new u8(288);for(var i=0;i<144;++i)flt[i]=8;for(var i=144;i<256;++i)flt[i]=9;for(var i=256;i<280;++i)flt[i]=7;for(var i=280;i<288;++i)flt[i]=8;var fdt=new u8(32);for(var i=0;i<32;++i)fdt[i]=5;var flm=hMap(flt,9,0),flrm=hMap(flt,9,1);var fdm=hMap(fdt,5,0),fdrm=hMap(fdt,5,1);var max=function(a){var m=a[0];for(var i=1;im)m=a[i]}return m};var bits=function(d,p,m){var o=p/8|0;return(d[o]|d[o+1]<<8)>>(p&7)&m};var bits16=function(d,p){var o=p/8|0;return(d[o]|d[o+1]<<8|d[o+2]<<16)>>(p&7)};var shft=function(p){return(p+7)/8|0};var slc=function(v,s,e){if(s==null||s<0)s=0;if(e==null||e>v.length)e=v.length;var n=new(v.BYTES_PER_ELEMENT==2?u16:v.BYTES_PER_ELEMENT==4?u32:u8)(e-s);n.set(v.subarray(s,e));return n};exports.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"];var err=function(ind,msg,nt){var e=new Error(msg||ec[ind]);e.code=ind;if(Error.captureStackTrace)Error.captureStackTrace(e,err);if(!nt)throw e;return e};var inflt=function(dat,buf,st){var sl=dat.length;if(!sl||st&&st.f&&!st.l)return buf||new u8(0);var noBuf=!buf||st;var noSt=!st||st.i;if(!st)st={};if(!buf)buf=new u8(sl*3);var cbuf=function(l){var bl=buf.length;if(l>bl){var nbuf=new u8(Math.max(bl*2,l));nbuf.set(buf);buf=nbuf}};var final=st.f||0,pos=st.p||0,bt=st.b||0,lm=st.l,dm=st.d,lbt=st.m,dbt=st.n;var tbts=sl*8;do{if(!lm){final=bits(dat,pos,1);var type=bits(dat,pos+1,3);pos+=3;if(!type){var s=shft(pos)+4,l=dat[s-4]|dat[s-3]<<8,t=s+l;if(t>sl){if(noSt)err(0);break}if(noBuf)cbuf(bt+l);buf.set(dat.subarray(s,t),bt);st.b=bt+=l,st.p=pos=t*8,st.f=final;continue}else if(type==1)lm=flrm,dm=fdrm,lbt=9,dbt=5;else if(type==2){var hLit=bits(dat,pos,31)+257,hcLen=bits(dat,pos+10,15)+4;var tl=hLit+bits(dat,pos+5,31)+1;pos+=14;var ldt=new u8(tl);var clt=new u8(19);for(var i=0;i>>4;if(s<16){ldt[i++]=s}else{var c=0,n=0;if(s==16)n=3+bits(dat,pos,3),pos+=2,c=ldt[i-1];else if(s==17)n=3+bits(dat,pos,7),pos+=3;else if(s==18)n=11+bits(dat,pos,127),pos+=7;while(n--)ldt[i++]=c}}var lt=ldt.subarray(0,hLit),dt=ldt.subarray(hLit);lbt=max(lt);dbt=max(dt);lm=hMap(lt,lbt,1);dm=hMap(dt,dbt,1)}else err(1);if(pos>tbts){if(noSt)err(0);break}}if(noBuf)cbuf(bt+131072);var lms=(1<>>4;pos+=c&15;if(pos>tbts){if(noSt)err(0);break}if(!c)err(2);if(sym<256)buf[bt++]=sym;else if(sym==256){lpos=pos,lm=null;break}else{var add=sym-254;if(sym>264){var i=sym-257,b=fleb[i];add=bits(dat,pos,(1<>>4;if(!d)err(3);pos+=d&15;var dt=fd[dsym];if(dsym>3){var b=fdeb[dsym];dt+=bits16(dat,pos)&(1<tbts){if(noSt)err(0);break}if(noBuf)cbuf(bt+131072);var end=bt+add;for(;bt>>8};var wbits16=function(d,p,v){v<<=p&7;var o=p/8|0;d[o]|=v;d[o+1]|=v>>>8;d[o+2]|=v>>>16};var hTree=function(d,mb){var t=[];for(var i=0;imaxSym)maxSym=t2[i].s}var tr=new u16(maxSym+1);var mbt=ln(t[i1-1],tr,0);if(mbt>mb){var i=0,dt=0;var lft=mbt-mb,cst=1<mb){dt+=cst-(1<>>=lft;while(dt>0){var i2_2=t2[i].s;if(tr[i2_2]=0&&dt;--i){var i2_3=t2[i].s;if(tr[i2_3]==mb){--tr[i2_3];++dt}}mbt=mb}return[new u8(tr),mbt]};var ln=function(n,l,d){return n.s==-1?Math.max(ln(n.l,l,d+1),ln(n.r,l,d+1)):l[n.s]=d};var lc=function(c){var s=c.length;while(s&&!c[--s]);var cl=new u16(++s);var cli=0,cln=c[0],cls=1;var w=function(v){cl[cli++]=v};for(var i=1;i<=s;++i){if(c[i]==cln&&i!=s)++cls;else{if(!cln&&cls>2){for(;cls>138;cls-=138)w(32754);if(cls>2){w(cls>10?cls-11<<5|28690:cls-3<<5|12305);cls=0}}else if(cls>3){w(cln),--cls;for(;cls>6;cls-=6)w(8304);if(cls>2)w(cls-3<<5|8208),cls=0}while(cls--)w(cln);cls=1;cln=c[i]}}return[cl.subarray(0,cli),s]};var clen=function(cf,cl){var l=0;for(var i=0;i>>8;out[o+2]=out[o]^255;out[o+3]=out[o+1]^255;for(var i=0;i4&&!lct[clim[nlcc-1]];--nlcc);var flen=bl+5<<3;var ftlen=clen(lf,flt)+clen(df,fdt)+eb;var dtlen=clen(lf,dlt)+clen(df,ddt)+eb+14+3*nlcc+clen(lcfreq,lct)+(2*lcfreq[16]+3*lcfreq[17]+7*lcfreq[18]);if(flen<=ftlen&&flen<=dtlen)return wfblk(out,p,dat.subarray(bs,bs+bl));var lm,ll,dm,dl;wbits(out,p,1+(dtlen15)wbits(out,p,clct[i]>>>5&127),p+=clct[i]>>>12}}}else{lm=flm,ll=flt,dm=fdm,dl=fdt}for(var i=0;i255){var len=syms[i]>>>18&31;wbits16(out,p,lm[len+257]),p+=ll[len+257];if(len>7)wbits(out,p,syms[i]>>>23&31),p+=fleb[len];var dst=syms[i]&31;wbits16(out,p,dm[dst]),p+=dl[dst];if(dst>3)wbits16(out,p,syms[i]>>>5&8191),p+=fdeb[dst]}else{wbits16(out,p,lm[syms[i]]),p+=ll[syms[i]]}}wbits16(out,p,lm[256]);return p+ll[256]};var deo=new u32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]);var et=new u8(0);var dflt=function(dat,lvl,plvl,pre,post,lst){var s=dat.length;var o=new u8(pre+s+5*(1+Math.ceil(s/7e3))+post);var w=o.subarray(pre,o.length-post);var pos=0;if(!lvl||s<8){for(var i=0;i<=s;i+=65535){var e=i+65535;if(e>=s){w[pos>>3]=lst}pos=wfblk(w,pos+1,dat.subarray(i,e))}}else{var opt=deo[lvl-1];var n=opt>>>13,c=opt&8191;var msk_1=(1<7e3||li>24576)&&rem>423){pos=wblk(dat,w,0,syms,lf,df,eb,li,bs,i-bs,pos);li=lc_1=eb=0,bs=i;for(var j=0;j<286;++j)lf[j]=0;for(var j=0;j<30;++j)df[j]=0}var l=2,d=0,ch_1=c,dif=imod-pimod&32767;if(rem>2&&hv==hsh(i-dif)){var maxn=Math.min(n,rem)-1;var maxd=Math.min(32767,i);var ml=Math.min(258,rem);while(dif<=maxd&&--ch_1&&imod!=pimod){if(dat[i+l]==dat[i+l-dif]){var nl=0;for(;nll){l=nl,d=dif;if(nl>maxn)break;var mmd=Math.min(dif,nl-2);var md=0;for(var j=0;jmd)md=cd,pimod=ti}}}imod=pimod,pimod=prev[imod];dif+=imod-pimod+32768&32767}}if(d){syms[li++]=268435456|revfl[l]<<18|revfd[d];var lin=revfl[l]&31,din=revfd[d]&31;eb+=fleb[lin]+fdeb[din];++lf[257+lin];++df[din];wi=i+l;++lc_1}else{syms[li++]=dat[i];++lf[dat[i]]}}}pos=wblk(dat,w,lst,syms,lf,df,eb,li,bs,i-bs,pos);if(!lst&&pos&7)pos=wfblk(w,pos+1,et)}return slc(o,0,pre+shft(pos)+post)};var crct=function(){var t=new Int32Array(256);for(var i=0;i<256;++i){var c=i,k=9;while(--k)c=(c&1&&-306674912)^c>>>1;t[i]=c}return t}();var crc=function(){var c=-1;return{p:function(d){var cr=c;for(var i=0;i>>8;c=cr},d:function(){return~c}}};var adler=function(){var a=1,b=0;return{p:function(d){var n=a,m=b;var l=d.length|0;for(var i=0;i!=l;){var e=Math.min(i+2655,l);for(;i>16),m=(m&65535)+15*(m>>16)}a=n,b=m},d:function(){a%=65521,b%=65521;return(a&255)<<24|a>>>8<<16|(b&255)<<8|b>>>8}}};var dopt=function(dat,opt,pre,post,st){return dflt(dat,opt.level==null?6:opt.level,opt.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(dat.length)))*1.5):12+opt.mem,pre,post,!st)};var mrg=function(a,b){var o={};for(var k in a)o[k]=a[k];for(var k in b)o[k]=b[k];return o};var wcln=function(fn,fnStr,td){var dt=fn();var st=fn.toString();var ks=st.slice(st.indexOf("[")+1,st.lastIndexOf("]")).replace(/\s+/g,"").split(",");for(var i=0;i>>0};var b8=function(d,b){return b4(d,b)+b4(d,b+4)*4294967296};var wbytes=function(d,b,v){for(;v;++b)d[b]=v,v>>>=8};var gzh=function(c,o){var fn=o.filename;c[0]=31,c[1]=139,c[2]=8,c[8]=o.level<2?4:o.level==9?2:0,c[9]=3;if(o.mtime!=0)wbytes(c,4,Math.floor(new Date(o.mtime||Date.now())/1e3));if(fn){c[3]=8;for(var i=0;i<=fn.length;++i)c[i+10]=fn.charCodeAt(i)}};var gzs=function(d){if(d[0]!=31||d[1]!=139||d[2]!=8)err(6,"invalid gzip data");var flg=d[3];var st=10;if(flg&4)st+=d[10]|(d[11]<<8)+2;for(var zs=(flg>>3&1)+(flg>>4&1);zs>0;zs-=!d[st++]);return st+(flg&2)};var gzl=function(d){var l=d.length;return(d[l-4]|d[l-3]<<8|d[l-2]<<16|d[l-1]<<24)>>>0};var gzhl=function(o){return 10+(o.filename&&o.filename.length+1||0)};var zlh=function(c,o){var lv=o.level,fl=lv==0?0:lv<6?1:lv==9?3:2;c[0]=120,c[1]=fl<<6|(fl?32-2*fl:1)};var zlv=function(d){if((d[0]&15)!=8||d[0]>>>4>7||(d[0]<<8|d[1])%31)err(6,"invalid zlib data");if(d[1]&32)err(6,"invalid zlib data: preset dictionaries not supported")};function AsyncCmpStrm(opts,cb){if(!cb&&typeof opts=="function")cb=opts,opts={};this.ondata=cb;return opts}var Deflate=function(){function Deflate(opts,cb){if(!cb&&typeof opts=="function")cb=opts,opts={};this.ondata=cb;this.o=opts||{}}Deflate.prototype.p=function(c,f){this.ondata(dopt(c,this.o,0,0,!f),f)};Deflate.prototype.push=function(chunk,final){if(!this.ondata)err(5);if(this.d)err(4);this.d=final;this.p(chunk,final||false)};return Deflate}();exports.Deflate=Deflate;var AsyncDeflate=function(){function AsyncDeflate(opts,cb){astrmify([bDflt,function(){return[astrm,Deflate]}],this,AsyncCmpStrm.call(this,opts,cb),function(ev){var strm=new Deflate(ev.data);onmessage=astrm(strm)},6)}return AsyncDeflate}();exports.AsyncDeflate=AsyncDeflate;function deflate(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return cbify(data,opts,[bDflt],function(ev){return pbf(deflateSync(ev.data[0],ev.data[1]))},0,cb)}exports.deflate=deflate;function deflateSync(data,opts){return dopt(data,opts||{},0,0)}exports.deflateSync=deflateSync;var Inflate=function(){function Inflate(cb){this.s={};this.p=new u8(0);this.ondata=cb}Inflate.prototype.e=function(c){if(!this.ondata)err(5);if(this.d)err(4);var l=this.p.length;var n=new u8(l+c.length);n.set(this.p),n.set(c,l),this.p=n};Inflate.prototype.c=function(final){this.d=this.s.i=final||false;var bts=this.s.b;var dt=inflt(this.p,this.o,this.s);this.ondata(slc(dt,bts,this.s.b),this.d);this.o=slc(dt,this.s.b-32768),this.s.b=this.o.length;this.p=slc(this.p,this.s.p/8|0),this.s.p&=7};Inflate.prototype.push=function(chunk,final){this.e(chunk),this.c(final)};return Inflate}();exports.Inflate=Inflate;var AsyncInflate=function(){function AsyncInflate(cb){this.ondata=cb;astrmify([bInflt,function(){return[astrm,Inflate]}],this,0,function(){var strm=new Inflate;onmessage=astrm(strm)},7)}return AsyncInflate}();exports.AsyncInflate=AsyncInflate;function inflate(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return cbify(data,opts,[bInflt],function(ev){return pbf(inflateSync(ev.data[0],gu8(ev.data[1])))},1,cb)}exports.inflate=inflate;function inflateSync(data,out){return inflt(data,out)}exports.inflateSync=inflateSync;var Gzip=function(){function Gzip(opts,cb){this.c=crc();this.l=0;this.v=1;Deflate.call(this,opts,cb)}Gzip.prototype.push=function(chunk,final){Deflate.prototype.push.call(this,chunk,final)};Gzip.prototype.p=function(c,f){this.c.p(c);this.l+=c.length;var raw=dopt(c,this.o,this.v&&gzhl(this.o),f&&8,!f);if(this.v)gzh(raw,this.o),this.v=0;if(f)wbytes(raw,raw.length-8,this.c.d()),wbytes(raw,raw.length-4,this.l);this.ondata(raw,f)};return Gzip}();exports.Gzip=Gzip;exports.Compress=Gzip;var AsyncGzip=function(){function AsyncGzip(opts,cb){astrmify([bDflt,gze,function(){return[astrm,Deflate,Gzip]}],this,AsyncCmpStrm.call(this,opts,cb),function(ev){var strm=new Gzip(ev.data);onmessage=astrm(strm)},8)}return AsyncGzip}();exports.AsyncGzip=AsyncGzip;exports.AsyncCompress=AsyncGzip;function gzip(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return cbify(data,opts,[bDflt,gze,function(){return[gzipSync]}],function(ev){return pbf(gzipSync(ev.data[0],ev.data[1]))},2,cb)}exports.gzip=gzip;exports.compress=gzip;function gzipSync(data,opts){if(!opts)opts={};var c=crc(),l=data.length;c.p(data);var d=dopt(data,opts,gzhl(opts),8),s=d.length;return gzh(d,opts),wbytes(d,s-8,c.d()),wbytes(d,s-4,l),d}exports.gzipSync=gzipSync;exports.compressSync=gzipSync;var Gunzip=function(){function Gunzip(cb){this.v=1;Inflate.call(this,cb)}Gunzip.prototype.push=function(chunk,final){Inflate.prototype.e.call(this,chunk);if(this.v){var s=this.p.length>3?gzs(this.p):4;if(s>=this.p.length&&!final)return;this.p=this.p.subarray(s),this.v=0}if(final){if(this.p.length<8)err(6,"invalid gzip data");this.p=this.p.subarray(0,-8)}Inflate.prototype.c.call(this,final)};return Gunzip}();exports.Gunzip=Gunzip;var AsyncGunzip=function(){function AsyncGunzip(cb){this.ondata=cb;astrmify([bInflt,guze,function(){return[astrm,Inflate,Gunzip]}],this,0,function(){var strm=new Gunzip;onmessage=astrm(strm)},9)}return AsyncGunzip}();exports.AsyncGunzip=AsyncGunzip;function gunzip(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return cbify(data,opts,[bInflt,guze,function(){return[gunzipSync]}],function(ev){return pbf(gunzipSync(ev.data[0]))},3,cb)}exports.gunzip=gunzip;function gunzipSync(data,out){return inflt(data.subarray(gzs(data),-8),out||new u8(gzl(data)))}exports.gunzipSync=gunzipSync;var Zlib=function(){function Zlib(opts,cb){this.c=adler();this.v=1;Deflate.call(this,opts,cb)}Zlib.prototype.push=function(chunk,final){Deflate.prototype.push.call(this,chunk,final)};Zlib.prototype.p=function(c,f){this.c.p(c);var raw=dopt(c,this.o,this.v&&2,f&&4,!f);if(this.v)zlh(raw,this.o),this.v=0;if(f)wbytes(raw,raw.length-4,this.c.d());this.ondata(raw,f)};return Zlib}();exports.Zlib=Zlib;var AsyncZlib=function(){function AsyncZlib(opts,cb){astrmify([bDflt,zle,function(){return[astrm,Deflate,Zlib]}],this,AsyncCmpStrm.call(this,opts,cb),function(ev){var strm=new Zlib(ev.data);onmessage=astrm(strm)},10)}return AsyncZlib}();exports.AsyncZlib=AsyncZlib;function zlib(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return cbify(data,opts,[bDflt,zle,function(){return[zlibSync]}],function(ev){return pbf(zlibSync(ev.data[0],ev.data[1]))},4,cb)}exports.zlib=zlib;function zlibSync(data,opts){if(!opts)opts={};var a=adler();a.p(data);var d=dopt(data,opts,2,4);return zlh(d,opts),wbytes(d,d.length-4,a.d()),d}exports.zlibSync=zlibSync;var Unzlib=function(){function Unzlib(cb){this.v=1;Inflate.call(this,cb)}Unzlib.prototype.push=function(chunk,final){Inflate.prototype.e.call(this,chunk);if(this.v){if(this.p.length<2&&!final)return;this.p=this.p.subarray(2),this.v=0}if(final){if(this.p.length<4)err(6,"invalid zlib data");this.p=this.p.subarray(0,-4)}Inflate.prototype.c.call(this,final)};return Unzlib}();exports.Unzlib=Unzlib;var AsyncUnzlib=function(){function AsyncUnzlib(cb){this.ondata=cb;astrmify([bInflt,zule,function(){return[astrm,Inflate,Unzlib]}],this,0,function(){var strm=new Unzlib;onmessage=astrm(strm)},11)}return AsyncUnzlib}();exports.AsyncUnzlib=AsyncUnzlib;function unzlib(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return cbify(data,opts,[bInflt,zule,function(){return[unzlibSync]}],function(ev){return pbf(unzlibSync(ev.data[0],gu8(ev.data[1])))},5,cb)}exports.unzlib=unzlib;function unzlibSync(data,out){return inflt((zlv(data),data.subarray(2,-4)),out)}exports.unzlibSync=unzlibSync;var Decompress=function(){function Decompress(cb){this.G=Gunzip;this.I=Inflate;this.Z=Unzlib;this.ondata=cb}Decompress.prototype.push=function(chunk,final){if(!this.ondata)err(5);if(!this.s){if(this.p&&this.p.length){var n=new u8(this.p.length+chunk.length);n.set(this.p),n.set(chunk,this.p.length)}else this.p=chunk;if(this.p.length>2){var _this_1=this;var cb=function(){_this_1.ondata.apply(_this_1,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(cb):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(cb):new this.Z(cb);this.s.push(this.p,final);this.p=null}}else this.s.push(chunk,final)};return Decompress}();exports.Decompress=Decompress;var AsyncDecompress=function(){function AsyncDecompress(cb){this.G=AsyncGunzip;this.I=AsyncInflate;this.Z=AsyncUnzlib;this.ondata=cb}AsyncDecompress.prototype.push=function(chunk,final){Decompress.prototype.push.call(this,chunk,final)};return AsyncDecompress}();exports.AsyncDecompress=AsyncDecompress;function decompress(data,opts,cb){if(!cb)cb=opts,opts={};if(typeof cb!="function")err(7);return data[0]==31&&data[1]==139&&data[2]==8?gunzip(data,opts,cb):(data[0]&15)!=8||data[0]>>4>7||(data[0]<<8|data[1])%31?inflate(data,opts,cb):unzlib(data,opts,cb)}exports.decompress=decompress;function decompressSync(data,out){return data[0]==31&&data[1]==139&&data[2]==8?gunzipSync(data,out):(data[0]&15)!=8||data[0]>>4>7||(data[0]<<8|data[1])%31?inflateSync(data,out):unzlibSync(data,out)}exports.decompressSync=decompressSync;var fltn=function(d,p,t,o){for(var k in d){var val=d[k],n=p+k,op=o;if(Array.isArray(val))op=mrg(o,val[1]),val=val[0];if(val instanceof u8)t[n]=[val,op];else{t[n+="/"]=[new u8(0),op];fltn(val,n,t,o)}}};var te=typeof TextEncoder!="undefined"&&new TextEncoder;var td=typeof TextDecoder!="undefined"&&new TextDecoder;var tds=0;try{td.decode(et,{stream:true});tds=1}catch(e){}var dutf8=function(d){for(var r="",i=0;;){var c=d[i++];var eb=(c>127)+(c>223)+(c>239);if(i+eb>d.length)return[r,slc(d,i-1)];if(!eb)r+=String.fromCharCode(c);else if(eb==3){c=((c&15)<<18|(d[i++]&63)<<12|(d[i++]&63)<<6|d[i++]&63)-65536,r+=String.fromCharCode(55296|c>>10,56320|c&1023)}else if(eb&1)r+=String.fromCharCode((c&31)<<6|d[i++]&63);else r+=String.fromCharCode((c&15)<<12|(d[i++]&63)<<6|d[i++]&63)}};var DecodeUTF8=function(){function DecodeUTF8(cb){this.ondata=cb;if(tds)this.t=new TextDecoder;else this.p=et}DecodeUTF8.prototype.push=function(chunk,final){if(!this.ondata)err(5);final=!!final;if(this.t){this.ondata(this.t.decode(chunk,{stream:true}),final);if(final){if(this.t.decode().length)err(8);this.t=null}return}if(!this.p)err(4);var dat=new u8(this.p.length+chunk.length);dat.set(this.p);dat.set(chunk,this.p.length);var _a=dutf8(dat),ch=_a[0],np=_a[1];if(final){if(np.length)err(8);this.p=null}else this.p=np;this.ondata(ch,final)};return DecodeUTF8}();exports.DecodeUTF8=DecodeUTF8;var EncodeUTF8=function(){function EncodeUTF8(cb){this.ondata=cb}EncodeUTF8.prototype.push=function(chunk,final){if(!this.ondata)err(5);if(this.d)err(4);this.ondata(strToU8(chunk),this.d=final||false)};return EncodeUTF8}();exports.EncodeUTF8=EncodeUTF8;function strToU8(str,latin1){if(latin1){var ar_1=new u8(str.length);for(var i=0;i>1));var ai=0;var w=function(v){ar[ai++]=v};for(var i=0;iar.length){var n=new u8(ai+8+(l-i<<1));n.set(ar);ar=n}var c=str.charCodeAt(i);if(c<128||latin1)w(c);else if(c<2048)w(192|c>>6),w(128|c&63);else if(c>55295&&c<57344)c=65536+(c&1023<<10)|str.charCodeAt(++i)&1023,w(240|c>>18),w(128|c>>12&63),w(128|c>>6&63),w(128|c&63);else w(224|c>>12),w(128|c>>6&63),w(128|c&63)}return slc(ar,0,ai)}exports.strToU8=strToU8;function strFromU8(dat,latin1){if(latin1){var r="";for(var i=0;i65535)err(9);le+=l+4}}return le};var wzh=function(d,b,f,fn,u,c,ce,co){var fl=fn.length,ex=f.extra,col=co&&co.length;var exl=exfl(ex);wbytes(d,b,ce!=null?33639248:67324752),b+=4;if(ce!=null)d[b++]=20,d[b++]=f.os;d[b]=20,b+=2;d[b++]=f.flag<<1|(c<0&&8),d[b++]=u&&8;d[b++]=f.compression&255,d[b++]=f.compression>>8;var dt=new Date(f.mtime==null?Date.now():f.mtime),y=dt.getFullYear()-1980;if(y<0||y>119)err(10);wbytes(d,b,y<<25|dt.getMonth()+1<<21|dt.getDate()<<16|dt.getHours()<<11|dt.getMinutes()<<5|dt.getSeconds()>>>1),b+=4;if(c!=-1){wbytes(d,b,f.crc);wbytes(d,b+4,c<0?-c-2:c);wbytes(d,b+8,f.size)}wbytes(d,b+12,fl);wbytes(d,b+14,exl),b+=16;if(ce!=null){wbytes(d,b,col);wbytes(d,b+6,f.attrs);wbytes(d,b+10,ce),b+=14}d.set(fn,b);b+=fl;if(exl){for(var k in ex){var exf=ex[k],l=exf.length;wbytes(d,b,+k);wbytes(d,b+2,l);d.set(exf,b+4),b+=4+l}}if(col)d.set(co,b),b+=col;return b};var wzf=function(o,b,c,d,e){wbytes(o,b,101010256);wbytes(o,b+8,c);wbytes(o,b+10,c);wbytes(o,b+12,d);wbytes(o,b+16,e)};var ZipPassThrough=function(){function ZipPassThrough(filename){this.filename=filename;this.c=crc();this.size=0;this.compression=0}ZipPassThrough.prototype.process=function(chunk,final){this.ondata(null,chunk,final)};ZipPassThrough.prototype.push=function(chunk,final){if(!this.ondata)err(5);this.c.p(chunk);this.size+=chunk.length;if(final)this.crc=this.c.d();this.process(chunk,final||false)};return ZipPassThrough}();exports.ZipPassThrough=ZipPassThrough;var ZipDeflate=function(){function ZipDeflate(filename,opts){var _this_1=this;if(!opts)opts={};ZipPassThrough.call(this,filename);this.d=new Deflate(opts,function(dat,final){_this_1.ondata(null,dat,final)});this.compression=8;this.flag=dbf(opts.level)}ZipDeflate.prototype.process=function(chunk,final){try{this.d.push(chunk,final)}catch(e){this.ondata(e,null,final)}};ZipDeflate.prototype.push=function(chunk,final){ZipPassThrough.prototype.push.call(this,chunk,final)};return ZipDeflate}();exports.ZipDeflate=ZipDeflate;var AsyncZipDeflate=function(){function AsyncZipDeflate(filename,opts){var _this_1=this;if(!opts)opts={};ZipPassThrough.call(this,filename);this.d=new AsyncDeflate(opts,function(err,dat,final){_this_1.ondata(err,dat,final)});this.compression=8;this.flag=dbf(opts.level);this.terminate=this.d.terminate}AsyncZipDeflate.prototype.process=function(chunk,final){this.d.push(chunk,final)};AsyncZipDeflate.prototype.push=function(chunk,final){ZipPassThrough.prototype.push.call(this,chunk,final)};return AsyncZipDeflate}();exports.AsyncZipDeflate=AsyncZipDeflate;var Zip=function(){function Zip(cb){this.ondata=cb;this.u=[];this.d=1}Zip.prototype.add=function(file){var _this_1=this;if(!this.ondata)err(5);if(this.d&2)this.ondata(err(4+(this.d&1)*8,0,1),null,false);else{var f=strToU8(file.filename),fl_1=f.length;var com=file.comment,o=com&&strToU8(com);var u=fl_1!=file.filename.length||o&&com.length!=o.length;var hl_1=fl_1+exfl(file.extra)+30;if(fl_1>65535)this.ondata(err(11,0,1),null,false);var header=new u8(hl_1);wzh(header,0,file,f,u,-1);var chks_1=[header];var pAll_1=function(){for(var _i=0,chks_2=chks_1;_i65535)cbl(err(11,0,1),null);if(!compression)cbl(null,file);else if(size<16e4){try{cbl(null,deflateSync(file,p))}catch(e){cbl(e,null)}}else term.push(deflate(file,p,cbl))};for(var i=0;i65535)err(11);var d=compression?deflateSync(file,p):file,l=d.length;var c=crc();c.p(file);files.push(mrg(p,{size:file.length,crc:c.d(),c:d,f:f,m:m,u:s!=fn.length||m&&com.length!=ms,o:o,compression:compression}));o+=30+s+exl+l;tot+=76+2*(s+exl)+(ms||0)+l}var out=new u8(tot+22),oe=o,cdl=tot-o;for(var i=0;i0){var len=Math.min(this.c,chunk.length);var toAdd=chunk.subarray(0,len);this.c-=len;if(this.d)this.d.push(toAdd,!this.c);else this.k[0].push(toAdd);chunk=chunk.subarray(len);if(chunk.length)return this.push(chunk,final)}else{var f=0,i=0,is=void 0,buf=void 0;if(!this.p.length)buf=chunk;else if(!chunk.length)buf=this.p;else{buf=new u8(this.p.length+chunk.length);buf.set(this.p),buf.set(chunk,this.p.length)}var l=buf.length,oc=this.c,add=oc&&this.d;var _loop_2=function(){var _a;var sig=b4(buf,i);if(sig==67324752){f=1,is=i;this_1.d=null;this_1.c=0;var bf=b2(buf,i+6),cmp_1=b2(buf,i+8),u=bf&2048,dd=bf&8,fnl=b2(buf,i+26),es=b2(buf,i+28);if(l>i+30+fnl+es){var chks_3=[];this_1.k.unshift(chks_3);f=2;var sc_1=b4(buf,i+18),su_1=b4(buf,i+22);var fn_1=strFromU8(buf.subarray(i+30,i+=30+fnl),!u);if(sc_1==4294967295){_a=dd?[-2]:z64e(buf,i),sc_1=_a[0],su_1=_a[1]}else if(dd)sc_1=-1;i+=es;this_1.c=sc_1;var d_1;var file_1={name:fn_1,compression:cmp_1,start:function(){if(!file_1.ondata)err(5);if(!sc_1)file_1.ondata(null,et,true);else{var ctr=_this_1.o[cmp_1];if(!ctr)file_1.ondata(err(14,"unknown compression type "+cmp_1,1),null,false);d_1=sc_1<0?new ctr(fn_1):new ctr(fn_1,sc_1,su_1);d_1.ondata=function(err,dat,final){file_1.ondata(err,dat,final)};for(var _i=0,chks_4=chks_3;_i=0)file_1.size=sc_1,file_1.originalSize=su_1;this_1.onfile(file_1)}return"break"}else if(oc){if(sig==134695760){is=i+=12+(oc==-2&&8),f=3,this_1.c=0;return"break"}else if(sig==33639248){is=i-=4,f=3,this_1.c=0;return"break"}}};var this_1=this;for(;i65558){cbd(err(13,0,1),null);return tAll}}var lft=b2(data,e+8);if(lft){var c=lft;var o=b4(data,e+16);var z=o==4294967295||c==65535;if(z){var ze=b4(data,e-12);z=b4(data,ze)==101075792;if(z){c=lft=b4(data,ze+32);o=b4(data,ze+48)}}var fltr=opts&&opts.filter;var _loop_3=function(i){var _a=zh(data,o,z),c_1=_a[0],sc=_a[1],su=_a[2],fn=_a[3],no=_a[4],off=_a[5],b=slzh(data,off);o=no;var cbl=function(e,d){if(e){tAll();cbd(e,null)}else{if(d)files[fn]=d;if(!--lft)cbd(null,files)}};if(!fltr||fltr({name:fn,size:sc,originalSize:su,compression:c_1})){if(!c_1)cbl(null,slc(data,b,b+sc));else if(c_1==8){var infl=data.subarray(b,b+sc);if(sc<32e4){try{cbl(null,inflateSync(infl,new u8(su)))}catch(e){cbl(e,null)}}else term.push(inflate(infl,{size:su},cbl))}else cbl(err(14,"unknown compression type "+c_1,1),null)}else cbl(null,null)};for(var i=0;i65558)err(13)}var c=b2(data,e+8);if(!c)return{};var o=b4(data,e+16);var z=o==4294967295||c==65535;if(z){var ze=b4(data,e-12);z=b4(data,ze)==101075792;if(z){c=b4(data,ze+32);o=b4(data,ze+48)}}var fltr=opts&&opts.filter;for(var i=0;i>4!==4092||current===65476){switch(current){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,jpeg.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(current>>8!==255){throw new Error("ERROR: format throw new IOException! (decode)")}}current=this.stream.get16()}if(current<65472||current>65479){throw new Error("ERROR: could not handle arithmetic code!")}this.frame.read(this.stream);current=this.stream.get16();do{while(current!==65498){switch(current){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,jpeg.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(current>>8!==255){throw new Error("ERROR: format throw new IOException! (Parser.decode)")}}current=this.stream.get16()}this.precision=this.frame.precision;this.components=this.frame.components;if(!this.numBytes){this.numBytes=parseInt(Math.ceil(this.precision/8))}if(this.numBytes==1){this.mask=255}else{this.mask=65535}this.scan.read(this.stream);this.numComp=this.scan.numComp;this.selection=this.scan.selection;if(this.numBytes===1){if(this.numComp===3){this.getter=this.getValueRGB;this.setter=this.setValueRGB;this.output=this.outputRGB}else{this.getter=this.getValue8;this.setter=this.setValue8;this.output=this.outputSingle}}else{this.getter=this.getValue16;this.setter=this.setValue16;this.output=this.outputSingle}switch(this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1;break}this.scanComps=this.scan.components;this.quantTables=this.quantTable.quantTables;for(i=0;i=jpeg.lossless.Decoder.RESTART_MARKER_BEGIN&¤t<=jpeg.lossless.Decoder.RESTART_MARKER_END)){break}}if(current===65500&&scanNum===1){this.readNumber();current=this.stream.get16()}}while(current!==65497&&(this.xLoc>1)};jpeg.lossless.Decoder.prototype.select6=function(compOffset){return this.getPreviousY(compOffset)+(this.getPreviousX(compOffset)-this.getPreviousXY(compOffset)>>1)};jpeg.lossless.Decoder.prototype.select7=function(compOffset){return(this.getPreviousX(compOffset)+this.getPreviousY(compOffset))/2};jpeg.lossless.Decoder.prototype.decodeRGB=function(prev,temp,index){var value,actab,dctab,qtab,ctrC,i,k,j;prev[0]=this.selector(0);prev[1]=this.selector(1);prev[2]=this.selector(2);for(ctrC=0;ctrC=65280){return value}prev[ctrC]=this.IDCT_Source[0]=prev[ctrC]+this.getn(index,value,temp,index);this.IDCT_Source[0]*=qtab[0];for(j=1;j<64;j+=1){value=this.getHuffmanValue(actab,temp,index);if(value>=65280){return value}j+=value>>4;if((value&15)===0){if(value>>4===0){break}}else{this.IDCT_Source[jpeg.lossless.Decoder.IDCT_P[j]]=this.getn(index,value&15,temp,index)*qtab[j]}}}}return 0};jpeg.lossless.Decoder.prototype.decodeSingle=function(prev,temp,index){var value,i,n,nRestart;if(this.restarting){this.restarting=false;prev[0]=1<=65280){return value}n=this.getn(prev,value,temp,index);nRestart=n>>8;if(nRestart>=jpeg.lossless.Decoder.RESTART_MARKER_BEGIN&&nRestart<=jpeg.lossless.Decoder.RESTART_MARKER_END){return nRestart}prev[0]+=n}return 0};jpeg.lossless.Decoder.prototype.getHuffmanValue=function(table,temp,index){var code,input,mask;mask=65535;if(index[0]<8){temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input}else{index[0]-=8}code=table[temp[0]>>index[0]];if((code&jpeg.lossless.Decoder.MSB)!==0){if(this.markerIndex!==0){this.markerIndex=0;return 65280|this.marker}temp[0]&=mask>>16-index[0];temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input;code=table[(code&255)*256+(temp[0]>>index[0])];index[0]+=8}index[0]+=8-(code>>8);if(index[0]<0){throw new Error("index="+index[0]+" temp="+temp[0]+" code="+code+" in HuffmanValue()")}if(index[0]>16-index[0];return code&255};jpeg.lossless.Decoder.prototype.getn=function(PRED,n,temp,index){var result,one,n_one,mask,input;one=1;n_one=-1;mask=65535;if(n===0){return 0}if(n===16){if(PRED[0]>=0){return-32768}else{return 32768}}index[0]-=n;if(index[0]>=0){if(index[0]>index[0];temp[0]&=mask>>16-index[0]}else{temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input;index[0]+=8;if(index[0]<0){if(this.markerIndex!==0){this.markerIndex=0;return(65280|this.marker)<<8}temp[0]<<=8;input=this.stream.get8();if(input===255){this.marker=this.stream.get8();if(this.marker!==0){this.markerIndex=9}}temp[0]|=input;index[0]+=8}if(index[0]<0){throw new Error("index="+index[0]+" in getn()")}if(index[0]>index[0];temp[0]&=mask>>16-index[0]}if(result0){return this.getter(this.yLoc*this.xDim+this.xLoc-1,compOffset)}else if(this.yLoc>0){return this.getPreviousY(compOffset)}else{return 1<0&&this.yLoc>0){return this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,compOffset)}else{return this.getPreviousY(compOffset)}};jpeg.lossless.Decoder.prototype.getPreviousY=function(compOffset){if(this.yLoc>0){return this.getter((this.yLoc-1)*this.xDim+this.xLoc,compOffset)}else{return this.getPreviousX(compOffset)}};jpeg.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1};jpeg.lossless.Decoder.prototype.outputSingle=function(PRED){if(this.xLoc=this.xDim){this.yLoc+=1;this.xLoc=0}}};jpeg.lossless.Decoder.prototype.outputRGB=function(PRED){var offset=this.yLoc*this.xDim+this.xLoc;if(this.xLoc=this.xDim){this.yLoc+=1;this.xLoc=0}}};jpeg.lossless.Decoder.prototype.setValue8=function(index,val){this.outputData[index]=val};jpeg.lossless.Decoder.prototype.getValue8=function(index){return this.outputData[index]};var littleEndian=function(){var buffer=new ArrayBuffer(2);new DataView(buffer).setInt16(0,256,true);return new Int16Array(buffer)[0]===256}();if(littleEndian){jpeg.lossless.Decoder.prototype.setValue16=jpeg.lossless.Decoder.prototype.setValue8;jpeg.lossless.Decoder.prototype.getValue16=jpeg.lossless.Decoder.prototype.getValue8}else{jpeg.lossless.Decoder.prototype.setValue16=function(index,val){this.outputData[index]=(val&255)<<8|val>>8&255};jpeg.lossless.Decoder.prototype.getValue16=function(index){var val=this.outputData[index];return(val&255)<<8|val>>8&255}}jpeg.lossless.Decoder.prototype.setValueRGB=function(index,val,compOffset){this.outputData[index*3+compOffset]=val};jpeg.lossless.Decoder.prototype.getValueRGB=function(index,compOffset){return this.outputData[index*3+compOffset]};jpeg.lossless.Decoder.prototype.readApp=function(){var count=0,length=this.stream.get16();count+=2;while(countlength){throw new Error("ERROR: frame format error")}c=data.get8();count+=1;if(count>=length){throw new Error("ERROR: frame format error [c>=Lf]")}temp=data.get8();count+=1;if(!this.components[c]){this.components[c]=new jpeg.lossless.ComponentSpec}this.components[c].hSamp=temp>>4;this.components[c].vSamp=temp&15;this.components[c].quantTableSel=data.get8();count+=1}if(count!==length){throw new Error("ERROR: frame format error [Lf!=count]")}return 1};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.FrameHeader}},{"./component-spec.js":9,"./data-stream.js":10}],13:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.Utils=jpeg.lossless.Utils||(typeof require!=="undefined"?require("./utils.js"):null);jpeg.lossless.HuffmanTable=jpeg.lossless.HuffmanTable||function(){this.l=jpeg.lossless.Utils.createArray(4,2,16);this.th=[];this.v=jpeg.lossless.Utils.createArray(4,2,16,200);this.tc=jpeg.lossless.Utils.createArray(4,2);this.tc[0][0]=0;this.tc[1][0]=0;this.tc[2][0]=0;this.tc[3][0]=0;this.tc[0][1]=0;this.tc[1][1]=0;this.tc[2][1]=0;this.tc[3][1]=0;this.th[0]=0;this.th[1]=0;this.th[2]=0;this.th[3]=0};jpeg.lossless.HuffmanTable.MSB=2147483648;jpeg.lossless.HuffmanTable.prototype.read=function(data,HuffTab){var count=0,length,temp,t,c,i,j;length=data.get16();count+=2;while(count3){throw new Error("ERROR: Huffman table ID > 3")}c=temp>>4;if(c>2){throw new Error("ERROR: Huffman table [Table class > 2 ]")}this.th[t]=1;this.tc[t][c]=1;for(i=0;i<16;i+=1){this.l[t][c][i]=data.get8();count+=1}for(i=0;i<16;i+=1){for(j=0;jlength){throw new Error("ERROR: Huffman table format error [count>Lh]")}this.v[t][c][i][j]=data.get8();count+=1}}}if(count!==length){throw new Error("ERROR: Huffman table format error [count!=Lf]")}for(i=0;i<4;i+=1){for(j=0;j<2;j+=1){if(this.tc[i][j]!==0){this.buildHuffTable(HuffTab[i][j],this.l[i][j],this.v[i][j])}}}return 1};jpeg.lossless.HuffmanTable.prototype.buildHuffTable=function(tab,L,V){var currentTable,temp,k,i,j,n;temp=256;k=0;for(i=0;i<8;i+=1){for(j=0;j>i+1;n+=1){tab[k]=V[i][j]|i+1<<8;k+=1}}}for(i=1;k<256;i+=1,k+=1){tab[k]=i|jpeg.lossless.HuffmanTable.MSB}currentTable=1;k=0;for(i=8;i<16;i+=1){for(j=0;j>i-7;n+=1){tab[currentTable*256+k]=V[i][j]|i+1<<8;k+=1}if(k>=256){if(k>256){throw new Error("ERROR: Huffman table error(1)!")}k=0;currentTable+=1}}}};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.HuffmanTable}},{"./data-stream.js":10,"./utils.js":18}],14:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.ComponentSpec=jpeg.lossless.ComponentSpec||(typeof require!=="undefined"?require("./component-spec.js"):null);jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.Decoder=jpeg.lossless.Decoder||(typeof require!=="undefined"?require("./decoder.js"):null);jpeg.lossless.FrameHeader=jpeg.lossless.FrameHeader||(typeof require!=="undefined"?require("./frame-header.js"):null);jpeg.lossless.HuffmanTable=jpeg.lossless.HuffmanTable||(typeof require!=="undefined"?require("./huffman-table.js"):null);jpeg.lossless.QuantizationTable=jpeg.lossless.QuantizationTable||(typeof require!=="undefined"?require("./quantization-table.js"):null);jpeg.lossless.ScanComponent=jpeg.lossless.ScanComponent||(typeof require!=="undefined"?require("./scan-component.js"):null);jpeg.lossless.ScanHeader=jpeg.lossless.ScanHeader||(typeof require!=="undefined"?require("./scan-header.js"):null);jpeg.lossless.Utils=jpeg.lossless.Utils||(typeof require!=="undefined"?require("./utils.js"):null);var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg}},{"./component-spec.js":9,"./data-stream.js":10,"./decoder.js":11,"./frame-header.js":12,"./huffman-table.js":13,"./quantization-table.js":15,"./scan-component.js":16,"./scan-header.js":17,"./utils.js":18}],15:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.Utils=jpeg.lossless.Utils||(typeof require!=="undefined"?require("./utils.js"):null);jpeg.lossless.QuantizationTable=jpeg.lossless.QuantizationTable||function(){this.precision=[];this.tq=[];this.quantTables=jpeg.lossless.Utils.createArray(4,64);this.tq[0]=0;this.tq[1]=0;this.tq[2]=0;this.tq[3]=0};jpeg.lossless.QuantizationTable.enhanceQuantizationTable=function(qtab,table){var i;for(i=0;i<8;i+=1){qtab[table[0*8+i]]*=90;qtab[table[4*8+i]]*=90;qtab[table[2*8+i]]*=118;qtab[table[6*8+i]]*=49;qtab[table[5*8+i]]*=71;qtab[table[1*8+i]]*=126;qtab[table[7*8+i]]*=25;qtab[table[3*8+i]]*=106}for(i=0;i<8;i+=1){qtab[table[0+8*i]]*=90;qtab[table[4+8*i]]*=90;qtab[table[2+8*i]]*=118;qtab[table[6+8*i]]*=49;qtab[table[5+8*i]]*=71;qtab[table[1+8*i]]*=126;qtab[table[7+8*i]]*=25;qtab[table[3+8*i]]*=106}for(i=0;i<64;i+=1){qtab[i]>>=6}};jpeg.lossless.QuantizationTable.prototype.read=function(data,table){var count=0,length,temp,t,i;length=data.get16();count+=2;while(count3){throw new Error("ERROR: Quantization table ID > 3")}this.precision[t]=temp>>4;if(this.precision[t]===0){this.precision[t]=8}else if(this.precision[t]===1){this.precision[t]=16}else{throw new Error("ERROR: Quantization table precision error")}this.tq[t]=1;if(this.precision[t]===8){for(i=0;i<64;i+=1){if(count>length){throw new Error("ERROR: Quantization table format error")}this.quantTables[t][i]=data.get8();count+=1}jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t],table)}else{for(i=0;i<64;i+=1){if(count>length){throw new Error("ERROR: Quantization table format error")}this.quantTables[t][i]=data.get16();count+=2}jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t],table)}}if(count!==length){throw new Error("ERROR: Quantization table error [count!=Lq]")}return 1};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.QuantizationTable}},{"./data-stream.js":10,"./utils.js":18}],16:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.ScanComponent=jpeg.lossless.ScanComponent||function(){this.acTabSel=0;this.dcTabSel=0;this.scanCompSel=0};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.ScanComponent}},{}],17:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.DataStream=jpeg.lossless.DataStream||(typeof require!=="undefined"?require("./data-stream.js"):null);jpeg.lossless.ScanComponent=jpeg.lossless.ScanComponent||(typeof require!=="undefined"?require("./scan-component.js"):null);jpeg.lossless.ScanHeader=jpeg.lossless.ScanHeader||function(){this.ah=0;this.al=0;this.numComp=0;this.selection=0;this.spectralEnd=0;this.components=[]};jpeg.lossless.ScanHeader.prototype.read=function(data){var count=0,length,i,temp;length=data.get16();count+=2;this.numComp=data.get8();count+=1;for(i=0;ilength){throw new Error("ERROR: scan header format error")}this.components[i].scanCompSel=data.get8();count+=1;temp=data.get8();count+=1;this.components[i].dcTabSel=temp>>4;this.components[i].acTabSel=temp&15}this.selection=data.get8();count+=1;this.spectralEnd=data.get8();count+=1;temp=data.get8();this.ah=temp>>4;this.al=temp&15;count+=1;if(count!==length){throw new Error("ERROR: scan header format error [count!=Ns]")}return 1};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.ScanHeader}},{"./data-stream.js":10,"./scan-component.js":16}],18:[function(require,module,exports){"use strict";var jpeg=jpeg||{};jpeg.lossless=jpeg.lossless||{};jpeg.lossless.Utils=jpeg.lossless.Utils||{};jpeg.lossless.Utils.createArray=function(length){var arr=new Array(length||0),i=length;if(arguments.length>1){var args=Array.prototype.slice.call(arguments,1);while(i--)arr[length-1-i]=jpeg.lossless.Utils.createArray.apply(this,args)}return arr};jpeg.lossless.Utils.makeCRCTable=function(){var c;var crcTable=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}crcTable[n]=c}return crcTable};jpeg.lossless.Utils.crc32=function(dataView){var uint8view=new Uint8Array(dataView.buffer);var crcTable=jpeg.lossless.Utils.crcTable||(jpeg.lossless.Utils.crcTable=jpeg.lossless.Utils.makeCRCTable());var crc=0^-1;for(var i=0;i>>8^crcTable[(crc^uint8view[i])&255]}return(crc^-1)>>>0};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=jpeg.lossless.Utils}},{}],19:[function(require,module,exports){(function(process){(function(){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=1;--i){code=path.charCodeAt(i);if(code===47){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1)return hasRoot?"/":".";if(hasRoot&&end===1){return"/"}return path.slice(0,end)};function basename(path){if(typeof path!=="string")path=path+"";var start=0;var end=-1;var matchedSlash=true;var i;for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1)return"";return path.slice(start,end)}exports.basename=function(path,ext){var f=basename(path);if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){if(typeof path!=="string")path=path+"";var startDot=-1;var startPart=0;var end=-1;var matchedSlash=true;var preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i1){for(var i=1;idaikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&absX>absY&&absX>absZ){axis=orientationX}else if(absY>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&absY>absX&&absY>absZ){axis=orientationY}else if(absZ>daikon.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&absZ>absX&&absZ>absY){axis=orientationZ}else{axis=null}return axis};daikon.Image.prototype.getCols=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_COLS[0],daikon.Tag.TAG_COLS[1]),0)};daikon.Image.prototype.getRows=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ROWS[0],daikon.Tag.TAG_ROWS[1]),0)};daikon.Image.prototype.getSeriesDescription=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_DESCRIPTION[0],daikon.Tag.TAG_SERIES_DESCRIPTION[1]),0)};daikon.Image.prototype.getSeriesInstanceUID=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_INSTANCE_UID[0],daikon.Tag.TAG_SERIES_INSTANCE_UID[1]),0)};daikon.Image.prototype.getSeriesNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SERIES_NUMBER[0],daikon.Tag.TAG_SERIES_NUMBER[1]),0)};daikon.Image.prototype.getEchoNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ECHO_NUMBER[0],daikon.Tag.TAG_ECHO_NUMBER[1]),0)};daikon.Image.prototype.getImagePosition=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_POSITION[0],daikon.Tag.TAG_IMAGE_POSITION[1]))};daikon.Image.prototype.getImageDirections=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_ORIENTATION[0],daikon.Tag.TAG_IMAGE_ORIENTATION[1]))};daikon.Image.prototype.getImagePositionSliceDir=function(sliceDir){var imagePos=daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_POSITION[0],daikon.Tag.TAG_IMAGE_POSITION[1]));if(imagePos){if(sliceDir>=0){return imagePos[sliceDir]}}return 0};daikon.Image.prototype.getModality=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_MODALITY[0],daikon.Tag.TAG_MODALITY[1]),0)};daikon.Image.prototype.getSliceLocation=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_LOCATION[0],daikon.Tag.TAG_SLICE_LOCATION[1]),0)};daikon.Image.prototype.getSliceLocationVector=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_SLICE_LOCATION_VECTOR[0],daikon.Tag.TAG_SLICE_LOCATION_VECTOR[1]))};daikon.Image.prototype.getImageNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_NUM[0],daikon.Tag.TAG_IMAGE_NUM[1]),0)};daikon.Image.prototype.getTemporalPosition=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TEMPORAL_POSITION[0],daikon.Tag.TAG_TEMPORAL_POSITION[1]),0)};daikon.Image.prototype.getTemporalNumber=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)};daikon.Image.prototype.getSliceGap=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_GAP[0],daikon.Tag.TAG_SLICE_GAP[1]),0)};daikon.Image.prototype.getSliceThickness=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_SLICE_THICKNESS[0],daikon.Tag.TAG_SLICE_THICKNESS[1]),0)};daikon.Image.prototype.getImageMax=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_MAX[0],daikon.Tag.TAG_IMAGE_MAX[1]),0)};daikon.Image.prototype.getImageMin=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_MIN[0],daikon.Tag.TAG_IMAGE_MIN[1]),0)};daikon.Image.prototype.getDataScaleSlope=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_SLOPE[0],daikon.Tag.TAG_DATA_SCALE_SLOPE[1]),0)};daikon.Image.prototype.getDataScaleIntercept=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_INTERCEPT[0],daikon.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)};daikon.Image.prototype.getDataScaleElscint=function(){var scale=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_DATA_SCALE_ELSCINT[0],daikon.Tag.TAG_DATA_SCALE_ELSCINT[1]),0);if(!scale){scale=1}var bandwidth=this.getPixelBandwidth();scale=Math.sqrt(bandwidth)/(10*scale);if(scale<=0){scale=1}return scale};daikon.Image.prototype.getWindowWidth=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_WINDOW_WIDTH[0],daikon.Tag.TAG_WINDOW_WIDTH[1]),0)};daikon.Image.prototype.getWindowCenter=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_WINDOW_CENTER[0],daikon.Tag.TAG_WINDOW_CENTER[1]),0)};daikon.Image.prototype.getPixelBandwidth=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_BANDWIDTH[0],daikon.Tag.TAG_PIXEL_BANDWIDTH[1]),0)};daikon.Image.prototype.getSeriesId=function(){var des=this.getSeriesDescription();var uid=this.getSeriesInstanceUID();var num=this.getSeriesNumber();var echo=this.getEchoNumber();var orientation=this.getOrientation();var cols=this.getCols();var rows=this.getRows();var id="";if(des!==null){id+=" "+des}if(uid!==null){id+=" "+uid}if(num!==null){id+=" "+num}if(echo!==null){id+=" "+echo}if(orientation!==null){id+=" "+orientation}id+=" ("+cols+" x "+rows+")";return id};daikon.Image.prototype.getPixelSpacing=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_PIXEL_SPACING[0],daikon.Tag.TAG_PIXEL_SPACING[1]))};daikon.Image.prototype.getImageType=function(){return daikon.Image.getValueSafely(this.getTag(daikon.Tag.TAG_IMAGE_TYPE[0],daikon.Tag.TAG_IMAGE_TYPE[1]))};daikon.Image.prototype.getBitsStored=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_BITS_STORED[0],daikon.Tag.TAG_BITS_STORED[1]),0)};daikon.Image.prototype.getBitsAllocated=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_BITS_ALLOCATED[0],daikon.Tag.TAG_BITS_ALLOCATED[1]),0)};daikon.Image.prototype.getFrameTime=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_FRAME_TIME[0],daikon.Tag.TAG_FRAME_TIME[1]),0)};daikon.Image.prototype.getAcquisitionMatrix=function(){var mat,matPrivate,start,end,str;mat=[0,0];mat[0]=daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_ACQUISITION_MATRIX[0],daikon.Tag.TAG_ACQUISITION_MATRIX[1]),0);if(this.privateDataAll===null){this.privateDataAll=this.getAllInterpretedPrivateData()}if(this.privateDataAll!==null&&this.privateDataAll.length>0){start=this.privateDataAll.indexOf("AcquisitionMatrixText");if(start!==-1){end=this.privateDataAll.indexOf("\n",start);if(end!==-1){str=this.privateDataAll.substring(start,end);matPrivate=str.match(/\d+/g);if(matPrivate!==null&&matPrivate.length===2){mat[0]=matPrivate[0];mat[1]=matPrivate[1]}else if(matPrivate!==null&&matPrivate.length===1){mat[0]=matPrivate[0]}}}}if(mat[1]===0){mat[1]=mat[0]}return mat};daikon.Image.prototype.getTR=function(){return daikon.Image.getSingleValueSafely(this.getTag(daikon.Tag.TAG_TR,daikon.Tag.TAG_TR[1]),0)};daikon.Image.prototype.putTag=function(tag){if(this.tags[tag.id]&&this.tags[tag.id].value[0]!==tag.value[0]){return}this.tags[tag.id]=tag;this.putFlattenedTag(this.tagsFlat,tag)};daikon.Image.prototype.putFlattenedTag=function(tags,tag){var ctr;if(tag.sublist){for(ctr=0;ctrmax){max=value;maxIndex=dataCtr}}if(asObject){return{data:data,min:min,minIndex:minIndex,max:max,maxIndex:maxIndex,numCols:this.getCols(),numRows:this.getRows()}}return data};daikon.Image.prototype.convertPalette=function(){var data,reds,greens,blues,rgb,numBytes,numElements,ctr,index,rVal,gVal,bVal;data=this.tags[daikon.Tag.createId(daikon.Tag.TAG_PIXEL_DATA[0],daikon.Tag.TAG_PIXEL_DATA[1])].value;reds=this.getPalleteValues(daikon.Tag.TAG_PALETTE_RED);greens=this.getPalleteValues(daikon.Tag.TAG_PALETTE_GREEN);blues=this.getPalleteValues(daikon.Tag.TAG_PALETTE_BLUE);if(reds!==null&&reds.length>0&&greens!==null&&greens.length>0&&blues!==null&&blues.length>0&&!this.convertedPalette){rgb=new DataView(new ArrayBuffer(this.getRows()*this.getCols()*this.getNumberOfFrames()*3));numBytes=parseInt(Math.ceil(this.getBitsAllocated()/8));numElements=data.byteLength/numBytes;if(numBytes===1){for(ctr=0;ctrbiggest){biggest=Math.abs(dirCos[ctr]);bigRow=ctr}}biggest=0;for(;ctr<6;ctr+=1){if(Math.abs(dirCos[ctr])>biggest){biggest=Math.abs(dirCos[ctr]);bigCol=ctr}}switch(bigRow){case 0:orient+="X";if(bigCol===4){orient+="YZ"}else{orient+="ZY"}break;case 1:orient+="Y";if(bigCol===3){orient+="XZ"}else{orient+="ZX"}break;case 2:orient+="Z";if(bigCol===3){orient+="XY"}else{orient+="YX"}break;default:break}switch(bigRow){case 0:if(dirCos[bigRow]>0){orient+="-"}else{orient+="+"}if(bigCol===4){if(dirCos[bigCol]>0){orient+="-"}else{orient+="+"}}else{if(dirCos[bigCol]>0){orient+="+"}else{orient+="-"}}break;case 1:if(dirCos[bigRow]>0){orient+="-"}else{orient+="+"}if(bigCol===3){if(dirCos[bigCol]>0){orient+="-"}else{orient+="+"}}else{if(dirCos[bigCol]>0){orient+="+"}else{orient+="-"}}break;case 2:if(dirCos[bigRow]>0){orient+="+"}else{orient+="-"}if(dirCos[bigCol]>0){orient+="-"}else{orient+="+"}break;default:break}if(rowSpacing===0){orient+="+";orientation=orient}else{if(swapZ){switch(orient.charAt(2)){case"X":if(rowSpacing>0){orient+="-"}else{orient+="+"}break;case"Y":case"Z":if(rowSpacing>0){orient+="+"}else{orient+="-"}break;default:break}}else{switch(orient.charAt(2)){case"X":if(rowSpacing>0){orient+="+"}else{orient+="-"}break;case"Y":case"Z":if(rowSpacing>0){orient+="-"}else{orient+="+"}break;default:break}}orientation=orient}return orientation};daikon.Image.prototype.isMosaic=function(){var imageType,labeledAsMosaic=false,canReadAsMosaic,ctr,matSize;imageType=this.getImageType();if(imageType!==null){for(ctr=0;ctr0&&(matSize[0]1){dataConcat[ctr]=daikon.Utils.concatArrayBuffers2(data[ctr])}else{dataConcat[ctr]=data[ctr][0]}data[ctr]=null}return dataConcat};daikon.Image.prototype.getRLE=function(){var encapTags,numTags,ctr,data=[];encapTags=this.getEncapsulatedData();if(encapTags){numTags=encapTags.length;for(ctr=1;ctr"}}str=str.replace(/\n\s*\n/g,"\n");str=str.replace(/(?:\r\n|\r|\n)/g,"
");return str};daikon.Image.prototype.getPalleteValues=function(tagID){var valsBig,valsLittle,value,numVals,ctr,valsBigMax,valsBigMin,valsLittleMax,valsLittleMin,valsBigDiff,valsLittleDiff;valsBig=null;valsLittle=null;value=daikon.Image.getValueSafely(this.getTag(tagID[0],tagID[1]));if(value!==null){numVals=value.buffer.byteLength/2;valsBig=[];valsLittle=[];for(ctr=0;ctr255||min<0){slope=255/(max-min);intercept=min;for(ctr=0;ctr=this.metaFinishedOffset){this.needsDeflate=false;copyMeta=data.buffer.slice(0,tag.offsetEnd);copyDeflated=data.buffer.slice(tag.offsetEnd);this.inflated=daikon.Utils.concatArrayBuffers(copyMeta,fflate.decompressSync(new Uint8Array(copyDeflated)));data=new DataView(this.inflated)}tag=this.getNextTag(data,tag.offsetEnd)}}catch(err){this.error=err}if(image!==null){image.littleEndian=this.littleEndian}return image};daikon.Parser.prototype.parseEncapsulated=function(data){var offset=0,tag,tags=[];this.encapsulation=true;try{tag=this.getNextTag(data,offset);while(tag!==null){if(tag.isSublistItem()){tags.push(tag)}if(daikon.Parser.verbose){console.log(tag.toString())}tag=this.getNextTag(data,tag.offsetEnd)}}catch(err){this.error=err}return tags};daikon.Parser.prototype.testForValidTag=function(data){var offset,tag=null;try{offset=this.findFirstTagOffset(data);tag=this.getNextTag(data,offset,false)}catch(err){this.error=err}return tag};daikon.Parser.prototype.getNextTag=function(data,offset,testForTag){var group=0,element,value=null,offsetStart=offset,offsetValue,length=0,little=true,vr=null,tag;if(offset>=data.byteLength){return null}if(this.metaFinished){little=this.littleEndian;group=data.getUint16(offset,little)}else{group=data.getUint16(offset,true);if(this.metaFinishedOffset!==-1&&offset>=this.metaFinishedOffset||group!==2){this.metaFinished=true;little=this.littleEndian;group=data.getUint16(offset,little)}else{little=true}}if(!this.metaFound&&group===2){this.metaFound=true}offset+=2;element=data.getUint16(offset,little);offset+=2;if(this.explicit||!this.metaFinished){vr=daikon.Utils.getStringAt(data,offset,2);if(!this.metaFound&&this.metaFinished&&daikon.Parser.VRS.indexOf(vr)===-1){vr=daikon.Dictionary.getVR(group,element);length=data.getUint32(offset,little);offset+=4;this.explicit=false}else{offset+=2;if(daikon.Parser.DATA_VRS.indexOf(vr)!==-1){offset+=2;length=data.getUint32(offset,little);offset+=4}else{length=data.getUint16(offset,little);offset+=2}}}else{vr=daikon.Dictionary.getVR(group,element);length=data.getUint32(offset,little);if(length===daikon.Parser.UNDEFINED_LENGTH){vr="SQ"}offset+=4}offsetValue=offset;var isPixelData=group===daikon.Tag.TAG_PIXEL_DATA[0]&&element===daikon.Tag.TAG_PIXEL_DATA[1];var isLookupTableData=40===group&&element>=4609&&element<4864;if(vr==="SQ"||!isLookupTableData&&!isPixelData&&!this.encapsulation&&daikon.Parser.DATA_VRS.indexOf(vr)!==-1&&vr!=="UC"){value=this.parseSublist(data,offset,length,vr!=="SQ");if(length===daikon.Parser.UNDEFINED_LENGTH){length=value[value.length-1].offsetEnd-offset}}else if(length>0&&!testForTag){if(length===daikon.Parser.UNDEFINED_LENGTH){if(isPixelData){length=data.byteLength-offset}}value=data.buffer.slice(offset,offset+length)}offset+=length;tag=new daikon.Tag(group,element,vr,value,offsetStart,offsetValue,offset,this.littleEndian,this.charset);if(tag.value){if(tag.isTransformSyntax()){this.transformSyntaxAlreadyExist=true;if(tag.value[0]===daikon.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE){this.explicit=false;this.littleEndian=true}else if(tag.value[0]===daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG){this.explicit=true;this.littleEndian=false}else if(tag.value[0]===daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE){this.needsDeflate=true;this.explicit=true;this.littleEndian=true}else{this.explicit=true;this.littleEndian=true}}else if(tag.isMetaLength()){this.metaFinishedOffset=tag.value[0]+offset}else if(tag.isCharset()){var charset=tag.value;if(charset.length==2){charset=(charset[0]||"ISO 2022 IR 6")+"\\"+charset[1]}else if(charset.length==1){charset=charset[0]}this.charset=charset}}return tag};daikon.Parser.prototype.parseSublist=function(data,offset,length,raw){var sublistItem,offsetEnd=offset+length,tags=[];this.level++;if(length===daikon.Parser.UNDEFINED_LENGTH){sublistItem=this.parseSublistItem(data,offset,raw);while(!sublistItem.isSequenceDelim()){tags.push(sublistItem);offset=sublistItem.offsetEnd;sublistItem=this.parseSublistItem(data,offset,raw)}tags.push(sublistItem)}else{while(offset=0&&code<128){this.readLiteral(code)}else if(code<=-1&&code>-128){this.readEncoded(code)}else if(code===-128){console.warn("RLE: unsupported code!")}}this.segmentIndex+=1};daikon.RLE.prototype.readLiteral=function(code){var ctr,length=code+1;if(this.hasValidInput()){for(ctr=0;ctr1&&images[0].getTemporalPosition()!==null;hasTemporalNumber=numFrames>1&&images[0].getTemporalNumber()!==null&&images[0].getTemporalNumber()===numFrames;if(hasTemporalPosition&&hasTemporalNumber){for(ctr=0;ctr1||this.isMosaic&&this.images[0].length>1;this.isMultiFrameVolume=false;this.isMultiFrameTimeseries=false;this.isImplicitTimeseries=false;if(this.isMultiFrame){hasFrameTime=this.images[0].getFrameTime()>0;if(this.isMosaic){this.isMultiFrameTimeseries=true}else{if(hasFrameTime){this.isMultiFrameTimeseries=true}else if(this.numberOfFramesInFile>1){this.isMultiFrameTimeseries=true;this.numberOfFrames=this.images.length}else{this.isMultiFrameVolume=true}}}if(!this.isMosaic&&this.numberOfFrames<=1){imagePos=this.images[0].getImagePosition()||[];sliceLoc=imagePos.toString();this.numberOfFrames=0;for(ctr=0;ctr1){this.isImplicitTimeseries=true}}this.sliceDir=this.images[0].getAcquiredSliceDirection();if(daikon.Series.useExplicitOrdering){orderedImages=this.images.slice()}else{orderedImages=daikon.Series.orderDicoms(this.images,this.numberOfFrames,this.sliceDir)}sliceLocationFirst=orderedImages[0].getImagePositionSliceDir(this.sliceDir);sliceLocationLast=orderedImages[orderedImages.length-1].getImagePositionSliceDir(this.sliceDir);sliceLocDiff=sliceLocationLast-sliceLocationFirst;if(daikon.Series.useExplicitOrdering){this.sliceSense=false}else if(this.isMosaic){this.sliceSense=true}else if(this.isMultiFrame){sliceLocations=orderedImages[0].getSliceLocationVector();if(sliceLocations!==null){orientation=orderedImages[0].getOrientation();if(orientation.charAt(2)==="Z"){this.sliceSense=sliceLocations[0]-sliceLocations[sliceLocations.length-1]<0}else{this.sliceSense=sliceLocations[0]-sliceLocations[sliceLocations.length-1]>0}}else{this.sliceSense=sliceLocationFirst<0?false:true}}else{if(this.sliceDir===daikon.Image.SLICE_DIRECTION_SAGITTAL||this.sliceDir===daikon.Image.SLICE_DIRECTION_CORONAL){if(sliceLocDiff>0){this.sliceSense=false}else{this.sliceSense=true}}else{if(sliceLocDiff>0){this.sliceSense=true}else{this.sliceSense=false}}}this.imagesOriginalOrder=this.images;this.images=orderedImages};daikon.Series.prototype.concatenateImageData=function(progressMeter,onFinishedImageRead){var buffer,data,length;if(this.isMosaic){data=this.getMosaicData(this.images[0],this.images[0].getPixelDataBytes())}else{data=this.images[0].getPixelDataBytes()}length=this.validatePixelDataLength(this.images[0]);this.images[0].clearPixelData();buffer=new Uint8Array(new ArrayBuffer(length*this.images.length));buffer.set(new Uint8Array(data,0,length),0);setTimeout(daikon.Utils.bind(this,function(){this.concatenateNextImageData(buffer,length,progressMeter,1,onFinishedImageRead)}),0)};daikon.Series.prototype.concatenateNextImageData=function(buffer,frameSize,progressMeter,index,onFinishedImageRead){var data,length;if(index>=this.images.length){if(progressMeter){progressMeter.drawProgress(1,"Reading DICOM Images")}onFinishedImageRead(buffer.buffer)}else{if(progressMeter){progressMeter.drawProgress(index/this.images.length,"Reading DICOM Images")}if(this.isMosaic){data=this.getMosaicData(this.images[index],this.images[index].getPixelDataBytes())}else{data=this.images[index].getPixelDataBytes()}length=this.validatePixelDataLength(this.images[index]);this.images[index].clearPixelData();buffer.set(new Uint8Array(data,0,length),frameSize*index);setTimeout(daikon.Utils.bind(this,function(){this.concatenateNextImageData(buffer,frameSize,progressMeter,index+1,onFinishedImageRead)}),0)}};daikon.Series.prototype.validatePixelDataLength=function(image){var length=image.getPixelDataBytes().byteLength,sliceLength=image.getCols()*image.getRows();if(length%sliceLength===0){return length}return sliceLength*image.getNumberOfFrames()*image.getNumberOfSamplesPerPixel()*(image.getBitsAllocated()/8)};daikon.Series.prototype.getMosaicData=function(image,data){var mosaicWidth,mosaicHeight,mosaicRows,mosaicCols,mosaicRowHeight,mosaicColWidth,numBytes,ctrS,ctrR,ctrC,numSlices,numRows,numCols,buffer,dataTyped,offset,ctr,index=0;numBytes=parseInt(this.images[0].getBitsAllocated()/8);numSlices=this.images[0].getMosaicCols()*this.images[0].getMosaicRows();numRows=parseInt(this.images[0].getRows()/this.images[0].getMosaicRows());numCols=parseInt(this.images[0].getCols()/this.images[0].getMosaicCols());mosaicWidth=this.images[0].getCols();mosaicHeight=this.images[0].getRows();mosaicRows=this.images[0].getMosaicRows();mosaicCols=this.images[0].getMosaicCols();mosaicRowHeight=parseInt(mosaicHeight/mosaicRows);mosaicColWidth=parseInt(mosaicWidth/mosaicCols);buffer=new Uint8Array(new ArrayBuffer(numSlices*numRows*numCols*numBytes));dataTyped=new Uint8Array(data);for(ctrS=0;ctrSdaikon.Siemens.CSA2_MAGIC_NUMBER.length){match=true;for(ctr=0;ctr128){return this.output}offset+=4;offset+=4;for(ctr=0;ctrthis.data.buffer.length){return-1}offset+=16;if(itemLength>0){this.output+=this.readString(offset,itemLength)+" "}return offset+itemLength};daikon.Siemens.prototype.canRead=function(group,element){return group===daikon.Siemens.GROUP_CSA&&(element===daikon.Siemens.ELEMENT_CSA1||element===daikon.Siemens.ELEMENT_CSA2)};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=daikon.Siemens}},{"./utilities.js":32}],31:[function(require,module,exports){"use strict";var daikon=daikon||{};daikon.Utils=daikon.Utils||(typeof require!=="undefined"?require("./utilities.js"):null);daikon.Dictionary=daikon.Dictionary||(typeof require!=="undefined"?require("./dictionary.js"):null);daikon.Siemens=daikon.Siemens||(typeof require!=="undefined"?require("./siemens.js"):null);daikon.Tag=daikon.Tag||function(group,element,vr,value,offsetStart,offsetValue,offsetEnd,littleEndian,charset){this.group=group;this.element=element;this.vr=vr;this.offsetStart=offsetStart;this.offsetValue=offsetValue;this.offsetEnd=offsetEnd;this.sublist=false;this.preformatted=false;this.id=daikon.Tag.createId(group,element);if(value instanceof Array){this.value=value;this.sublist=true}else if(value!==null){var dv=new DataView(value);this.value=daikon.Tag.convertValue(vr,dv,littleEndian,charset);if(this.value===dv&&this.isPrivateData()){this.value=daikon.Tag.convertPrivateValue(group,element,dv);this.preformatted=this.value!==dv}}else{this.value=null}};daikon.Tag.PRIVATE_DATA_READERS=[daikon.Siemens];daikon.Tag.VR_AE_MAX_LENGTH=16;daikon.Tag.VR_AS_MAX_LENGTH=4;daikon.Tag.VR_AT_MAX_LENGTH=4;daikon.Tag.VR_CS_MAX_LENGTH=16;daikon.Tag.VR_DA_MAX_LENGTH=8;daikon.Tag.VR_DS_MAX_LENGTH=16;daikon.Tag.VR_DT_MAX_LENGTH=26;daikon.Tag.VR_FL_MAX_LENGTH=4;daikon.Tag.VR_FD_MAX_LENGTH=8;daikon.Tag.VR_IS_MAX_LENGTH=12;daikon.Tag.VR_LO_MAX_LENGTH=64;daikon.Tag.VR_LT_MAX_LENGTH=10240;daikon.Tag.VR_OB_MAX_LENGTH=-1;daikon.Tag.VR_OD_MAX_LENGTH=-1;daikon.Tag.VR_OF_MAX_LENGTH=-1;daikon.Tag.VR_OW_MAX_LENGTH=-1;daikon.Tag.VR_PN_MAX_LENGTH=64*5;daikon.Tag.VR_SH_MAX_LENGTH=16;daikon.Tag.VR_SL_MAX_LENGTH=4;daikon.Tag.VR_SS_MAX_LENGTH=2;daikon.Tag.VR_ST_MAX_LENGTH=1024;daikon.Tag.VR_TM_MAX_LENGTH=16;daikon.Tag.VR_UI_MAX_LENGTH=64;daikon.Tag.VR_UL_MAX_LENGTH=4;daikon.Tag.VR_UN_MAX_LENGTH=-1;daikon.Tag.VR_US_MAX_LENGTH=2;daikon.Tag.VR_UT_MAX_LENGTH=-1;daikon.Tag.VR_UC_MAX_LENGTH=-1;daikon.Tag.TAG_TRANSFER_SYNTAX=[2,16];daikon.Tag.TAG_META_LENGTH=[2,0];daikon.Tag.TAG_SUBLIST_ITEM=[65534,57344];daikon.Tag.TAG_SUBLIST_ITEM_DELIM=[65534,57357];daikon.Tag.TAG_SUBLIST_SEQ_DELIM=[65534,57565];daikon.Tag.TAG_ROWS=[40,16];daikon.Tag.TAG_COLS=[40,17];daikon.Tag.TAG_ACQUISITION_MATRIX=[24,4880];daikon.Tag.TAG_NUMBER_OF_FRAMES=[40,8];daikon.Tag.TAG_NUMBER_TEMPORAL_POSITIONS=[32,261];daikon.Tag.TAG_PIXEL_SPACING=[40,48];daikon.Tag.TAG_SLICE_THICKNESS=[24,80];daikon.Tag.TAG_SLICE_GAP=[24,136];daikon.Tag.TAG_TR=[24,128];daikon.Tag.TAG_FRAME_TIME=[24,4195];daikon.Tag.TAG_BITS_ALLOCATED=[40,256];daikon.Tag.TAG_BITS_STORED=[40,257];daikon.Tag.TAG_PIXEL_REPRESENTATION=[40,259];daikon.Tag.TAG_HIGH_BIT=[40,258];daikon.Tag.TAG_PHOTOMETRIC_INTERPRETATION=[40,4];daikon.Tag.TAG_SAMPLES_PER_PIXEL=[40,2];daikon.Tag.TAG_PLANAR_CONFIG=[40,6];daikon.Tag.TAG_PALETTE_RED=[40,4609];daikon.Tag.TAG_PALETTE_GREEN=[40,4610];daikon.Tag.TAG_PALETTE_BLUE=[40,4611];daikon.Tag.TAG_DATA_SCALE_SLOPE=[40,4179];daikon.Tag.TAG_DATA_SCALE_INTERCEPT=[40,4178];daikon.Tag.TAG_DATA_SCALE_ELSCINT=[519,4127];daikon.Tag.TAG_PIXEL_BANDWIDTH=[24,149];daikon.Tag.TAG_IMAGE_MIN=[40,262];daikon.Tag.TAG_IMAGE_MAX=[40,263];daikon.Tag.TAG_WINDOW_CENTER=[40,4176];daikon.Tag.TAG_WINDOW_WIDTH=[40,4177];daikon.Tag.TAG_SPECIFIC_CHAR_SET=[8,5];daikon.Tag.TAG_PATIENT_NAME=[16,16];daikon.Tag.TAG_PATIENT_ID=[16,32];daikon.Tag.TAG_STUDY_DATE=[8,32];daikon.Tag.TAG_STUDY_TIME=[8,48];daikon.Tag.TAG_STUDY_DES=[8,4144];daikon.Tag.TAG_IMAGE_TYPE=[8,8];daikon.Tag.TAG_IMAGE_COMMENTS=[32,16384];daikon.Tag.TAG_SEQUENCE_NAME=[24,36];daikon.Tag.TAG_MODALITY=[8,96];daikon.Tag.TAG_FRAME_OF_REF_UID=[32,82];daikon.Tag.TAG_STUDY_UID=[32,13];daikon.Tag.TAG_SERIES_DESCRIPTION=[8,4158];daikon.Tag.TAG_SERIES_INSTANCE_UID=[32,14];daikon.Tag.TAG_SERIES_NUMBER=[32,17];daikon.Tag.TAG_ECHO_NUMBER=[24,134];daikon.Tag.TAG_TEMPORAL_POSITION=[32,256];daikon.Tag.TAG_IMAGE_NUM=[32,19];daikon.Tag.TAG_SLICE_LOCATION=[32,4161];daikon.Tag.TAG_IMAGE_ORIENTATION=[32,55];daikon.Tag.TAG_IMAGE_POSITION=[32,50];daikon.Tag.TAG_SLICE_LOCATION_VECTOR=[24,8197];daikon.Tag.TAG_LUT_SHAPE=[8272,32];daikon.Tag.TAG_PIXEL_DATA=[32736,16];daikon.Tag.createId=function(group,element){var groupStr=daikon.Utils.dec2hex(group),elemStr=daikon.Utils.dec2hex(element);return groupStr+elemStr};daikon.Tag.getUnsignedInteger16=function(rawData,littleEndian){var data,mul,ctr;mul=rawData.byteLength/2;data=[];for(ctr=0;ctr=4){year=parseInt(stringData[ctr].substring(0,4),10);if(stringData[ctr].length>=6){month=daikon.Utils.safeParseInt(stringData[ctr].substring(4,6))-1}if(stringData[ctr].length>=8){date=daikon.Utils.safeParseInt(stringData[ctr].substring(6,8))}if(stringData[ctr].length>=10){hours=daikon.Utils.safeParseInt(stringData[ctr].substring(8,10))}if(stringData[ctr].length>=12){minutes=daikon.Utils.safeParseInt(stringData[ctr].substring(10,12))}if(stringData[ctr].length>=14){seconds=daikon.Utils.safeParseInt(stringData[ctr].substring(12,14))}data[ctr]=new Date(year,month,date,hours,minutes,seconds)}else{data[ctr]=Date.parse(stringData[ctr])}if(!daikon.Utils.isValidDate(data[ctr])){data[ctr]=stringData[ctr]}}return data};daikon.Tag.getTimeStringValue=function(rawData,ms){var stringData=daikon.Tag.getStringValue(rawData),data=[];if(ms){var parts=null,ctr,hours=0,minutes=0,seconds=0;for(ctr=0;ctr1){minutes=daikon.Utils.safeParseInt(parts[1])}if(parts.length>2){seconds=daikon.Utils.safeParseFloat(parts[2])}}else{if(stringData[ctr].length>=2){hours=daikon.Utils.safeParseInt(stringData[ctr].substring(0,2))}if(stringData[ctr].length>=4){minutes=daikon.Utils.safeParseInt(stringData[ctr].substring(2,4))}if(stringData[ctr].length>=6){seconds=daikon.Utils.safeParseFloat(stringData[ctr].substring(4))}}data[ctr]=Math.round(hours*60*60*1e3+minutes*60*1e3+seconds*1e3)}return data}return stringData};daikon.Tag.getDoubleStringValue=function(rawData){var stringData=daikon.Tag.getStringValue(rawData),data=[],ctr;for(ctr=0;ctr]"}else{valueStr="["+this.value+"]"}}if(this.isSublistItem()){tagStr="Sequence Item"}else if(this.isSublistItemDelim()){tagStr="Sequence Item Delimiter"}else if(this.isSequenceDelim()){tagStr="Sequence Delimiter"}else if(this.isPixelData()){tagStr="Pixel Data"}else{des=daikon.Utils.convertCamcelCaseToTitleCase(daikon.Dictionary.getDescription(this.group,this.element))}if(html){return padding+""+tagStr+"   "+des+"   "+valueStr}else{return padding+" "+tagStr+" "+des+" "+valueStr}};daikon.Tag.prototype.toHTMLString=function(level){return this.toString(level,true)};daikon.Tag.prototype.isTransformSyntax=function(){return this.group===daikon.Tag.TAG_TRANSFER_SYNTAX[0]&&this.element===daikon.Tag.TAG_TRANSFER_SYNTAX[1]};daikon.Tag.prototype.isCharset=function(){return this.group===daikon.Tag.TAG_SPECIFIC_CHAR_SET[0]&&this.element===daikon.Tag.TAG_SPECIFIC_CHAR_SET[1]};daikon.Tag.prototype.isPixelData=function(){return this.group===daikon.Tag.TAG_PIXEL_DATA[0]&&this.element===daikon.Tag.TAG_PIXEL_DATA[1]};daikon.Tag.prototype.isPrivateData=function(){return(this.group&1)===1};daikon.Tag.prototype.hasInterpretedPrivateData=function(){return this.isPrivateData()&&daikon.Utils.isString(this.value)};daikon.Tag.prototype.isSublistItem=function(){return this.group===daikon.Tag.TAG_SUBLIST_ITEM[0]&&this.element===daikon.Tag.TAG_SUBLIST_ITEM[1]};daikon.Tag.prototype.isSublistItemDelim=function(){return this.group===daikon.Tag.TAG_SUBLIST_ITEM_DELIM[0]&&this.element===daikon.Tag.TAG_SUBLIST_ITEM_DELIM[1]};daikon.Tag.prototype.isSequenceDelim=function(){return this.group===daikon.Tag.TAG_SUBLIST_SEQ_DELIM[0]&&this.element===daikon.Tag.TAG_SUBLIST_SEQ_DELIM[1]};daikon.Tag.prototype.isMetaLength=function(){return this.group===daikon.Tag.TAG_META_LENGTH[0]&&this.element===daikon.Tag.TAG_META_LENGTH[1]};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=daikon.Tag}},{"./dictionary.js":22,"./siemens.js":30,"./utilities.js":32}],32:[function(require,module,exports){"use strict";var convertBytes=require("@wearemothership/dicom-character-set").convertBytes;var daikon=daikon||{};daikon.Utils=daikon.Utils||{};daikon.Utils.crcTable=null;daikon.Utils.MAX_VALUE=9007199254740991;daikon.Utils.MIN_VALUE=-9007199254740991;daikon.Utils.dec2hex=function(i){return(i+65536).toString(16).substr(-4).toUpperCase()};daikon.Utils.createArray=function(length){var arr=new Array(length||0),i=length;if(arguments.length>1){var args=Array.prototype.slice.call(arguments,1);while(i--)arr[length-1-i]=daikon.Utils.createArray.apply(this,args)}return arr};daikon.Utils.getStringAt=function(dataview,start,length,charset,vr){var strBuff=new Uint8Array(dataview.buffer,dataview.byteOffset+start,length);var str=convertBytes(charset||"ISO 2022 IR 6",strBuff,{vr:vr});while(str&&str.charCodeAt(str.length-1)===0){str=str.slice(0,-1)}return str};daikon.Utils.trim=function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};daikon.Utils.stripLeadingZeros=function(str){return str.replace(/^[0]+/g,"")};daikon.Utils.safeParseInt=function(str){str=daikon.Utils.stripLeadingZeros(str);if(str.length>0){return parseInt(str,10)}return 0};daikon.Utils.convertCamcelCaseToTitleCase=function(str){var result=str.replace(/([A-Z][a-z])/g," $1");return daikon.Utils.trim(result.charAt(0).toUpperCase()+result.slice(1))};daikon.Utils.safeParseFloat=function(str){str=daikon.Utils.stripLeadingZeros(str);if(str.length>0){return parseFloat(str)}return 0};daikon.Utils.bytesToDouble=function(data){var sign=(data[0]&1<<7)>>7;var exponent=(data[0]&127)<<4|(data[1]&15<<4)>>4;if(exponent==0)return 0;if(exponent==2047)return sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;var mul=Math.pow(2,exponent-1023-52);var mantissa=data[7]+data[6]*Math.pow(2,8)+data[5]*Math.pow(2,8*2)+data[4]*Math.pow(2,8*3)+data[3]*Math.pow(2,8*4)+data[2]*Math.pow(2,8*5)+(data[1]&15)*Math.pow(2,8*6)+Math.pow(2,52);return Math.pow(-1,sign)*mantissa*mul};daikon.Utils.concatArrayBuffers=function(buffer1,buffer2){var tmp=new Uint8Array(buffer1.byteLength+buffer2.byteLength);tmp.set(new Uint8Array(buffer1),0);tmp.set(new Uint8Array(buffer2),buffer1.byteLength);return tmp.buffer};daikon.Utils.concatArrayBuffers2=function(buffers){var length=0,offset=0,ctr;for(ctr=0;ctr>8&65280|val>>24&255};daikon.Utils.swap16=function(val){return((val&255)<<8|val>>8&255)<<16>>16};daikon.Utils.makeCRCTable=function(){var c;var crcTable=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}crcTable[n]=c}return crcTable};daikon.Utils.crc32=function(dataView){var crcTable=daikon.Utils.crcTable||(daikon.Utils.crcTable=daikon.Utils.makeCRCTable());var crc=0^-1;for(var i=0;i>>8^crcTable[(crc^dataView.getUint8(i))&255]}return(crc^-1)>>>0};daikon.Utils.createBitMask=function(numBytes,bitsStored,unsigned){var mask=4294967295;mask>>>=(4-numBytes)*8+(numBytes*8-bitsStored);if(unsigned){if(numBytes==1){mask&=255}else if(numBytes==2){mask&=65535}else if(numBytes==4){mask&=4294967295}else if(numBytes==8){mask=4294967295}}else{mask=4294967295}return mask};var moduleType=typeof module;if(moduleType!=="undefined"&&module.exports){module.exports=daikon.Utils}},{"@wearemothership/dicom-character-set":5}]},{},[25])(25)}); \ No newline at end of file diff --git a/release/current/daikon.js b/release/current/daikon.js index cd2ee7c..ee7ed4c 100644 --- a/release/current/daikon.js +++ b/release/current/daikon.js @@ -66,7 +66,7 @@ if ((moduleType !== 'undefined') && module.exports) { } }).call(this)}).call(this,require('_process'),"/lib") -},{"_process":33,"fs":5,"path":32}],2:[function(require,module,exports){ +},{"_process":20,"fs":6,"path":19}],2:[function(require,module,exports){ /* Copyright 2011 notmasteryet @@ -5289,8580 +5289,4341 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = JpxImage; } },{}],5:[function(require,module,exports){ +/*! @wearemothership/dicom-character-set - 1.0.4-opt.1 - 2021-03-22 | (c) 2018 Radialogica, LLC | https://github.com/radialogica/dicom-character-set */ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["dicom-character-set"]=n():e["dicom-character-set"]=n()}(this,function(){return(()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{characterSets:()=>i,convertBytes:()=>function(e,n,t){return g(y,r,e,n,t)},convertBytesPromise:()=>function(e,n,t){return g(P,m,e,n,t)}});var n={codeElement:"G0",escapeSequence:[27,40,66],encoding:"windows-1252",isASCII:!0,bytesPerCodePoint:1},i={"ISO_IR 6":{encoding:"utf-8"},"ISO_IR 100":{encoding:"windows-1252"},"ISO_IR 101":{encoding:"iso-8859-2"},"ISO_IR 109":{encoding:"iso-8859-3"},"ISO_IR 110":{encoding:"iso-8859-4"},"ISO_IR 144":{encoding:"iso-8859-5"},"ISO_IR 127":{encoding:"iso-8859-6"},"ISO_IR 126":{encoding:"iso-8859-7"},"ISO_IR 138":{encoding:"iso-8859-8"},"ISO_IR 148":{encoding:"windows-1254"},"ISO_IR 13":{encoding:"shift-jis"},"ISO_IR 166":{encoding:"tis-620"},"ISO 2022 IR 6":{extension:!0,elements:[n]},"ISO 2022 IR 100":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,65],encoding:"windows-1252",bytesPerCodePoint:1}]},"ISO 2022 IR 101":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,66],encoding:"iso-8859-2",bytesPerCodePoint:1}]},"ISO 2022 IR 109":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,67],encoding:"iso-8859-3",bytesPerCodePoint:1}]},"ISO 2022 IR 110":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,68],encoding:"iso-8859-4",bytesPerCodePoint:1}]},"ISO 2022 IR 144":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,76],encoding:"iso-8859-5",bytesPerCodePoint:1}]},"ISO 2022 IR 127":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,71],encoding:"iso-8859-6",bytesPerCodePoint:1}]},"ISO 2022 IR 126":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,70],encoding:"iso-8859-7",bytesPerCodePoint:1}]},"ISO 2022 IR 138":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,72],encoding:"iso-8859-8",bytesPerCodePoint:1}]},"ISO 2022 IR 148":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,77],encoding:"windows-1254",bytesPerCodePoint:1}]},"ISO 2022 IR 13":{extension:!0,elements:[{codeElement:"G0",escapeSequence:[27,40,74],encoding:"shift-jis",bytesPerCodePoint:1},{codeElement:"G1",escapeSequence:[27,41,73],encoding:"shift-jis",bytesPerCodePoint:1}]},"ISO 2022 IR 166":{extension:!0,elements:[n,{codeElement:"G1",escapeSequence:[27,45,84],encoding:"tis-620",bytesPerCodePoint:1}]},"ISO 2022 IR 87":{extension:!0,multiByte:!0,elements:[{codeElement:"G0",escapeSequence:[27,36,66],encoding:"euc-jp",setHighBit:!0,bytesPerCodePoint:2}]},"ISO 2022 IR 159":{extension:!0,multiByte:!0,elements:[{codeElement:"G0",escapeSequence:[27,36,40,68],encoding:"euc-jp",isJISX0212:!0,bytesPerCodePoint:2}]},"ISO 2022 IR 149":{extension:!0,multiByte:!0,elements:[{codeElement:"G1",escapeSequence:[27,36,41,67],encoding:"euc-kr",bytesPerCodePoint:2}]},"ISO 2022 IR 58":{extension:!0,multiByte:!0,elements:[{codeElement:"G1",escapeSequence:[27,36,41,65],encoding:"gb18030",bytesPerCodePoint:2}]},"ISO_IR 192":{encoding:"utf-8",multiByte:!0},GB18030:{encoding:"gb18030",multiByte:!0},GBK:{encoding:"gbk",multiByte:!0}},l=27,c=10,s=12,u=13,d=9,a=92,f=61,I=94;function S(e){return e.replace(/~/g,"‾").replace(/\\/g,"¥")}function r(e,n,t,o,r){r=b(n,t,o,r);return e+y(n.encoding,r)}function m(e,t,n,o,r){var i=b(t,n,o,r);return(""===e?Promise.resolve(""):e).then(function(n){return P(t.encoding,i).then(function(e){return n+e})})}function g(e,n,t,o,r){!function(e,n){if(n&&!(n instanceof Uint8Array))throw new Error("bytes must be a Uint8Array");if(e&&"string"!=typeof e)throw new Error("specificCharacterSet must be a string")}(t,o);t=function(e){e=e?e.split("\\").map(function(e){return e.trim().toUpperCase()}):[""];""===e[0]&&(e[0]=1=n.length)return!1;if(n[t+o]!==e[o])return!1}return!0}(c.escapeSequence,e,n))return c}throw new Error("Unknown escape sequence encountered at byte "+n)}(n,d,e),c[a.codeElement]=a,s+=a.escapeSequence.length)}return r}(t.map(function(e){return i[e]}),o,function(e){var n=(e||"").trim().toUpperCase(),e=[c,s,u,d];["UT","ST","LT"].includes(n)||e.push(a);"PN"===n&&(e.push(f),e.push(I));return e}(r.vr),n)}var p={};function y(e,n){var t=p[e];return t||(t=new TextDecoder(e),p[e]=t="shift-jis"===e?{textDecoder:t,decode:function(e){return S(t.decode(e))}}:t),t.decode(n)}function P(o,r){return new Promise(function(e){var n=new FileReader;n.onload="shift-jis"===o?function(){return e(S(n.result))}:function(){return e(n.result)};var t=new Blob([r]);n.readAsText(t,o)})}function h(e,n){return 127> 4) !== 0x0FFC) || (current === 0xFFC4))) { // SOF 0~15 - switch (current) { - case 0xFFC4: // DHT - this.huffTable.read(this.stream, this.HuffTab); - break; - case 0xFFCC: // DAC - throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)"); - case 0xFFDB: - this.quantTable.read(this.stream, jpeg.lossless.Decoder.TABLE); - break; - case 0xFFDD: - this.restartInterval = this.readNumber(); - break; - case 0xFFE0: - case 0xFFE1: - case 0xFFE2: - case 0xFFE3: - case 0xFFE4: - case 0xFFE5: - case 0xFFE6: - case 0xFFE7: - case 0xFFE8: - case 0xFFE9: - case 0xFFEA: - case 0xFFEB: - case 0xFFEC: - case 0xFFED: - case 0xFFEE: - case 0xFFEF: - this.readApp(); - break; - case 0xFFFE: - this.readComment(); - break; - default: - if ((current >> 8) !== 0xFF) { - throw new Error("ERROR: format throw new IOException! (decode)"); - } - } - - current = this.stream.get16(); - } - - if ((current < 0xFFC0) || (current > 0xFFC7)) { - throw new Error("ERROR: could not handle arithmetic code!"); - } - - this.frame.read(this.stream); - current = this.stream.get16(); - - do { - while (current !== 0x0FFDA) { // SOS - switch (current) { - case 0xFFC4: // DHT - this.huffTable.read(this.stream, this.HuffTab); - break; - case 0xFFCC: // DAC - throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)"); - case 0xFFDB: - this.quantTable.read(this.stream, jpeg.lossless.Decoder.TABLE); - break; - case 0xFFDD: - this.restartInterval = this.readNumber(); - break; - case 0xFFE0: - case 0xFFE1: - case 0xFFE2: - case 0xFFE3: - case 0xFFE4: - case 0xFFE5: - case 0xFFE6: - case 0xFFE7: - case 0xFFE8: - case 0xFFE9: - case 0xFFEA: - case 0xFFEB: - case 0xFFEC: - case 0xFFED: - case 0xFFEE: - case 0xFFEF: - this.readApp(); - break; - case 0xFFFE: - this.readComment(); - break; - default: - if ((current >> 8) !== 0xFF) { - throw new Error("ERROR: format throw new IOException! (Parser.decode)"); - } - } - - current = this.stream.get16(); - } - - this.precision = this.frame.precision; - this.components = this.frame.components; - - if (!this.numBytes) { - this.numBytes = parseInt(Math.ceil(this.precision / 8)); - } - - if (this.numBytes == 1) { - this.mask = 0xFF; - } else { - this.mask = 0xFFFF; - } - - this.scan.read(this.stream); - this.numComp = this.scan.numComp; - this.selection = this.scan.selection; - - if (this.numBytes === 1) { - if (this.numComp === 3) { - this.getter = this.getValueRGB; - this.setter = this.setValueRGB; - this.output = this.outputRGB; - } else { - this.getter = this.getValue8; - this.setter = this.setValue8; - this.output = this.outputSingle; - } - } else { - this.getter = this.getValue16; - this.setter = this.setValue16; - this.output = this.outputSingle; - } - - switch (this.selection) { - case 2: - this.selector = this.select2; - break; - case 3: - this.selector = this.select3; - break; - case 4: - this.selector = this.select4; - break; - case 5: - this.selector = this.select5; - break; - case 6: - this.selector = this.select6; - break; - case 7: - this.selector = this.select7; - break; - default: - this.selector = this.select1; - break; - } - - this.scanComps = this.scan.components; - this.quantTables = this.quantTable.quantTables; - - for (i = 0; i < this.numComp; i+=1) { - compN = this.scanComps[i].scanCompSel; - this.qTab[i] = this.quantTables[this.components[compN].quantTableSel]; - this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp; - this.dcTab[i] = this.HuffTab[this.scanComps[i].dcTabSel][0]; - this.acTab[i] = this.HuffTab[this.scanComps[i].acTabSel][1]; - } - - this.xDim = this.frame.dimX; - this.yDim = this.frame.dimY; - if (this.numBytes == 1) { - this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp)); - } else { - this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp)); - } - - scanNum+=1; - - while (true) { // Decode one scan - temp[0] = 0; - index[0] = 0; - - for (i = 0; i < 10; i+=1) { - pred[i] = (1 << (this.precision - 1)); - } - - if (this.restartInterval === 0) { - current = this.decodeUnit(pred, temp, index); - - while ((current === 0) && ((this.xLoc < this.xDim) && (this.yLoc < this.yDim))) { - this.output(pred); - current = this.decodeUnit(pred, temp, index); - } - - break; //current=MARKER - } - - for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum+=1) { - this.restarting = (mcuNum == 0); - current = this.decodeUnit(pred, temp, index); - this.output(pred); - - if (current !== 0) { - break; - } - } - - if (current === 0) { - if (this.markerIndex !== 0) { - current = (0xFF00 | this.marker); - this.markerIndex = 0; - } else { - current = this.stream.get16(); - } - } - - if (!((current >= jpeg.lossless.Decoder.RESTART_MARKER_BEGIN) && - (current <= jpeg.lossless.Decoder.RESTART_MARKER_END))) { - break; //current=MARKER - } - } - - if ((current === 0xFFDC) && (scanNum === 1)) { //DNL - this.readNumber(); - current = this.stream.get16(); - } - } while ((current !== 0xFFD9) && ((this.xLoc < this.xDim) && (this.yLoc < this.yDim)) && (scanNum === 0)); - - return this.outputData; -}; - - - -jpeg.lossless.Decoder.prototype.decodeUnit = function (prev, temp, index) { - if (this.numComp == 1) { - return this.decodeSingle(prev, temp, index); - } else if (this.numComp == 3) { - return this.decodeRGB(prev, temp, index); - } else { - return -1; - } -}; - - - -jpeg.lossless.Decoder.prototype.select1 = function (compOffset) { - return this.getPreviousX(compOffset); -}; - - - -jpeg.lossless.Decoder.prototype.select2 = function (compOffset) { - return this.getPreviousY(compOffset); -}; - - - -jpeg.lossless.Decoder.prototype.select3 = function (compOffset) { - return this.getPreviousXY(compOffset); -}; - - - -jpeg.lossless.Decoder.prototype.select4 = function (compOffset) { - return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) - this.getPreviousXY(compOffset); -}; - - - -jpeg.lossless.Decoder.prototype.select5 = function (compOffset) { - return this.getPreviousX(compOffset) + ((this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)) >> 1); -}; - - - -jpeg.lossless.Decoder.prototype.select6 = function (compOffset) { - return this.getPreviousY(compOffset) + ((this.getPreviousX(compOffset) - this.getPreviousXY(compOffset)) >> 1); -}; - - - -jpeg.lossless.Decoder.prototype.select7 = function (compOffset) { - return ((this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2); -}; - - - -jpeg.lossless.Decoder.prototype.decodeRGB = function (prev, temp, index) { - /*jslint bitwise: true */ - - var value, actab, dctab, qtab, ctrC, i, k, j; - - prev[0] = this.selector(0); - prev[1] = this.selector(1); - prev[2] = this.selector(2); - - for (ctrC = 0; ctrC < this.numComp; ctrC+=1) { - qtab = this.qTab[ctrC]; - actab = this.acTab[ctrC]; - dctab = this.dcTab[ctrC]; - for (i = 0; i < this.nBlock[ctrC]; i+=1) { - for (k = 0; k < this.IDCT_Source.length; k+=1) { - this.IDCT_Source[k] = 0; - } - - value = this.getHuffmanValue(dctab, temp, index); - - if (value >= 0xFF00) { - return value; - } - - prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index); - this.IDCT_Source[0] *= qtab[0]; - - for (j = 1; j < 64; j+=1) { - value = this.getHuffmanValue(actab, temp, index); - - if (value >= 0xFF00) { - return value; - } - - j += (value >> 4); - - if ((value & 0x0F) === 0) { - if ((value >> 4) === 0) { - break; - } - } else { - this.IDCT_Source[jpeg.lossless.Decoder.IDCT_P[j]] = this.getn(index, value & 0x0F, temp, index) * qtab[j]; - } - } - } - } - - return 0; -}; - - - -jpeg.lossless.Decoder.prototype.decodeSingle = function (prev, temp, index) { - /*jslint bitwise: true */ - - var value, i, n, nRestart; - - if (this.restarting) { - this.restarting = false; - prev[0] = (1 << (this.frame.precision - 1)); - } else { - prev[0] = this.selector(); - } - - for (i = 0; i < this.nBlock[0]; i+=1) { - value = this.getHuffmanValue(this.dcTab[0], temp, index); - if (value >= 0xFF00) { - return value; - } - - n = this.getn(prev, value, temp, index); - nRestart = (n >> 8); - - if ((nRestart >= jpeg.lossless.Decoder.RESTART_MARKER_BEGIN) && (nRestart <= jpeg.lossless.Decoder.RESTART_MARKER_END)) { - return nRestart; - } - - prev[0] += n; - } - - return 0; -}; - - - -// Huffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8 -// bits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256. -// HuffTab[*][*][0-256] is always the only 1st-layer table. -// -// An entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal -// -// HuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...) -// ): -// return: Huffman Value of table -// 0xFF?? if it receives a MARKER -// Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...) -// temp temp storage for remainded bits -// index index to bit of temp -// in FILE pointer -// Effect: -// temp store new remainded bits -// index change to new index -// in change to new position -// NOTE: -// Initial by temp=0; index=0; -// NOTE: (explain temp and index) -// temp: is always in the form at calling time or returning time -// | byte 4 | byte 3 | byte 2 | byte 1 | -// | 0 | 0 | 00000000 | 00000??? | if not a MARKER -// ^index=3 (from 0 to 15) -// 321 -// NOTE (marker and marker_index): -// If get a MARKER from 'in', marker=the low-byte of the MARKER -// and marker_index=9 -// If marker_index=9 then index is always > 8, or HuffmanValue() -// will not be called -jpeg.lossless.Decoder.prototype.getHuffmanValue = function (table, temp, index) { - /*jslint bitwise: true */ - - var code, input, mask; - mask = 0xFFFF; - - if (index[0] < 8) { - temp[0] <<= 8; - input = this.stream.get8(); - if (input === 0xFF) { - this.marker = this.stream.get8(); - if (this.marker !== 0) { - this.markerIndex = 9; - } - } - temp[0] |= input; - } else { - index[0] -= 8; - } - - code = table[temp[0] >> index[0]]; - - if ((code & jpeg.lossless.Decoder.MSB) !== 0) { - if (this.markerIndex !== 0) { - this.markerIndex = 0; - return 0xFF00 | this.marker; - } - - temp[0] &= (mask >> (16 - index[0])); - temp[0] <<= 8; - input = this.stream.get8(); - - if (input === 0xFF) { - this.marker = this.stream.get8(); - if (this.marker !== 0) { - this.markerIndex = 9; - } - } - - temp[0] |= input; - code = table[((code & 0xFF) * 256) + (temp[0] >> index[0])]; - index[0] += 8; - } - - index[0] += 8 - (code >> 8); - - if (index[0] < 0) { - throw new Error("index=" + index[0] + " temp=" + temp[0] + " code=" + code + " in HuffmanValue()"); - } - - if (index[0] < this.markerIndex) { - this.markerIndex = 0; - return 0xFF00 | this.marker; - } - - temp[0] &= (mask >> (16 - index[0])); - return code & 0xFF; -}; - - - -jpeg.lossless.Decoder.prototype.getn = function (PRED, n, temp, index) { - /*jslint bitwise: true */ - - var result, one, n_one, mask, input; - one = 1; - n_one = -1; - mask = 0xFFFF; - - if (n === 0) { - return 0; - } - - if (n === 16) { - if (PRED[0] >= 0) { - return -32768; - } else { - return 32768; - } - } - - index[0] -= n; - - if (index[0] >= 0) { - if ((index[0] < this.markerIndex) && !this.isLastPixel()) { // this was corrupting the last pixel in some cases - this.markerIndex = 0; - return (0xFF00 | this.marker) << 8; - } - - result = temp[0] >> index[0]; - temp[0] &= (mask >> (16 - index[0])); - } else { - temp[0] <<= 8; - input = this.stream.get8(); - - if (input === 0xFF) { - this.marker = this.stream.get8(); - if (this.marker !== 0) { - this.markerIndex = 9; - } - } - - temp[0] |= input; - index[0] += 8; - - if (index[0] < 0) { - if (this.markerIndex !== 0) { - this.markerIndex = 0; - return (0xFF00 | this.marker) << 8; - } - - temp[0] <<= 8; - input = this.stream.get8(); - - if (input === 0xFF) { - this.marker = this.stream.get8(); - if (this.marker !== 0) { - this.markerIndex = 9; - } - } - - temp[0] |= input; - index[0] += 8; - } - - if (index[0] < 0) { - throw new Error("index=" + index[0] + " in getn()"); - } - - if (index[0] < this.markerIndex) { - this.markerIndex = 0; - return (0xFF00 | this.marker) << 8; - } - - result = temp[0] >> index[0]; - temp[0] &= (mask >> (16 - index[0])); - } - - if (result < (one << (n - 1))) { - result += (n_one << n) + 1; - } - - return result; -}; - - - -jpeg.lossless.Decoder.prototype.getPreviousX = function (compOffset) { - /*jslint bitwise: true */ - - if (this.xLoc > 0) { - return this.getter((((this.yLoc * this.xDim) + this.xLoc) - 1), compOffset); - } else if (this.yLoc > 0) { - return this.getPreviousY(compOffset); - } else { - return (1 << (this.frame.precision - 1)); - } -}; - - - -jpeg.lossless.Decoder.prototype.getPreviousXY = function (compOffset) { - /*jslint bitwise: true */ - - if ((this.xLoc > 0) && (this.yLoc > 0)) { - return this.getter(((((this.yLoc - 1) * this.xDim) + this.xLoc) - 1), compOffset); - } else { - return this.getPreviousY(compOffset); - } -}; - - - -jpeg.lossless.Decoder.prototype.getPreviousY = function (compOffset) { - /*jslint bitwise: true */ - - if (this.yLoc > 0) { - return this.getter((((this.yLoc - 1) * this.xDim) + this.xLoc), compOffset); - } else { - return this.getPreviousX(compOffset); - } -}; - - - -jpeg.lossless.Decoder.prototype.isLastPixel = function () { - return (this.xLoc === (this.xDim - 1)) && (this.yLoc === (this.yDim - 1)); -}; - - - -jpeg.lossless.Decoder.prototype.outputSingle = function (PRED) { - if ((this.xLoc < this.xDim) && (this.yLoc < this.yDim)) { - this.setter((((this.yLoc * this.xDim) + this.xLoc)), this.mask & PRED[0]); - - this.xLoc+=1; - - if (this.xLoc >= this.xDim) { - this.yLoc+=1; - this.xLoc = 0; - } - } -}; - - - -jpeg.lossless.Decoder.prototype.outputRGB = function (PRED) { - var offset = ((this.yLoc * this.xDim) + this.xLoc); - - if ((this.xLoc < this.xDim) && (this.yLoc < this.yDim)) { - this.setter(offset, PRED[0], 0); - this.setter(offset, PRED[1], 1); - this.setter(offset, PRED[2], 2); - - this.xLoc+=1; - - if (this.xLoc >= this.xDim) { - this.yLoc+=1; - this.xLoc = 0; - } - } -}; - -jpeg.lossless.Decoder.prototype.setValue8 = function (index, val) { - this.outputData[index] = val; -}; - -jpeg.lossless.Decoder.prototype.getValue8 = function (index) { - return this.outputData[index]; // mask should not be necessary because outputData is either Int8Array or Int16Array -}; - -var littleEndian = (function() { - var buffer = new ArrayBuffer(2); - new DataView(buffer).setInt16(0, 256, true /* littleEndian */); - // Int16Array uses the platform's endianness. - return new Int16Array(buffer)[0] === 256; -})(); - -if (littleEndian) { - // just reading from an array is fine then. Int16Array will use platform endianness. - jpeg.lossless.Decoder.prototype.setValue16 = jpeg.lossless.Decoder.prototype.setValue8; - jpeg.lossless.Decoder.prototype.getValue16 = jpeg.lossless.Decoder.prototype.getValue8; -} -else { - // If platform is big-endian, we will need to convert to little-endian - jpeg.lossless.Decoder.prototype.setValue16 = function (index, val) { - this.outputData[index] = ((val & 0xFF) << 8) | ((val >> 8) & 0xFF); - }; - - jpeg.lossless.Decoder.prototype.getValue16 = function (index) { - var val = this.outputData[index]; - return ((val & 0xFF) << 8) | ((val >> 8) & 0xFF); - }; -} - -jpeg.lossless.Decoder.prototype.setValueRGB = function (index, val, compOffset) { - // this.outputData.setUint8(index * 3 + compOffset, val); - this.outputData[index * 3 + compOffset] = val; -}; - -jpeg.lossless.Decoder.prototype.getValueRGB = function (index, compOffset) { - // return this.outputData.getUint8(index * 3 + compOffset); - return this.outputData[index * 3 + compOffset]; -}; - - - -jpeg.lossless.Decoder.prototype.readApp = function() { - var count = 0, length = this.stream.get16(); - count += 2; - - while (count < length) { - this.stream.get8(); - count+=1; - } - - return length; -}; - - - -jpeg.lossless.Decoder.prototype.readComment = function () { - var sb = "", count = 0, length; - - length = this.stream.get16(); - count += 2; - - while (count < length) { - sb += this.stream.get8(); - count+=1; - } - - return sb; -}; - - - -jpeg.lossless.Decoder.prototype.readNumber = function() { - var Ld = this.stream.get16(); - - if (Ld !== 4) { - throw new Error("ERROR: Define number format throw new IOException [Ld!=4]"); - } - - return this.stream.get16(); -}; - - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.Decoder; -} - -},{"./data-stream.js":7,"./frame-header.js":9,"./huffman-table.js":10,"./quantization-table.js":12,"./scan-header.js":14,"./utils.js":15}],9:[function(require,module,exports){ -/* - * Copyright (C) 2015 Michael Martinez - * Changes: Added support for selection values 2-7, fixed minor bugs & - * warnings, split into multiple class files, and general clean up. - * - * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. - */ - -/* - * Copyright (C) Helmut Dersch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ***/ -var jpeg = jpeg || {}; -jpeg.lossless = jpeg.lossless || {}; -jpeg.lossless.ComponentSpec = jpeg.lossless.ComponentSpec || ((typeof require !== 'undefined') ? require('./component-spec.js') : null); -jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); - - -/*** Constructor ***/ -jpeg.lossless.FrameHeader = jpeg.lossless.FrameHeader || function () { - this.components = []; // Components - this.dimX = 0; // Number of samples per line - this.dimY = 0; // Number of lines - this.numComp = 0; // Number of component in the frame - this.precision = 0; // Sample Precision (from the original image) -}; - - - -/*** Prototype Methods ***/ - -jpeg.lossless.FrameHeader.prototype.read = function (data) { - /*jslint bitwise: true */ - - var count = 0, length, i, c, temp; - - length = data.get16(); - count += 2; - - this.precision = data.get8(); - count+=1; - - this.dimY = data.get16(); - count += 2; - - this.dimX = data.get16(); - count += 2; - - this.numComp = data.get8(); - count+=1; - for (i = 1; i <= this.numComp; i+=1) { - if (count > length) { - throw new Error("ERROR: frame format error"); - } - - c = data.get8(); - count+=1; - - if (count >= length) { - throw new Error("ERROR: frame format error [c>=Lf]"); - } - - temp = data.get8(); - count+=1; - - if (!this.components[c]) { - this.components[c] = new jpeg.lossless.ComponentSpec(); - } - - this.components[c].hSamp = temp >> 4; - this.components[c].vSamp = temp & 0x0F; - this.components[c].quantTableSel = data.get8(); - count+=1; - } - - if (count !== length) { - throw new Error("ERROR: frame format error [Lf!=count]"); - } - - return 1; -}; - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.FrameHeader; -} - -},{"./component-spec.js":6,"./data-stream.js":7}],10:[function(require,module,exports){ -/* - * Copyright (C) 2015 Michael Martinez - * Changes: Added support for selection values 2-7, fixed minor bugs & - * warnings, split into multiple class files, and general clean up. - * - * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. - */ - -/* - * Copyright (C) Helmut Dersch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ***/ -var jpeg = jpeg || {}; -jpeg.lossless = jpeg.lossless || {}; -jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); -jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); - - -/*** Constructor ***/ -jpeg.lossless.HuffmanTable = jpeg.lossless.HuffmanTable || function () { - this.l = jpeg.lossless.Utils.createArray(4, 2, 16); - this.th = []; - this.v = jpeg.lossless.Utils.createArray(4, 2, 16, 200); - this.tc = jpeg.lossless.Utils.createArray(4, 2); - - this.tc[0][0] = 0; - this.tc[1][0] = 0; - this.tc[2][0] = 0; - this.tc[3][0] = 0; - this.tc[0][1] = 0; - this.tc[1][1] = 0; - this.tc[2][1] = 0; - this.tc[3][1] = 0; - this.th[0] = 0; - this.th[1] = 0; - this.th[2] = 0; - this.th[3] = 0; -}; - - - -/*** Static Pseudo-constants ***/ - -jpeg.lossless.HuffmanTable.MSB = 0x80000000; - - -/*** Prototype Methods ***/ - -jpeg.lossless.HuffmanTable.prototype.read = function(data, HuffTab) { - /*jslint bitwise: true */ - - var count = 0, length, temp, t, c, i, j; - - length = data.get16(); - count += 2; - - while (count < length) { - temp = data.get8(); - count+=1; - t = temp & 0x0F; - if (t > 3) { - throw new Error("ERROR: Huffman table ID > 3"); - } - - c = temp >> 4; - if (c > 2) { - throw new Error("ERROR: Huffman table [Table class > 2 ]"); - } - - this.th[t] = 1; - this.tc[t][c] = 1; - - for (i = 0; i < 16; i+=1) { - this.l[t][c][i] = data.get8(); - count+=1; - } - - for (i = 0; i < 16; i+=1) { - for (j = 0; j < this.l[t][c][i]; j+=1) { - if (count > length) { - throw new Error("ERROR: Huffman table format error [count>Lh]"); - } - - this.v[t][c][i][j] = data.get8(); - count+=1; - } - } - } - - if (count !== length) { - throw new Error("ERROR: Huffman table format error [count!=Lf]"); - } - - for (i = 0; i < 4; i+=1) { - for (j = 0; j < 2; j+=1) { - if (this.tc[i][j] !== 0) { - this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j]); - } - } - } - - return 1; -}; - - - -// Build_HuffTab() -// Parameter: t table ID -// c table class ( 0 for DC, 1 for AC ) -// L[i] # of codewords which length is i -// V[i][j] Huffman Value (length=i) -// Effect: -// build up HuffTab[t][c] using L and V. -jpeg.lossless.HuffmanTable.prototype.buildHuffTable = function(tab, L, V) { - /*jslint bitwise: true */ - - var currentTable, temp, k, i, j, n; - temp = 256; - k = 0; - - for (i = 0; i < 8; i+=1) { // i+1 is Code length - for (j = 0; j < L[i]; j+=1) { - for (n = 0; n < (temp >> (i + 1)); n+=1) { - tab[k] = V[i][j] | ((i + 1) << 8); - k+=1; - } - } - } - - for (i = 1; k < 256; i+=1, k+=1) { - tab[k] = i | jpeg.lossless.HuffmanTable.MSB; - } - - currentTable = 1; - k = 0; - - for (i = 8; i < 16; i+=1) { // i+1 is Code length - for (j = 0; j < L[i]; j+=1) { - for (n = 0; n < (temp >> (i - 7)); n+=1) { - tab[(currentTable * 256) + k] = V[i][j] | ((i + 1) << 8); - k+=1; - } - - if (k >= 256) { - if (k > 256) { - throw new Error("ERROR: Huffman table error(1)!"); - } - - k = 0; - currentTable+=1; - } - } - } -}; - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.HuffmanTable; -} - -},{"./data-stream.js":7,"./utils.js":15}],11:[function(require,module,exports){ -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ****/ - -/** - * jpeg - * @type {*|{}} - */ -var jpeg = jpeg || {}; - -/** - * jpeg.lossless - * @type {*|{}} - */ -jpeg.lossless = jpeg.lossless || {}; - - -jpeg.lossless.ComponentSpec = jpeg.lossless.ComponentSpec || ((typeof require !== 'undefined') ? require('./component-spec.js') : null); -jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); -jpeg.lossless.Decoder = jpeg.lossless.Decoder || ((typeof require !== 'undefined') ? require('./decoder.js') : null); -jpeg.lossless.FrameHeader = jpeg.lossless.FrameHeader || ((typeof require !== 'undefined') ? require('./frame-header.js') : null); -jpeg.lossless.HuffmanTable = jpeg.lossless.HuffmanTable || ((typeof require !== 'undefined') ? require('./huffman-table.js') : null); -jpeg.lossless.QuantizationTable = jpeg.lossless.QuantizationTable || ((typeof require !== 'undefined') ? require('./quantization-table.js') : null); -jpeg.lossless.ScanComponent = jpeg.lossless.ScanComponent || ((typeof require !== 'undefined') ? require('./scan-component.js') : null); -jpeg.lossless.ScanHeader = jpeg.lossless.ScanHeader || ((typeof require !== 'undefined') ? require('./scan-header.js') : null); -jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); - - -/*** Exports ***/ -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg; -} - -},{"./component-spec.js":6,"./data-stream.js":7,"./decoder.js":8,"./frame-header.js":9,"./huffman-table.js":10,"./quantization-table.js":12,"./scan-component.js":13,"./scan-header.js":14,"./utils.js":15}],12:[function(require,module,exports){ -/* - * Copyright (C) 2015 Michael Martinez - * Changes: Added support for selection values 2-7, fixed minor bugs & - * warnings, split into multiple class files, and general clean up. - * - * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. - */ - -/* - * Copyright (C) Helmut Dersch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ***/ -var jpeg = jpeg || {}; -jpeg.lossless = jpeg.lossless || {}; -jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); -jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); - - -/*** Constructor ***/ -jpeg.lossless.QuantizationTable = jpeg.lossless.QuantizationTable || function () { - this.precision = []; // Quantization precision 8 or 16 - this.tq = []; // 1: this table is presented - this.quantTables = jpeg.lossless.Utils.createArray(4, 64); // Tables - - this.tq[0] = 0; - this.tq[1] = 0; - this.tq[2] = 0; - this.tq[3] = 0; -}; - - - -/*** Static Methods ***/ - -jpeg.lossless.QuantizationTable.enhanceQuantizationTable = function(qtab, table) { - /*jslint bitwise: true */ - - var i; - - for (i = 0; i < 8; i+=1) { - qtab[table[(0 * 8) + i]] *= 90; - qtab[table[(4 * 8) + i]] *= 90; - qtab[table[(2 * 8) + i]] *= 118; - qtab[table[(6 * 8) + i]] *= 49; - qtab[table[(5 * 8) + i]] *= 71; - qtab[table[(1 * 8) + i]] *= 126; - qtab[table[(7 * 8) + i]] *= 25; - qtab[table[(3 * 8) + i]] *= 106; - } - - for (i = 0; i < 8; i+=1) { - qtab[table[0 + (8 * i)]] *= 90; - qtab[table[4 + (8 * i)]] *= 90; - qtab[table[2 + (8 * i)]] *= 118; - qtab[table[6 + (8 * i)]] *= 49; - qtab[table[5 + (8 * i)]] *= 71; - qtab[table[1 + (8 * i)]] *= 126; - qtab[table[7 + (8 * i)]] *= 25; - qtab[table[3 + (8 * i)]] *= 106; - } - - for (i = 0; i < 64; i+=1) { - qtab[i] >>= 6; - } -}; - - -/*** Prototype Methods ***/ - -jpeg.lossless.QuantizationTable.prototype.read = function (data, table) { - /*jslint bitwise: true */ - - var count = 0, length, temp, t, i; - - length = data.get16(); - count += 2; - - while (count < length) { - temp = data.get8(); - count+=1; - t = temp & 0x0F; - - if (t > 3) { - throw new Error("ERROR: Quantization table ID > 3"); - } - - this.precision[t] = temp >> 4; - - if (this.precision[t] === 0) { - this.precision[t] = 8; - } else if (this.precision[t] === 1) { - this.precision[t] = 16; - } else { - throw new Error("ERROR: Quantization table precision error"); - } - - this.tq[t] = 1; - - if (this.precision[t] === 8) { - for (i = 0; i < 64; i+=1) { - if (count > length) { - throw new Error("ERROR: Quantization table format error"); - } - - this.quantTables[t][i] = data.get8(); - count+=1; - } - - jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table); - } else { - for (i = 0; i < 64; i+=1) { - if (count > length) { - throw new Error("ERROR: Quantization table format error"); - } - - this.quantTables[t][i] = data.get16(); - count += 2; - } - - jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table); - } - } - - if (count !== length) { - throw new Error("ERROR: Quantization table error [count!=Lq]"); - } - - return 1; -}; - - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.QuantizationTable; -} - -},{"./data-stream.js":7,"./utils.js":15}],13:[function(require,module,exports){ -/* - * Copyright (C) 2015 Michael Martinez - * Changes: Added support for selection values 2-7, fixed minor bugs & - * warnings, split into multiple class files, and general clean up. - * - * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. - */ - -/* - * Copyright (C) Helmut Dersch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ***/ -var jpeg = jpeg || {}; -jpeg.lossless = jpeg.lossless || {}; - - -/*** Constructor ***/ -jpeg.lossless.ScanComponent = jpeg.lossless.ScanComponent || function () { - this.acTabSel = 0; // AC table selector - this.dcTabSel = 0; // DC table selector - this.scanCompSel = 0; // Scan component selector -}; - - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.ScanComponent; -} - -},{}],14:[function(require,module,exports){ -/* - * Copyright (C) 2015 Michael Martinez - * Changes: Added support for selection values 2-7, fixed minor bugs & - * warnings, split into multiple class files, and general clean up. - * - * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. - */ - -/* - * Copyright (C) Helmut Dersch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ***/ -var jpeg = jpeg || {}; -jpeg.lossless = jpeg.lossless || {}; -jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); -jpeg.lossless.ScanComponent = jpeg.lossless.ScanComponent || ((typeof require !== 'undefined') ? require('./scan-component.js') : null); - - -/*** Constructor ***/ -jpeg.lossless.ScanHeader = jpeg.lossless.ScanHeader || function () { - this.ah = 0; - this.al = 0; - this.numComp = 0; // Number of components in the scan - this.selection = 0; // Start of spectral or predictor selection - this.spectralEnd = 0; // End of spectral selection - this.components = []; -}; - - -/*** Prototype Methods ***/ - -jpeg.lossless.ScanHeader.prototype.read = function(data) { - /*jslint bitwise: true */ - - var count = 0, length, i, temp; - - length = data.get16(); - count += 2; - - this.numComp = data.get8(); - count+=1; - - for (i = 0; i < this.numComp; i+=1) { - this.components[i] = new jpeg.lossless.ScanComponent(); - - if (count > length) { - throw new Error("ERROR: scan header format error"); - } - - this.components[i].scanCompSel = data.get8(); - count+=1; - - temp = data.get8(); - count+=1; - - this.components[i].dcTabSel = (temp >> 4); - this.components[i].acTabSel = (temp & 0x0F); - } - - this.selection = data.get8(); - count+=1; - - this.spectralEnd = data.get8(); - count+=1; - - temp = data.get8(); - this.ah = (temp >> 4); - this.al = (temp & 0x0F); - count+=1; - - if (count !== length) { - throw new Error("ERROR: scan header format error [count!=Ns]"); - } - - return 1; -}; - - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.ScanHeader; -} - -},{"./data-stream.js":7,"./scan-component.js":13}],15:[function(require,module,exports){ -/* - * Copyright (C) 2015 Michael Martinez - * Changes: Added support for selection values 2-7, fixed minor bugs & - * warnings, split into multiple class files, and general clean up. - * - * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. - */ - -/* - * Copyright (C) Helmut Dersch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/*jslint browser: true, node: true */ -/*global require, module */ - -"use strict"; - -/*** Imports ***/ -var jpeg = jpeg || {}; -jpeg.lossless = jpeg.lossless || {}; - - -/*** Constructor ***/ -jpeg.lossless.Utils = jpeg.lossless.Utils || {}; - - -/*** Static methods ***/ - -// http://stackoverflow.com/questions/966225/how-can-i-create-a-two-dimensional-array-in-javascript -jpeg.lossless.Utils.createArray = function (length) { - var arr = new Array(length || 0), - i = length; - - if (arguments.length > 1) { - var args = Array.prototype.slice.call(arguments, 1); - while(i--) arr[length-1 - i] = jpeg.lossless.Utils.createArray.apply(this, args); - } - - return arr; -}; - - -// http://stackoverflow.com/questions/18638900/javascript-crc32 -jpeg.lossless.Utils.makeCRCTable = function(){ - var c; - var crcTable = []; - for(var n =0; n < 256; n++){ - c = n; - for(var k =0; k < 8; k++){ - c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - crcTable[n] = c; - } - return crcTable; -}; - -jpeg.lossless.Utils.crc32 = function(dataView) { - var uint8view = new Uint8Array(dataView.buffer); - var crcTable = jpeg.lossless.Utils.crcTable || (jpeg.lossless.Utils.crcTable = jpeg.lossless.Utils.makeCRCTable()); - var crc = 0 ^ (-1); - - for (var i = 0; i < uint8view.length; i++ ) { - crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xFF]; - } - - return (crc ^ (-1)) >>> 0; -}; - - -/*** Exports ***/ - -var moduleType = typeof module; -if ((moduleType !== 'undefined') && module.exports) { - module.exports = jpeg.lossless.Utils; -} - -},{}],16:[function(require,module,exports){ -// Top level file is just a mixin of submodules & constants -'use strict'; - -var assign = require('./lib/utils/common').assign; - -var deflate = require('./lib/deflate'); -var inflate = require('./lib/inflate'); -var constants = require('./lib/zlib/constants'); - -var pako = {}; - -assign(pako, deflate, inflate, constants); - -module.exports = pako; - -},{"./lib/deflate":17,"./lib/inflate":18,"./lib/utils/common":19,"./lib/zlib/constants":22}],17:[function(require,module,exports){ -'use strict'; - - -var zlib_deflate = require('./zlib/deflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); - -var toString = Object.prototype.toString; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - -var Z_NO_FLUSH = 0; -var Z_FINISH = 4; - -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_SYNC_FLUSH = 2; - -var Z_DEFAULT_COMPRESSION = -1; - -var Z_DEFAULT_STRATEGY = 0; - -var Z_DEFLATED = 8; - -/* ===========================================================================*/ - - -/** - * class Deflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[deflate]], - * [[deflateRaw]] and [[gzip]]. - **/ - -/* internal - * Deflate.chunks -> Array - * - * Chunks of output data, if [[Deflate#onData]] not overridden. - **/ - -/** - * Deflate.result -> Uint8Array|Array - * - * Compressed result, generated by default [[Deflate#onData]] - * and [[Deflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Deflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Deflate.err -> Number - * - * Error code after deflate finished. 0 (Z_OK) on success. - * You will not need it in real life, because deflate errors - * are possible only on wrong options or bad `onData` / `onEnd` - * custom handlers. - **/ - -/** - * Deflate.msg -> String - * - * Error message, if [[Deflate.err]] != 0 - **/ - - -/** - * new Deflate(options) - * - options (Object): zlib deflate options. - * - * Creates new deflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `level` - * - `windowBits` - * - `memLevel` - * - `strategy` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw deflate - * - `gzip` (Boolean) - create gzip wrapper - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - `header` (Object) - custom header for gzip - * - `text` (Boolean) - true if compressed data believed to be text - * - `time` (Number) - modification time, unix timestamp - * - `os` (Number) - operation system code - * - `extra` (Array) - array of bytes with extra data (max 65536) - * - `name` (String) - file name (binary string) - * - `comment` (String) - comment (binary string) - * - `hcrc` (Boolean) - true if header crc should be added - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var deflate = new pako.Deflate({ level: 3}); - * - * deflate.push(chunk1, false); - * deflate.push(chunk2, true); // true -> last chunk - * - * if (deflate.err) { throw new Error(deflate.err); } - * - * console.log(deflate.result); - * ``` - **/ -function Deflate(options) { - if (!(this instanceof Deflate)) return new Deflate(options); - - this.options = utils.assign({ - level: Z_DEFAULT_COMPRESSION, - method: Z_DEFLATED, - chunkSize: 16384, - windowBits: 15, - memLevel: 8, - strategy: Z_DEFAULT_STRATEGY, - to: '' - }, options || {}); - - var opt = this.options; - - if (opt.raw && (opt.windowBits > 0)) { - opt.windowBits = -opt.windowBits; - } - - else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) { - opt.windowBits += 16; - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_deflate.deflateInit2( - this.strm, - opt.level, - opt.method, - opt.windowBits, - opt.memLevel, - opt.strategy - ); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - if (opt.header) { - zlib_deflate.deflateSetHeader(this.strm, opt.header); - } - - if (opt.dictionary) { - var dict; - // Convert data if needed - if (typeof opt.dictionary === 'string') { - // If we need to compress text, change encoding to utf8. - dict = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - dict = new Uint8Array(opt.dictionary); - } else { - dict = opt.dictionary; - } - - status = zlib_deflate.deflateSetDictionary(this.strm, dict); - - if (status !== Z_OK) { - throw new Error(msg[status]); - } - - this._dict_set = true; - } -} - -/** - * Deflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be - * converted to utf8 byte sequence. - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with - * new compressed chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the compression context. - * - * On fail call [[Deflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * array format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Deflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var status, _mode; - - if (this.ended) { return false; } - - _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // If we need to compress text, change encoding to utf8. - strm.input = strings.string2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - status = zlib_deflate.deflate(strm, _mode); /* no bad return value */ - - if (status !== Z_STREAM_END && status !== Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) { - if (this.options.to === 'string') { - this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); - - // Finalize on the last chunk. - if (_mode === Z_FINISH) { - status = zlib_deflate.deflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === Z_SYNC_FLUSH) { - this.onEnd(Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Deflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Deflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Deflate#onEnd(status) -> Void - * - status (Number): deflate status. 0 (Z_OK) on success, - * other if not. - * - * Called once after you tell deflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Deflate.prototype.onEnd = function (status) { - // On success - join - if (status === Z_OK) { - if (this.options.to === 'string') { - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * deflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * Compress `data` with deflate algorithm and `options`. - * - * Supported options are: - * - * - level - * - windowBits - * - memLevel - * - strategy - * - dictionary - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be "binary string" - * (each char code [0..255]) - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , data = Uint8Array([1,2,3,4,5,6,7,8,9]); - * - * console.log(pako.deflate(data)); - * ``` - **/ -function deflate(input, options) { - var deflator = new Deflate(options); - - deflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (deflator.err) { throw deflator.msg || msg[deflator.err]; } - - return deflator.result; -} - - -/** - * deflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function deflateRaw(input, options) { - options = options || {}; - options.raw = true; - return deflate(input, options); -} - - -/** - * gzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to compress. - * - options (Object): zlib deflate options. - * - * The same as [[deflate]], but create gzip wrapper instead of - * deflate one. - **/ -function gzip(input, options) { - options = options || {}; - options.gzip = true; - return deflate(input, options); -} - - -exports.Deflate = Deflate; -exports.deflate = deflate; -exports.deflateRaw = deflateRaw; -exports.gzip = gzip; - -},{"./utils/common":19,"./utils/strings":20,"./zlib/deflate":24,"./zlib/messages":29,"./zlib/zstream":31}],18:[function(require,module,exports){ -'use strict'; - - -var zlib_inflate = require('./zlib/inflate'); -var utils = require('./utils/common'); -var strings = require('./utils/strings'); -var c = require('./zlib/constants'); -var msg = require('./zlib/messages'); -var ZStream = require('./zlib/zstream'); -var GZheader = require('./zlib/gzheader'); - -var toString = Object.prototype.toString; - -/** - * class Inflate - * - * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] - * and [[inflateRaw]]. - **/ - -/* internal - * inflate.chunks -> Array - * - * Chunks of output data, if [[Inflate#onData]] not overridden. - **/ - -/** - * Inflate.result -> Uint8Array|Array|String - * - * Uncompressed result, generated by default [[Inflate#onData]] - * and [[Inflate#onEnd]] handlers. Filled after you push last chunk - * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you - * push a chunk with explicit flush (call [[Inflate#push]] with - * `Z_SYNC_FLUSH` param). - **/ - -/** - * Inflate.err -> Number - * - * Error code after inflate finished. 0 (Z_OK) on success. - * Should be checked if broken data possible. - **/ - -/** - * Inflate.msg -> String - * - * Error message, if [[Inflate.err]] != 0 - **/ - - -/** - * new Inflate(options) - * - options (Object): zlib inflate options. - * - * Creates new inflator instance with specified params. Throws exception - * on bad params. Supported options: - * - * - `windowBits` - * - `dictionary` - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information on these. - * - * Additional options, for internal needs: - * - * - `chunkSize` - size of generated data chunks (16K by default) - * - `raw` (Boolean) - do raw inflate - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * By default, when no options set, autodetect deflate/gzip data format via - * wrapper header. - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9]) - * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]); - * - * var inflate = new pako.Inflate({ level: 3}); - * - * inflate.push(chunk1, false); - * inflate.push(chunk2, true); // true -> last chunk - * - * if (inflate.err) { throw new Error(inflate.err); } - * - * console.log(inflate.result); - * ``` - **/ -function Inflate(options) { - if (!(this instanceof Inflate)) return new Inflate(options); - - this.options = utils.assign({ - chunkSize: 16384, - windowBits: 0, - to: '' - }, options || {}); - - var opt = this.options; - - // Force window size for `raw` data, if not set directly, - // because we have no header for autodetect. - if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) { - opt.windowBits = -opt.windowBits; - if (opt.windowBits === 0) { opt.windowBits = -15; } - } - - // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate - if ((opt.windowBits >= 0) && (opt.windowBits < 16) && - !(options && options.windowBits)) { - opt.windowBits += 32; - } - - // Gzip header has no info about windows size, we can do autodetect only - // for deflate. So, if window size not set, force it to max when gzip possible - if ((opt.windowBits > 15) && (opt.windowBits < 48)) { - // bit 3 (16) -> gzipped data - // bit 4 (32) -> autodetect gzip/deflate - if ((opt.windowBits & 15) === 0) { - opt.windowBits |= 15; - } - } - - this.err = 0; // error code, if happens (0 = Z_OK) - this.msg = ''; // error message - this.ended = false; // used to avoid multiple onEnd() calls - this.chunks = []; // chunks of compressed data - - this.strm = new ZStream(); - this.strm.avail_out = 0; - - var status = zlib_inflate.inflateInit2( - this.strm, - opt.windowBits - ); - - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - - this.header = new GZheader(); - - zlib_inflate.inflateGetHeader(this.strm, this.header); - - // Setup dictionary - if (opt.dictionary) { - // Convert data if needed - if (typeof opt.dictionary === 'string') { - opt.dictionary = strings.string2buf(opt.dictionary); - } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { - opt.dictionary = new Uint8Array(opt.dictionary); - } - if (opt.raw) { //In raw mode we need to set the dictionary early - status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); - if (status !== c.Z_OK) { - throw new Error(msg[status]); - } - } - } -} - -/** - * Inflate#push(data[, mode]) -> Boolean - * - data (Uint8Array|Array|ArrayBuffer|String): input data - * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. - * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. - * - * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with - * new output chunks. Returns `true` on success. The last data block must have - * mode Z_FINISH (or `true`). That will flush internal pending buffers and call - * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you - * can use mode Z_SYNC_FLUSH, keeping the decompression context. - * - * On fail call [[Inflate#onEnd]] with error code and return false. - * - * We strongly recommend to use `Uint8Array` on input for best speed (output - * format is detected automatically). Also, don't skip last param and always - * use the same type in your code (boolean or number). That will improve JS speed. - * - * For regular `Array`-s make sure all elements are [0..255]. - * - * ##### Example - * - * ```javascript - * push(chunk, false); // push one of data chunks - * ... - * push(chunk, true); // push last chunk - * ``` - **/ -Inflate.prototype.push = function (data, mode) { - var strm = this.strm; - var chunkSize = this.options.chunkSize; - var dictionary = this.options.dictionary; - var status, _mode; - var next_out_utf8, tail, utf8str; - - // Flag to properly process Z_BUF_ERROR on testing inflate call - // when we check that all output data was flushed. - var allowBufError = false; - - if (this.ended) { return false; } - _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH); - - // Convert data if needed - if (typeof data === 'string') { - // Only binary strings can be decompressed on practice - strm.input = strings.binstring2buf(data); - } else if (toString.call(data) === '[object ArrayBuffer]') { - strm.input = new Uint8Array(data); - } else { - strm.input = data; - } - - strm.next_in = 0; - strm.avail_in = strm.input.length; - - do { - if (strm.avail_out === 0) { - strm.output = new utils.Buf8(chunkSize); - strm.next_out = 0; - strm.avail_out = chunkSize; - } - - status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */ - - if (status === c.Z_NEED_DICT && dictionary) { - status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); - } - - if (status === c.Z_BUF_ERROR && allowBufError === true) { - status = c.Z_OK; - allowBufError = false; - } - - if (status !== c.Z_STREAM_END && status !== c.Z_OK) { - this.onEnd(status); - this.ended = true; - return false; - } - - if (strm.next_out) { - if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) { - - if (this.options.to === 'string') { - - next_out_utf8 = strings.utf8border(strm.output, strm.next_out); - - tail = strm.next_out - next_out_utf8; - utf8str = strings.buf2string(strm.output, next_out_utf8); - - // move tail - strm.next_out = tail; - strm.avail_out = chunkSize - tail; - if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); } - - this.onData(utf8str); - - } else { - this.onData(utils.shrinkBuf(strm.output, strm.next_out)); - } - } - } - - // When no more input data, we should check that internal inflate buffers - // are flushed. The only way to do it when avail_out = 0 - run one more - // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. - // Here we set flag to process this error properly. - // - // NOTE. Deflate does not return error in this case and does not needs such - // logic. - if (strm.avail_in === 0 && strm.avail_out === 0) { - allowBufError = true; - } - - } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); - - if (status === c.Z_STREAM_END) { - _mode = c.Z_FINISH; - } - - // Finalize on the last chunk. - if (_mode === c.Z_FINISH) { - status = zlib_inflate.inflateEnd(this.strm); - this.onEnd(status); - this.ended = true; - return status === c.Z_OK; - } - - // callback interim results if Z_SYNC_FLUSH. - if (_mode === c.Z_SYNC_FLUSH) { - this.onEnd(c.Z_OK); - strm.avail_out = 0; - return true; - } - - return true; -}; - - -/** - * Inflate#onData(chunk) -> Void - * - chunk (Uint8Array|Array|String): output data. Type of array depends - * on js engine support. When string output requested, each chunk - * will be string. - * - * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. - **/ -Inflate.prototype.onData = function (chunk) { - this.chunks.push(chunk); -}; - - -/** - * Inflate#onEnd(status) -> Void - * - status (Number): inflate status. 0 (Z_OK) on success, - * other if not. - * - * Called either after you tell inflate that the input stream is - * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH) - * or if an error happened. By default - join collected chunks, - * free memory and fill `results` / `err` properties. - **/ -Inflate.prototype.onEnd = function (status) { - // On success - join - if (status === c.Z_OK) { - if (this.options.to === 'string') { - // Glue & convert here, until we teach pako to send - // utf8 aligned strings to onData - this.result = this.chunks.join(''); - } else { - this.result = utils.flattenChunks(this.chunks); - } - } - this.chunks = []; - this.err = status; - this.msg = this.strm.msg; -}; - - -/** - * inflate(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Decompress `data` with inflate/ungzip and `options`. Autodetect - * format via wrapper header by default. That's why we don't provide - * separate `ungzip` method. - * - * Supported options are: - * - * - windowBits - * - * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) - * for more information. - * - * Sugar (options): - * - * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify - * negative windowBits implicitly. - * - `to` (String) - if equal to 'string', then result will be converted - * from utf8 to utf16 (javascript) string. When string output requested, - * chunk length can differ from `chunkSize`, depending on content. - * - * - * ##### Example: - * - * ```javascript - * var pako = require('pako') - * , input = pako.deflate([1,2,3,4,5,6,7,8,9]) - * , output; - * - * try { - * output = pako.inflate(input); - * } catch (err) - * console.log(err); - * } - * ``` - **/ -function inflate(input, options) { - var inflator = new Inflate(options); - - inflator.push(input, true); - - // That will never happens, if you don't cheat with options :) - if (inflator.err) { throw inflator.msg || msg[inflator.err]; } - - return inflator.result; -} - - -/** - * inflateRaw(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * The same as [[inflate]], but creates raw data, without wrapper - * (header and adler32 crc). - **/ -function inflateRaw(input, options) { - options = options || {}; - options.raw = true; - return inflate(input, options); -} - - -/** - * ungzip(data[, options]) -> Uint8Array|Array|String - * - data (Uint8Array|Array|String): input data to decompress. - * - options (Object): zlib inflate options. - * - * Just shortcut to [[inflate]], because it autodetects format - * by header.content. Done for convenience. - **/ - - -exports.Inflate = Inflate; -exports.inflate = inflate; -exports.inflateRaw = inflateRaw; -exports.ungzip = inflate; - -},{"./utils/common":19,"./utils/strings":20,"./zlib/constants":22,"./zlib/gzheader":25,"./zlib/inflate":27,"./zlib/messages":29,"./zlib/zstream":31}],19:[function(require,module,exports){ -'use strict'; - -var TYPED_OK = (typeof Uint8Array !== 'undefined') && - (typeof Uint16Array !== 'undefined') && - (typeof Int32Array !== 'undefined'); - -function _has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); +},{}],7:[function(require,module,exports){ +"use strict"; +// DEFLATE is a complex format; to read this code, you should probably check the RFC first: +// https://tools.ietf.org/html/rfc1951 +// You may also wish to take a look at the guide I made about this program: +// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad +// Some of the following code is similar to that of UZIP.js: +// https://github.com/photopea/UZIP.js +// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size. +// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint +// is better for memory in most engines (I *think*). +var node_worker_1 = require("./node-worker.cjs"); +// aliases for shorter compressed code (most minifers don't do this) +var u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array; +// fixed length extra bits +var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]); +// fixed distance extra bits +// see fleb note +var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]); +// code length index map +var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); +// get base, reverse index map from extra bits +var freb = function (eb, start) { + var b = new u16(31); + for (var i = 0; i < 31; ++i) { + b[i] = start += 1 << eb[i - 1]; + } + // numbers here are at max 18 bits + var r = new u32(b[30]); + for (var i = 1; i < 30; ++i) { + for (var j = b[i]; j < b[i + 1]; ++j) { + r[j] = ((j - b[i]) << 5) | i; + } + } + return [b, r]; +}; +var _a = freb(fleb, 2), fl = _a[0], revfl = _a[1]; +// we can ignore the fact that the other numbers are wrong; they never happen anyway +fl[28] = 258, revfl[258] = 28; +var _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1]; +// map of value to reverse (assuming 16 bits) +var rev = new u16(32768); +for (var i = 0; i < 32768; ++i) { + // reverse table algorithm from SO + var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1); + x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2); + x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4); + rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1; } - -exports.assign = function (obj /*from1, from2, from3, ...*/) { - var sources = Array.prototype.slice.call(arguments, 1); - while (sources.length) { - var source = sources.shift(); - if (!source) { continue; } - - if (typeof source !== 'object') { - throw new TypeError(source + 'must be non-object'); +// create huffman tree from u8 "map": index -> code length for code index +// mb (max bits) must be at most 15 +// TODO: optimize/split up? +var hMap = (function (cd, mb, r) { + var s = cd.length; + // index + var i = 0; + // u16 "map": index -> # of codes with bit length = index + var l = new u16(mb); + // length of cd must be 288 (total # of codes) + for (; i < s; ++i) { + if (cd[i]) + ++l[cd[i] - 1]; + } + // u16 "map": index -> minimum code for bit length = index + var le = new u16(mb); + for (i = 0; i < mb; ++i) { + le[i] = (le[i - 1] + l[i - 1]) << 1; + } + var co; + if (r) { + // u16 "map": index -> number of actual bits, symbol for code + co = new u16(1 << mb); + // bits to remove for reverser + var rvb = 15 - mb; + for (i = 0; i < s; ++i) { + // ignore 0 lengths + if (cd[i]) { + // num encoding both symbol and bits read + var sv = (i << 4) | cd[i]; + // free bits + var r_1 = mb - cd[i]; + // start value + var v = le[cd[i] - 1]++ << r_1; + // m is end value + for (var m = v | ((1 << r_1) - 1); v <= m; ++v) { + // every 16 bit value starting with the code yields the same result + co[rev[v] >>> rvb] = sv; + } + } + } } - - for (var p in source) { - if (_has(source, p)) { - obj[p] = source[p]; - } + else { + co = new u16(s); + for (i = 0; i < s; ++i) { + if (cd[i]) { + co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]); + } + } } - } - - return obj; -}; - - -// reduce buffer size, avoiding mem copy -exports.shrinkBuf = function (buf, size) { - if (buf.length === size) { return buf; } - if (buf.subarray) { return buf.subarray(0, size); } - buf.length = size; - return buf; + return co; +}); +// fixed length tree +var flt = new u8(288); +for (var i = 0; i < 144; ++i) + flt[i] = 8; +for (var i = 144; i < 256; ++i) + flt[i] = 9; +for (var i = 256; i < 280; ++i) + flt[i] = 7; +for (var i = 280; i < 288; ++i) + flt[i] = 8; +// fixed distance tree +var fdt = new u8(32); +for (var i = 0; i < 32; ++i) + fdt[i] = 5; +// fixed length map +var flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1); +// fixed distance map +var fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1); +// find max of array +var max = function (a) { + var m = a[0]; + for (var i = 1; i < a.length; ++i) { + if (a[i] > m) + m = a[i]; + } + return m; +}; +// read d, starting at bit p and mask with m +var bits = function (d, p, m) { + var o = (p / 8) | 0; + return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m; +}; +// read d, starting at bit p continuing for at least 16 bits +var bits16 = function (d, p) { + var o = (p / 8) | 0; + return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7)); +}; +// get end of byte +var shft = function (p) { return ((p + 7) / 8) | 0; }; +// typed array slice - allows garbage collector to free original reference, +// while being more compatible than .slice +var slc = function (v, s, e) { + if (s == null || s < 0) + s = 0; + if (e == null || e > v.length) + e = v.length; + // can't use .constructor in case user-supplied + var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s); + n.set(v.subarray(s, e)); + return n; }; - - -var fnTyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - if (src.subarray && dest.subarray) { - dest.set(src.subarray(src_offs, src_offs + len), dest_offs); - return; - } - // Fallback to ordinary array - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; +/** + * Codes for errors generated within this library + */ +exports.FlateErrorCode = { + UnexpectedEOF: 0, + InvalidBlockType: 1, + InvalidLengthLiteral: 2, + InvalidDistance: 3, + StreamFinished: 4, + NoStreamHandler: 5, + InvalidHeader: 6, + NoCallback: 7, + InvalidUTF8: 8, + ExtraFieldTooLong: 9, + InvalidDate: 10, + FilenameTooLong: 11, + StreamFinishing: 12, + InvalidZipData: 13, + UnknownCompressionMethod: 14 +}; +// error codes +var ec = [ + 'unexpected EOF', + 'invalid block type', + 'invalid length/literal', + 'invalid distance', + 'stream finished', + 'no stream handler', + , + 'no callback', + 'invalid UTF-8 data', + 'extra field too long', + 'date not in range 1980-2099', + 'filename too long', + 'stream finishing', + 'invalid zip data' + // determined by unknown compression method +]; +; +var err = function (ind, msg, nt) { + var e = new Error(msg || ec[ind]); + e.code = ind; + if (Error.captureStackTrace) + Error.captureStackTrace(e, err); + if (!nt) + throw e; + return e; +}; +// expands raw DEFLATE data +var inflt = function (dat, buf, st) { + // source length + var sl = dat.length; + if (!sl || (st && st.f && !st.l)) + return buf || new u8(0); + // have to estimate size + var noBuf = !buf || st; + // no state + var noSt = !st || st.i; + if (!st) + st = {}; + // Assumes roughly 33% compression ratio average + if (!buf) + buf = new u8(sl * 3); + // ensure buffer can fit at least l elements + var cbuf = function (l) { + var bl = buf.length; + // need to increase size to fit + if (l > bl) { + // Double or set to necessary, whichever is greater + var nbuf = new u8(Math.max(bl * 2, l)); + nbuf.set(buf); + buf = nbuf; + } + }; + // last chunk bitpos bytes + var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n; + // total bits + var tbts = sl * 8; + do { + if (!lm) { + // BFINAL - this is only 1 when last chunk is next + final = bits(dat, pos, 1); + // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman + var type = bits(dat, pos + 1, 3); + pos += 3; + if (!type) { + // go to end of byte boundary + var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l; + if (t > sl) { + if (noSt) + err(0); + break; + } + // ensure size + if (noBuf) + cbuf(bt + l); + // Copy over uncompressed data + buf.set(dat.subarray(s, t), bt); + // Get new bitpos, update byte count + st.b = bt += l, st.p = pos = t * 8, st.f = final; + continue; + } + else if (type == 1) + lm = flrm, dm = fdrm, lbt = 9, dbt = 5; + else if (type == 2) { + // literal lengths + var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4; + var tl = hLit + bits(dat, pos + 5, 31) + 1; + pos += 14; + // length+distance tree + var ldt = new u8(tl); + // code length tree + var clt = new u8(19); + for (var i = 0; i < hcLen; ++i) { + // use index map to get real code + clt[clim[i]] = bits(dat, pos + i * 3, 7); + } + pos += hcLen * 3; + // code lengths bits + var clb = max(clt), clbmsk = (1 << clb) - 1; + // code lengths map + var clm = hMap(clt, clb, 1); + for (var i = 0; i < tl;) { + var r = clm[bits(dat, pos, clbmsk)]; + // bits read + pos += r & 15; + // symbol + var s = r >>> 4; + // code length to copy + if (s < 16) { + ldt[i++] = s; + } + else { + // copy count + var c = 0, n = 0; + if (s == 16) + n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1]; + else if (s == 17) + n = 3 + bits(dat, pos, 7), pos += 3; + else if (s == 18) + n = 11 + bits(dat, pos, 127), pos += 7; + while (n--) + ldt[i++] = c; + } + } + // length tree distance tree + var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit); + // max length bits + lbt = max(lt); + // max dist bits + dbt = max(dt); + lm = hMap(lt, lbt, 1); + dm = hMap(dt, dbt, 1); + } + else + err(1); + if (pos > tbts) { + if (noSt) + err(0); + break; + } + } + // Make sure the buffer can hold this + the largest possible addition + // Maximum chunk size (practically, theoretically infinite) is 2^17; + if (noBuf) + cbuf(bt + 131072); + var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1; + var lpos = pos; + for (;; lpos = pos) { + // bits read, code + var c = lm[bits16(dat, pos) & lms], sym = c >>> 4; + pos += c & 15; + if (pos > tbts) { + if (noSt) + err(0); + break; + } + if (!c) + err(2); + if (sym < 256) + buf[bt++] = sym; + else if (sym == 256) { + lpos = pos, lm = null; + break; + } + else { + var add = sym - 254; + // no extra bits needed if less + if (sym > 264) { + // index + var i = sym - 257, b = fleb[i]; + add = bits(dat, pos, (1 << b) - 1) + fl[i]; + pos += b; + } + // dist + var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4; + if (!d) + err(3); + pos += d & 15; + var dt = fd[dsym]; + if (dsym > 3) { + var b = fdeb[dsym]; + dt += bits16(dat, pos) & ((1 << b) - 1), pos += b; + } + if (pos > tbts) { + if (noSt) + err(0); + break; + } + if (noBuf) + cbuf(bt + 131072); + var end = bt + add; + for (; bt < end; bt += 4) { + buf[bt] = buf[bt - dt]; + buf[bt + 1] = buf[bt + 1 - dt]; + buf[bt + 2] = buf[bt + 2 - dt]; + buf[bt + 3] = buf[bt + 3 - dt]; + } + bt = end; + } + } + st.l = lm, st.p = lpos, st.b = bt, st.f = final; + if (lm) + final = 1, st.m = lbt, st.d = dm, st.n = dbt; + } while (!final); + return bt == buf.length ? buf : slc(buf, 0, bt); +}; +// starting at p, write the minimum number of bits that can hold v to d +var wbits = function (d, p, v) { + v <<= p & 7; + var o = (p / 8) | 0; + d[o] |= v; + d[o + 1] |= v >>> 8; +}; +// starting at p, write the minimum number of bits (>8) that can hold v to d +var wbits16 = function (d, p, v) { + v <<= p & 7; + var o = (p / 8) | 0; + d[o] |= v; + d[o + 1] |= v >>> 8; + d[o + 2] |= v >>> 16; +}; +// creates code lengths from a frequency table +var hTree = function (d, mb) { + // Need extra info to make a tree + var t = []; + for (var i = 0; i < d.length; ++i) { + if (d[i]) + t.push({ s: i, f: d[i] }); + } + var s = t.length; + var t2 = t.slice(); + if (!s) + return [et, 0]; + if (s == 1) { + var v = new u8(t[0].s + 1); + v[t[0].s] = 1; + return [v, 1]; + } + t.sort(function (a, b) { return a.f - b.f; }); + // after i2 reaches last ind, will be stopped + // freq must be greater than largest possible number of symbols + t.push({ s: -1, f: 25001 }); + var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2; + t[0] = { s: -1, f: l.f + r.f, l: l, r: r }; + // efficient algorithm from UZIP.js + // i0 is lookbehind, i2 is lookahead - after processing two low-freq + // symbols that combined have high freq, will start processing i2 (high-freq, + // non-composite) symbols instead + // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/ + while (i1 != s - 1) { + l = t[t[i0].f < t[i2].f ? i0++ : i2++]; + r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++]; + t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r }; + } + var maxSym = t2[0].s; + for (var i = 1; i < s; ++i) { + if (t2[i].s > maxSym) + maxSym = t2[i].s; + } + // code lengths + var tr = new u16(maxSym + 1); + // max bits in tree + var mbt = ln(t[i1 - 1], tr, 0); + if (mbt > mb) { + // more algorithms from UZIP.js + // TODO: find out how this code works (debt) + // ind debt + var i = 0, dt = 0; + // left cost + var lft = mbt - mb, cst = 1 << lft; + t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; }); + for (; i < s; ++i) { + var i2_1 = t2[i].s; + if (tr[i2_1] > mb) { + dt += cst - (1 << (mbt - tr[i2_1])); + tr[i2_1] = mb; + } + else + break; + } + dt >>>= lft; + while (dt > 0) { + var i2_2 = t2[i].s; + if (tr[i2_2] < mb) + dt -= 1 << (mb - tr[i2_2]++ - 1); + else + ++i; + } + for (; i >= 0 && dt; --i) { + var i2_3 = t2[i].s; + if (tr[i2_3] == mb) { + --tr[i2_3]; + ++dt; + } + } + mbt = mb; + } + return [new u8(tr), mbt]; +}; +// get the max length and assign length codes +var ln = function (n, l, d) { + return n.s == -1 + ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) + : (l[n.s] = d); +}; +// length codes generation +var lc = function (c) { + var s = c.length; + // Note that the semicolon was intentional + while (s && !c[--s]) + ; + var cl = new u16(++s); + // ind num streak + var cli = 0, cln = c[0], cls = 1; + var w = function (v) { cl[cli++] = v; }; + for (var i = 1; i <= s; ++i) { + if (c[i] == cln && i != s) + ++cls; + else { + if (!cln && cls > 2) { + for (; cls > 138; cls -= 138) + w(32754); + if (cls > 2) { + w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305); + cls = 0; + } + } + else if (cls > 3) { + w(cln), --cls; + for (; cls > 6; cls -= 6) + w(8304); + if (cls > 2) + w(((cls - 3) << 5) | 8208), cls = 0; + } + while (cls--) + w(cln); + cls = 1; + cln = c[i]; + } + } + return [cl.subarray(0, cli), s]; +}; +// calculate the length of output from tree, code lengths +var clen = function (cf, cl) { + var l = 0; + for (var i = 0; i < cl.length; ++i) + l += cf[i] * cl[i]; + return l; +}; +// writes a fixed block +// returns the new bit pos +var wfblk = function (out, pos, dat) { + // no need to write 00 as type: TypedArray defaults to 0 + var s = dat.length; + var o = shft(pos + 2); + out[o] = s & 255; + out[o + 1] = s >>> 8; + out[o + 2] = out[o] ^ 255; + out[o + 3] = out[o + 1] ^ 255; + for (var i = 0; i < s; ++i) + out[o + i + 4] = dat[i]; + return (o + 4 + s) * 8; +}; +// writes a block +var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) { + wbits(out, p++, final); + ++lf[256]; + var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1]; + var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1]; + var _c = lc(dlt), lclt = _c[0], nlc = _c[1]; + var _d = lc(ddt), lcdt = _d[0], ndc = _d[1]; + var lcfreq = new u16(19); + for (var i = 0; i < lclt.length; ++i) + lcfreq[lclt[i] & 31]++; + for (var i = 0; i < lcdt.length; ++i) + lcfreq[lcdt[i] & 31]++; + var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1]; + var nlcc = 19; + for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc) + ; + var flen = (bl + 5) << 3; + var ftlen = clen(lf, flt) + clen(df, fdt) + eb; + var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]); + if (flen <= ftlen && flen <= dtlen) + return wfblk(out, p, dat.subarray(bs, bs + bl)); + var lm, ll, dm, dl; + wbits(out, p, 1 + (dtlen < ftlen)), p += 2; + if (dtlen < ftlen) { + lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt; + var llm = hMap(lct, mlcb, 0); + wbits(out, p, nlc - 257); + wbits(out, p + 5, ndc - 1); + wbits(out, p + 10, nlcc - 4); + p += 14; + for (var i = 0; i < nlcc; ++i) + wbits(out, p + 3 * i, lct[clim[i]]); + p += 3 * nlcc; + var lcts = [lclt, lcdt]; + for (var it = 0; it < 2; ++it) { + var clct = lcts[it]; + for (var i = 0; i < clct.length; ++i) { + var len = clct[i] & 31; + wbits(out, p, llm[len]), p += lct[len]; + if (len > 15) + wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12; + } + } } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - var i, l, len, pos, chunk, result; - - // calculate data length - len = 0; - for (i = 0, l = chunks.length; i < l; i++) { - len += chunks[i].length; + else { + lm = flm, ll = flt, dm = fdm, dl = fdt; + } + for (var i = 0; i < li; ++i) { + if (syms[i] > 255) { + var len = (syms[i] >>> 18) & 31; + wbits16(out, p, lm[len + 257]), p += ll[len + 257]; + if (len > 7) + wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len]; + var dst = syms[i] & 31; + wbits16(out, p, dm[dst]), p += dl[dst]; + if (dst > 3) + wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst]; + } + else { + wbits16(out, p, lm[syms[i]]), p += ll[syms[i]]; + } + } + wbits16(out, p, lm[256]); + return p + ll[256]; +}; +// deflate options (nice << 13) | chain +var deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]); +// empty +var et = /*#__PURE__*/ new u8(0); +// compresses data into a raw DEFLATE buffer +var dflt = function (dat, lvl, plvl, pre, post, lst) { + var s = dat.length; + var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post); + // writing to this writes to the output buffer + var w = o.subarray(pre, o.length - post); + var pos = 0; + if (!lvl || s < 8) { + for (var i = 0; i <= s; i += 65535) { + // end + var e = i + 65535; + if (e >= s) { + // write final block + w[pos >> 3] = lst; + } + pos = wfblk(w, pos + 1, dat.subarray(i, e)); + } } - - // join chunks - result = new Uint8Array(len); - pos = 0; - for (i = 0, l = chunks.length; i < l; i++) { - chunk = chunks[i]; - result.set(chunk, pos); - pos += chunk.length; + else { + var opt = deo[lvl - 1]; + var n = opt >>> 13, c = opt & 8191; + var msk_1 = (1 << plvl) - 1; + // prev 2-byte val map curr 2-byte val map + var prev = new u16(32768), head = new u16(msk_1 + 1); + var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1; + var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; }; + // 24576 is an arbitrary number of maximum symbols per block + // 424 buffer for last block + var syms = new u32(25000); + // length/literal freq distance freq + var lf = new u16(288), df = new u16(32); + // l/lcnt exbits index l/lind waitdx bitpos + var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0; + for (; i < s; ++i) { + // hash value + // deopt when i > s - 3 - at end, deopt acceptable + var hv = hsh(i); + // index mod 32768 previous index mod + var imod = i & 32767, pimod = head[hv]; + prev[imod] = pimod; + head[hv] = imod; + // We always should modify head and prev, but only add symbols if + // this data is not yet processed ("wait" for wait index) + if (wi <= i) { + // bytes remaining + var rem = s - i; + if ((lc_1 > 7000 || li > 24576) && rem > 423) { + pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos); + li = lc_1 = eb = 0, bs = i; + for (var j = 0; j < 286; ++j) + lf[j] = 0; + for (var j = 0; j < 30; ++j) + df[j] = 0; + } + // len dist chain + var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767; + if (rem > 2 && hv == hsh(i - dif)) { + var maxn = Math.min(n, rem) - 1; + var maxd = Math.min(32767, i); + // max possible length + // not capped at dif because decompressors implement "rolling" index population + var ml = Math.min(258, rem); + while (dif <= maxd && --ch_1 && imod != pimod) { + if (dat[i + l] == dat[i + l - dif]) { + var nl = 0; + for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl) + ; + if (nl > l) { + l = nl, d = dif; + // break out early when we reach "nice" (we are satisfied enough) + if (nl > maxn) + break; + // now, find the rarest 2-byte sequence within this + // length of literals and search for that instead. + // Much faster than just using the start + var mmd = Math.min(dif, nl - 2); + var md = 0; + for (var j = 0; j < mmd; ++j) { + var ti = (i - dif + j + 32768) & 32767; + var pti = prev[ti]; + var cd = (ti - pti + 32768) & 32767; + if (cd > md) + md = cd, pimod = ti; + } + } + } + // check the previous match + imod = pimod, pimod = prev[imod]; + dif += (imod - pimod + 32768) & 32767; + } + } + // d will be nonzero only when a match was found + if (d) { + // store both dist and len data in one Uint32 + // Make sure this is recognized as a len/dist with 28th bit (2^28) + syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d]; + var lin = revfl[l] & 31, din = revfd[d] & 31; + eb += fleb[lin] + fdeb[din]; + ++lf[257 + lin]; + ++df[din]; + wi = i + l; + ++lc_1; + } + else { + syms[li++] = dat[i]; + ++lf[dat[i]]; + } + } + } + pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos); + // this is the easiest way to avoid needing to maintain state + if (!lst && pos & 7) + pos = wfblk(w, pos + 1, et); } - - return result; - } + return slc(o, 0, pre + shft(pos) + post); }; - -var fnUntyped = { - arraySet: function (dest, src, src_offs, len, dest_offs) { - for (var i = 0; i < len; i++) { - dest[dest_offs + i] = src[src_offs + i]; +// CRC32 table +var crct = /*#__PURE__*/ (function () { + var t = new Int32Array(256); + for (var i = 0; i < 256; ++i) { + var c = i, k = 9; + while (--k) + c = ((c & 1) && -306674912) ^ (c >>> 1); + t[i] = c; } - }, - // Join array of chunks to single array. - flattenChunks: function (chunks) { - return [].concat.apply([], chunks); - } -}; - - -// Enable/Disable typed arrays use, for testing -// -exports.setTyped = function (on) { - if (on) { - exports.Buf8 = Uint8Array; - exports.Buf16 = Uint16Array; - exports.Buf32 = Int32Array; - exports.assign(exports, fnTyped); - } else { - exports.Buf8 = Array; - exports.Buf16 = Array; - exports.Buf32 = Array; - exports.assign(exports, fnUntyped); - } + return t; +})(); +// CRC32 +var crc = function () { + var c = -1; + return { + p: function (d) { + // closures have awful performance + var cr = c; + for (var i = 0; i < d.length; ++i) + cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8); + c = cr; + }, + d: function () { return ~c; } + }; }; - -exports.setTyped(TYPED_OK); - -},{}],20:[function(require,module,exports){ -// String encode/decode helpers -'use strict'; - - -var utils = require('./common'); - - -// Quick check if we can use fast array to bin string conversion -// -// - apply(Array) can fail on Android 2.2 -// - apply(Uint8Array) can fail on iOS 5.1 Safari -// -var STR_APPLY_OK = true; -var STR_APPLY_UIA_OK = true; - -try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; } -try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; } - - -// Table with utf8 lengths (calculated by first byte of sequence) -// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, -// because max possible codepoint is 0x10ffff -var _utf8len = new utils.Buf8(256); -for (var q = 0; q < 256; q++) { - _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1); -} -_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start - - -// convert string to array (typed, when possible) -exports.string2buf = function (str) { - var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; - - // count binary size - for (m_pos = 0; m_pos < str_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; - } - - // allocate buffer - buf = new utils.Buf8(buf_len); - - // convert - for (i = 0, m_pos = 0; i < buf_len; m_pos++) { - c = str.charCodeAt(m_pos); - if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) { - c2 = str.charCodeAt(m_pos + 1); - if ((c2 & 0xfc00) === 0xdc00) { - c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); - m_pos++; - } - } - if (c < 0x80) { - /* one byte */ - buf[i++] = c; - } else if (c < 0x800) { - /* two bytes */ - buf[i++] = 0xC0 | (c >>> 6); - buf[i++] = 0x80 | (c & 0x3f); - } else if (c < 0x10000) { - /* three bytes */ - buf[i++] = 0xE0 | (c >>> 12); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } else { - /* four bytes */ - buf[i++] = 0xf0 | (c >>> 18); - buf[i++] = 0x80 | (c >>> 12 & 0x3f); - buf[i++] = 0x80 | (c >>> 6 & 0x3f); - buf[i++] = 0x80 | (c & 0x3f); - } - } - - return buf; +// Alder32 +var adler = function () { + var a = 1, b = 0; + return { + p: function (d) { + // closures have awful performance + var n = a, m = b; + var l = d.length | 0; + for (var i = 0; i != l;) { + var e = Math.min(i + 2655, l); + for (; i < e; ++i) + m += n += d[i]; + n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16); + } + a = n, b = m; + }, + d: function () { + a %= 65521, b %= 65521; + return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8); + } + }; }; - -// Helper (used in 2 places) -function buf2binstring(buf, len) { - // On Chrome, the arguments in a function call that are allowed is `65534`. - // If the length of the buffer is smaller than that, we can use this optimization, - // otherwise we will take a slower path. - if (len < 65534) { - if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) { - return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); - } - } - - var result = ''; - for (var i = 0; i < len; i++) { - result += String.fromCharCode(buf[i]); - } - return result; +; +// deflate with opts +var dopt = function (dat, opt, pre, post, st) { + return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st); +}; +// Walmart object spread +var mrg = function (a, b) { + var o = {}; + for (var k in a) + o[k] = a[k]; + for (var k in b) + o[k] = b[k]; + return o; +}; +// worker clone +// This is possibly the craziest part of the entire codebase, despite how simple it may seem. +// The only parameter to this function is a closure that returns an array of variables outside of the function scope. +// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization. +// We will return an object mapping of true variable name to value (basically, the current scope as a JS object). +// The reason we can't just use the original variable names is minifiers mangling the toplevel scope. +// This took me three weeks to figure out how to do. +var wcln = function (fn, fnStr, td) { + var dt = fn(); + var st = fn.toString(); + var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\s+/g, '').split(','); + for (var i = 0; i < dt.length; ++i) { + var v = dt[i], k = ks[i]; + if (typeof v == 'function') { + fnStr += ';' + k + '='; + var st_1 = v.toString(); + if (v.prototype) { + // for global objects + if (st_1.indexOf('[native code]') != -1) { + var spInd = st_1.indexOf(' ', 8) + 1; + fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd)); + } + else { + fnStr += st_1; + for (var t in v.prototype) + fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString(); + } + } + else + fnStr += st_1; + } + else + td[k] = v; + } + return [fnStr, td]; +}; +var ch = []; +// clone bufs +var cbfs = function (v) { + var tl = []; + for (var k in v) { + if (v[k].buffer) { + tl.push((v[k] = new v[k].constructor(v[k])).buffer); + } + } + return tl; +}; +// use a worker to execute code +var wrkr = function (fns, init, id, cb) { + var _a; + if (!ch[id]) { + var fnStr = '', td_1 = {}, m = fns.length - 1; + for (var i = 0; i < m; ++i) + _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1]; + ch[id] = wcln(fns[m], fnStr, td_1); + } + var td = mrg({}, ch[id][1]); + return node_worker_1["default"](ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb); +}; +// base async inflate fn +var bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; }; +var bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; }; +// gzip extra +var gze = function () { return [gzh, gzhl, wbytes, crc, crct]; }; +// gunzip extra +var guze = function () { return [gzs, gzl]; }; +// zlib extra +var zle = function () { return [zlh, wbytes, adler]; }; +// unzlib extra +var zule = function () { return [zlv]; }; +// post buf +var pbf = function (msg) { return postMessage(msg, [msg.buffer]); }; +// get u8 +var gu8 = function (o) { return o && o.size && new u8(o.size); }; +// async helper +var cbify = function (dat, opts, fns, init, id, cb) { + var w = wrkr(fns, init, id, function (err, dat) { + w.terminate(); + cb(err, dat); + }); + w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []); + return function () { w.terminate(); }; +}; +// auto stream +var astrm = function (strm) { + strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); }; + return function (ev) { return strm.push(ev.data[0], ev.data[1]); }; +}; +// async stream attach +var astrmify = function (fns, strm, opts, init, id) { + var t; + var w = wrkr(fns, init, id, function (err, dat) { + if (err) + w.terminate(), strm.ondata.call(strm, err); + else { + if (dat[1]) + w.terminate(); + strm.ondata.call(strm, err, dat[0], dat[1]); + } + }); + w.postMessage(opts); + strm.push = function (d, f) { + if (!strm.ondata) + err(5); + if (t) + strm.ondata(err(4, 0, 1), null, !!f); + w.postMessage([d, t = f], [d.buffer]); + }; + strm.terminate = function () { w.terminate(); }; +}; +// read 2 bytes +var b2 = function (d, b) { return d[b] | (d[b + 1] << 8); }; +// read 4 bytes +var b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; }; +var b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); }; +// write bytes +var wbytes = function (d, b, v) { + for (; v; ++b) + d[b] = v, v >>>= 8; +}; +// gzip header +var gzh = function (c, o) { + var fn = o.filename; + c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix + if (o.mtime != 0) + wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000)); + if (fn) { + c[3] = 8; + for (var i = 0; i <= fn.length; ++i) + c[i + 10] = fn.charCodeAt(i); + } +}; +// gzip footer: -8 to -4 = CRC, -4 to -0 is length +// gzip start +var gzs = function (d) { + if (d[0] != 31 || d[1] != 139 || d[2] != 8) + err(6, 'invalid gzip data'); + var flg = d[3]; + var st = 10; + if (flg & 4) + st += d[10] | (d[11] << 8) + 2; + for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++]) + ; + return st + (flg & 2); +}; +// gzip length +var gzl = function (d) { + var l = d.length; + return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0; +}; +// gzip header length +var gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); }; +// zlib header +var zlh = function (c, o) { + var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2; + c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1); +}; +// zlib valid +var zlv = function (d) { + if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31)) + err(6, 'invalid zlib data'); + if (d[1] & 32) + err(6, 'invalid zlib data: preset dictionaries not supported'); +}; +function AsyncCmpStrm(opts, cb) { + if (!cb && typeof opts == 'function') + cb = opts, opts = {}; + this.ondata = cb; + return opts; } - - -// Convert byte array to binary string -exports.buf2binstring = function (buf) { - return buf2binstring(buf, buf.length); -}; - - -// Convert binary string (typed, when possible) -exports.binstring2buf = function (str) { - var buf = new utils.Buf8(str.length); - for (var i = 0, len = buf.length; i < len; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}; - - -// convert array to string -exports.buf2string = function (buf, max) { - var i, out, c, c_len; - var len = max || buf.length; - - // Reserve max possible length (2 words per char) - // NB: by unknown reasons, Array is significantly faster for - // String.fromCharCode.apply than Uint16Array. - var utf16buf = new Array(len * 2); - - for (out = 0, i = 0; i < len;) { - c = buf[i++]; - // quick process ascii - if (c < 0x80) { utf16buf[out++] = c; continue; } - - c_len = _utf8len[c]; - // skip 5 & 6 byte codes - if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; } - - // apply mask on first byte - c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; - // join the rest - while (c_len > 1 && i < len) { - c = (c << 6) | (buf[i++] & 0x3f); - c_len--; - } - - // terminated by end of string? - if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } - - if (c < 0x10000) { - utf16buf[out++] = c; - } else { - c -= 0x10000; - utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); - utf16buf[out++] = 0xdc00 | (c & 0x3ff); - } - } - - return buf2binstring(utf16buf, out); -}; - - -// Calculate max possible position in utf8 buffer, -// that will not break sequence. If that's not possible -// - (very small limits) return max size as is. -// -// buf[] - utf8 bytes array -// max - length limit (mandatory); -exports.utf8border = function (buf, max) { - var pos; - - max = max || buf.length; - if (max > buf.length) { max = buf.length; } - - // go back from last position, until start of sequence found - pos = max - 1; - while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } - - // Very small and broken sequence, - // return max, because we should return something anyway. - if (pos < 0) { return max; } - - // If we came to start of buffer - that means buffer is too small, - // return max too. - if (pos === 0) { return max; } - - return (pos + _utf8len[buf[pos]] > max) ? pos : max; -}; - -},{"./common":19}],21:[function(require,module,exports){ -'use strict'; - -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; - - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; - - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); - - s1 %= 65521; - s2 %= 65521; - } - - return (s1 | (s2 << 16)) |0; +// zlib footer: -4 to -0 is Adler32 +/** + * Streaming DEFLATE compression + */ +var Deflate = /*#__PURE__*/ (function () { + function Deflate(opts, cb) { + if (!cb && typeof opts == 'function') + cb = opts, opts = {}; + this.ondata = cb; + this.o = opts || {}; + } + Deflate.prototype.p = function (c, f) { + this.ondata(dopt(c, this.o, 0, 0, !f), f); + }; + /** + * Pushes a chunk to be deflated + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Deflate.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + if (this.d) + err(4); + this.d = final; + this.p(chunk, final || false); + }; + return Deflate; +}()); +exports.Deflate = Deflate; +/** + * Asynchronous streaming DEFLATE compression + */ +var AsyncDeflate = /*#__PURE__*/ (function () { + function AsyncDeflate(opts, cb) { + astrmify([ + bDflt, + function () { return [astrm, Deflate]; } + ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) { + var strm = new Deflate(ev.data); + onmessage = astrm(strm); + }, 6); + } + return AsyncDeflate; +}()); +exports.AsyncDeflate = AsyncDeflate; +function deflate(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bDflt, + ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb); } - - -module.exports = adler32; - -},{}],22:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - - /* Allowed flush values; see deflate() and inflate() below for details */ - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - - /* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - //Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - //Z_VERSION_ERROR: -6, - - /* compression levels */ - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - - - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - - /* Possible values of the data_type field (though see inflate()) */ - Z_BINARY: 0, - Z_TEXT: 1, - //Z_ASCII: 1, // = Z_TEXT (deprecated) - Z_UNKNOWN: 2, - - /* The deflate compression method */ - Z_DEFLATED: 8 - //Z_NULL: null // Use -1 or null inline, depending on var type -}; - -},{}],23:[function(require,module,exports){ -'use strict'; - -// Note: we can't get significant speed boost here. -// So write code to minimize size - no pregenerated tables -// and array tools dependencies. - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// Use ordinary array, since untyped makes no boost here -function makeTable() { - var c, table = []; - - for (var n = 0; n < 256; n++) { - c = n; - for (var k = 0; k < 8; k++) { - c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); - } - table[n] = c; - } - - return table; +exports.deflate = deflate; +/** + * Compresses data with DEFLATE without any wrapper + * @param data The data to compress + * @param opts The compression options + * @returns The deflated version of the data + */ +function deflateSync(data, opts) { + return dopt(data, opts || {}, 0, 0); } - -// Create table on load. Just 255 signed longs. Not a problem. -var crcTable = makeTable(); - - -function crc32(crc, buf, len, pos) { - var t = crcTable, - end = pos + len; - - crc ^= -1; - - for (var i = pos; i < end; i++) { - crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; - } - - return (crc ^ (-1)); // >>> 0; +exports.deflateSync = deflateSync; +/** + * Streaming DEFLATE decompression + */ +var Inflate = /*#__PURE__*/ (function () { + /** + * Creates an inflation stream + * @param cb The callback to call whenever data is inflated + */ + function Inflate(cb) { + this.s = {}; + this.p = new u8(0); + this.ondata = cb; + } + Inflate.prototype.e = function (c) { + if (!this.ondata) + err(5); + if (this.d) + err(4); + var l = this.p.length; + var n = new u8(l + c.length); + n.set(this.p), n.set(c, l), this.p = n; + }; + Inflate.prototype.c = function (final) { + this.d = this.s.i = final || false; + var bts = this.s.b; + var dt = inflt(this.p, this.o, this.s); + this.ondata(slc(dt, bts, this.s.b), this.d); + this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length; + this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7; + }; + /** + * Pushes a chunk to be inflated + * @param chunk The chunk to push + * @param final Whether this is the final chunk + */ + Inflate.prototype.push = function (chunk, final) { + this.e(chunk), this.c(final); + }; + return Inflate; +}()); +exports.Inflate = Inflate; +/** + * Asynchronous streaming DEFLATE decompression + */ +var AsyncInflate = /*#__PURE__*/ (function () { + /** + * Creates an asynchronous inflation stream + * @param cb The callback to call whenever data is deflated + */ + function AsyncInflate(cb) { + this.ondata = cb; + astrmify([ + bInflt, + function () { return [astrm, Inflate]; } + ], this, 0, function () { + var strm = new Inflate(); + onmessage = astrm(strm); + }, 7); + } + return AsyncInflate; +}()); +exports.AsyncInflate = AsyncInflate; +function inflate(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bInflt + ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb); } - - -module.exports = crc32; - -},{}],24:[function(require,module,exports){ -'use strict'; - -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var trees = require('./trees'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var msg = require('./messages'); - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -var Z_NO_FLUSH = 0; -var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -//var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. +exports.inflate = inflate; +/** + * Expands DEFLATE data with no wrapper + * @param data The data to decompress + * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. + * @returns The decompressed version of the data */ -var Z_OK = 0; -var Z_STREAM_END = 1; -//var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -//var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - - -/* compression levels */ -//var Z_NO_COMPRESSION = 0; -//var Z_BEST_SPEED = 1; -//var Z_BEST_COMPRESSION = 9; -var Z_DEFAULT_COMPRESSION = -1; - - -var Z_FILTERED = 1; -var Z_HUFFMAN_ONLY = 2; -var Z_RLE = 3; -var Z_FIXED = 4; -var Z_DEFAULT_STRATEGY = 0; - -/* Possible values of the data_type field (though see inflate()) */ -//var Z_BINARY = 0; -//var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; - - -/* The deflate compression method */ -var Z_DEFLATED = 8; - -/*============================================================================*/ - - -var MAX_MEM_LEVEL = 9; -/* Maximum value for memLevel in deflateInit2 */ -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_MEM_LEVEL = 8; - - -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ -var LITERALS = 256; -/* number of literal bytes 0..255 */ -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ - -var MIN_MATCH = 3; -var MAX_MATCH = 258; -var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -var PRESET_DICT = 0x20; - -var INIT_STATE = 42; -var EXTRA_STATE = 69; -var NAME_STATE = 73; -var COMMENT_STATE = 91; -var HCRC_STATE = 103; -var BUSY_STATE = 113; -var FINISH_STATE = 666; - -var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ -var BS_BLOCK_DONE = 2; /* block flush performed */ -var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ -var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ - -var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. - -function err(strm, errorCode) { - strm.msg = msg[errorCode]; - return errorCode; +function inflateSync(data, out) { + return inflt(data, out); } - -function rank(f) { - return ((f) << 1) - ((f) > 4 ? 9 : 0); +exports.inflateSync = inflateSync; +// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize. +/** + * Streaming GZIP compression + */ +var Gzip = /*#__PURE__*/ (function () { + function Gzip(opts, cb) { + this.c = crc(); + this.l = 0; + this.v = 1; + Deflate.call(this, opts, cb); + } + /** + * Pushes a chunk to be GZIPped + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Gzip.prototype.push = function (chunk, final) { + Deflate.prototype.push.call(this, chunk, final); + }; + Gzip.prototype.p = function (c, f) { + this.c.p(c); + this.l += c.length; + var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f); + if (this.v) + gzh(raw, this.o), this.v = 0; + if (f) + wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l); + this.ondata(raw, f); + }; + return Gzip; +}()); +exports.Gzip = Gzip; +exports.Compress = Gzip; +/** + * Asynchronous streaming GZIP compression + */ +var AsyncGzip = /*#__PURE__*/ (function () { + function AsyncGzip(opts, cb) { + astrmify([ + bDflt, + gze, + function () { return [astrm, Deflate, Gzip]; } + ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) { + var strm = new Gzip(ev.data); + onmessage = astrm(strm); + }, 8); + } + return AsyncGzip; +}()); +exports.AsyncGzip = AsyncGzip; +exports.AsyncCompress = AsyncGzip; +function gzip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bDflt, + gze, + function () { return [gzipSync]; } + ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb); } - -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } - - -/* ========================================================================= - * Flush as much pending output as possible. All deflate() output goes - * through this function so some applications may wish to modify it - * to avoid allocating a large strm->output buffer and copying into it. - * (See also read_buf()). +exports.gzip = gzip; +exports.compress = gzip; +/** + * Compresses data with GZIP + * @param data The data to compress + * @param opts The compression options + * @returns The gzipped version of the data */ -function flush_pending(strm) { - var s = strm.state; - - //_tr_flush_bits(s); - var len = s.pending; - if (len > strm.avail_out) { - len = strm.avail_out; - } - if (len === 0) { return; } - - utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); - strm.next_out += len; - s.pending_out += len; - strm.total_out += len; - strm.avail_out -= len; - s.pending -= len; - if (s.pending === 0) { - s.pending_out = 0; - } +function gzipSync(data, opts) { + if (!opts) + opts = {}; + var c = crc(), l = data.length; + c.p(data); + var d = dopt(data, opts, gzhl(opts), 8), s = d.length; + return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d; } - - -function flush_block_only(s, last) { - trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); - s.block_start = s.strstart; - flush_pending(s.strm); +exports.gzipSync = gzipSync; +exports.compressSync = gzipSync; +/** + * Streaming GZIP decompression + */ +var Gunzip = /*#__PURE__*/ (function () { + /** + * Creates a GUNZIP stream + * @param cb The callback to call whenever data is inflated + */ + function Gunzip(cb) { + this.v = 1; + Inflate.call(this, cb); + } + /** + * Pushes a chunk to be GUNZIPped + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Gunzip.prototype.push = function (chunk, final) { + Inflate.prototype.e.call(this, chunk); + if (this.v) { + var s = this.p.length > 3 ? gzs(this.p) : 4; + if (s >= this.p.length && !final) + return; + this.p = this.p.subarray(s), this.v = 0; + } + if (final) { + if (this.p.length < 8) + err(6, 'invalid gzip data'); + this.p = this.p.subarray(0, -8); + } + // necessary to prevent TS from using the closure value + // This allows for workerization to function correctly + Inflate.prototype.c.call(this, final); + }; + return Gunzip; +}()); +exports.Gunzip = Gunzip; +/** + * Asynchronous streaming GZIP decompression + */ +var AsyncGunzip = /*#__PURE__*/ (function () { + /** + * Creates an asynchronous GUNZIP stream + * @param cb The callback to call whenever data is deflated + */ + function AsyncGunzip(cb) { + this.ondata = cb; + astrmify([ + bInflt, + guze, + function () { return [astrm, Inflate, Gunzip]; } + ], this, 0, function () { + var strm = new Gunzip(); + onmessage = astrm(strm); + }, 9); + } + return AsyncGunzip; +}()); +exports.AsyncGunzip = AsyncGunzip; +function gunzip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bInflt, + guze, + function () { return [gunzipSync]; } + ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb); } - - -function put_byte(s, b) { - s.pending_buf[s.pending++] = b; +exports.gunzip = gunzip; +/** + * Expands GZIP data + * @param data The data to decompress + * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory. + * @returns The decompressed version of the data + */ +function gunzipSync(data, out) { + return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data))); } - - -/* ========================================================================= - * Put a short in the pending buffer. The 16-bit value is put in MSB order. - * IN assertion: the stream state is correct and there is enough room in - * pending_buf. +exports.gunzipSync = gunzipSync; +/** + * Streaming Zlib compression + */ +var Zlib = /*#__PURE__*/ (function () { + function Zlib(opts, cb) { + this.c = adler(); + this.v = 1; + Deflate.call(this, opts, cb); + } + /** + * Pushes a chunk to be zlibbed + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Zlib.prototype.push = function (chunk, final) { + Deflate.prototype.push.call(this, chunk, final); + }; + Zlib.prototype.p = function (c, f) { + this.c.p(c); + var raw = dopt(c, this.o, this.v && 2, f && 4, !f); + if (this.v) + zlh(raw, this.o), this.v = 0; + if (f) + wbytes(raw, raw.length - 4, this.c.d()); + this.ondata(raw, f); + }; + return Zlib; +}()); +exports.Zlib = Zlib; +/** + * Asynchronous streaming Zlib compression */ -function putShortMSB(s, b) { -// put_byte(s, (Byte)(b >> 8)); -// put_byte(s, (Byte)(b & 0xff)); - s.pending_buf[s.pending++] = (b >>> 8) & 0xff; - s.pending_buf[s.pending++] = b & 0xff; +var AsyncZlib = /*#__PURE__*/ (function () { + function AsyncZlib(opts, cb) { + astrmify([ + bDflt, + zle, + function () { return [astrm, Deflate, Zlib]; } + ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) { + var strm = new Zlib(ev.data); + onmessage = astrm(strm); + }, 10); + } + return AsyncZlib; +}()); +exports.AsyncZlib = AsyncZlib; +function zlib(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bDflt, + zle, + function () { return [zlibSync]; } + ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb); } - - -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->input buffer and copying from it. - * (See also flush_pending()). +exports.zlib = zlib; +/** + * Compress data with Zlib + * @param data The data to compress + * @param opts The compression options + * @returns The zlib-compressed version of the data */ -function read_buf(strm, buf, start, size) { - var len = strm.avail_in; - - if (len > size) { len = size; } - if (len === 0) { return 0; } - - strm.avail_in -= len; - - // zmemcpy(buf, strm->next_in, len); - utils.arraySet(buf, strm.input, strm.next_in, len, start); - if (strm.state.wrap === 1) { - strm.adler = adler32(strm.adler, buf, len, start); - } - - else if (strm.state.wrap === 2) { - strm.adler = crc32(strm.adler, buf, len, start); - } - - strm.next_in += len; - strm.total_in += len; - - return len; +function zlibSync(data, opts) { + if (!opts) + opts = {}; + var a = adler(); + a.p(data); + var d = dopt(data, opts, 2, 4); + return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d; } - - -/* =========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - * OUT assertion: the match length is not greater than s->lookahead. +exports.zlibSync = zlibSync; +/** + * Streaming Zlib decompression */ -function longest_match(s, cur_match) { - var chain_length = s.max_chain_length; /* max hash chain length */ - var scan = s.strstart; /* current string */ - var match; /* matched string */ - var len; /* length of current match */ - var best_len = s.prev_length; /* best match length so far */ - var nice_match = s.nice_match; /* stop if match long enough */ - var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? - s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; - - var _win = s.window; // shortcut - - var wmask = s.w_mask; - var prev = s.prev; - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - - var strend = s.strstart + MAX_MATCH; - var scan_end1 = _win[scan + best_len - 1]; - var scan_end = _win[scan + best_len]; - - /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. - * It is easy to get rid of this optimization if necessary. - */ - // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - - /* Do not waste too much time if we already have a good match: */ - if (s.prev_length >= s.good_match) { - chain_length >>= 2; - } - /* Do not look for matches beyond the end of the input. This is necessary - * to make deflate deterministic. - */ - if (nice_match > s.lookahead) { nice_match = s.lookahead; } - - // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); - - do { - // Assert(cur_match < s->strstart, "no future"); - match = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2. Note that the checks below - * for insufficient lookahead only occur occasionally for performance - * reasons. Therefore uninitialized memory will be accessed, and - * conditional jumps will be made that depend on those values. - * However the length of the match is limited to the lookahead, so - * the output of deflate is not affected by the uninitialized values. +var Unzlib = /*#__PURE__*/ (function () { + /** + * Creates a Zlib decompression stream + * @param cb The callback to call whenever data is inflated */ - - if (_win[match + best_len] !== scan_end || - _win[match + best_len - 1] !== scan_end1 || - _win[match] !== _win[scan] || - _win[++match] !== _win[scan + 1]) { - continue; + function Unzlib(cb) { + this.v = 1; + Inflate.call(this, cb); } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. + /** + * Pushes a chunk to be unzlibbed + * @param chunk The chunk to push + * @param final Whether this is the last chunk */ - scan += 2; - match++; - // Assert(*scan == *match, "match[2]?"); - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. + Unzlib.prototype.push = function (chunk, final) { + Inflate.prototype.e.call(this, chunk); + if (this.v) { + if (this.p.length < 2 && !final) + return; + this.p = this.p.subarray(2), this.v = 0; + } + if (final) { + if (this.p.length < 4) + err(6, 'invalid zlib data'); + this.p = this.p.subarray(0, -4); + } + // necessary to prevent TS from using the closure value + // This allows for workerization to function correctly + Inflate.prototype.c.call(this, final); + }; + return Unzlib; +}()); +exports.Unzlib = Unzlib; +/** + * Asynchronous streaming Zlib decompression + */ +var AsyncUnzlib = /*#__PURE__*/ (function () { + /** + * Creates an asynchronous Zlib decompression stream + * @param cb The callback to call whenever data is deflated */ - do { - /*jshint noempty:false*/ - } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && - scan < strend); - - // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - s.match_start = cur_match; - best_len = len; - if (len >= nice_match) { - break; - } - scan_end1 = _win[scan + best_len - 1]; - scan_end = _win[scan + best_len]; - } - } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); - - if (best_len <= s.lookahead) { - return best_len; - } - return s.lookahead; + function AsyncUnzlib(cb) { + this.ondata = cb; + astrmify([ + bInflt, + zule, + function () { return [astrm, Inflate, Unzlib]; } + ], this, 0, function () { + var strm = new Unzlib(); + onmessage = astrm(strm); + }, 11); + } + return AsyncUnzlib; +}()); +exports.AsyncUnzlib = AsyncUnzlib; +function unzlib(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bInflt, + zule, + function () { return [unzlibSync]; } + ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb); } - - -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). +exports.unzlib = unzlib; +/** + * Expands Zlib data + * @param data The data to decompress + * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. + * @returns The decompressed version of the data + */ +function unzlibSync(data, out) { + return inflt((zlv(data), data.subarray(2, -4)), out); +} +exports.unzlibSync = unzlibSync; +/** + * Streaming GZIP, Zlib, or raw DEFLATE decompression */ -function fill_window(s) { - var _w_size = s.w_size; - var p, n, m, more, str; - - //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = s.window_size - s.lookahead - s.strstart; - - // JS ints have 32 bit, block below not needed - /* Deal with !@#$% 64K limit: */ - //if (sizeof(int) <= 2) { - // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - // more = wsize; - // - // } else if (more == (unsigned)(-1)) { - // /* Very unlikely, but possible on 16 bit machine if - // * strstart == 0 && lookahead == 1 (input done a byte at time) - // */ - // more--; - // } - //} - - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. +var Decompress = /*#__PURE__*/ (function () { + /** + * Creates a decompression stream + * @param cb The callback to call whenever data is decompressed */ - if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - - utils.arraySet(s.window, s.window, _w_size, _w_size, 0); - s.match_start -= _w_size; - s.strstart -= _w_size; - /* we now have strstart >= MAX_DIST */ - s.block_start -= _w_size; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= _w_size ? m - _w_size : 0); - } while (--n); - - n = _w_size; - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= _w_size ? m - _w_size : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); - - more += _w_size; + function Decompress(cb) { + this.G = Gunzip; + this.I = Inflate; + this.Z = Unzlib; + this.ondata = cb; } - if (s.strm.avail_in === 0) { - break; + /** + * Pushes a chunk to be decompressed + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Decompress.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + if (!this.s) { + if (this.p && this.p.length) { + var n = new u8(this.p.length + chunk.length); + n.set(this.p), n.set(chunk, this.p.length); + } + else + this.p = chunk; + if (this.p.length > 2) { + var _this_1 = this; + var cb = function () { _this_1.ondata.apply(_this_1, arguments); }; + this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8) + ? new this.G(cb) + : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31)) + ? new this.I(cb) + : new this.Z(cb); + this.s.push(this.p, final); + this.p = null; + } + } + else + this.s.push(chunk, final); + }; + return Decompress; +}()); +exports.Decompress = Decompress; +/** + * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression + */ +var AsyncDecompress = /*#__PURE__*/ (function () { + /** + * Creates an asynchronous decompression stream + * @param cb The callback to call whenever data is decompressed + */ + function AsyncDecompress(cb) { + this.G = AsyncGunzip; + this.I = AsyncInflate; + this.Z = AsyncUnzlib; + this.ondata = cb; } - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + /** + * Pushes a chunk to be decompressed + * @param chunk The chunk to push + * @param final Whether this is the last chunk */ - //Assert(more >= 2, "more < 2"); - n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); - s.lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s.lookahead + s.insert >= MIN_MATCH) { - str = s.strstart - s.insert; - s.ins_h = s.window[str]; - - /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; -//#if MIN_MATCH != 3 -// Call update_hash() MIN_MATCH-3 more times -//#endif - while (s.insert) { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - s.insert--; - if (s.lookahead + s.insert < MIN_MATCH) { - break; + AsyncDecompress.prototype.push = function (chunk, final) { + Decompress.prototype.push.call(this, chunk, final); + }; + return AsyncDecompress; +}()); +exports.AsyncDecompress = AsyncDecompress; +function decompress(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return (data[0] == 31 && data[1] == 139 && data[2] == 8) + ? gunzip(data, opts, cb) + : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) + ? inflate(data, opts, cb) + : unzlib(data, opts, cb); +} +exports.decompress = decompress; +/** + * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format + * @param data The data to decompress + * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. + * @returns The decompressed version of the data + */ +function decompressSync(data, out) { + return (data[0] == 31 && data[1] == 139 && data[2] == 8) + ? gunzipSync(data, out) + : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) + ? inflateSync(data, out) + : unzlibSync(data, out); +} +exports.decompressSync = decompressSync; +// flatten a directory structure +var fltn = function (d, p, t, o) { + for (var k in d) { + var val = d[k], n = p + k, op = o; + if (Array.isArray(val)) + op = mrg(o, val[1]), val = val[0]; + if (val instanceof u8) + t[n] = [val, op]; + else { + t[n += '/'] = [new u8(0), op]; + fltn(val, n, t, o); + } + } +}; +// text encoder +var te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder(); +// text decoder +var td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder(); +// text decoder stream +var tds = 0; +try { + td.decode(et, { stream: true }); + tds = 1; +} +catch (e) { } +// decode UTF8 +var dutf8 = function (d) { + for (var r = '', i = 0;;) { + var c = d[i++]; + var eb = (c > 127) + (c > 223) + (c > 239); + if (i + eb > d.length) + return [r, slc(d, i - 1)]; + if (!eb) + r += String.fromCharCode(c); + else if (eb == 3) { + c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536, + r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023)); + } + else if (eb & 1) + r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63)); + else + r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)); + } +}; +/** + * Streaming UTF-8 decoding + */ +var DecodeUTF8 = /*#__PURE__*/ (function () { + /** + * Creates a UTF-8 decoding stream + * @param cb The callback to call whenever data is decoded + */ + function DecodeUTF8(cb) { + this.ondata = cb; + if (tds) + this.t = new TextDecoder(); + else + this.p = et; + } + /** + * Pushes a chunk to be decoded from UTF-8 binary + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + DecodeUTF8.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + final = !!final; + if (this.t) { + this.ondata(this.t.decode(chunk, { stream: true }), final); + if (final) { + if (this.t.decode().length) + err(8); + this.t = null; + } + return; } - } + if (!this.p) + err(4); + var dat = new u8(this.p.length + chunk.length); + dat.set(this.p); + dat.set(chunk, this.p.length); + var _a = dutf8(dat), ch = _a[0], np = _a[1]; + if (final) { + if (np.length) + err(8); + this.p = null; + } + else + this.p = np; + this.ondata(ch, final); + }; + return DecodeUTF8; +}()); +exports.DecodeUTF8 = DecodeUTF8; +/** + * Streaming UTF-8 encoding + */ +var EncodeUTF8 = /*#__PURE__*/ (function () { + /** + * Creates a UTF-8 decoding stream + * @param cb The callback to call whenever data is encoded + */ + function EncodeUTF8(cb) { + this.ondata = cb; } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. + /** + * Pushes a chunk to be encoded to UTF-8 + * @param chunk The string data to push + * @param final Whether this is the last chunk */ - - } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ -// if (s.high_water < s.window_size) { -// var curr = s.strstart + s.lookahead; -// var init = 0; -// -// if (s.high_water < curr) { -// /* Previous high water mark below current data -- zero WIN_INIT -// * bytes or up to end of window, whichever is less. -// */ -// init = s.window_size - curr; -// if (init > WIN_INIT) -// init = WIN_INIT; -// zmemzero(s->window + curr, (unsigned)init); -// s->high_water = curr + init; -// } -// else if (s->high_water < (ulg)curr + WIN_INIT) { -// /* High water mark at or above current data, but below current data -// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up -// * to end of window, whichever is less. -// */ -// init = (ulg)curr + WIN_INIT - s->high_water; -// if (init > s->window_size - s->high_water) -// init = s->window_size - s->high_water; -// zmemzero(s->window + s->high_water, (unsigned)init); -// s->high_water += init; -// } -// } -// -// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, -// "not enough room for search"); + EncodeUTF8.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + if (this.d) + err(4); + this.ondata(strToU8(chunk), this.d = final || false); + }; + return EncodeUTF8; +}()); +exports.EncodeUTF8 = EncodeUTF8; +/** + * Converts a string into a Uint8Array for use with compression/decompression methods + * @param str The string to encode + * @param latin1 Whether or not to interpret the data as Latin-1. This should + * not need to be true unless decoding a binary string. + * @returns The string encoded in UTF-8/Latin-1 binary + */ +function strToU8(str, latin1) { + if (latin1) { + var ar_1 = new u8(str.length); + for (var i = 0; i < str.length; ++i) + ar_1[i] = str.charCodeAt(i); + return ar_1; + } + if (te) + return te.encode(str); + var l = str.length; + var ar = new u8(str.length + (str.length >> 1)); + var ai = 0; + var w = function (v) { ar[ai++] = v; }; + for (var i = 0; i < l; ++i) { + if (ai + 5 > ar.length) { + var n = new u8(ai + 8 + ((l - i) << 1)); + n.set(ar); + ar = n; + } + var c = str.charCodeAt(i); + if (c < 128 || latin1) + w(c); + else if (c < 2048) + w(192 | (c >> 6)), w(128 | (c & 63)); + else if (c > 55295 && c < 57344) + c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023), + w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63)); + else + w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63)); + } + return slc(ar, 0, ai); } - -/* =========================================================================== - * Copy without compression as much as possible from the input stream, return - * the current block state. - * This function does not insert new strings in the dictionary since - * uncompressible data is probably not useful. This function is used - * only for the level=0 compression option. - * NOTE: this function should be optimized to avoid extra copying from - * window to pending_buf. +exports.strToU8 = strToU8; +/** + * Converts a Uint8Array to a string + * @param dat The data to decode to string + * @param latin1 Whether or not to interpret the data as Latin-1. This should + * not need to be true unless encoding to binary string. + * @returns The original UTF-8/Latin-1 string */ -function deflate_stored(s, flush) { - /* Stored blocks are limited to 0xffff bytes, pending_buf is limited - * to pending_buf_size, and each stored block has a 5 byte header: - */ - var max_block_size = 0xffff; - - if (max_block_size > s.pending_buf_size - 5) { - max_block_size = s.pending_buf_size - 5; - } - - /* Copy as much as possible from input to output: */ - for (;;) { - /* Fill the window as much as possible: */ - if (s.lookahead <= 1) { - - //Assert(s->strstart < s->w_size+MAX_DIST(s) || - // s->block_start >= (long)s->w_size, "slide too late"); -// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || -// s.block_start >= s.w_size)) { -// throw new Error("slide too late"); -// } - - fill_window(s); - if (s.lookahead === 0 && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - - if (s.lookahead === 0) { - break; - } - /* flush the current block */ +function strFromU8(dat, latin1) { + if (latin1) { + var r = ''; + for (var i = 0; i < dat.length; i += 16384) + r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384)); + return r; + } + else if (td) + return td.decode(dat); + else { + var _a = dutf8(dat), out = _a[0], ext = _a[1]; + if (ext.length) + err(8); + return out; } - //Assert(s->block_start >= 0L, "block gone"); -// if (s.block_start < 0) throw new Error("block gone"); - - s.strstart += s.lookahead; - s.lookahead = 0; - - /* Emit a stored block if pending_buf will be full: */ - var max_start = s.block_start + max_block_size; - - if (s.strstart === 0 || s.strstart >= max_start) { - /* strstart == 0 is possible when wraparound on 16-bit machine */ - s.lookahead = s.strstart - max_start; - s.strstart = max_start; - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - - +} +exports.strFromU8 = strFromU8; +; +// deflate bit flag +var dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; }; +// skip local zip header +var slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); }; +// read zip header +var zh = function (d, b, z) { + var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20); + var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2]; + return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off]; +}; +// read zip64 extra field +var z64e = function (d, b) { + for (; b2(d, b) != 1; b += 4 + b2(d, b + 2)) + ; + return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)]; +}; +// extra field length +var exfl = function (ex) { + var le = 0; + if (ex) { + for (var k in ex) { + var l = ex[k].length; + if (l > 65535) + err(9); + le += l + 4; + } + } + return le; +}; +// write zip header +var wzh = function (d, b, f, fn, u, c, ce, co) { + var fl = fn.length, ex = f.extra, col = co && co.length; + var exl = exfl(ex); + wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4; + if (ce != null) + d[b++] = 20, d[b++] = f.os; + d[b] = 20, b += 2; // spec compliance? what's that? + d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8; + d[b++] = f.compression & 255, d[b++] = f.compression >> 8; + var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980; + if (y < 0 || y > 119) + err(10); + wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4; + if (c != -1) { + wbytes(d, b, f.crc); + wbytes(d, b + 4, c < 0 ? -c - 2 : c); + wbytes(d, b + 8, f.size); + } + wbytes(d, b + 12, fl); + wbytes(d, b + 14, exl), b += 16; + if (ce != null) { + wbytes(d, b, col); + wbytes(d, b + 6, f.attrs); + wbytes(d, b + 10, ce), b += 14; + } + d.set(fn, b); + b += fl; + if (exl) { + for (var k in ex) { + var exf = ex[k], l = exf.length; + wbytes(d, b, +k); + wbytes(d, b + 2, l); + d.set(exf, b + 4), b += 4 + l; + } + } + if (col) + d.set(co, b), b += col; + return b; +}; +// write zip footer (end of central directory) +var wzf = function (o, b, c, d, e) { + wbytes(o, b, 0x6054B50); // skip disk + wbytes(o, b + 8, c); + wbytes(o, b + 10, c); + wbytes(o, b + 12, d); + wbytes(o, b + 16, e); +}; +/** + * A pass-through stream to keep data uncompressed in a ZIP archive. + */ +var ZipPassThrough = /*#__PURE__*/ (function () { + /** + * Creates a pass-through stream that can be added to ZIP archives + * @param filename The filename to associate with this data stream + */ + function ZipPassThrough(filename) { + this.filename = filename; + this.c = crc(); + this.size = 0; + this.compression = 0; + } + /** + * Processes a chunk and pushes to the output stream. You can override this + * method in a subclass for custom behavior, but by default this passes + * the data through. You must call this.ondata(err, chunk, final) at some + * point in this method. + * @param chunk The chunk to process + * @param final Whether this is the last chunk + */ + ZipPassThrough.prototype.process = function (chunk, final) { + this.ondata(null, chunk, final); + }; + /** + * Pushes a chunk to be added. If you are subclassing this with a custom + * compression algorithm, note that you must push data from the source + * file only, pre-compression. + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + ZipPassThrough.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + this.c.p(chunk); + this.size += chunk.length; + if (final) + this.crc = this.c.d(); + this.process(chunk, final || false); + }; + return ZipPassThrough; +}()); +exports.ZipPassThrough = ZipPassThrough; +// I don't extend because TypeScript extension adds 1kB of runtime bloat +/** + * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate + * for better performance + */ +var ZipDeflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE stream that can be added to ZIP archives + * @param filename The filename to associate with this data stream + * @param opts The compression options + */ + function ZipDeflate(filename, opts) { + var _this_1 = this; + if (!opts) + opts = {}; + ZipPassThrough.call(this, filename); + this.d = new Deflate(opts, function (dat, final) { + _this_1.ondata(null, dat, final); + }); + this.compression = 8; + this.flag = dbf(opts.level); + } + ZipDeflate.prototype.process = function (chunk, final) { + try { + this.d.push(chunk, final); + } + catch (e) { + this.ondata(e, null, final); + } + }; + /** + * Pushes a chunk to be deflated + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + ZipDeflate.prototype.push = function (chunk, final) { + ZipPassThrough.prototype.push.call(this, chunk, final); + }; + return ZipDeflate; +}()); +exports.ZipDeflate = ZipDeflate; +/** + * Asynchronous streaming DEFLATE compression for ZIP archives + */ +var AsyncZipDeflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE stream that can be added to ZIP archives + * @param filename The filename to associate with this data stream + * @param opts The compression options + */ + function AsyncZipDeflate(filename, opts) { + var _this_1 = this; + if (!opts) + opts = {}; + ZipPassThrough.call(this, filename); + this.d = new AsyncDeflate(opts, function (err, dat, final) { + _this_1.ondata(err, dat, final); + }); + this.compression = 8; + this.flag = dbf(opts.level); + this.terminate = this.d.terminate; + } + AsyncZipDeflate.prototype.process = function (chunk, final) { + this.d.push(chunk, final); + }; + /** + * Pushes a chunk to be deflated + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + AsyncZipDeflate.prototype.push = function (chunk, final) { + ZipPassThrough.prototype.push.call(this, chunk, final); + }; + return AsyncZipDeflate; +}()); +exports.AsyncZipDeflate = AsyncZipDeflate; +// TODO: Better tree shaking +/** + * A zippable archive to which files can incrementally be added + */ +var Zip = /*#__PURE__*/ (function () { + /** + * Creates an empty ZIP archive to which files can be added + * @param cb The callback to call whenever data for the generated ZIP archive + * is available + */ + function Zip(cb) { + this.ondata = cb; + this.u = []; + this.d = 1; } - /* Flush if we may have to slide, otherwise block_start may become - * negative and the data will be gone: + /** + * Adds a file to the ZIP archive + * @param file The file stream to add + */ + Zip.prototype.add = function (file) { + var _this_1 = this; + if (!this.ondata) + err(5); + // finishing or finished + if (this.d & 2) + this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false); + else { + var f = strToU8(file.filename), fl_1 = f.length; + var com = file.comment, o = com && strToU8(com); + var u = fl_1 != file.filename.length || (o && (com.length != o.length)); + var hl_1 = fl_1 + exfl(file.extra) + 30; + if (fl_1 > 65535) + this.ondata(err(11, 0, 1), null, false); + var header = new u8(hl_1); + wzh(header, 0, file, f, u, -1); + var chks_1 = [header]; + var pAll_1 = function () { + for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) { + var chk = chks_2[_i]; + _this_1.ondata(null, chk, false); + } + chks_1 = []; + }; + var tr_1 = this.d; + this.d = 0; + var ind_1 = this.u.length; + var uf_1 = mrg(file, { + f: f, + u: u, + o: o, + t: function () { + if (file.terminate) + file.terminate(); + }, + r: function () { + pAll_1(); + if (tr_1) { + var nxt = _this_1.u[ind_1 + 1]; + if (nxt) + nxt.r(); + else + _this_1.d = 1; + } + tr_1 = 1; + } + }); + var cl_1 = 0; + file.ondata = function (err, dat, final) { + if (err) { + _this_1.ondata(err, dat, final); + _this_1.terminate(); + } + else { + cl_1 += dat.length; + chks_1.push(dat); + if (final) { + var dd = new u8(16); + wbytes(dd, 0, 0x8074B50); + wbytes(dd, 4, file.crc); + wbytes(dd, 8, cl_1); + wbytes(dd, 12, file.size); + chks_1.push(dd); + uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size; + if (tr_1) + uf_1.r(); + tr_1 = 1; + } + else if (tr_1) + pAll_1(); + } + }; + this.u.push(uf_1); + } + }; + /** + * Ends the process of adding files and prepares to emit the final chunks. + * This *must* be called after adding all desired files for the resulting + * ZIP file to work properly. + */ + Zip.prototype.end = function () { + var _this_1 = this; + if (this.d & 2) { + this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true); + return; + } + if (this.d) + this.e(); + else + this.u.push({ + r: function () { + if (!(_this_1.d & 1)) + return; + _this_1.u.splice(-1, 1); + _this_1.e(); + }, + t: function () { } + }); + this.d = 3; + }; + Zip.prototype.e = function () { + var bt = 0, l = 0, tl = 0; + for (var _i = 0, _a = this.u; _i < _a.length; _i++) { + var f = _a[_i]; + tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0); + } + var out = new u8(tl + 22); + for (var _b = 0, _c = this.u; _b < _c.length; _b++) { + var f = _c[_b]; + wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o); + bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b; + } + wzf(out, bt, this.u.length, tl, l); + this.ondata(null, out, true); + this.d = 2; + }; + /** + * A method to terminate any internal workers used by the stream. Subsequent + * calls to add() will fail. */ - if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - - s.insert = 0; - - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - - if (s.strstart > s.block_start) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; + Zip.prototype.terminate = function () { + for (var _i = 0, _a = this.u; _i < _a.length; _i++) { + var f = _a[_i]; + f.t(); + } + this.d = 2; + }; + return Zip; +}()); +exports.Zip = Zip; +function zip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + var r = {}; + fltn(data, '', r, opts); + var k = Object.keys(r); + var lft = k.length, o = 0, tot = 0; + var slft = lft, files = new Array(lft); + var term = []; + var tAll = function () { + for (var i = 0; i < term.length; ++i) + term[i](); + }; + var cbd = function (a, b) { + mt(function () { cb(a, b); }); + }; + mt(function () { cbd = cb; }); + var cbf = function () { + var out = new u8(tot + 22), oe = o, cdl = tot - o; + tot = 0; + for (var i = 0; i < slft; ++i) { + var f = files[i]; + try { + var l = f.c.length; + wzh(out, tot, f, f.f, f.u, l); + var badd = 30 + f.f.length + exfl(f.extra); + var loc = tot + badd; + out.set(f.c, loc); + wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l; + } + catch (e) { + return cbd(e, null); + } + } + wzf(out, o, files.length, cdl, oe); + cbd(null, out); + }; + if (!lft) + cbf(); + var _loop_1 = function (i) { + var fn = k[i]; + var _a = r[fn], file = _a[0], p = _a[1]; + var c = crc(), size = file.length; + c.p(file); + var f = strToU8(fn), s = f.length; + var com = p.comment, m = com && strToU8(com), ms = m && m.length; + var exl = exfl(p.extra); + var compression = p.level == 0 ? 0 : 8; + var cbl = function (e, d) { + if (e) { + tAll(); + cbd(e, null); + } + else { + var l = d.length; + files[i] = mrg(p, { + size: size, + crc: c.d(), + c: d, + f: f, + m: m, + u: s != fn.length || (m && (com.length != ms)), + compression: compression + }); + o += 30 + s + exl + l; + tot += 76 + 2 * (s + exl) + (ms || 0) + l; + if (!--lft) + cbf(); + } + }; + if (s > 65535) + cbl(err(11, 0, 1), null); + if (!compression) + cbl(null, file); + else if (size < 160000) { + try { + cbl(null, deflateSync(file, p)); + } + catch (e) { + cbl(e, null); + } + } + else + term.push(deflate(file, p, cbl)); + }; + // Cannot use lft because it can decrease + for (var i = 0; i < slft; ++i) { + _loop_1(i); } - /***/ - } - - return BS_NEED_MORE; + return tAll; } - -/* =========================================================================== - * Compress as much as possible from the input stream, return the current - * block state. - * This function does not perform lazy evaluation of matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. +exports.zip = zip; +/** + * Synchronously creates a ZIP file. Prefer using `zip` for better performance + * with more than one file. + * @param data The directory structure for the ZIP archive + * @param opts The main options, merged with per-file options + * @returns The generated ZIP archive */ -function deflate_fast(s, flush) { - var hash_head; /* head of the hash chain */ - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { - break; /* flush the current block */ - } - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ +function zipSync(data, opts) { + if (!opts) + opts = {}; + var r = {}; + var files = []; + fltn(data, '', r, opts); + var o = 0; + var tot = 0; + for (var fn in r) { + var _a = r[fn], file = _a[0], p = _a[1]; + var compression = p.level == 0 ? 0 : 8; + var f = strToU8(fn), s = f.length; + var com = p.comment, m = com && strToU8(com), ms = m && m.length; + var exl = exfl(p.extra); + if (s > 65535) + err(11); + var d = compression ? deflateSync(file, p) : file, l = d.length; + var c = crc(); + c.p(file); + files.push(mrg(p, { + size: file.length, + crc: c.d(), + c: d, + f: f, + m: m, + u: s != fn.length || (m && (com.length != ms)), + o: o, + compression: compression + })); + o += 30 + s + exl + l; + tot += 76 + 2 * (s + exl) + (ms || 0) + l; + } + var out = new u8(tot + 22), oe = o, cdl = tot - o; + for (var i = 0; i < files.length; ++i) { + var f = files[i]; + wzh(out, f.o, f, f.f, f.u, f.c.length); + var badd = 30 + f.f.length + exfl(f.extra); + out.set(f.c, f.o + badd); + wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0); + } + wzf(out, o, files.length, cdl, oe); + return out; +} +exports.zipSync = zipSync; +/** + * Streaming pass-through decompression for ZIP archives + */ +var UnzipPassThrough = /*#__PURE__*/ (function () { + function UnzipPassThrough() { } - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH + UnzipPassThrough.prototype.push = function (data, final) { + this.ondata(null, data, final); + }; + UnzipPassThrough.compression = 0; + return UnzipPassThrough; +}()); +exports.UnzipPassThrough = UnzipPassThrough; +/** + * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for + * better performance. + */ +var UnzipInflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE decompression that can be used in ZIP archives */ - if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - } - if (s.match_length >= MIN_MATCH) { - // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only - - /*** _tr_tally_dist(s, s.strstart - s.match_start, - s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { - s.match_length--; /* string at strstart already in table */ - do { - s.strstart++; - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. - */ - } while (--s.match_length !== 0); - s.strstart++; - } else - { - s.strstart += s.match_length; - s.match_length = 0; - s.ins_h = s.window[s.strstart]; - /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; - -//#if MIN_MATCH != 3 -// Call UPDATE_HASH() MIN_MATCH-3 more times -//#endif - /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not - * matter since it will be recomputed at next deflate call. - */ - } - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s.window[s.strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; + function UnzipInflate() { + var _this_1 = this; + this.i = new Inflate(function (dat, final) { + _this_1.ondata(null, dat, final); + }); } - /***/ - } - return BS_BLOCK_DONE; -} - -/* =========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. + UnzipInflate.prototype.push = function (data, final) { + try { + this.i.push(data, final); + } + catch (e) { + this.ondata(e, null, final); + } + }; + UnzipInflate.compression = 8; + return UnzipInflate; +}()); +exports.UnzipInflate = UnzipInflate; +/** + * Asynchronous streaming DEFLATE decompression for ZIP archives */ -function deflate_slow(s, flush) { - var hash_head; /* head of hash chain */ - var bflush; /* set if current block must be flushed */ - - var max_insert; - - /* Process the input block. */ - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. +var AsyncUnzipInflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE decompression that can be used in ZIP archives */ - if (s.lookahead < MIN_LOOKAHEAD) { - fill_window(s); - if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: + function AsyncUnzipInflate(_, sz) { + var _this_1 = this; + if (sz < 320000) { + this.i = new Inflate(function (dat, final) { + _this_1.ondata(null, dat, final); + }); + } + else { + this.i = new AsyncInflate(function (err, dat, final) { + _this_1.ondata(err, dat, final); + }); + this.terminate = this.i.terminate; + } + } + AsyncUnzipInflate.prototype.push = function (data, final) { + if (this.i.terminate) + data = slc(data, 0); + this.i.push(data, final); + }; + AsyncUnzipInflate.compression = 8; + return AsyncUnzipInflate; +}()); +exports.AsyncUnzipInflate = AsyncUnzipInflate; +/** + * A ZIP archive decompression stream that emits files as they are discovered + */ +var Unzip = /*#__PURE__*/ (function () { + /** + * Creates a ZIP decompression stream + * @param cb The callback to call whenever a file in the ZIP archive is found */ - hash_head = 0/*NIL*/; - if (s.lookahead >= MIN_MATCH) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ + function Unzip(cb) { + this.onfile = cb; + this.k = []; + this.o = { + 0: UnzipPassThrough + }; + this.p = et; } - - /* Find the longest match, discarding those <= prev_length. + /** + * Pushes a chunk to be unzipped + * @param chunk The chunk to push + * @param final Whether this is the last chunk */ - s.prev_length = s.match_length; - s.prev_match = s.match_start; - s.match_length = MIN_MATCH - 1; - - if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && - s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - s.match_length = longest_match(s, hash_head); - /* longest_match() sets match_start */ - - if (s.match_length <= 5 && - (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { - - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - s.match_length = MIN_MATCH - 1; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: + Unzip.prototype.push = function (chunk, final) { + var _this_1 = this; + if (!this.onfile) + err(5); + if (!this.p) + err(4); + if (this.c > 0) { + var len = Math.min(this.c, chunk.length); + var toAdd = chunk.subarray(0, len); + this.c -= len; + if (this.d) + this.d.push(toAdd, !this.c); + else + this.k[0].push(toAdd); + chunk = chunk.subarray(len); + if (chunk.length) + return this.push(chunk, final); + } + else { + var f = 0, i = 0, is = void 0, buf = void 0; + if (!this.p.length) + buf = chunk; + else if (!chunk.length) + buf = this.p; + else { + buf = new u8(this.p.length + chunk.length); + buf.set(this.p), buf.set(chunk, this.p.length); + } + var l = buf.length, oc = this.c, add = oc && this.d; + var _loop_2 = function () { + var _a; + var sig = b4(buf, i); + if (sig == 0x4034B50) { + f = 1, is = i; + this_1.d = null; + this_1.c = 0; + var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28); + if (l > i + 30 + fnl + es) { + var chks_3 = []; + this_1.k.unshift(chks_3); + f = 2; + var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22); + var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u); + if (sc_1 == 4294967295) { + _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1]; + } + else if (dd) + sc_1 = -1; + i += es; + this_1.c = sc_1; + var d_1; + var file_1 = { + name: fn_1, + compression: cmp_1, + start: function () { + if (!file_1.ondata) + err(5); + if (!sc_1) + file_1.ondata(null, et, true); + else { + var ctr = _this_1.o[cmp_1]; + if (!ctr) + file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false); + d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1); + d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); }; + for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) { + var dat = chks_4[_i]; + d_1.push(dat, false); + } + if (_this_1.k[0] == chks_3 && _this_1.c) + _this_1.d = d_1; + else + d_1.push(et, true); + } + }, + terminate: function () { + if (d_1 && d_1.terminate) + d_1.terminate(); + } + }; + if (sc_1 >= 0) + file_1.size = sc_1, file_1.originalSize = su_1; + this_1.onfile(file_1); + } + return "break"; + } + else if (oc) { + if (sig == 0x8074B50) { + is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0; + return "break"; + } + else if (sig == 0x2014B50) { + is = i -= 4, f = 3, this_1.c = 0; + return "break"; + } + } + }; + var this_1 = this; + for (; i < l - 4; ++i) { + var state_1 = _loop_2(); + if (state_1 === "break") + break; + } + this.p = et; + if (oc < 0) { + var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i); + if (add) + add.push(dat, !!f); + else + this.k[+(f == 2)].push(dat); + } + if (f & 2) + return this.push(buf.subarray(i), final); + this.p = buf.subarray(i); + } + if (final) { + if (this.c) + err(13); + this.p = null; + } + }; + /** + * Registers a decoder with the stream, allowing for files compressed with + * the compression type provided to be expanded correctly + * @param decoder The decoder constructor */ - if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { - max_insert = s.strstart + s.lookahead - MIN_MATCH; - /* Do not insert strings in hash table beyond this. */ - - //check_match(s, s.strstart-1, s.prev_match, s.prev_length); - - /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, - s.prev_length - MIN_MATCH, bflush);***/ - bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not - * enough lookahead, the last two strings are not inserted in - * the hash table. - */ - s.lookahead -= s.prev_length - 1; - s.prev_length -= 2; - do { - if (++s.strstart <= max_insert) { - /*** INSERT_STRING(s, s.strstart, hash_head); ***/ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; - hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = s.strstart; - /***/ - } - } while (--s.prev_length !== 0); - s.match_available = 0; - s.match_length = MIN_MATCH - 1; - s.strstart++; - - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - - } else if (s.match_available) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - if (bflush) { - /*** FLUSH_BLOCK_ONLY(s, 0) ***/ - flush_block_only(s, false); - /***/ - } - s.strstart++; - s.lookahead--; - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - s.match_available = 1; - s.strstart++; - s.lookahead--; - } - } - //Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s.match_available) { - //Tracevv((stderr,"%c", s->window[s->strstart-1])); - /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); - - s.match_available = 0; - } - s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; + Unzip.prototype.register = function (decoder) { + this.o[decoder.compression] = decoder; + }; + return Unzip; +}()); +exports.Unzip = Unzip; +var mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); }; +function unzip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + var term = []; + var tAll = function () { + for (var i = 0; i < term.length; ++i) + term[i](); + }; + var files = {}; + var cbd = function (a, b) { + mt(function () { cb(a, b); }); + }; + mt(function () { cbd = cb; }); + var e = data.length - 22; + for (; b4(data, e) != 0x6054B50; --e) { + if (!e || data.length - e > 65558) { + cbd(err(13, 0, 1), null); + return tAll; + } + } + ; + var lft = b2(data, e + 8); + if (lft) { + var c = lft; + var o = b4(data, e + 16); + var z = o == 4294967295 || c == 65535; + if (z) { + var ze = b4(data, e - 12); + z = b4(data, ze) == 0x6064B50; + if (z) { + c = lft = b4(data, ze + 32); + o = b4(data, ze + 48); + } + } + var fltr = opts && opts.filter; + var _loop_3 = function (i) { + var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off); + o = no; + var cbl = function (e, d) { + if (e) { + tAll(); + cbd(e, null); + } + else { + if (d) + files[fn] = d; + if (!--lft) + cbd(null, files); + } + }; + if (!fltr || fltr({ + name: fn, + size: sc, + originalSize: su, + compression: c_1 + })) { + if (!c_1) + cbl(null, slc(data, b, b + sc)); + else if (c_1 == 8) { + var infl = data.subarray(b, b + sc); + if (sc < 320000) { + try { + cbl(null, inflateSync(infl, new u8(su))); + } + catch (e) { + cbl(e, null); + } + } + else + term.push(inflate(infl, { size: su }, cbl)); + } + else + cbl(err(14, 'unknown compression type ' + c_1, 1), null); + } + else + cbl(null, null); + }; + for (var i = 0; i < c; ++i) { + _loop_3(i); + } } - /***/ - } - - return BS_BLOCK_DONE; + else + cbd(null, {}); + return tAll; } - - -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) +exports.unzip = unzip; +/** + * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better + * performance with more than one file. + * @param data The raw compressed ZIP file + * @param opts The ZIP extraction options + * @returns The decompressed files */ -function deflate_rle(s, flush) { - var bflush; /* set if current block must be flushed */ - var prev; /* byte at distance one to match */ - var scan, strend; /* scan goes up to strend for length of run */ - - var _win = s.window; - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s.lookahead <= MAX_MATCH) { - fill_window(s); - if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - if (s.lookahead === 0) { break; } /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s.match_length = 0; - if (s.lookahead >= MIN_MATCH && s.strstart > 0) { - scan = s.strstart - 1; - prev = _win[scan]; - if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { - strend = s.strstart + MAX_MATCH; - do { - /*jshint noempty:false*/ - } while (prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - prev === _win[++scan] && prev === _win[++scan] && - scan < strend); - s.match_length = MAX_MATCH - (strend - scan); - if (s.match_length > s.lookahead) { - s.match_length = s.lookahead; +function unzipSync(data, opts) { + var files = {}; + var e = data.length - 22; + for (; b4(data, e) != 0x6054B50; --e) { + if (!e || data.length - e > 65558) + err(13); + } + ; + var c = b2(data, e + 8); + if (!c) + return {}; + var o = b4(data, e + 16); + var z = o == 4294967295 || c == 65535; + if (z) { + var ze = b4(data, e - 12); + z = b4(data, ze) == 0x6064B50; + if (z) { + c = b4(data, ze + 32); + o = b4(data, ze + 48); + } + } + var fltr = opts && opts.filter; + for (var i = 0; i < c; ++i) { + var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off); + o = no; + if (!fltr || fltr({ + name: fn, + size: sc, + originalSize: su, + compression: c_2 + })) { + if (!c_2) + files[fn] = slc(data, b, b + sc); + else if (c_2 == 8) + files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su)); + else + err(14, 'unknown compression type ' + c_2); } - } - //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s.match_length >= MIN_MATCH) { - //check_match(s, s.strstart, s.strstart - 1, s.match_length); - - /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ - bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); - - s.lookahead -= s.match_length; - s.strstart += s.match_length; - s.match_length = 0; - } else { - /* No match, output a literal byte */ - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - - s.lookahead--; - s.strstart++; - } - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; } - /***/ - } - return BS_BLOCK_DONE; + return files; } +exports.unzipSync = unzipSync; -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -function deflate_huff(s, flush) { - var bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s.lookahead === 0) { - fill_window(s); - if (s.lookahead === 0) { - if (flush === Z_NO_FLUSH) { - return BS_NEED_MORE; - } - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s.match_length = 0; - //Tracevv((stderr,"%c", s->window[s->strstart])); - /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ - bflush = trees._tr_tally(s, 0, s.window[s.strstart]); - s.lookahead--; - s.strstart++; - if (bflush) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - } - s.insert = 0; - if (flush === Z_FINISH) { - /*** FLUSH_BLOCK(s, 1); ***/ - flush_block_only(s, true); - if (s.strm.avail_out === 0) { - return BS_FINISH_STARTED; - } - /***/ - return BS_FINISH_DONE; - } - if (s.last_lit) { - /*** FLUSH_BLOCK(s, 0); ***/ - flush_block_only(s, false); - if (s.strm.avail_out === 0) { - return BS_NEED_MORE; - } - /***/ - } - return BS_BLOCK_DONE; -} +},{"./node-worker.cjs":8}],8:[function(require,module,exports){ +"use strict"; +var ch2 = {}; +exports["default"] = (function (c, id, msg, transfer, cb) { + var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([ + c + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})' + ], { type: 'text/javascript' })))); + w.onmessage = function (e) { + var d = e.data, ed = d.$e$; + if (ed) { + var err = new Error(ed[0]); + err['code'] = ed[1]; + err.stack = ed[2]; + cb(err, null); + } + else + cb(null, d); + }; + w.postMessage(msg, transfer); + return w; +}); -/* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. +},{}],9:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. */ -function Config(good_length, max_lazy, nice_length, max_chain, func) { - this.good_length = good_length; - this.max_lazy = max_lazy; - this.nice_length = nice_length; - this.max_chain = max_chain; - this.func = func; -} -var configuration_table; - -configuration_table = [ - /* good lazy nice chain */ - new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ - new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ - new Config(4, 5, 16, 8, deflate_fast), /* 2 */ - new Config(4, 6, 32, 32, deflate_fast), /* 3 */ - - new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ - new Config(8, 16, 32, 32, deflate_slow), /* 5 */ - new Config(8, 16, 128, 128, deflate_slow), /* 6 */ - new Config(8, 32, 128, 256, deflate_slow), /* 7 */ - new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ - new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ -]; +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. */ -function lm_init(s) { - s.window_size = 2 * s.w_size; - - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - - /* Set the default configuration parameters: - */ - s.max_lazy_match = configuration_table[s.level].max_lazy; - s.good_match = configuration_table[s.level].good_length; - s.nice_match = configuration_table[s.level].nice_length; - s.max_chain_length = configuration_table[s.level].max_chain; - - s.strstart = 0; - s.block_start = 0; - s.lookahead = 0; - s.insert = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - s.ins_h = 0; -} - - -function DeflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.status = 0; /* as the name implies */ - this.pending_buf = null; /* output still pending */ - this.pending_buf_size = 0; /* size of pending_buf */ - this.pending_out = 0; /* next pending byte to output to the stream */ - this.pending = 0; /* nb of bytes in the pending buffer */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.gzhead = null; /* gzip header information to write */ - this.gzindex = 0; /* where in extra, name, or comment */ - this.method = Z_DEFLATED; /* can only be DEFLATED */ - this.last_flush = -1; /* value of flush param for previous deflate call */ - - this.w_size = 0; /* LZ77 window size (32K by default) */ - this.w_bits = 0; /* log2(w_size) (8..16) */ - this.w_mask = 0; /* w_size - 1 */ - - this.window = null; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. - */ - - this.window_size = 0; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - this.prev = null; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - this.head = null; /* Heads of the hash chains or NIL. */ - - this.ins_h = 0; /* hash index of string to be inserted */ - this.hash_size = 0; /* number of elements in hash table */ - this.hash_bits = 0; /* log2(hash_size) */ - this.hash_mask = 0; /* hash_size-1 */ - - this.hash_shift = 0; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - this.block_start = 0; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - this.match_length = 0; /* length of best match */ - this.prev_match = 0; /* previous match */ - this.match_available = 0; /* set if previous match exists */ - this.strstart = 0; /* start of string to insert */ - this.match_start = 0; /* start of matching string */ - this.lookahead = 0; /* number of valid bytes ahead in window */ - - this.prev_length = 0; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - this.max_chain_length = 0; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - this.max_lazy_match = 0; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ - // That's alias to max_lazy_match, don't use directly - //this.max_insert_length = 0; - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - this.level = 0; /* compression level (1..9) */ - this.strategy = 0; /* favor or force Huffman coding*/ - - this.good_match = 0; - /* Use a faster search when the previous match is longer than this */ - - this.nice_match = 0; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ +/*jslint browser: true, node: true */ +/*global require, module */ - /* Didn't use ct_data typedef below to suppress compiler warning */ +"use strict"; - // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; - // Use flat array of DOUBLE size, with interleaved fata, - // because JS does not support effective - this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); - this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); - this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); - zero(this.dyn_ltree); - zero(this.dyn_dtree); - zero(this.bl_tree); - this.l_desc = null; /* desc. for literal tree */ - this.d_desc = null; /* desc. for distance tree */ - this.bl_desc = null; /* desc. for bit length tree */ +/*** Constructor ***/ +jpeg.lossless.ComponentSpec = jpeg.lossless.ComponentSpec || function () { + this.hSamp = 0; // Horizontal sampling factor + this.quantTableSel = 0; // Quantization table destination selector + this.vSamp = 0; // Vertical +}; - //ush bl_count[MAX_BITS+1]; - this.bl_count = new utils.Buf16(MAX_BITS + 1); - /* number of codes at each bit length for an optimal tree */ - //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ - zero(this.heap); +/*** Exports ***/ - this.heap_len = 0; /* number of elements in the heap */ - this.heap_max = 0; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.ComponentSpec; +} - this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; - zero(this.depth); - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ +},{}],10:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. + */ - this.l_buf = 0; /* buffer index for literals or lengths */ - - this.lit_bufsize = 0; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: - this.last_lit = 0; /* running index in l_buf */ + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. - this.d_buf = 0; - /* Buffer index for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ - this.opt_len = 0; /* bit length of current block with optimal trees */ - this.static_len = 0; /* bit length of current block with static trees */ - this.matches = 0; /* number of string matches in current block */ - this.insert = 0; /* bytes at end of window left to insert */ +/*jslint browser: true, node: true */ +/*global require, module */ +"use strict"; - this.bi_buf = 0; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - this.bi_valid = 0; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; - // Used for window memory init. We safely ignore it for JS. That makes - // sense only for pointers and memory check tools. - //this.high_water = 0; - /* High water mark offset in window for initialized bytes -- bytes above - * this are set to zero in order to avoid memory check warnings when - * longest match routines access bytes past the input. This is then - * updated to the new high water mark. - */ -} +/*** Constructor ***/ +jpeg.lossless.DataStream = jpeg.lossless.DataStream || function (data, offset, length) { + if (offset === undefined && length === undefined) { // Old api + this.buffer = new Uint8Array(data); + } else { + this.buffer = new Uint8Array(data, offset, length); + } + this.index = 0; +}; -function deflateResetKeep(strm) { - var s; - if (!strm || !strm.state) { - return err(strm, Z_STREAM_ERROR); - } - strm.total_in = strm.total_out = 0; - strm.data_type = Z_UNKNOWN; +jpeg.lossless.DataStream.prototype.get16 = function () { + // var value = this.buffer.getUint16(this.index, false); + var value = (this.buffer[this.index] << 8) + this.buffer[this.index + 1]; // DataView is big-endian by default + this.index += 2; + return value; +}; - s = strm.state; - s.pending = 0; - s.pending_out = 0; - if (s.wrap < 0) { - s.wrap = -s.wrap; - /* was made negative by deflate(..., Z_FINISH); */ - } - s.status = (s.wrap ? INIT_STATE : BUSY_STATE); - strm.adler = (s.wrap === 2) ? - 0 // crc32(0, Z_NULL, 0) - : - 1; // adler32(0, Z_NULL, 0) - s.last_flush = Z_NO_FLUSH; - trees._tr_init(s); - return Z_OK; -} +jpeg.lossless.DataStream.prototype.get8 = function () { + // var value = this.buffer.getUint8(this.index); + var value = this.buffer[this.index]; + this.index += 1; + return value; +}; -function deflateReset(strm) { - var ret = deflateResetKeep(strm); - if (ret === Z_OK) { - lm_init(strm.state); - } - return ret; -} +/*** Exports ***/ -function deflateSetHeader(strm, head) { - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } - strm.state.gzhead = head; - return Z_OK; +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.DataStream; } +},{}],11:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. + */ -function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { - if (!strm) { // === Z_NULL - return Z_STREAM_ERROR; - } - var wrap = 1; +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: - if (level === Z_DEFAULT_COMPRESSION) { - level = 6; - } + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; - windowBits = -windowBits; - } + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ - windowBits -= 16; - } +/*jslint browser: true, node: true */ +/*global require, module */ +"use strict"; - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { - return err(strm, Z_STREAM_ERROR); - } +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; +jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); +jpeg.lossless.HuffmanTable = jpeg.lossless.HuffmanTable || ((typeof require !== 'undefined') ? require('./huffman-table.js') : null); +jpeg.lossless.QuantizationTable = jpeg.lossless.QuantizationTable || ((typeof require !== 'undefined') ? require('./quantization-table.js') : null); +jpeg.lossless.ScanHeader = jpeg.lossless.ScanHeader || ((typeof require !== 'undefined') ? require('./scan-header.js') : null); +jpeg.lossless.FrameHeader = jpeg.lossless.FrameHeader || ((typeof require !== 'undefined') ? require('./frame-header.js') : null); +jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); - if (windowBits === 8) { - windowBits = 9; - } - /* until 256-byte window bug fixed */ +/*** Constructor ***/ - var s = new DeflateState(); +/** + * The Decoder constructor. + * @property {number} xDim - size of x dimension + * @property {number} yDim - size of y dimension + * @property {number} numComp - number of components + * @property {number} numBytes - number of bytes per component + * @type {Function} + */ +jpeg.lossless.Decoder = jpeg.lossless.Decoder || function (buffer, numBytes) { + this.buffer = buffer; + this.frame = new jpeg.lossless.FrameHeader(); + this.huffTable = new jpeg.lossless.HuffmanTable(); + this.quantTable = new jpeg.lossless.QuantizationTable(); + this.scan = new jpeg.lossless.ScanHeader(); + this.DU = jpeg.lossless.Utils.createArray(10, 4, 64); // at most 10 data units in a MCU, at most 4 data units in one component + this.HuffTab = jpeg.lossless.Utils.createArray(4, 2, 50 * 256); + this.IDCT_Source = []; + this.nBlock = []; // number of blocks in the i-th Comp in a scan + this.acTab = jpeg.lossless.Utils.createArray(10, 1); // ac HuffTab for the i-th Comp in a scan + this.dcTab = jpeg.lossless.Utils.createArray(10, 1); // dc HuffTab for the i-th Comp in a scan + this.qTab = jpeg.lossless.Utils.createArray(10, 1); // quantization table for the i-th Comp in a scan + this.marker = 0; + this.markerIndex = 0; + this.numComp = 0; + this.restartInterval = 0; + this.selection = 0; + this.xDim = 0; + this.yDim = 0; + this.xLoc = 0; + this.yLoc = 0; + this.numBytes = 0; + this.outputData = null; + this.restarting = false; + this.mask = 0; - strm.state = s; - s.strm = strm; + if (typeof numBytes !== "undefined") { + this.numBytes = numBytes; + } +}; - s.wrap = wrap; - s.gzhead = null; - s.w_bits = windowBits; - s.w_size = 1 << s.w_bits; - s.w_mask = s.w_size - 1; - s.hash_bits = memLevel + 7; - s.hash_size = 1 << s.hash_bits; - s.hash_mask = s.hash_size - 1; - s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); +/*** Static Pseudo-constants ***/ - s.window = new utils.Buf8(s.w_size * 2); - s.head = new utils.Buf16(s.hash_size); - s.prev = new utils.Buf16(s.w_size); +jpeg.lossless.Decoder.IDCT_P = [0, 5, 40, 16, 45, 2, 7, 42, 21, 56, 8, 61, 18, 47, 1, 4, 41, 23, 58, 13, 32, 24, 37, 10, 63, 17, 44, 3, 6, 43, 20, + 57, 15, 34, 29, 48, 53, 26, 39, 9, 60, 19, 46, 22, 59, 12, 33, 31, 50, 55, 25, 36, 11, 62, 14, 35, 28, 49, 52, 27, 38, 30, 51, 54]; +jpeg.lossless.Decoder.TABLE = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, + 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63]; +jpeg.lossless.Decoder.MAX_HUFFMAN_SUBTREE = 50; +jpeg.lossless.Decoder.MSB = 0x80000000; +jpeg.lossless.Decoder.RESTART_MARKER_BEGIN = 0xFFD0; +jpeg.lossless.Decoder.RESTART_MARKER_END = 0xFFD7; - // Don't need mem init magic for JS. - //s.high_water = 0; /* nothing written to s->window yet */ +/*** Prototype Methods ***/ - s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ +/** + * Returns decompressed data. + * @param {ArrayBuffer} buffer + * @param {number} [offset] + * @param {number} [length] + * @returns {ArrayBufer} + */ +jpeg.lossless.Decoder.prototype.decompress = function (buffer, offset, length) { + return this.decode(buffer, offset, length).buffer; +}; - s.pending_buf_size = s.lit_bufsize * 4; - //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); - //s->pending_buf = (uchf *) overlay; - s.pending_buf = new utils.Buf8(s.pending_buf_size); - // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s.d_buf = 1 * s.lit_bufsize; +jpeg.lossless.Decoder.prototype.decode = function (buffer, offset, length, numBytes) { + /*jslint bitwise: true */ - //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s.l_buf = (1 + 2) * s.lit_bufsize; + var current, scanNum = 0, pred = [], i, compN, temp = [], index = [], mcuNum; - s.level = level; - s.strategy = strategy; - s.method = method; + if (typeof buffer !== "undefined") { + this.buffer = buffer; + } - return deflateReset(strm); -} + if (typeof numBytes !== "undefined") { + this.numBytes = numBytes; + } -function deflateInit(strm, level) { - return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -} + this.stream = new jpeg.lossless.DataStream(this.buffer, offset, length); + this.buffer = null; + this.xLoc = 0; + this.yLoc = 0; + current = this.stream.get16(); -function deflate(strm, flush) { - var old_flush, s; - var beg, val; // for gzip header write only + if (current !== 0xFFD8) { // SOI + throw new Error("Not a JPEG file"); + } - if (!strm || !strm.state || - flush > Z_BLOCK || flush < 0) { - return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; - } + current = this.stream.get16(); - s = strm.state; + while ((((current >> 4) !== 0x0FFC) || (current === 0xFFC4))) { // SOF 0~15 + switch (current) { + case 0xFFC4: // DHT + this.huffTable.read(this.stream, this.HuffTab); + break; + case 0xFFCC: // DAC + throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)"); + case 0xFFDB: + this.quantTable.read(this.stream, jpeg.lossless.Decoder.TABLE); + break; + case 0xFFDD: + this.restartInterval = this.readNumber(); + break; + case 0xFFE0: + case 0xFFE1: + case 0xFFE2: + case 0xFFE3: + case 0xFFE4: + case 0xFFE5: + case 0xFFE6: + case 0xFFE7: + case 0xFFE8: + case 0xFFE9: + case 0xFFEA: + case 0xFFEB: + case 0xFFEC: + case 0xFFED: + case 0xFFEE: + case 0xFFEF: + this.readApp(); + break; + case 0xFFFE: + this.readComment(); + break; + default: + if ((current >> 8) !== 0xFF) { + throw new Error("ERROR: format throw new IOException! (decode)"); + } + } - if (!strm.output || - (!strm.input && strm.avail_in !== 0) || - (s.status === FINISH_STATE && flush !== Z_FINISH)) { - return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); - } + current = this.stream.get16(); + } - s.strm = strm; /* just in case */ - old_flush = s.last_flush; - s.last_flush = flush; - - /* Write the header */ - if (s.status === INIT_STATE) { - - if (s.wrap === 2) { // GZIP header - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } + if ((current < 0xFFC0) || (current > 0xFFC7)) { + throw new Error("ERROR: could not handle arithmetic code!"); } - else // DEFLATE header - { - var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - var level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - s.status = BUSY_STATE; - putShortMSB(s, header); + this.frame.read(this.stream); + current = this.stream.get16(); + + do { + while (current !== 0x0FFDA) { // SOS + switch (current) { + case 0xFFC4: // DHT + this.huffTable.read(this.stream, this.HuffTab); + break; + case 0xFFCC: // DAC + throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)"); + case 0xFFDB: + this.quantTable.read(this.stream, jpeg.lossless.Decoder.TABLE); + break; + case 0xFFDD: + this.restartInterval = this.readNumber(); + break; + case 0xFFE0: + case 0xFFE1: + case 0xFFE2: + case 0xFFE3: + case 0xFFE4: + case 0xFFE5: + case 0xFFE6: + case 0xFFE7: + case 0xFFE8: + case 0xFFE9: + case 0xFFEA: + case 0xFFEB: + case 0xFFEC: + case 0xFFED: + case 0xFFEE: + case 0xFFEF: + this.readApp(); + break; + case 0xFFFE: + this.readComment(); + break; + default: + if ((current >> 8) !== 0xFF) { + throw new Error("ERROR: format throw new IOException! (Parser.decode)"); + } + } - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - } - } + current = this.stream.get16(); + } -//#ifdef GZIP - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ + this.precision = this.frame.precision; + this.components = this.frame.components; - while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - break; - } + if (!this.numBytes) { + this.numBytes = parseInt(Math.ceil(this.precision / 8)); } - put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); - s.gzindex++; - } - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (s.gzindex === s.gzhead.extra.length) { - s.gzindex = 0; - s.status = NAME_STATE; - } - } - else { - s.status = NAME_STATE; - } - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } + if (this.numBytes == 1) { + this.mask = 0xFF; + } else { + this.mask = 0xFFFF; } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + + this.scan.read(this.stream); + this.numComp = this.scan.numComp; + this.selection = this.scan.selection; + + if (this.numBytes === 1) { + if (this.numComp === 3) { + this.getter = this.getValueRGB; + this.setter = this.setValueRGB; + this.output = this.outputRGB; + } else { + this.getter = this.getValue8; + this.setter = this.setValue8; + this.output = this.outputSingle; + } } else { - val = 0; + this.getter = this.getValue16; + this.setter = this.setValue16; + this.output = this.outputSingle; } - put_byte(s, val); - } while (val !== 0); - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.gzindex = 0; - s.status = COMMENT_STATE; - } - } - else { - s.status = COMMENT_STATE; - } - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - beg = s.pending; /* start of bytes to update crc */ - //int val; + switch (this.selection) { + case 2: + this.selector = this.select2; + break; + case 3: + this.selector = this.select3; + break; + case 4: + this.selector = this.select4; + break; + case 5: + this.selector = this.select5; + break; + case 6: + this.selector = this.select6; + break; + case 7: + this.selector = this.select7; + break; + default: + this.selector = this.select1; + break; + } - do { - if (s.pending === s.pending_buf_size) { - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - flush_pending(strm); - beg = s.pending; - if (s.pending === s.pending_buf_size) { - val = 1; - break; - } + this.scanComps = this.scan.components; + this.quantTables = this.quantTable.quantTables; + + for (i = 0; i < this.numComp; i+=1) { + compN = this.scanComps[i].scanCompSel; + this.qTab[i] = this.quantTables[this.components[compN].quantTableSel]; + this.nBlock[i] = this.components[compN].vSamp * this.components[compN].hSamp; + this.dcTab[i] = this.HuffTab[this.scanComps[i].dcTabSel][0]; + this.acTab[i] = this.HuffTab[this.scanComps[i].acTabSel][1]; } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + + this.xDim = this.frame.dimX; + this.yDim = this.frame.dimY; + if (this.numBytes == 1) { + this.outputData = new Uint8Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp)); } else { - val = 0; + this.outputData = new Uint16Array(new ArrayBuffer(this.xDim * this.yDim * this.numBytes * this.numComp)); } - put_byte(s, val); - } while (val !== 0); - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - if (val === 0) { - s.status = HCRC_STATE; - } - } - else { - s.status = HCRC_STATE; - } - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - } - if (s.pending + 2 <= s.pending_buf_size) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - } - } - else { - s.status = BUSY_STATE; - } - } -//#endif + scanNum+=1; - /* Flush as much pending output as possible */ - if (s.pending !== 0) { - flush_pending(strm); - if (strm.avail_out === 0) { - /* Since avail_out is 0, deflate will be called again with - * more output space, but possibly with both pending and - * avail_in equal to zero. There won't be anything to do, - * but this is not an error situation so make sure we - * return OK instead of BUF_ERROR at next call of deflate: - */ - s.last_flush = -1; - return Z_OK; - } - - /* Make sure there is something to do and avoid duplicate consecutive - * flushes. For repeated and useless calls with Z_FINISH, we keep - * returning Z_STREAM_END instead of Z_BUF_ERROR. - */ - } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && - flush !== Z_FINISH) { - return err(strm, Z_BUF_ERROR); - } + while (true) { // Decode one scan + temp[0] = 0; + index[0] = 0; - /* User must not provide more input after the first FINISH: */ - if (s.status === FINISH_STATE && strm.avail_in !== 0) { - return err(strm, Z_BUF_ERROR); - } + for (i = 0; i < 10; i+=1) { + pred[i] = (1 << (this.precision - 1)); + } - /* Start a new block or continue the current one. - */ - if (strm.avail_in !== 0 || s.lookahead !== 0 || - (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : - (s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush)); - - if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { - s.status = FINISH_STATE; - } - if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { - if (strm.avail_out === 0) { - s.last_flush = -1; - /* avoid BUF_ERROR next call, see above */ - } - return Z_OK; - /* If flush != Z_NO_FLUSH && avail_out == 0, the next call - * of deflate should use the same flush parameter to make sure - * that the flush is complete. So we don't have to output an - * empty block here, this will be done at next call. This also - * ensures that for a very small output buffer, we emit at most - * one empty block. - */ - } - if (bstate === BS_BLOCK_DONE) { - if (flush === Z_PARTIAL_FLUSH) { - trees._tr_align(s); - } - else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + if (this.restartInterval === 0) { + current = this.decodeUnit(pred, temp, index); - trees._tr_stored_block(s, 0, 0, false); - /* For a full flush, this empty block will be recognized - * as a special marker by inflate_sync(). - */ - if (flush === Z_FULL_FLUSH) { - /*** CLEAR_HASH(s); ***/ /* forget history */ - zero(s.head); // Fill with NIL (= 0); - - if (s.lookahead === 0) { - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } + while ((current === 0) && ((this.xLoc < this.xDim) && (this.yLoc < this.yDim))) { + this.output(pred); + current = this.decodeUnit(pred, temp, index); + } + + break; //current=MARKER + } + + for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum+=1) { + this.restarting = (mcuNum == 0); + current = this.decodeUnit(pred, temp, index); + this.output(pred); + + if (current !== 0) { + break; + } + } + + if (current === 0) { + if (this.markerIndex !== 0) { + current = (0xFF00 | this.marker); + this.markerIndex = 0; + } else { + current = this.stream.get16(); + } + } + + if (!((current >= jpeg.lossless.Decoder.RESTART_MARKER_BEGIN) && + (current <= jpeg.lossless.Decoder.RESTART_MARKER_END))) { + break; //current=MARKER + } } - } - flush_pending(strm); - if (strm.avail_out === 0) { - s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ - return Z_OK; - } - } - } - //Assert(strm->avail_out > 0, "bug2"); - //if (strm.avail_out <= 0) { throw new Error("bug2");} - - if (flush !== Z_FINISH) { return Z_OK; } - if (s.wrap <= 0) { return Z_STREAM_END; } - - /* Write the trailer */ - if (s.wrap === 2) { - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - put_byte(s, (strm.adler >> 16) & 0xff); - put_byte(s, (strm.adler >> 24) & 0xff); - put_byte(s, strm.total_in & 0xff); - put_byte(s, (strm.total_in >> 8) & 0xff); - put_byte(s, (strm.total_in >> 16) & 0xff); - put_byte(s, (strm.total_in >> 24) & 0xff); - } - else - { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - flush_pending(strm); - /* If avail_out is zero, the application will call deflate again - * to flush the rest. - */ - if (s.wrap > 0) { s.wrap = -s.wrap; } - /* write the trailer only once! */ - return s.pending !== 0 ? Z_OK : Z_STREAM_END; -} + if ((current === 0xFFDC) && (scanNum === 1)) { //DNL + this.readNumber(); + current = this.stream.get16(); + } + } while ((current !== 0xFFD9) && ((this.xLoc < this.xDim) && (this.yLoc < this.yDim)) && (scanNum === 0)); -function deflateEnd(strm) { - var status; + return this.outputData; +}; - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } - status = strm.state.status; - if (status !== INIT_STATE && - status !== EXTRA_STATE && - status !== NAME_STATE && - status !== COMMENT_STATE && - status !== HCRC_STATE && - status !== BUSY_STATE && - status !== FINISH_STATE - ) { - return err(strm, Z_STREAM_ERROR); - } - strm.state = null; +jpeg.lossless.Decoder.prototype.decodeUnit = function (prev, temp, index) { + if (this.numComp == 1) { + return this.decodeSingle(prev, temp, index); + } else if (this.numComp == 3) { + return this.decodeRGB(prev, temp, index); + } else { + return -1; + } +}; - return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; -} -/* ========================================================================= - * Initializes the compression dictionary from the given byte - * sequence without producing any compressed output. - */ -function deflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; - - var s; - var str, n; - var wrap; - var avail; - var next; - var input; - var tmpDict; - - if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { - return Z_STREAM_ERROR; - } +jpeg.lossless.Decoder.prototype.select1 = function (compOffset) { + return this.getPreviousX(compOffset); +}; - s = strm.state; - wrap = s.wrap; - if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { - return Z_STREAM_ERROR; - } - /* when using zlib wrappers, compute Adler-32 for provided dictionary */ - if (wrap === 1) { - /* adler32(strm->adler, dictionary, dictLength); */ - strm.adler = adler32(strm.adler, dictionary, dictLength, 0); - } +jpeg.lossless.Decoder.prototype.select2 = function (compOffset) { + return this.getPreviousY(compOffset); +}; - s.wrap = 0; /* avoid computing Adler-32 in read_buf */ - - /* if dictionary would fill window, just replace the history */ - if (dictLength >= s.w_size) { - if (wrap === 0) { /* already empty otherwise */ - /*** CLEAR_HASH(s); ***/ - zero(s.head); // Fill with NIL (= 0); - s.strstart = 0; - s.block_start = 0; - s.insert = 0; - } - /* use the tail */ - // dictionary = dictionary.slice(dictLength - s.w_size); - tmpDict = new utils.Buf8(s.w_size); - utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); - dictionary = tmpDict; - dictLength = s.w_size; - } - /* insert dictionary into window and hash */ - avail = strm.avail_in; - next = strm.next_in; - input = strm.input; - strm.avail_in = dictLength; - strm.next_in = 0; - strm.input = dictionary; - fill_window(s); - while (s.lookahead >= MIN_MATCH) { - str = s.strstart; - n = s.lookahead - (MIN_MATCH - 1); - do { - /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ - s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; - s.prev[str & s.w_mask] = s.head[s.ins_h]; - s.head[s.ins_h] = str; - str++; - } while (--n); - s.strstart = str; - s.lookahead = MIN_MATCH - 1; - fill_window(s); - } - s.strstart += s.lookahead; - s.block_start = s.strstart; - s.insert = s.lookahead; - s.lookahead = 0; - s.match_length = s.prev_length = MIN_MATCH - 1; - s.match_available = 0; - strm.next_in = next; - strm.input = input; - strm.avail_in = avail; - s.wrap = wrap; - return Z_OK; -} +jpeg.lossless.Decoder.prototype.select3 = function (compOffset) { + return this.getPreviousXY(compOffset); +}; -exports.deflateInit = deflateInit; -exports.deflateInit2 = deflateInit2; -exports.deflateReset = deflateReset; -exports.deflateResetKeep = deflateResetKeep; -exports.deflateSetHeader = deflateSetHeader; -exports.deflate = deflate; -exports.deflateEnd = deflateEnd; -exports.deflateSetDictionary = deflateSetDictionary; -exports.deflateInfo = 'pako deflate (from Nodeca project)'; - -/* Not implemented -exports.deflateBound = deflateBound; -exports.deflateCopy = deflateCopy; -exports.deflateParams = deflateParams; -exports.deflatePending = deflatePending; -exports.deflatePrime = deflatePrime; -exports.deflateTune = deflateTune; -*/ - -},{"../utils/common":19,"./adler32":21,"./crc32":23,"./messages":29,"./trees":30}],25:[function(require,module,exports){ -'use strict'; -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function GZheader() { - /* true if compressed data believed to be text */ - this.text = 0; - /* modification time */ - this.time = 0; - /* extra flags (not used when writing a gzip file) */ - this.xflags = 0; - /* operating system */ - this.os = 0; - /* pointer to extra field or Z_NULL if none */ - this.extra = null; - /* extra field length (valid if extra != Z_NULL) */ - this.extra_len = 0; // Actually, we don't need it in JS, - // but leave for few code modifications - - // - // Setup limits is not necessary because in js we should not preallocate memory - // for inflate use constant limit in 65536 bytes - // - - /* space at extra (only when reading header) */ - // this.extra_max = 0; - /* pointer to zero-terminated file name or Z_NULL */ - this.name = ''; - /* space at name (only when reading header) */ - // this.name_max = 0; - /* pointer to zero-terminated comment or Z_NULL */ - this.comment = ''; - /* space at comment (only when reading header) */ - // this.comm_max = 0; - /* true if there was or will be a header crc */ - this.hcrc = 0; - /* true when done reading gzip header (not used when writing a gzip file) */ - this.done = false; -} +jpeg.lossless.Decoder.prototype.select4 = function (compOffset) { + return (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) - this.getPreviousXY(compOffset); +}; -module.exports = GZheader; -},{}],26:[function(require,module,exports){ -'use strict'; -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -// See state defs from inflate.js -var BAD = 30; /* got a data error -- remain here until reset */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +jpeg.lossless.Decoder.prototype.select5 = function (compOffset) { + return this.getPreviousX(compOffset) + ((this.getPreviousY(compOffset) - this.getPreviousXY(compOffset)) >> 1); +}; -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state.mode === LEN - strm.avail_in >= 6 - strm.avail_out >= 258 - start >= strm.avail_out - state.bits < 8 - - On return, state.mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm.avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm.avail_out >= 258 for each loop to avoid checking for - output space. - */ -module.exports = function inflate_fast(strm, start) { - var state; - var _in; /* local strm.input */ - var last; /* have enough input while in < last */ - var _out; /* local strm.output */ - var beg; /* inflate()'s initial strm.output */ - var end; /* while out < end, enough space available */ -//#ifdef INFLATE_STRICT - var dmax; /* maximum distance from zlib header */ -//#endif - var wsize; /* window size or zero if not using window */ - var whave; /* valid bytes in the window */ - var wnext; /* window write index */ - // Use `s_window` instead `window`, avoid conflict with instrumentation tools - var s_window; /* allocated sliding window, if wsize != 0 */ - var hold; /* local strm.hold */ - var bits; /* local strm.bits */ - var lcode; /* local strm.lencode */ - var dcode; /* local strm.distcode */ - var lmask; /* mask for first level of length codes */ - var dmask; /* mask for first level of distance codes */ - var here; /* retrieved table entry */ - var op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - var len; /* match length, unused bytes */ - var dist; /* match distance */ - var from; /* where to copy match from */ - var from_source; - - - var input, output; // JS specific, because we have no pointers - - /* copy state to local variables */ - state = strm.state; - //here = state.here; - _in = strm.next_in; - input = strm.input; - last = _in + (strm.avail_in - 5); - _out = strm.next_out; - output = strm.output; - beg = _out - (start - strm.avail_out); - end = _out + (strm.avail_out - 257); -//#ifdef INFLATE_STRICT - dmax = state.dmax; -//#endif - wsize = state.wsize; - whave = state.whave; - wnext = state.wnext; - s_window = state.window; - hold = state.hold; - bits = state.bits; - lcode = state.lencode; - dcode = state.distcode; - lmask = (1 << state.lenbits) - 1; - dmask = (1 << state.distbits) - 1; - - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - top: - do { - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - - here = lcode[hold & lmask]; - - dolen: - for (;;) { // Goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - if (op === 0) { /* literal */ - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - output[_out++] = here & 0xffff/*here.val*/; - } - else if (op & 16) { /* length base */ - len = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - len += hold & ((1 << op) - 1); - hold >>>= op; - bits -= op; - } - //Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += input[_in++] << bits; - bits += 8; - hold += input[_in++] << bits; - bits += 8; - } - here = dcode[hold & dmask]; - - dodist: - for (;;) { // goto emulation - op = here >>> 24/*here.bits*/; - hold >>>= op; - bits -= op; - op = (here >>> 16) & 0xff/*here.op*/; - - if (op & 16) { /* distance base */ - dist = here & 0xffff/*here.val*/; - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - if (bits < op) { - hold += input[_in++] << bits; - bits += 8; - } - } - dist += hold & ((1 << op) - 1); -//#ifdef INFLATE_STRICT - if (dist > dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -//#endif - hold >>>= op; - bits -= op; - //Tracevv((stderr, "inflate: distance %u\n", dist)); - op = _out - beg; /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break top; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// if (len <= op - whave) { -// do { -// output[_out++] = 0; -// } while (--len); -// continue top; -// } -// len -= op - whave; -// do { -// output[_out++] = 0; -// } while (--op > whave); -// if (op === 0) { -// from = _out - dist; -// do { -// output[_out++] = output[from++]; -// } while (--len); -// continue top; -// } -//#endif - } - from = 0; // window index - from_source = s_window; - if (wnext === 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - else if (wnext < op) { /* wrap around window */ - from += wsize + wnext - op; - op -= wnext; - if (op < len) { /* some from end of window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = 0; - if (wnext < len) { /* some from start of window */ - op = wnext; - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ - len -= op; - do { - output[_out++] = s_window[from++]; - } while (--op); - from = _out - dist; /* rest from output */ - from_source = output; - } - } - while (len > 2) { - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - output[_out++] = from_source[from++]; - len -= 3; - } - if (len) { - output[_out++] = from_source[from++]; - if (len > 1) { - output[_out++] = from_source[from++]; - } - } - } - else { - from = _out - dist; /* copy direct from output */ - do { /* minimum length is three */ - output[_out++] = output[from++]; - output[_out++] = output[from++]; - output[_out++] = output[from++]; - len -= 3; - } while (len > 2); - if (len) { - output[_out++] = output[from++]; - if (len > 1) { - output[_out++] = output[from++]; - } - } - } - } - else if ((op & 64) === 0) { /* 2nd level distance code */ - here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dodist; - } - else { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break top; - } - break; // need to emulate goto via "continue" - } - } - else if ((op & 64) === 0) { /* 2nd level length code */ - here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; - continue dolen; - } - else if (op & 32) { /* end-of-block */ - //Tracevv((stderr, "inflate: end of block\n")); - state.mode = TYPE; - break top; - } - else { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break top; - } +jpeg.lossless.Decoder.prototype.select6 = function (compOffset) { + return this.getPreviousY(compOffset) + ((this.getPreviousX(compOffset) - this.getPreviousXY(compOffset)) >> 1); +}; - break; // need to emulate goto via "continue" - } - } while (_in < last && _out < end); - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - _in -= len; - bits -= len << 3; - hold &= (1 << bits) - 1; - /* update state and return */ - strm.next_in = _in; - strm.next_out = _out; - strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); - strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); - state.hold = hold; - state.bits = bits; - return; +jpeg.lossless.Decoder.prototype.select7 = function (compOffset) { + return ((this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) / 2); }; -},{}],27:[function(require,module,exports){ -'use strict'; -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); -var adler32 = require('./adler32'); -var crc32 = require('./crc32'); -var inflate_fast = require('./inffast'); -var inflate_table = require('./inftrees'); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -/* Public constants ==========================================================*/ -/* ===========================================================================*/ - - -/* Allowed flush values; see deflate() and inflate() below for details */ -//var Z_NO_FLUSH = 0; -//var Z_PARTIAL_FLUSH = 1; -//var Z_SYNC_FLUSH = 2; -//var Z_FULL_FLUSH = 3; -var Z_FINISH = 4; -var Z_BLOCK = 5; -var Z_TREES = 6; - - -/* Return codes for the compression/decompression functions. Negative values - * are errors, positive values are used for special but normal events. - */ -var Z_OK = 0; -var Z_STREAM_END = 1; -var Z_NEED_DICT = 2; -//var Z_ERRNO = -1; -var Z_STREAM_ERROR = -2; -var Z_DATA_ERROR = -3; -var Z_MEM_ERROR = -4; -var Z_BUF_ERROR = -5; -//var Z_VERSION_ERROR = -6; - -/* The deflate compression method */ -var Z_DEFLATED = 8; - - -/* STATES ====================================================================*/ -/* ===========================================================================*/ - - -var HEAD = 1; /* i: waiting for magic header */ -var FLAGS = 2; /* i: waiting for method and flags (gzip) */ -var TIME = 3; /* i: waiting for modification time (gzip) */ -var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ -var EXLEN = 5; /* i: waiting for extra length (gzip) */ -var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ -var NAME = 7; /* i: waiting for end of file name (gzip) */ -var COMMENT = 8; /* i: waiting for end of comment (gzip) */ -var HCRC = 9; /* i: waiting for header crc (gzip) */ -var DICTID = 10; /* i: waiting for dictionary check value */ -var DICT = 11; /* waiting for inflateSetDictionary() call */ -var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ -var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ -var STORED = 14; /* i: waiting for stored size (length and complement) */ -var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ -var COPY = 16; /* i/o: waiting for input or output to copy stored block */ -var TABLE = 17; /* i: waiting for dynamic block table lengths */ -var LENLENS = 18; /* i: waiting for code length code lengths */ -var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ -var LEN_ = 20; /* i: same as LEN below, but only first time in */ -var LEN = 21; /* i: waiting for length/lit/eob code */ -var LENEXT = 22; /* i: waiting for length extra bits */ -var DIST = 23; /* i: waiting for distance code */ -var DISTEXT = 24; /* i: waiting for distance extra bits */ -var MATCH = 25; /* o: waiting for output space to copy string */ -var LIT = 26; /* o: waiting for output space to write literal */ -var CHECK = 27; /* i: waiting for 32-bit check value */ -var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ -var DONE = 29; /* finished check, done -- remain here until reset */ -var BAD = 30; /* got a data error -- remain here until reset */ -var MEM = 31; /* got an inflate() memory error -- remain here until reset */ -var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ - -/* ===========================================================================*/ - - - -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var MAX_WBITS = 15; -/* 32K LZ77 window */ -var DEF_WBITS = MAX_WBITS; - - -function zswap32(q) { - return (((q >>> 24) & 0xff) + - ((q >>> 8) & 0xff00) + - ((q & 0xff00) << 8) + - ((q & 0xff) << 24)); -} +jpeg.lossless.Decoder.prototype.decodeRGB = function (prev, temp, index) { + /*jslint bitwise: true */ -function InflateState() { - this.mode = 0; /* current inflate mode */ - this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ - this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib) */ - this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ - this.check = 0; /* protected copy of check value */ - this.total = 0; /* protected copy of output count */ - // TODO: may be {} - this.head = null; /* where to save gzip header information */ - - /* sliding window */ - this.wbits = 0; /* log base 2 of requested window size */ - this.wsize = 0; /* window size or zero if not using window */ - this.whave = 0; /* valid bytes in the window */ - this.wnext = 0; /* window write index */ - this.window = null; /* allocated sliding window, if needed */ - - /* bit accumulator */ - this.hold = 0; /* input bit accumulator */ - this.bits = 0; /* number of bits in "in" */ - - /* for string and stored block copying */ - this.length = 0; /* literal or length of data to copy */ - this.offset = 0; /* distance back to copy string from */ - - /* for table and code decoding */ - this.extra = 0; /* extra bits needed */ - - /* fixed and dynamic code tables */ - this.lencode = null; /* starting table for length/literal codes */ - this.distcode = null; /* starting table for distance codes */ - this.lenbits = 0; /* index bits for lencode */ - this.distbits = 0; /* index bits for distcode */ - - /* dynamic table building */ - this.ncode = 0; /* number of code length code lengths */ - this.nlen = 0; /* number of length code lengths */ - this.ndist = 0; /* number of distance code lengths */ - this.have = 0; /* number of code lengths in lens[] */ - this.next = null; /* next available space in codes[] */ - - this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ - this.work = new utils.Buf16(288); /* work area for code table building */ - - /* - because we don't have pointers in js, we use lencode and distcode directly - as buffers so we don't need codes - */ - //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ - this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ - this.distdyn = null; /* dynamic table for distance codes (JS specific) */ - this.sane = 0; /* if false, allow invalid distance too far */ - this.back = 0; /* bits back of last unprocessed length/lit */ - this.was = 0; /* initial length of match */ -} + var value, actab, dctab, qtab, ctrC, i, k, j; -function inflateResetKeep(strm) { - var state; + prev[0] = this.selector(0); + prev[1] = this.selector(1); + prev[2] = this.selector(2); - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - strm.total_in = strm.total_out = state.total = 0; - strm.msg = ''; /*Z_NULL*/ - if (state.wrap) { /* to support ill-conceived Java test suite */ - strm.adler = state.wrap & 1; - } - state.mode = HEAD; - state.last = 0; - state.havedict = 0; - state.dmax = 32768; - state.head = null/*Z_NULL*/; - state.hold = 0; - state.bits = 0; - //state.lencode = state.distcode = state.next = state.codes; - state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); - state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); - - state.sane = 1; - state.back = -1; - //Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} + for (ctrC = 0; ctrC < this.numComp; ctrC+=1) { + qtab = this.qTab[ctrC]; + actab = this.acTab[ctrC]; + dctab = this.dcTab[ctrC]; + for (i = 0; i < this.nBlock[ctrC]; i+=1) { + for (k = 0; k < this.IDCT_Source.length; k+=1) { + this.IDCT_Source[k] = 0; + } -function inflateReset(strm) { - var state; + value = this.getHuffmanValue(dctab, temp, index); - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - state.wsize = 0; - state.whave = 0; - state.wnext = 0; - return inflateResetKeep(strm); + if (value >= 0xFF00) { + return value; + } -} + prev[ctrC] = this.IDCT_Source[0] = prev[ctrC] + this.getn(index, value, temp, index); + this.IDCT_Source[0] *= qtab[0]; -function inflateReset2(strm, windowBits) { - var wrap; - var state; + for (j = 1; j < 64; j+=1) { + value = this.getHuffmanValue(actab, temp, index); - /* get the state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; + if (value >= 0xFF00) { + return value; + } - /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; - } - else { - wrap = (windowBits >> 4) + 1; - if (windowBits < 48) { - windowBits &= 15; + j += (value >> 4); + + if ((value & 0x0F) === 0) { + if ((value >> 4) === 0) { + break; + } + } else { + this.IDCT_Source[jpeg.lossless.Decoder.IDCT_P[j]] = this.getn(index, value & 0x0F, temp, index) * qtab[j]; + } + } + } } - } - /* set number of window bits, free window if different */ - if (windowBits && (windowBits < 8 || windowBits > 15)) { - return Z_STREAM_ERROR; - } - if (state.window !== null && state.wbits !== windowBits) { - state.window = null; - } + return 0; +}; - /* update state and reset the rest of it */ - state.wrap = wrap; - state.wbits = windowBits; - return inflateReset(strm); -} -function inflateInit2(strm, windowBits) { - var ret; - var state; - if (!strm) { return Z_STREAM_ERROR; } - //strm.msg = Z_NULL; /* in case we return an error */ +jpeg.lossless.Decoder.prototype.decodeSingle = function (prev, temp, index) { + /*jslint bitwise: true */ - state = new InflateState(); + var value, i, n, nRestart; - //if (state === Z_NULL) return Z_MEM_ERROR; - //Tracev((stderr, "inflate: allocated\n")); - strm.state = state; - state.window = null/*Z_NULL*/; - ret = inflateReset2(strm, windowBits); - if (ret !== Z_OK) { - strm.state = null/*Z_NULL*/; - } - return ret; -} + if (this.restarting) { + this.restarting = false; + prev[0] = (1 << (this.frame.precision - 1)); + } else { + prev[0] = this.selector(); + } -function inflateInit(strm) { - return inflateInit2(strm, DEF_WBITS); -} + for (i = 0; i < this.nBlock[0]; i+=1) { + value = this.getHuffmanValue(this.dcTab[0], temp, index); + if (value >= 0xFF00) { + return value; + } + n = this.getn(prev, value, temp, index); + nRestart = (n >> 8); -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. Normally this returns fixed tables from inffixed.h. - If BUILDFIXED is defined, then instead this routine builds the tables the - first time it's called, and returns those tables the first time and - thereafter. This reduces the size of the code by about 2K bytes, in - exchange for a little execution time. However, BUILDFIXED should not be - used for threaded applications, since the rewriting of the tables and virgin - may not be thread-safe. - */ -var virgin = true; + if ((nRestart >= jpeg.lossless.Decoder.RESTART_MARKER_BEGIN) && (nRestart <= jpeg.lossless.Decoder.RESTART_MARKER_END)) { + return nRestart; + } -var lenfix, distfix; // We have no pointers in JS, so keep tables separate + prev[0] += n; + } -function fixedtables(state) { - /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - var sym; + return 0; +}; - lenfix = new utils.Buf32(512); - distfix = new utils.Buf32(32); - /* literal/length table */ - sym = 0; - while (sym < 144) { state.lens[sym++] = 8; } - while (sym < 256) { state.lens[sym++] = 9; } - while (sym < 280) { state.lens[sym++] = 7; } - while (sym < 288) { state.lens[sym++] = 8; } - inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); +// Huffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8 +// bits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256. +// HuffTab[*][*][0-256] is always the only 1st-layer table. +// +// An entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal +// +// HuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...) +// ): +// return: Huffman Value of table +// 0xFF?? if it receives a MARKER +// Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...) +// temp temp storage for remainded bits +// index index to bit of temp +// in FILE pointer +// Effect: +// temp store new remainded bits +// index change to new index +// in change to new position +// NOTE: +// Initial by temp=0; index=0; +// NOTE: (explain temp and index) +// temp: is always in the form at calling time or returning time +// | byte 4 | byte 3 | byte 2 | byte 1 | +// | 0 | 0 | 00000000 | 00000??? | if not a MARKER +// ^index=3 (from 0 to 15) +// 321 +// NOTE (marker and marker_index): +// If get a MARKER from 'in', marker=the low-byte of the MARKER +// and marker_index=9 +// If marker_index=9 then index is always > 8, or HuffmanValue() +// will not be called +jpeg.lossless.Decoder.prototype.getHuffmanValue = function (table, temp, index) { + /*jslint bitwise: true */ - /* distance table */ - sym = 0; - while (sym < 32) { state.lens[sym++] = 5; } + var code, input, mask; + mask = 0xFFFF; - inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + if (index[0] < 8) { + temp[0] <<= 8; + input = this.stream.get8(); + if (input === 0xFF) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } + temp[0] |= input; + } else { + index[0] -= 8; + } - /* do this just once */ - virgin = false; - } + code = table[temp[0] >> index[0]]; - state.lencode = lenfix; - state.lenbits = 9; - state.distcode = distfix; - state.distbits = 5; -} + if ((code & jpeg.lossless.Decoder.MSB) !== 0) { + if (this.markerIndex !== 0) { + this.markerIndex = 0; + return 0xFF00 | this.marker; + } + temp[0] &= (mask >> (16 - index[0])); + temp[0] <<= 8; + input = this.stream.get8(); -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. If window does not exist yet, create it. This is only called - when a window is already in use, or when output has been written during this - inflate call, but the end of the deflate stream has not been reached yet. - It is also called to create a window for dictionary data when a dictionary - is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -function updatewindow(strm, src, end, copy) { - var dist; - var state = strm.state; + if (input === 0xFF) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } - /* if it hasn't been done already, allocate space for the window */ - if (state.window === null) { - state.wsize = 1 << state.wbits; - state.wnext = 0; - state.whave = 0; + temp[0] |= input; + code = table[((code & 0xFF) * 256) + (temp[0] >> index[0])]; + index[0] += 8; + } - state.window = new utils.Buf8(state.wsize); - } + index[0] += 8 - (code >> 8); - /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state.wsize) { - utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); - state.wnext = 0; - state.whave = state.wsize; - } - else { - dist = state.wsize - state.wnext; - if (dist > copy) { - dist = copy; - } - //zmemcpy(state->window + state->wnext, end - copy, dist); - utils.arraySet(state.window, src, end - copy, dist, state.wnext); - copy -= dist; - if (copy) { - //zmemcpy(state->window, end - copy, copy); - utils.arraySet(state.window, src, end - copy, copy, 0); - state.wnext = copy; - state.whave = state.wsize; + if (index[0] < 0) { + throw new Error("index=" + index[0] + " temp=" + temp[0] + " code=" + code + " in HuffmanValue()"); } - else { - state.wnext += dist; - if (state.wnext === state.wsize) { state.wnext = 0; } - if (state.whave < state.wsize) { state.whave += dist; } + + if (index[0] < this.markerIndex) { + this.markerIndex = 0; + return 0xFF00 | this.marker; } - } - return 0; -} -function inflate(strm, flush) { - var state; - var input, output; // input/output buffers - var next; /* next input INDEX */ - var put; /* next output INDEX */ - var have, left; /* available input and output */ - var hold; /* bit buffer */ - var bits; /* bits in bit buffer */ - var _in, _out; /* save starting available input and output */ - var copy; /* number of stored or match bytes to copy */ - var from; /* where to copy match bytes from */ - var from_source; - var here = 0; /* current decoding table entry */ - var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) - //var last; /* parent table entry */ - var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) - var len; /* length to copy for repeats, bits to drop */ - var ret; /* return code */ - var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ - var opts; - - var n; // temporary var for NEED_BITS - - var order = /* permutation of code lengths */ - [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; - - - if (!strm || !strm.state || !strm.output || - (!strm.input && strm.avail_in !== 0)) { - return Z_STREAM_ERROR; - } + temp[0] &= (mask >> (16 - index[0])); + return code & 0xFF; +}; - state = strm.state; - if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ - - - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - _in = have; - _out = left; - ret = Z_OK; - - inf_leave: // goto emulation - for (;;) { - switch (state.mode) { - case HEAD: - if (state.wrap === 0) { - state.mode = TYPEDO; - break; - } - //=== NEEDBITS(16); - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - state.check = 0/*crc32(0L, Z_NULL, 0)*/; - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = FLAGS; - break; - } - state.flags = 0; /* expect zlib header */ - if (state.head) { - state.head.done = false; - } - if (!(state.wrap & 1) || /* check if zlib header allowed */ - (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { - strm.msg = 'incorrect header check'; - state.mode = BAD; - break; - } - if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// - len = (hold & 0x0f)/*BITS(4)*/ + 8; - if (state.wbits === 0) { - state.wbits = len; - } - else if (len > state.wbits) { - strm.msg = 'invalid window size'; - state.mode = BAD; - break; - } - state.dmax = 1 << len; - //Tracev((stderr, "inflate: zlib header ok\n")); - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = hold & 0x200 ? DICTID : TYPE; - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - break; - case FLAGS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.flags = hold; - if ((state.flags & 0xff) !== Z_DEFLATED) { - strm.msg = 'unknown compression method'; - state.mode = BAD; - break; - } - if (state.flags & 0xe000) { - strm.msg = 'unknown header flags set'; - state.mode = BAD; - break; - } - if (state.head) { - state.head.text = ((hold >> 8) & 1); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = TIME; - /* falls through */ - case TIME: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.time = hold; - } - if (state.flags & 0x0200) { - //=== CRC4(state.check, hold) - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - hbuf[2] = (hold >>> 16) & 0xff; - hbuf[3] = (hold >>> 24) & 0xff; - state.check = crc32(state.check, hbuf, 4, 0); - //=== - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = OS; - /* falls through */ - case OS: - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (state.head) { - state.head.xflags = (hold & 0xff); - state.head.os = (hold >> 8); - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = EXLEN; - /* falls through */ - case EXLEN: - if (state.flags & 0x0400) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length = hold; - if (state.head) { - state.head.extra_len = hold; - } - if (state.flags & 0x0200) { - //=== CRC2(state.check, hold); - hbuf[0] = hold & 0xff; - hbuf[1] = (hold >>> 8) & 0xff; - state.check = crc32(state.check, hbuf, 2, 0); - //===// - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - else if (state.head) { - state.head.extra = null/*Z_NULL*/; - } - state.mode = EXTRA; - /* falls through */ - case EXTRA: - if (state.flags & 0x0400) { - copy = state.length; - if (copy > have) { copy = have; } - if (copy) { - if (state.head) { - len = state.head.extra_len - state.length; - if (!state.head.extra) { - // Use untyped array for more convenient processing later - state.head.extra = new Array(state.head.extra_len); - } - utils.arraySet( - state.head.extra, - input, - next, - // extra field is limited to 65536 bytes - // - no need for additional size check - copy, - /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ - len - ); - //zmemcpy(state.head.extra + len, next, - // len + copy > state.head.extra_max ? - // state.head.extra_max - len : copy); - } - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - state.length -= copy; - } - if (state.length) { break inf_leave; } - } - state.length = 0; - state.mode = NAME; - /* falls through */ - case NAME: - if (state.flags & 0x0800) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - // TODO: 2 or 1 bytes? - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.name_max*/)) { - state.head.name += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.name = null; - } - state.length = 0; - state.mode = COMMENT; - /* falls through */ - case COMMENT: - if (state.flags & 0x1000) { - if (have === 0) { break inf_leave; } - copy = 0; - do { - len = input[next + copy++]; - /* use constant limit because in js we should not preallocate memory */ - if (state.head && len && - (state.length < 65536 /*state.head.comm_max*/)) { - state.head.comment += String.fromCharCode(len); - } - } while (len && copy < have); - if (state.flags & 0x0200) { - state.check = crc32(state.check, input, copy, next); - } - have -= copy; - next += copy; - if (len) { break inf_leave; } - } - else if (state.head) { - state.head.comment = null; - } - state.mode = HCRC; - /* falls through */ - case HCRC: - if (state.flags & 0x0200) { - //=== NEEDBITS(16); */ - while (bits < 16) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.check & 0xffff)) { - strm.msg = 'header crc mismatch'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - } - if (state.head) { - state.head.hcrc = ((state.flags >> 9) & 1); - state.head.done = true; - } - strm.adler = state.check = 0; - state.mode = TYPE; - break; - case DICTID: - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - strm.adler = state.check = zswap32(hold); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = DICT; - /* falls through */ - case DICT: - if (state.havedict === 0) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - return Z_NEED_DICT; - } - strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; - state.mode = TYPE; - /* falls through */ - case TYPE: - if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } - /* falls through */ - case TYPEDO: - if (state.last) { - //--- BYTEBITS() ---// - hold >>>= bits & 7; - bits -= bits & 7; - //---// - state.mode = CHECK; - break; - } - //=== NEEDBITS(3); */ - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.last = (hold & 0x01)/*BITS(1)*/; - //--- DROPBITS(1) ---// - hold >>>= 1; - bits -= 1; - //---// - - switch ((hold & 0x03)/*BITS(2)*/) { - case 0: /* stored block */ - //Tracev((stderr, "inflate: stored block%s\n", - // state.last ? " (last)" : "")); - state.mode = STORED; - break; - case 1: /* fixed block */ - fixedtables(state); - //Tracev((stderr, "inflate: fixed codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = LEN_; /* decode codes */ - if (flush === Z_TREES) { - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break inf_leave; - } - break; - case 2: /* dynamic block */ - //Tracev((stderr, "inflate: dynamic codes block%s\n", - // state.last ? " (last)" : "")); - state.mode = TABLE; - break; - case 3: - strm.msg = 'invalid block type'; - state.mode = BAD; - } - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - break; - case STORED: - //--- BYTEBITS() ---// /* go to byte boundary */ - hold >>>= bits & 7; - bits -= bits & 7; - //---// - //=== NEEDBITS(32); */ - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { - strm.msg = 'invalid stored block lengths'; - state.mode = BAD; - break; - } - state.length = hold & 0xffff; - //Tracev((stderr, "inflate: stored length %u\n", - // state.length)); - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - state.mode = COPY_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case COPY_: - state.mode = COPY; - /* falls through */ - case COPY: - copy = state.length; - if (copy) { - if (copy > have) { copy = have; } - if (copy > left) { copy = left; } - if (copy === 0) { break inf_leave; } - //--- zmemcpy(put, next, copy); --- - utils.arraySet(output, input, next, copy, put); - //---// - have -= copy; - next += copy; - left -= copy; - put += copy; - state.length -= copy; - break; - } - //Tracev((stderr, "inflate: stored end\n")); - state.mode = TYPE; - break; - case TABLE: - //=== NEEDBITS(14); */ - while (bits < 14) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; - //--- DROPBITS(5) ---// - hold >>>= 5; - bits -= 5; - //---// - state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; - //--- DROPBITS(4) ---// - hold >>>= 4; - bits -= 4; - //---// -//#ifndef PKZIP_BUG_WORKAROUND - if (state.nlen > 286 || state.ndist > 30) { - strm.msg = 'too many length or distance symbols'; - state.mode = BAD; - break; - } -//#endif - //Tracev((stderr, "inflate: table sizes ok\n")); - state.have = 0; - state.mode = LENLENS; - /* falls through */ - case LENLENS: - while (state.have < state.ncode) { - //=== NEEDBITS(3); - while (bits < 3) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - while (state.have < 19) { - state.lens[order[state.have++]] = 0; - } - // We have separate tables & no pointers. 2 commented lines below not needed. - //state.next = state.codes; - //state.lencode = state.next; - // Switch to use dynamic table - state.lencode = state.lendyn; - state.lenbits = 7; - - opts = { bits: state.lenbits }; - ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); - state.lenbits = opts.bits; - - if (ret) { - strm.msg = 'invalid code lengths set'; - state.mode = BAD; - break; + +jpeg.lossless.Decoder.prototype.getn = function (PRED, n, temp, index) { + /*jslint bitwise: true */ + + var result, one, n_one, mask, input; + one = 1; + n_one = -1; + mask = 0xFFFF; + + if (n === 0) { + return 0; + } + + if (n === 16) { + if (PRED[0] >= 0) { + return -32768; + } else { + return 32768; } - //Tracev((stderr, "inflate: code lengths ok\n")); - state.have = 0; - state.mode = CODELENS; - /* falls through */ - case CODELENS: - while (state.have < state.nlen + state.ndist) { - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_val < 16) { - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.lens[state.have++] = here_val; - } - else { - if (here_val === 16) { - //=== NEEDBITS(here.bits + 2); - n = here_bits + 2; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - if (state.have === 0) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - len = state.lens[state.have - 1]; - copy = 3 + (hold & 0x03);//BITS(2); - //--- DROPBITS(2) ---// - hold >>>= 2; - bits -= 2; - //---// - } - else if (here_val === 17) { - //=== NEEDBITS(here.bits + 3); - n = here_bits + 3; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 3 + (hold & 0x07);//BITS(3); - //--- DROPBITS(3) ---// - hold >>>= 3; - bits -= 3; - //---// - } - else { - //=== NEEDBITS(here.bits + 7); - n = here_bits + 7; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - len = 0; - copy = 11 + (hold & 0x7f);//BITS(7); - //--- DROPBITS(7) ---// - hold >>>= 7; - bits -= 7; - //---// - } - if (state.have + copy > state.nlen + state.ndist) { - strm.msg = 'invalid bit length repeat'; - state.mode = BAD; - break; - } - while (copy--) { - state.lens[state.have++] = len; - } - } + } + + index[0] -= n; + + if (index[0] >= 0) { + if ((index[0] < this.markerIndex) && !this.isLastPixel()) { // this was corrupting the last pixel in some cases + this.markerIndex = 0; + return (0xFF00 | this.marker) << 8; } - /* handle error breaks in while */ - if (state.mode === BAD) { break; } + result = temp[0] >> index[0]; + temp[0] &= (mask >> (16 - index[0])); + } else { + temp[0] <<= 8; + input = this.stream.get8(); - /* check for end-of-block code (better have one) */ - if (state.lens[256] === 0) { - strm.msg = 'invalid code -- missing end-of-block'; - state.mode = BAD; - break; + if (input === 0xFF) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } } - /* build code tables -- note: do not change the lenbits or distbits - values here (9 and 6) without reading the comments in inftrees.h - concerning the ENOUGH constants, which depend on those values */ - state.lenbits = 9; + temp[0] |= input; + index[0] += 8; - opts = { bits: state.lenbits }; - ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.lenbits = opts.bits; - // state.lencode = state.next; + if (index[0] < 0) { + if (this.markerIndex !== 0) { + this.markerIndex = 0; + return (0xFF00 | this.marker) << 8; + } - if (ret) { - strm.msg = 'invalid literal/lengths set'; - state.mode = BAD; - break; - } + temp[0] <<= 8; + input = this.stream.get8(); - state.distbits = 6; - //state.distcode.copy(state.codes); - // Switch to use dynamic table - state.distcode = state.distdyn; - opts = { bits: state.distbits }; - ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); - // We have separate tables & no pointers. 2 commented lines below not needed. - // state.next_index = opts.table_index; - state.distbits = opts.bits; - // state.distcode = state.next; - - if (ret) { - strm.msg = 'invalid distances set'; - state.mode = BAD; - break; - } - //Tracev((stderr, 'inflate: codes ok\n')); - state.mode = LEN_; - if (flush === Z_TREES) { break inf_leave; } - /* falls through */ - case LEN_: - state.mode = LEN; - /* falls through */ - case LEN: - if (have >= 6 && left >= 258) { - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - inflate_fast(strm, _out); - //--- LOAD() --- - put = strm.next_out; - output = strm.output; - left = strm.avail_out; - next = strm.next_in; - input = strm.input; - have = strm.avail_in; - hold = state.hold; - bits = state.bits; - //--- - - if (state.mode === TYPE) { - state.back = -1; - } - break; - } - state.back = 0; - for (;;) { - here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if (here_bits <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if (here_op && (here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.lencode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - state.length = here_val; - if (here_op === 0) { - //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - // "inflate: literal '%c'\n" : - // "inflate: literal 0x%02x\n", here.val)); - state.mode = LIT; - break; - } - if (here_op & 32) { - //Tracevv((stderr, "inflate: end of block\n")); - state.back = -1; - state.mode = TYPE; - break; - } - if (here_op & 64) { - strm.msg = 'invalid literal/length code'; - state.mode = BAD; - break; + if (input === 0xFF) { + this.marker = this.stream.get8(); + if (this.marker !== 0) { + this.markerIndex = 9; + } + } + + temp[0] |= input; + index[0] += 8; } - state.extra = here_op & 15; - state.mode = LENEXT; - /* falls through */ - case LENEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } - //Tracevv((stderr, "inflate: length %u\n", state.length)); - state.was = state.length; - state.mode = DIST; - /* falls through */ - case DIST: - for (;;) { - here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - if ((here_op & 0xf0) === 0) { - last_bits = here_bits; - last_op = here_op; - last_val = here_val; - for (;;) { - here = state.distcode[last_val + - ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; - here_bits = here >>> 24; - here_op = (here >>> 16) & 0xff; - here_val = here & 0xffff; - - if ((last_bits + here_bits) <= bits) { break; } - //--- PULLBYTE() ---// - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - //---// - } - //--- DROPBITS(last.bits) ---// - hold >>>= last_bits; - bits -= last_bits; - //---// - state.back += last_bits; - } - //--- DROPBITS(here.bits) ---// - hold >>>= here_bits; - bits -= here_bits; - //---// - state.back += here_bits; - if (here_op & 64) { - strm.msg = 'invalid distance code'; - state.mode = BAD; - break; + + if (index[0] < 0) { + throw new Error("index=" + index[0] + " in getn()"); } - state.offset = here_val; - state.extra = (here_op) & 15; - state.mode = DISTEXT; - /* falls through */ - case DISTEXT: - if (state.extra) { - //=== NEEDBITS(state.extra); - n = state.extra; - while (bits < n) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; - //--- DROPBITS(state.extra) ---// - hold >>>= state.extra; - bits -= state.extra; - //---// - state.back += state.extra; - } -//#ifdef INFLATE_STRICT - if (state.offset > state.dmax) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; + + if (index[0] < this.markerIndex) { + this.markerIndex = 0; + return (0xFF00 | this.marker) << 8; } -//#endif - //Tracevv((stderr, "inflate: distance %u\n", state.offset)); - state.mode = MATCH; - /* falls through */ - case MATCH: - if (left === 0) { break inf_leave; } - copy = _out - left; - if (state.offset > copy) { /* copy from window */ - copy = state.offset - copy; - if (copy > state.whave) { - if (state.sane) { - strm.msg = 'invalid distance too far back'; - state.mode = BAD; - break; - } -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility -//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR -// Trace((stderr, "inflate.c too far\n")); -// copy -= state.whave; -// if (copy > state.length) { copy = state.length; } -// if (copy > left) { copy = left; } -// left -= copy; -// state.length -= copy; -// do { -// output[put++] = 0; -// } while (--copy); -// if (state.length === 0) { state.mode = LEN; } -// break; -//#endif - } - if (copy > state.wnext) { - copy -= state.wnext; - from = state.wsize - copy; - } - else { - from = state.wnext - copy; - } - if (copy > state.length) { copy = state.length; } - from_source = state.window; - } - else { /* copy from output */ - from_source = output; - from = put - state.offset; - copy = state.length; - } - if (copy > left) { copy = left; } - left -= copy; - state.length -= copy; - do { - output[put++] = from_source[from++]; - } while (--copy); - if (state.length === 0) { state.mode = LEN; } - break; - case LIT: - if (left === 0) { break inf_leave; } - output[put++] = state.length; - left--; - state.mode = LEN; - break; - case CHECK: - if (state.wrap) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - // Use '|' instead of '+' to make sure that result is signed - hold |= input[next++] << bits; - bits += 8; - } - //===// - _out -= left; - strm.total_out += _out; - state.total += _out; - if (_out) { - strm.adler = state.check = - /*UPDATE(state.check, put - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); - } - _out = left; - // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.flags ? hold : zswap32(hold)) !== state.check) { - strm.msg = 'incorrect data check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: check matches trailer\n")); - } - state.mode = LENGTH; - /* falls through */ - case LENGTH: - if (state.wrap && state.flags) { - //=== NEEDBITS(32); - while (bits < 32) { - if (have === 0) { break inf_leave; } - have--; - hold += input[next++] << bits; - bits += 8; - } - //===// - if (hold !== (state.total & 0xffffffff)) { - strm.msg = 'incorrect length check'; - state.mode = BAD; - break; - } - //=== INITBITS(); - hold = 0; - bits = 0; - //===// - //Tracev((stderr, "inflate: length matches trailer\n")); - } - state.mode = DONE; - /* falls through */ - case DONE: - ret = Z_STREAM_END; - break inf_leave; - case BAD: - ret = Z_DATA_ERROR; - break inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - /* falls through */ - default: - return Z_STREAM_ERROR; + result = temp[0] >> index[0]; + temp[0] &= (mask >> (16 - index[0])); + } + + if (result < (one << (n - 1))) { + result += (n_one << n) + 1; } - } - // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + return result; +}; - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call updatewindow() to create and/or update the window state. - Note: a memory error from inflate() is non-recoverable. - */ - //--- RESTORE() --- - strm.next_out = put; - strm.avail_out = left; - strm.next_in = next; - strm.avail_in = have; - state.hold = hold; - state.bits = bits; - //--- - - if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && - (state.mode < CHECK || flush !== Z_FINISH))) { - if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { - state.mode = MEM; - return Z_MEM_ERROR; + +jpeg.lossless.Decoder.prototype.getPreviousX = function (compOffset) { + /*jslint bitwise: true */ + + if (this.xLoc > 0) { + return this.getter((((this.yLoc * this.xDim) + this.xLoc) - 1), compOffset); + } else if (this.yLoc > 0) { + return this.getPreviousY(compOffset); + } else { + return (1 << (this.frame.precision - 1)); } - } - _in -= strm.avail_in; - _out -= strm.avail_out; - strm.total_in += _in; - strm.total_out += _out; - state.total += _out; - if (state.wrap && _out) { - strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ - (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); - } - strm.data_type = state.bits + (state.last ? 64 : 0) + - (state.mode === TYPE ? 128 : 0) + - (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); - if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { - ret = Z_BUF_ERROR; - } - return ret; -} +}; -function inflateEnd(strm) { - if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { - return Z_STREAM_ERROR; - } - var state = strm.state; - if (state.window) { - state.window = null; - } - strm.state = null; - return Z_OK; -} +jpeg.lossless.Decoder.prototype.getPreviousXY = function (compOffset) { + /*jslint bitwise: true */ + + if ((this.xLoc > 0) && (this.yLoc > 0)) { + return this.getter(((((this.yLoc - 1) * this.xDim) + this.xLoc) - 1), compOffset); + } else { + return this.getPreviousY(compOffset); + } +}; -function inflateGetHeader(strm, head) { - var state; - /* check state */ - if (!strm || !strm.state) { return Z_STREAM_ERROR; } - state = strm.state; - if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } - /* save header structure */ - state.head = head; - head.done = false; - return Z_OK; -} +jpeg.lossless.Decoder.prototype.getPreviousY = function (compOffset) { + /*jslint bitwise: true */ -function inflateSetDictionary(strm, dictionary) { - var dictLength = dictionary.length; + if (this.yLoc > 0) { + return this.getter((((this.yLoc - 1) * this.xDim) + this.xLoc), compOffset); + } else { + return this.getPreviousX(compOffset); + } +}; - var state; - var dictid; - var ret; - /* check state */ - if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } - state = strm.state; - if (state.wrap !== 0 && state.mode !== DICT) { - return Z_STREAM_ERROR; - } +jpeg.lossless.Decoder.prototype.isLastPixel = function () { + return (this.xLoc === (this.xDim - 1)) && (this.yLoc === (this.yDim - 1)); +}; - /* check for correct dictionary identifier */ - if (state.mode === DICT) { - dictid = 1; /* adler32(0, null, 0)*/ - /* dictid = adler32(dictid, dictionary, dictLength); */ - dictid = adler32(dictid, dictionary, dictLength, 0); - if (dictid !== state.check) { - return Z_DATA_ERROR; + + +jpeg.lossless.Decoder.prototype.outputSingle = function (PRED) { + if ((this.xLoc < this.xDim) && (this.yLoc < this.yDim)) { + this.setter((((this.yLoc * this.xDim) + this.xLoc)), this.mask & PRED[0]); + + this.xLoc+=1; + + if (this.xLoc >= this.xDim) { + this.yLoc+=1; + this.xLoc = 0; + } } - } - /* copy dictionary to window using updatewindow(), which will amend the - existing dictionary if appropriate */ - ret = updatewindow(strm, dictionary, dictLength, dictLength); - if (ret) { - state.mode = MEM; - return Z_MEM_ERROR; - } - state.havedict = 1; - // Tracev((stderr, "inflate: dictionary set\n")); - return Z_OK; -} +}; -exports.inflateReset = inflateReset; -exports.inflateReset2 = inflateReset2; -exports.inflateResetKeep = inflateResetKeep; -exports.inflateInit = inflateInit; -exports.inflateInit2 = inflateInit2; -exports.inflate = inflate; -exports.inflateEnd = inflateEnd; -exports.inflateGetHeader = inflateGetHeader; -exports.inflateSetDictionary = inflateSetDictionary; -exports.inflateInfo = 'pako inflate (from Nodeca project)'; - -/* Not implemented -exports.inflateCopy = inflateCopy; -exports.inflateGetDictionary = inflateGetDictionary; -exports.inflateMark = inflateMark; -exports.inflatePrime = inflatePrime; -exports.inflateSync = inflateSync; -exports.inflateSyncPoint = inflateSyncPoint; -exports.inflateUndermine = inflateUndermine; -*/ -},{"../utils/common":19,"./adler32":21,"./crc32":23,"./inffast":26,"./inftrees":28}],28:[function(require,module,exports){ -'use strict'; -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -var utils = require('../utils/common'); - -var MAXBITS = 15; -var ENOUGH_LENS = 852; -var ENOUGH_DISTS = 592; -//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); - -var CODES = 0; -var LENS = 1; -var DISTS = 2; - -var lbase = [ /* Length codes 257..285 base */ - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 -]; +jpeg.lossless.Decoder.prototype.outputRGB = function (PRED) { + var offset = ((this.yLoc * this.xDim) + this.xLoc); -var lext = [ /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 -]; + if ((this.xLoc < this.xDim) && (this.yLoc < this.yDim)) { + this.setter(offset, PRED[0], 0); + this.setter(offset, PRED[1], 1); + this.setter(offset, PRED[2], 2); -var dbase = [ /* Distance codes 0..29 base */ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0 -]; + this.xLoc+=1; -var dext = [ /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64 -]; + if (this.xLoc >= this.xDim) { + this.yLoc+=1; + this.xLoc = 0; + } + } +}; -module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) -{ - var bits = opts.bits; - //here = opts.here; /* table entry for duplication */ - - var len = 0; /* a code's length in bits */ - var sym = 0; /* index of code symbols */ - var min = 0, max = 0; /* minimum and maximum code lengths */ - var root = 0; /* number of index bits for root table */ - var curr = 0; /* number of index bits for current table */ - var drop = 0; /* code bits to drop for sub-table */ - var left = 0; /* number of prefix codes available */ - var used = 0; /* code entries in table used */ - var huff = 0; /* Huffman code */ - var incr; /* for incrementing code, index */ - var fill; /* index for replicating entries */ - var low; /* low bits for current root entry */ - var mask; /* mask for low root bits */ - var next; /* next available space in table */ - var base = null; /* base value table to use */ - var base_index = 0; -// var shoextra; /* extra bits table to use */ - var end; /* use base and extra for symbol > end */ - var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ - var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ - var extra = null; - var extra_index = 0; - - var here_bits, here_op, here_val; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ +jpeg.lossless.Decoder.prototype.setValue8 = function (index, val) { + this.outputData[index] = val; +}; - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) { - count[len] = 0; - } - for (sym = 0; sym < codes; sym++) { - count[lens[lens_index + sym]]++; - } +jpeg.lossless.Decoder.prototype.getValue8 = function (index) { + return this.outputData[index]; // mask should not be necessary because outputData is either Int8Array or Int16Array +}; - /* bound code lengths, force root to be within code lengths */ - root = bits; - for (max = MAXBITS; max >= 1; max--) { - if (count[max] !== 0) { break; } - } - if (root > max) { - root = max; - } - if (max === 0) { /* no symbols to code at all */ - //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ - //table.bits[opts.table_index] = 1; //here.bits = (var char)1; - //table.val[opts.table_index++] = 0; //here.val = (var short)0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; +var littleEndian = (function() { + var buffer = new ArrayBuffer(2); + new DataView(buffer).setInt16(0, 256, true /* littleEndian */); + // Int16Array uses the platform's endianness. + return new Int16Array(buffer)[0] === 256; +})(); + +if (littleEndian) { + // just reading from an array is fine then. Int16Array will use platform endianness. + jpeg.lossless.Decoder.prototype.setValue16 = jpeg.lossless.Decoder.prototype.setValue8; + jpeg.lossless.Decoder.prototype.getValue16 = jpeg.lossless.Decoder.prototype.getValue8; +} +else { + // If platform is big-endian, we will need to convert to little-endian + jpeg.lossless.Decoder.prototype.setValue16 = function (index, val) { + this.outputData[index] = ((val & 0xFF) << 8) | ((val >> 8) & 0xFF); + }; + jpeg.lossless.Decoder.prototype.getValue16 = function (index) { + var val = this.outputData[index]; + return ((val & 0xFF) << 8) | ((val >> 8) & 0xFF); + }; +} - //table.op[opts.table_index] = 64; - //table.bits[opts.table_index] = 1; - //table.val[opts.table_index++] = 0; - table[table_index++] = (1 << 24) | (64 << 16) | 0; +jpeg.lossless.Decoder.prototype.setValueRGB = function (index, val, compOffset) { + // this.outputData.setUint8(index * 3 + compOffset, val); + this.outputData[index * 3 + compOffset] = val; +}; - opts.bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min < max; min++) { - if (count[min] !== 0) { break; } - } - if (root < min) { - root = min; - } +jpeg.lossless.Decoder.prototype.getValueRGB = function (index, compOffset) { + // return this.outputData.getUint8(index * 3 + compOffset); + return this.outputData[index * 3 + compOffset]; +}; - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) { - return -1; - } /* over-subscribed */ - } - if (left > 0 && (type === CODES || max !== 1)) { - return -1; /* incomplete set */ - } - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) { - offs[len + 1] = offs[len] + count[len]; - } - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) { - if (lens[lens_index + sym] !== 0) { - work[offs[lens[lens_index + sym]]++] = sym; +jpeg.lossless.Decoder.prototype.readApp = function() { + var count = 0, length = this.stream.get16(); + count += 2; + + while (count < length) { + this.stream.get8(); + count+=1; } - } - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked for LENS and DIST tables against - the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in - the initial root table size constants. See the comments in inftrees.h - for more information. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ + return length; +}; - /* set up for code type */ - // poor man optimization - use if-else instead of switch, - // to avoid deopts in old v8 - if (type === CODES) { - base = extra = work; /* dummy value--not used */ - end = 19; - - } else if (type === LENS) { - base = lbase; - base_index -= 257; - extra = lext; - extra_index -= 257; - end = 256; - - } else { /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } - /* initialize opts for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = table_index; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = -1; /* trigger new sub-table when len > root */ - used = 1 << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - here_bits = len - drop; - if (work[sym] < end) { - here_op = 0; - here_val = work[sym]; - } - else if (work[sym] > end) { - here_op = extra[extra_index + work[sym]]; - here_val = base[base_index + work[sym]]; +jpeg.lossless.Decoder.prototype.readComment = function () { + var sb = "", count = 0, length; + + length = this.stream.get16(); + count += 2; + + while (count < length) { + sb += this.stream.get8(); + count+=1; } - else { - here_op = 32 + 64; /* end of block */ - here_val = 0; + + return sb; +}; + + + +jpeg.lossless.Decoder.prototype.readNumber = function() { + var Ld = this.stream.get16(); + + if (Ld !== 4) { + throw new Error("ERROR: Define number format throw new IOException [Ld!=4]"); } - /* replicate for those indices with low len bits equal to huff */ - incr = 1 << (len - drop); - fill = 1 << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; - } while (fill !== 0); - - /* backwards increment the len-bit code huff */ - incr = 1 << (len - 1); - while (huff & incr) { - incr >>= 1; - } - if (incr !== 0) { - huff &= incr - 1; - huff += incr; - } else { - huff = 0; - } + return this.stream.get16(); +}; + + + +/*** Exports ***/ + +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.Decoder; +} - /* go to next symbol, update count, len */ - sym++; - if (--count[len] === 0) { - if (len === max) { break; } - len = lens[lens_index + work[sym]]; - } +},{"./data-stream.js":10,"./frame-header.js":12,"./huffman-table.js":13,"./quantization-table.js":15,"./scan-header.js":17,"./utils.js":18}],12:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. + */ - /* create new sub-table if needed */ - if (len > root && (huff & mask) !== low) { - /* if first time, transition to sub-tables */ - if (drop === 0) { - drop = root; - } +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = 1 << curr; - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) { break; } - curr++; - left <<= 1; - } + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. - /* check for enough space */ - used += 1 << curr; - if ((type === LENS && used > ENOUGH_LENS) || - (type === DISTS && used > ENOUGH_DISTS)) { - return 1; - } + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ - /* point entry in root table to sub-table */ - low = huff & mask; - /*table.op[low] = curr; - table.bits[low] = root; - table.val[low] = next - opts.table_index;*/ - table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; - } - } +/*jslint browser: true, node: true */ +/*global require, module */ - /* fill in remaining table entry if code is incomplete (guaranteed to have - at most one remaining entry, since if the code is incomplete, the - maximum code length that was allowed to get this far is one bit) */ - if (huff !== 0) { - //table.op[next + huff] = 64; /* invalid code marker */ - //table.bits[next + huff] = len - drop; - //table.val[next + huff] = 0; - table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; - } +"use strict"; - /* set return parameters */ - //opts.table_index += used; - opts.bits = root; - return 0; -}; +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; +jpeg.lossless.ComponentSpec = jpeg.lossless.ComponentSpec || ((typeof require !== 'undefined') ? require('./component-spec.js') : null); +jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); -},{"../utils/common":19}],29:[function(require,module,exports){ -'use strict'; -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -module.exports = { - 2: 'need dictionary', /* Z_NEED_DICT 2 */ - 1: 'stream end', /* Z_STREAM_END 1 */ - 0: '', /* Z_OK 0 */ - '-1': 'file error', /* Z_ERRNO (-1) */ - '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ - '-3': 'data error', /* Z_DATA_ERROR (-3) */ - '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ - '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ - '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ -}; - -},{}],30:[function(require,module,exports){ -'use strict'; +/*** Constructor ***/ +jpeg.lossless.FrameHeader = jpeg.lossless.FrameHeader || function () { + this.components = []; // Components + this.dimX = 0; // Number of samples per line + this.dimY = 0; // Number of lines + this.numComp = 0; // Number of component in the frame + this.precision = 0; // Sample Precision (from the original image) +}; -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -/* eslint-disable space-unary-ops */ -var utils = require('../utils/common'); +/*** Prototype Methods ***/ -/* Public constants ==========================================================*/ -/* ===========================================================================*/ +jpeg.lossless.FrameHeader.prototype.read = function (data) { + /*jslint bitwise: true */ + var count = 0, length, i, c, temp; -//var Z_FILTERED = 1; -//var Z_HUFFMAN_ONLY = 2; -//var Z_RLE = 3; -var Z_FIXED = 4; -//var Z_DEFAULT_STRATEGY = 0; + length = data.get16(); + count += 2; -/* Possible values of the data_type field (though see inflate()) */ -var Z_BINARY = 0; -var Z_TEXT = 1; -//var Z_ASCII = 1; // = Z_TEXT -var Z_UNKNOWN = 2; + this.precision = data.get8(); + count+=1; -/*============================================================================*/ + this.dimY = data.get16(); + count += 2; + this.dimX = data.get16(); + count += 2; -function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + this.numComp = data.get8(); + count+=1; + for (i = 1; i <= this.numComp; i+=1) { + if (count > length) { + throw new Error("ERROR: frame format error"); + } -// From zutil.h + c = data.get8(); + count+=1; -var STORED_BLOCK = 0; -var STATIC_TREES = 1; -var DYN_TREES = 2; -/* The three kinds of block type */ + if (count >= length) { + throw new Error("ERROR: frame format error [c>=Lf]"); + } -var MIN_MATCH = 3; -var MAX_MATCH = 258; -/* The minimum and maximum match lengths */ + temp = data.get8(); + count+=1; -// From deflate.h -/* =========================================================================== - * Internal compression state. - */ + if (!this.components[c]) { + this.components[c] = new jpeg.lossless.ComponentSpec(); + } -var LENGTH_CODES = 29; -/* number of length codes, not counting the special END_BLOCK code */ + this.components[c].hSamp = temp >> 4; + this.components[c].vSamp = temp & 0x0F; + this.components[c].quantTableSel = data.get8(); + count+=1; + } -var LITERALS = 256; -/* number of literal bytes 0..255 */ + if (count !== length) { + throw new Error("ERROR: frame format error [Lf!=count]"); + } -var L_CODES = LITERALS + 1 + LENGTH_CODES; -/* number of Literal or Length codes, including the END_BLOCK code */ + return 1; +}; -var D_CODES = 30; -/* number of distance codes */ -var BL_CODES = 19; -/* number of codes used to transfer the bit lengths */ +/*** Exports ***/ -var HEAP_SIZE = 2 * L_CODES + 1; -/* maximum heap size */ +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.FrameHeader; +} -var MAX_BITS = 15; -/* All codes must not exceed MAX_BITS bits */ +},{"./component-spec.js":9,"./data-stream.js":10}],13:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. + */ -var Buf_size = 16; -/* size of bit buffer in bi_buf */ +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. -/* =========================================================================== - * Constants + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. */ -var MAX_BL_BITS = 7; -/* Bit length codes must not exceed MAX_BL_BITS bits */ +/*jslint browser: true, node: true */ +/*global require, module */ + +"use strict"; -var END_BLOCK = 256; -/* end of block literal code */ +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; +jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); +jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); -var REP_3_6 = 16; -/* repeat previous bit length 3-6 times (2 bits of repeat count) */ -var REPZ_3_10 = 17; -/* repeat a zero length 3-10 times (3 bits of repeat count) */ +/*** Constructor ***/ +jpeg.lossless.HuffmanTable = jpeg.lossless.HuffmanTable || function () { + this.l = jpeg.lossless.Utils.createArray(4, 2, 16); + this.th = []; + this.v = jpeg.lossless.Utils.createArray(4, 2, 16, 200); + this.tc = jpeg.lossless.Utils.createArray(4, 2); -var REPZ_11_138 = 18; -/* repeat a zero length 11-138 times (7 bits of repeat count) */ + this.tc[0][0] = 0; + this.tc[1][0] = 0; + this.tc[2][0] = 0; + this.tc[3][0] = 0; + this.tc[0][1] = 0; + this.tc[1][1] = 0; + this.tc[2][1] = 0; + this.tc[3][1] = 0; + this.th[0] = 0; + this.th[1] = 0; + this.th[2] = 0; + this.th[3] = 0; +}; -/* eslint-disable comma-spacing,array-bracket-spacing */ -var extra_lbits = /* extra bits for each length code */ - [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; -var extra_dbits = /* extra bits for each distance code */ - [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; -var extra_blbits = /* extra bits for each bit length code */ - [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; +/*** Static Pseudo-constants ***/ -var bl_order = - [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; -/* eslint-enable comma-spacing,array-bracket-spacing */ +jpeg.lossless.HuffmanTable.MSB = 0x80000000; -/* The lengths of the bit length codes are sent in order of decreasing - * probability, to avoid transmitting the lengths for unused bit length codes. - */ -/* =========================================================================== - * Local data. These are initialized only once. - */ +/*** Prototype Methods ***/ -// We pre-fill arrays with 0 to avoid uninitialized gaps +jpeg.lossless.HuffmanTable.prototype.read = function(data, HuffTab) { + /*jslint bitwise: true */ -var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + var count = 0, length, temp, t, c, i, j; -// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 -var static_ltree = new Array((L_CODES + 2) * 2); -zero(static_ltree); -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ + length = data.get16(); + count += 2; -var static_dtree = new Array(D_CODES * 2); -zero(static_dtree); -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ + while (count < length) { + temp = data.get8(); + count+=1; + t = temp & 0x0F; + if (t > 3) { + throw new Error("ERROR: Huffman table ID > 3"); + } -var _dist_code = new Array(DIST_CODE_LEN); -zero(_dist_code); -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ + c = temp >> 4; + if (c > 2) { + throw new Error("ERROR: Huffman table [Table class > 2 ]"); + } -var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); -zero(_length_code); -/* length code for each normalized match length (0 == MIN_MATCH) */ + this.th[t] = 1; + this.tc[t][c] = 1; -var base_length = new Array(LENGTH_CODES); -zero(base_length); -/* First normalized length for each code (0 = MIN_MATCH) */ + for (i = 0; i < 16; i+=1) { + this.l[t][c][i] = data.get8(); + count+=1; + } -var base_dist = new Array(D_CODES); -zero(base_dist); -/* First normalized distance for each code (0 = distance of 1) */ + for (i = 0; i < 16; i+=1) { + for (j = 0; j < this.l[t][c][i]; j+=1) { + if (count > length) { + throw new Error("ERROR: Huffman table format error [count>Lh]"); + } + this.v[t][c][i][j] = data.get8(); + count+=1; + } + } + } -function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + if (count !== length) { + throw new Error("ERROR: Huffman table format error [count!=Lf]"); + } - this.static_tree = static_tree; /* static tree or NULL */ - this.extra_bits = extra_bits; /* extra bits for each code or NULL */ - this.extra_base = extra_base; /* base index for extra_bits */ - this.elems = elems; /* max number of elements in the tree */ - this.max_length = max_length; /* max bit length for the codes */ + for (i = 0; i < 4; i+=1) { + for (j = 0; j < 2; j+=1) { + if (this.tc[i][j] !== 0) { + this.buildHuffTable(HuffTab[i][j], this.l[i][j], this.v[i][j]); + } + } + } - // show if `static_tree` has data or dummy - needed for monomorphic objects - this.has_stree = static_tree && static_tree.length; -} + return 1; +}; -var static_l_desc; -var static_d_desc; -var static_bl_desc; +// Build_HuffTab() +// Parameter: t table ID +// c table class ( 0 for DC, 1 for AC ) +// L[i] # of codewords which length is i +// V[i][j] Huffman Value (length=i) +// Effect: +// build up HuffTab[t][c] using L and V. +jpeg.lossless.HuffmanTable.prototype.buildHuffTable = function(tab, L, V) { + /*jslint bitwise: true */ -function TreeDesc(dyn_tree, stat_desc) { - this.dyn_tree = dyn_tree; /* the dynamic tree */ - this.max_code = 0; /* largest code with non zero frequency */ - this.stat_desc = stat_desc; /* the corresponding static tree */ -} + var currentTable, temp, k, i, j, n; + temp = 256; + k = 0; + for (i = 0; i < 8; i+=1) { // i+1 is Code length + for (j = 0; j < L[i]; j+=1) { + for (n = 0; n < (temp >> (i + 1)); n+=1) { + tab[k] = V[i][j] | ((i + 1) << 8); + k+=1; + } + } + } + for (i = 1; k < 256; i+=1, k+=1) { + tab[k] = i | jpeg.lossless.HuffmanTable.MSB; + } -function d_code(dist) { - return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; -} + currentTable = 1; + k = 0; + for (i = 8; i < 16; i+=1) { // i+1 is Code length + for (j = 0; j < L[i]; j+=1) { + for (n = 0; n < (temp >> (i - 7)); n+=1) { + tab[(currentTable * 256) + k] = V[i][j] | ((i + 1) << 8); + k+=1; + } -/* =========================================================================== - * Output a short LSB first on the stream. - * IN assertion: there is enough room in pendingBuf. - */ -function put_short(s, w) { -// put_byte(s, (uch)((w) & 0xff)); -// put_byte(s, (uch)((ush)(w) >> 8)); - s.pending_buf[s.pending++] = (w) & 0xff; - s.pending_buf[s.pending++] = (w >>> 8) & 0xff; -} + if (k >= 256) { + if (k > 256) { + throw new Error("ERROR: Huffman table error(1)!"); + } + k = 0; + currentTable+=1; + } + } + } +}; -/* =========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ -function send_bits(s, value, length) { - if (s.bi_valid > (Buf_size - length)) { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - put_short(s, s.bi_buf); - s.bi_buf = value >> (Buf_size - s.bi_valid); - s.bi_valid += length - Buf_size; - } else { - s.bi_buf |= (value << s.bi_valid) & 0xffff; - s.bi_valid += length; - } -} +/*** Exports ***/ -function send_code(s, c, tree) { - send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.HuffmanTable; } +},{"./data-stream.js":10,"./utils.js":18}],14:[function(require,module,exports){ +/*jslint browser: true, node: true */ +/*global require, module */ -/* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -function bi_reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; -} +"use strict"; +/*** Imports ****/ -/* =========================================================================== - * Flush the bit buffer, keeping at most 7 bits in it. +/** + * jpeg + * @type {*|{}} */ -function bi_flush(s) { - if (s.bi_valid === 16) { - put_short(s, s.bi_buf); - s.bi_buf = 0; - s.bi_valid = 0; - - } else if (s.bi_valid >= 8) { - s.pending_buf[s.pending++] = s.bi_buf & 0xff; - s.bi_buf >>= 8; - s.bi_valid -= 8; - } -} - +var jpeg = jpeg || {}; -/* =========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. +/** + * jpeg.lossless + * @type {*|{}} */ -function gen_bitlen(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var max_code = desc.max_code; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var extra = desc.stat_desc.extra_bits; - var base = desc.stat_desc.extra_base; - var max_length = desc.stat_desc.max_length; - var h; /* heap index */ - var n, m; /* iterate over the tree elements */ - var bits; /* bit length */ - var xbits; /* extra bits */ - var f; /* frequency */ - var overflow = 0; /* number of elements with bit length too large */ - - for (bits = 0; bits <= MAX_BITS; bits++) { - s.bl_count[bits] = 0; - } - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ +jpeg.lossless = jpeg.lossless || {}; - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1]/*.Len*/ = bits; - /* We overwrite tree[n].Dad which is no longer needed */ - if (n > max_code) { continue; } /* not a leaf node */ +jpeg.lossless.ComponentSpec = jpeg.lossless.ComponentSpec || ((typeof require !== 'undefined') ? require('./component-spec.js') : null); +jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); +jpeg.lossless.Decoder = jpeg.lossless.Decoder || ((typeof require !== 'undefined') ? require('./decoder.js') : null); +jpeg.lossless.FrameHeader = jpeg.lossless.FrameHeader || ((typeof require !== 'undefined') ? require('./frame-header.js') : null); +jpeg.lossless.HuffmanTable = jpeg.lossless.HuffmanTable || ((typeof require !== 'undefined') ? require('./huffman-table.js') : null); +jpeg.lossless.QuantizationTable = jpeg.lossless.QuantizationTable || ((typeof require !== 'undefined') ? require('./quantization-table.js') : null); +jpeg.lossless.ScanComponent = jpeg.lossless.ScanComponent || ((typeof require !== 'undefined') ? require('./scan-component.js') : null); +jpeg.lossless.ScanHeader = jpeg.lossless.ScanHeader || ((typeof require !== 'undefined') ? require('./scan-header.js') : null); +jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); - s.bl_count[bits]++; - xbits = 0; - if (n >= base) { - xbits = extra[n - base]; - } - f = tree[n * 2]/*.Freq*/; - s.opt_len += f * (bits + xbits); - if (has_stree) { - s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); - } - } - if (overflow === 0) { return; } - - // Trace((stderr,"\nbit length overflow\n")); - /* This happens for example on obj2 and pic of the Calgary corpus */ - - /* Find the first bit length which could increase: */ - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) { bits--; } - s.bl_count[bits]--; /* move one leaf down the tree */ - s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ - s.bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > max_code) { continue; } - if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); - s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; - tree[m * 2 + 1]/*.Len*/ = bits; - } - n--; - } - } +/*** Exports ***/ +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg; } - -/* =========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. +},{"./component-spec.js":9,"./data-stream.js":10,"./decoder.js":11,"./frame-header.js":12,"./huffman-table.js":13,"./quantization-table.js":15,"./scan-component.js":16,"./scan-header.js":17,"./utils.js":18}],15:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. */ -function gen_codes(tree, max_code, bl_count) -// ct_data *tree; /* the tree to decorate */ -// int max_code; /* largest code with non zero frequency */ -// ushf *bl_count; /* number of codes at each bit length */ -{ - var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ - var code = 0; /* running code value */ - var bits; /* bit index */ - var n; /* code index */ - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= MAX_BITS; bits++) { - next_code[bits] = code = (code + bl_count[bits - 1]) << 1; - } - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ - length = 0; - for (code = 0; code < LENGTH_CODES - 1; code++) { - base_length[code] = length; - for (n = 0; n < (1 << extra_lbits[code]); n++) { - _length_code[length++] = code; - } - } - //Assert (length == 256, "tr_static_init: length != 256"); - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - _length_code[length - 1] = code; + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - base_dist[code] = dist; - for (n = 0; n < (1 << extra_dbits[code]); n++) { - _dist_code[dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: dist != 256"); - dist >>= 7; /* from now on, all distances are divided by 128 */ - for (; code < D_CODES; code++) { - base_dist[code] = dist << 7; - for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { - _dist_code[256 + dist++] = code; - } - } - //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) { - bl_count[bits] = 0; - } +/*jslint browser: true, node: true */ +/*global require, module */ - n = 0; - while (n <= 143) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - while (n <= 255) { - static_ltree[n * 2 + 1]/*.Len*/ = 9; - n++; - bl_count[9]++; - } - while (n <= 279) { - static_ltree[n * 2 + 1]/*.Len*/ = 7; - n++; - bl_count[7]++; - } - while (n <= 287) { - static_ltree[n * 2 + 1]/*.Len*/ = 8; - n++; - bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes(static_ltree, L_CODES + 1, bl_count); +"use strict"; - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n * 2 + 1]/*.Len*/ = 5; - static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); - } +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; +jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); +jpeg.lossless.Utils = jpeg.lossless.Utils || ((typeof require !== 'undefined') ? require('./utils.js') : null); - // Now data ready and we can init static trees - static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); - static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); - static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); - //static_init_done = true; -} +/*** Constructor ***/ +jpeg.lossless.QuantizationTable = jpeg.lossless.QuantizationTable || function () { + this.precision = []; // Quantization precision 8 or 16 + this.tq = []; // 1: this table is presented + this.quantTables = jpeg.lossless.Utils.createArray(4, 64); // Tables + this.tq[0] = 0; + this.tq[1] = 0; + this.tq[2] = 0; + this.tq[3] = 0; +}; -/* =========================================================================== - * Initialize a new block. - */ -function init_block(s) { - var n; /* iterates over tree elements */ - /* Initialize the trees. */ - for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } - for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } - s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; - s.opt_len = s.static_len = 0; - s.last_lit = s.matches = 0; -} +/*** Static Methods ***/ +jpeg.lossless.QuantizationTable.enhanceQuantizationTable = function(qtab, table) { + /*jslint bitwise: true */ -/* =========================================================================== - * Flush the bit buffer and align the output on a byte boundary - */ -function bi_windup(s) -{ - if (s.bi_valid > 8) { - put_short(s, s.bi_buf); - } else if (s.bi_valid > 0) { - //put_byte(s, (Byte)s->bi_buf); - s.pending_buf[s.pending++] = s.bi_buf; - } - s.bi_buf = 0; - s.bi_valid = 0; -} + var i; -/* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ -function copy_block(s, buf, len, header) -//DeflateState *s; -//charf *buf; /* the input data */ -//unsigned len; /* its length */ -//int header; /* true if block header must be written */ -{ - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, len); - put_short(s, ~len); - } -// while (len--) { -// put_byte(s, *buf++); -// } - utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); - s.pending += len; -} + for (i = 0; i < 8; i+=1) { + qtab[table[(0 * 8) + i]] *= 90; + qtab[table[(4 * 8) + i]] *= 90; + qtab[table[(2 * 8) + i]] *= 118; + qtab[table[(6 * 8) + i]] *= 49; + qtab[table[(5 * 8) + i]] *= 71; + qtab[table[(1 * 8) + i]] *= 126; + qtab[table[(7 * 8) + i]] *= 25; + qtab[table[(3 * 8) + i]] *= 106; + } -/* =========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ -function smaller(tree, n, m, depth) { - var _n2 = n * 2; - var _m2 = m * 2; - return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || - (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); -} + for (i = 0; i < 8; i+=1) { + qtab[table[0 + (8 * i)]] *= 90; + qtab[table[4 + (8 * i)]] *= 90; + qtab[table[2 + (8 * i)]] *= 118; + qtab[table[6 + (8 * i)]] *= 49; + qtab[table[5 + (8 * i)]] *= 71; + qtab[table[1 + (8 * i)]] *= 126; + qtab[table[7 + (8 * i)]] *= 25; + qtab[table[3 + (8 * i)]] *= 106; + } -/* =========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ -function pqdownheap(s, tree, k) -// deflate_state *s; -// ct_data *tree; /* the tree to restore */ -// int k; /* node to move down */ -{ - var v = s.heap[k]; - var j = k << 1; /* left son of k */ - while (j <= s.heap_len) { - /* Set j to the smallest of the two sons: */ - if (j < s.heap_len && - smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { - j++; - } - /* Exit if v is smaller than both sons */ - if (smaller(tree, v, s.heap[j], s.depth)) { break; } - - /* Exchange v with the smallest son */ - s.heap[k] = s.heap[j]; - k = j; - - /* And continue down the tree, setting j to the left son of k */ - j <<= 1; - } - s.heap[k] = v; -} + for (i = 0; i < 64; i+=1) { + qtab[i] >>= 6; + } +}; -// inlined manually -// var SMALLEST = 1; +/*** Prototype Methods ***/ -/* =========================================================================== - * Send the block data compressed using the given Huffman trees - */ -function compress_block(s, ltree, dtree) -// deflate_state *s; -// const ct_data *ltree; /* literal tree */ -// const ct_data *dtree; /* distance tree */ -{ - var dist; /* distance of matched string */ - var lc; /* match length or unmatched char (if dist == 0) */ - var lx = 0; /* running index in l_buf */ - var code; /* the code to send */ - var extra; /* number of extra bits to send */ - - if (s.last_lit !== 0) { - do { - dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); - lc = s.pending_buf[s.l_buf + lx]; - lx++; +jpeg.lossless.QuantizationTable.prototype.read = function (data, table) { + /*jslint bitwise: true */ - if (dist === 0) { - send_code(s, lc, ltree); /* send a literal byte */ - //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); - } else { - /* Here, lc is the match length - MIN_MATCH */ - code = _length_code[lc]; - send_code(s, code + LITERALS + 1, ltree); /* send the length code */ - extra = extra_lbits[code]; - if (extra !== 0) { - lc -= base_length[code]; - send_bits(s, lc, extra); /* send the extra length bits */ - } - dist--; /* dist is now the match distance - 1 */ - code = d_code(dist); - //Assert (code < D_CODES, "bad d_code"); - - send_code(s, code, dtree); /* send the distance code */ - extra = extra_dbits[code]; - if (extra !== 0) { - dist -= base_dist[code]; - send_bits(s, dist, extra); /* send the extra distance bits */ - } - } /* literal or match pair ? */ - - /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ - //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, - // "pendingBuf overflow"); - - } while (lx < s.last_lit); - } + var count = 0, length, temp, t, i; - send_code(s, END_BLOCK, ltree); -} + length = data.get16(); + count += 2; + while (count < length) { + temp = data.get8(); + count+=1; + t = temp & 0x0F; -/* =========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ -function build_tree(s, desc) -// deflate_state *s; -// tree_desc *desc; /* the tree descriptor */ -{ - var tree = desc.dyn_tree; - var stree = desc.stat_desc.static_tree; - var has_stree = desc.stat_desc.has_stree; - var elems = desc.stat_desc.elems; - var n, m; /* iterate over heap elements */ - var max_code = -1; /* largest code with non zero frequency */ - var node; /* new node being created */ - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - s.heap_len = 0; - s.heap_max = HEAP_SIZE; + if (t > 3) { + throw new Error("ERROR: Quantization table ID > 3"); + } - for (n = 0; n < elems; n++) { - if (tree[n * 2]/*.Freq*/ !== 0) { - s.heap[++s.heap_len] = max_code = n; - s.depth[n] = 0; + this.precision[t] = temp >> 4; - } else { - tree[n * 2 + 1]/*.Len*/ = 0; - } - } + if (this.precision[t] === 0) { + this.precision[t] = 8; + } else if (this.precision[t] === 1) { + this.precision[t] = 16; + } else { + throw new Error("ERROR: Quantization table precision error"); + } - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (s.heap_len < 2) { - node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); - tree[node * 2]/*.Freq*/ = 1; - s.depth[node] = 0; - s.opt_len--; + this.tq[t] = 1; - if (has_stree) { - s.static_len -= stree[node * 2 + 1]/*.Len*/; - } - /* node is 0 or 1 so it does not have extra bits */ - } - desc.max_code = max_code; + if (this.precision[t] === 8) { + for (i = 0; i < 64; i+=1) { + if (count > length) { + throw new Error("ERROR: Quantization table format error"); + } - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + this.quantTables[t][i] = data.get8(); + count+=1; + } - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - node = elems; /* next internal node of the tree */ - do { - //pqremove(s, tree, n); /* n = node of least frequency */ - /*** pqremove ***/ - n = s.heap[1/*SMALLEST*/]; - s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; - pqdownheap(s, tree, 1/*SMALLEST*/); - /***/ + jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table); + } else { + for (i = 0; i < 64; i+=1) { + if (count > length) { + throw new Error("ERROR: Quantization table format error"); + } - m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + this.quantTables[t][i] = data.get16(); + count += 2; + } - s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ - s.heap[--s.heap_max] = m; + jpeg.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t], table); + } + } - /* Create a new node father of n and m */ - tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; - s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; - tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + if (count !== length) { + throw new Error("ERROR: Quantization table error [count!=Lq]"); + } - /* and insert the new node in the heap */ - s.heap[1/*SMALLEST*/] = node++; - pqdownheap(s, tree, 1/*SMALLEST*/); + return 1; +}; - } while (s.heap_len >= 2); - s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - gen_bitlen(s, desc); +/*** Exports ***/ - /* The field len is now set, we can generate the bit codes */ - gen_codes(tree, max_code, s.bl_count); +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.QuantizationTable; } - -/* =========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. +},{"./data-stream.js":10,"./utils.js":18}],16:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. */ -function scan_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. - if (++count < max_count && curlen === nextlen) { - continue; + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ - } else if (count < min_count) { - s.bl_tree[curlen * 2]/*.Freq*/ += count; +/*jslint browser: true, node: true */ +/*global require, module */ - } else if (curlen !== 0) { +"use strict"; - if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } - s.bl_tree[REP_3_6 * 2]/*.Freq*/++; +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; - } else if (count <= 10) { - s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; - } else { - s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; - } +/*** Constructor ***/ +jpeg.lossless.ScanComponent = jpeg.lossless.ScanComponent || function () { + this.acTabSel = 0; // AC table selector + this.dcTabSel = 0; // DC table selector + this.scanCompSel = 0; // Scan component selector +}; - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; +/*** Exports ***/ - } else { - max_count = 7; - min_count = 4; - } - } +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.ScanComponent; } - -/* =========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. +},{}],17:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. */ -function send_tree(s, tree, max_code) -// deflate_state *s; -// ct_data *tree; /* the tree to be scanned */ -// int max_code; /* and its largest code of non zero frequency */ -{ - var n; /* iterates over all tree elements */ - var prevlen = -1; /* last emitted length */ - var curlen; /* length of current code */ - - var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ - - var count = 0; /* repeat count of the current code */ - var max_count = 7; /* max repeat count */ - var min_count = 4; /* min repeat count */ - - /* tree[max_code+1].Len = -1; */ /* guard already set */ - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; - if (++count < max_count && curlen === nextlen) { - continue; - - } else if (count < min_count) { - do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); - - } else if (curlen !== 0) { - if (curlen !== prevlen) { - send_code(s, curlen, s.bl_tree); - count--; - } - //Assert(count >= 3 && count <= 6, " 3_6?"); - send_code(s, REP_3_6, s.bl_tree); - send_bits(s, count - 3, 2); +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: - } else if (count <= 10) { - send_code(s, REPZ_3_10, s.bl_tree); - send_bits(s, count - 3, 3); + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. - } else { - send_code(s, REPZ_11_138, s.bl_tree); - send_bits(s, count - 11, 7); - } + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; +/*jslint browser: true, node: true */ +/*global require, module */ - } else if (curlen === nextlen) { - max_count = 6; - min_count = 3; +"use strict"; - } else { - max_count = 7; - min_count = 4; - } - } -} +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; +jpeg.lossless.DataStream = jpeg.lossless.DataStream || ((typeof require !== 'undefined') ? require('./data-stream.js') : null); +jpeg.lossless.ScanComponent = jpeg.lossless.ScanComponent || ((typeof require !== 'undefined') ? require('./scan-component.js') : null); -/* =========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ -function build_bl_tree(s) { - var max_blindex; /* index of last bit length code of non zero freq */ +/*** Constructor ***/ +jpeg.lossless.ScanHeader = jpeg.lossless.ScanHeader || function () { + this.ah = 0; + this.al = 0; + this.numComp = 0; // Number of components in the scan + this.selection = 0; // Start of spectral or predictor selection + this.spectralEnd = 0; // End of spectral selection + this.components = []; +}; - /* Determine the bit length frequencies for literal and distance trees */ - scan_tree(s, s.dyn_ltree, s.l_desc.max_code); - scan_tree(s, s.dyn_dtree, s.d_desc.max_code); - /* Build the bit length tree: */ - build_tree(s, s.bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ +/*** Prototype Methods ***/ - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { - break; - } - } - /* Update opt_len to include the bit length tree and counts */ - s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - // s->opt_len, s->static_len)); +jpeg.lossless.ScanHeader.prototype.read = function(data) { + /*jslint bitwise: true */ - return max_blindex; -} + var count = 0, length, i, temp; + length = data.get16(); + count += 2; -/* =========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ -function send_all_trees(s, lcodes, dcodes, blcodes) -// deflate_state *s; -// int lcodes, dcodes, blcodes; /* number of codes for each tree */ -{ - var rank; /* index in bl_order */ - - //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); - //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, - // "too many codes"); - //Tracev((stderr, "\nbl counts: ")); - send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ - send_bits(s, dcodes - 1, 5); - send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ - for (rank = 0; rank < blcodes; rank++) { - //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); - send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); - } - //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + this.numComp = data.get8(); + count+=1; - send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ - //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + for (i = 0; i < this.numComp; i+=1) { + this.components[i] = new jpeg.lossless.ScanComponent(); - send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ - //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); -} + if (count > length) { + throw new Error("ERROR: scan header format error"); + } + this.components[i].scanCompSel = data.get8(); + count+=1; -/* =========================================================================== - * Check if the data type is TEXT or BINARY, using the following algorithm: - * - TEXT if the two conditions below are satisfied: - * a) There are no non-portable control characters belonging to the - * "black list" (0..6, 14..25, 28..31). - * b) There is at least one printable character belonging to the - * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). - * - BINARY otherwise. - * - The following partially-portable control characters form a - * "gray list" that is ignored in this detection algorithm: - * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). - * IN assertion: the fields Freq of dyn_ltree are set. - */ -function detect_data_type(s) { - /* black_mask is the bit mask of black-listed bytes - * set bits 0..6, 14..25, and 28..31 - * 0xf3ffc07f = binary 11110011111111111100000001111111 - */ - var black_mask = 0xf3ffc07f; - var n; + temp = data.get8(); + count+=1; - /* Check for non-textual ("black-listed") bytes. */ - for (n = 0; n <= 31; n++, black_mask >>>= 1) { - if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { - return Z_BINARY; + this.components[i].dcTabSel = (temp >> 4); + this.components[i].acTabSel = (temp & 0x0F); } - } - /* Check for textual ("white-listed") bytes. */ - if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || - s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - for (n = 32; n < LITERALS; n++) { - if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { - return Z_TEXT; - } - } + this.selection = data.get8(); + count+=1; - /* There are no "black-listed" or "white-listed" bytes: - * this stream either is empty or has tolerated ("gray-listed") bytes only. - */ - return Z_BINARY; -} + this.spectralEnd = data.get8(); + count+=1; + temp = data.get8(); + this.ah = (temp >> 4); + this.al = (temp & 0x0F); + count+=1; -var static_init_done = false; + if (count !== length) { + throw new Error("ERROR: scan header format error [count!=Ns]"); + } -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -function _tr_init(s) -{ + return 1; +}; - if (!static_init_done) { - tr_static_init(); - static_init_done = true; - } - s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); - s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); - s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); - s.bi_buf = 0; - s.bi_valid = 0; +/*** Exports ***/ - /* Initialize the first block of the first file: */ - init_block(s); +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.ScanHeader; } - -/* =========================================================================== - * Send a stored block +},{"./data-stream.js":10,"./scan-component.js":16}],18:[function(require,module,exports){ +/* + * Copyright (C) 2015 Michael Martinez + * Changes: Added support for selection values 2-7, fixed minor bugs & + * warnings, split into multiple class files, and general clean up. + * + * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT. */ -function _tr_stored_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - copy_block(s, buf, stored_len, true); /* with header */ -} +/* + * Copyright (C) Helmut Dersch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: -/* =========================================================================== - * Send one empty static block to give enough lookahead for inflate. - * This takes 10 bits, of which 7 may remain in the bit buffer. - */ -function _tr_align(s) { - send_bits(s, STATIC_TREES << 1, 3); - send_code(s, END_BLOCK, static_ltree); - bi_flush(s); -} - + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. -/* =========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. */ -function _tr_flush_block(s, buf, stored_len, last) -//DeflateState *s; -//charf *buf; /* input block, or NULL if too old */ -//ulg stored_len; /* length of input block */ -//int last; /* one if this is the last block for a file */ -{ - var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ - var max_blindex = 0; /* index of last bit length code of non zero freq */ - - /* Build the Huffman trees unless a stored block is forced */ - if (s.level > 0) { - - /* Check if the file is binary or text */ - if (s.strm.data_type === Z_UNKNOWN) { - s.strm.data_type = detect_data_type(s); - } - - /* Construct the literal and distance trees */ - build_tree(s, s.l_desc); - // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - - build_tree(s, s.d_desc); - // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - // s->static_len)); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = build_bl_tree(s); +/*jslint browser: true, node: true */ +/*global require, module */ - /* Determine the best encoding. Compute the block lengths in bytes. */ - opt_lenb = (s.opt_len + 3 + 7) >>> 3; - static_lenb = (s.static_len + 3 + 7) >>> 3; +"use strict"; - // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->last_lit)); +/*** Imports ***/ +var jpeg = jpeg || {}; +jpeg.lossless = jpeg.lossless || {}; - if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } - } else { - // Assert(buf != (char*)0, "lost buf"); - opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ - } +/*** Constructor ***/ +jpeg.lossless.Utils = jpeg.lossless.Utils || {}; - if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { - /* 4: two words for the lengths */ - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - _tr_stored_block(s, buf, stored_len, last); +/*** Static methods ***/ - } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { +// http://stackoverflow.com/questions/966225/how-can-i-create-a-two-dimensional-array-in-javascript +jpeg.lossless.Utils.createArray = function (length) { + var arr = new Array(length || 0), + i = length; - send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); - compress_block(s, static_ltree, static_dtree); + if (arguments.length > 1) { + var args = Array.prototype.slice.call(arguments, 1); + while(i--) arr[length-1 - i] = jpeg.lossless.Utils.createArray.apply(this, args); + } - } else { - send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); - send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); - compress_block(s, s.dyn_ltree, s.dyn_dtree); - } - // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); - /* The above check is made mod 2^32, for files larger than 512 MB - * and uLong implemented on 32 bits. - */ - init_block(s); + return arr; +}; - if (last) { - bi_windup(s); - } - // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - // s->compressed_len-7*last)); -} -/* =========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ -function _tr_tally(s, dist, lc) -// deflate_state *s; -// unsigned dist; /* distance of matched string */ -// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ -{ - //var out_length, in_length, dcode; - - s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; - s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; - - s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; - s.last_lit++; - - if (dist === 0) { - /* lc is the unmatched char */ - s.dyn_ltree[lc * 2]/*.Freq*/++; - } else { - s.matches++; - /* Here, lc is the match length - MIN_MATCH */ - dist--; /* dist = match distance - 1 */ - //Assert((ush)dist < (ush)MAX_DIST(s) && - // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && - // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); - - s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; - s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; - } +// http://stackoverflow.com/questions/18638900/javascript-crc32 +jpeg.lossless.Utils.makeCRCTable = function(){ + var c; + var crcTable = []; + for(var n =0; n < 256; n++){ + c = n; + for(var k =0; k < 8; k++){ + c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + crcTable[n] = c; + } + return crcTable; +}; -// (!) This block is disabled in zlib defaults, -// don't enable it for binary compatibility +jpeg.lossless.Utils.crc32 = function(dataView) { + var uint8view = new Uint8Array(dataView.buffer); + var crcTable = jpeg.lossless.Utils.crcTable || (jpeg.lossless.Utils.crcTable = jpeg.lossless.Utils.makeCRCTable()); + var crc = 0 ^ (-1); -//#ifdef TRUNCATE_BLOCK -// /* Try to guess if it is profitable to stop the current block here */ -// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { -// /* Compute an upper bound for the compressed length */ -// out_length = s.last_lit*8; -// in_length = s.strstart - s.block_start; -// -// for (dcode = 0; dcode < D_CODES; dcode++) { -// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); -// } -// out_length >>>= 3; -// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", -// // s->last_lit, in_length, out_length, -// // 100L - out_length*100L/in_length)); -// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { -// return true; -// } -// } -//#endif + for (var i = 0; i < uint8view.length; i++ ) { + crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xFF]; + } - return (s.last_lit === s.lit_bufsize - 1); - /* We avoid equality with lit_bufsize because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ -} + return (crc ^ (-1)) >>> 0; +}; -exports._tr_init = _tr_init; -exports._tr_stored_block = _tr_stored_block; -exports._tr_flush_block = _tr_flush_block; -exports._tr_tally = _tr_tally; -exports._tr_align = _tr_align; -},{"../utils/common":19}],31:[function(require,module,exports){ -'use strict'; +/*** Exports ***/ -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. - -function ZStream() { - /* next input byte */ - this.input = null; // JS specific, because we have no pointers - this.next_in = 0; - /* number of bytes available at input */ - this.avail_in = 0; - /* total number of input bytes read so far */ - this.total_in = 0; - /* next output byte should be put there */ - this.output = null; // JS specific, because we have no pointers - this.next_out = 0; - /* remaining free space at output */ - this.avail_out = 0; - /* total number of bytes output so far */ - this.total_out = 0; - /* last error message, NULL if no error */ - this.msg = ''/*Z_NULL*/; - /* not visible by applications */ - this.state = null; - /* best guess about the data type: binary or text */ - this.data_type = 2/*Z_UNKNOWN*/; - /* adler32 value of the uncompressed data */ - this.adler = 0; +var moduleType = typeof module; +if ((moduleType !== 'undefined') && module.exports) { + module.exports = jpeg.lossless.Utils; } -module.exports = ZStream; - -},{}],32:[function(require,module,exports){ +},{}],19:[function(require,module,exports){ (function (process){(function (){ // .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, // backported and transplited with Babel, with backwards-compat fixes @@ -14168,7 +9929,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this)}).call(this,require('_process')) -},{"_process":33}],33:[function(require,module,exports){ +},{"_process":20}],20:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -14354,7 +10115,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],34:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -14414,7 +10175,7 @@ var moduleType = typeof module; if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.CompressionUtils; } -},{}],35:[function(require,module,exports){ +},{}],22:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -18128,7 +13889,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Dictionary; } -},{"./utilities.js":45}],36:[function(require,module,exports){ +},{"./utilities.js":32}],23:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -19779,7 +15540,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Image; } -},{"../lib/jpeg-baseline.js":2,"../lib/jpeg-ls.js":3,"../lib/jpx.js":4,"./compression-utils.js":34,"./parser.js":40,"./rle.js":41,"./tag.js":44,"./utilities.js":45,"jpeg-lossless-decoder-js":11}],37:[function(require,module,exports){ +},{"../lib/jpeg-baseline.js":2,"../lib/jpeg-ls.js":3,"../lib/jpx.js":4,"./compression-utils.js":21,"./parser.js":27,"./rle.js":28,"./tag.js":31,"./utilities.js":32,"jpeg-lossless-decoder-js":14}],24:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require */ @@ -19819,7 +15580,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.OrderedMapIterator; } -},{}],38:[function(require,module,exports){ +},{}],25:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -19857,7 +15618,9 @@ var JpxImage = JpxImage || ((typeof require !== 'undefined') ? require('../lib/j var CharLS = CharLS || ((typeof require !== 'undefined') ? require('../lib/charLS-DynamicMemory-browser.js') : null); var JpegLSDecoder = JpegLSDecoder || ((typeof require !== 'undefined') ? require('../lib/jpeg-ls.js') : null); -var pako = pako || ((typeof require !== 'undefined') ? require('pako') : null); +//use fflate not pako +//var pako = pako || ((typeof require !== 'undefined') ? require('pako') : null); +var fflate = fflate || ((typeof require !== 'undefined') ? require('fflate') : null); /*** Exports ***/ @@ -19866,7 +15629,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon; } -},{"../lib/charLS-DynamicMemory-browser.js":1,"../lib/jpeg-baseline.js":2,"../lib/jpeg-ls.js":3,"../lib/jpx.js":4,"./compression-utils.js":34,"./dictionary.js":35,"./image.js":36,"./iterator.js":37,"./orderedmap.js":39,"./parser.js":40,"./rle.js":41,"./series.js":42,"./siemens.js":43,"./tag.js":44,"./utilities.js":45,"jpeg-lossless-decoder-js":11,"pako":16}],39:[function(require,module,exports){ +},{"../lib/charLS-DynamicMemory-browser.js":1,"../lib/jpeg-baseline.js":2,"../lib/jpeg-ls.js":3,"../lib/jpx.js":4,"./compression-utils.js":21,"./dictionary.js":22,"./image.js":23,"./iterator.js":24,"./orderedmap.js":26,"./parser.js":27,"./rle.js":28,"./series.js":29,"./siemens.js":30,"./tag.js":31,"./utilities.js":32,"fflate":7,"jpeg-lossless-decoder-js":14}],26:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require */ @@ -19947,7 +15710,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.OrderedMap; } -},{"./iterator.js":37}],40:[function(require,module,exports){ +},{"./iterator.js":24}],27:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -19961,8 +15724,9 @@ daikon.Utils = daikon.Utils || ((typeof require !== 'undefined') ? require('./ut daikon.Dictionary = daikon.Dictionary || ((typeof require !== 'undefined') ? require('./dictionary.js') : null); daikon.Image = daikon.Image || ((typeof require !== 'undefined') ? require('./image.js') : null); -var pako = pako || ((typeof require !== 'undefined') ? require('pako') : null); - +//use fflate not pako +//var pako = pako || ((typeof require !== 'undefined') ? require('pako') : null); +var fflate = fflate || ((typeof require !== 'undefined') ? require('fflate') : null); /*** Constructor ***/ @@ -20069,7 +15833,8 @@ daikon.Parser.prototype.parse = function (data) { this.needsDeflate = false; copyMeta = data.buffer.slice(0, tag.offsetEnd); copyDeflated = data.buffer.slice(tag.offsetEnd); - this.inflated = daikon.Utils.concatArrayBuffers(copyMeta, pako.inflateRaw(copyDeflated)); + //this.inflated = daikon.Utils.concatArrayBuffers(copyMeta, pako.inflateRaw(copyDeflated)); + this.inflated = daikon.Utils.concatArrayBuffers(copyMeta, fflate.decompressSync(new Uint8Array(copyDeflated))); data = new DataView(this.inflated); } @@ -20162,7 +15927,6 @@ daikon.Parser.prototype.getNextTag = function (data, offset, testForTag) { element = data.getUint16(offset, little); offset += 2; - if (this.explicit || !this.metaFinished) { vr = daikon.Utils.getStringAt(data, offset, 2); @@ -20223,27 +15987,39 @@ daikon.Parser.prototype.getNextTag = function (data, offset, testForTag) { } offset += length; - tag = new daikon.Tag(group, element, vr, value, offsetStart, offsetValue, offset, this.littleEndian); - - if (tag.isTransformSyntax() && !this.transformSyntaxAlreadyExist) { - // 传输语法已存在 - this.transformSyntaxAlreadyExist = true; - if (tag.value[0] === daikon.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE) { - this.explicit = false; - this.littleEndian = true; - } else if (tag.value[0] === daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG) { - this.explicit = true; - this.littleEndian = false; - } else if (tag.value[0] === daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE) { - this.needsDeflate = true; - this.explicit = true; - this.littleEndian = true; - } else { - this.explicit = true; - this.littleEndian = true; + tag = new daikon.Tag(group, element, vr, value, offsetStart, offsetValue, offset, this.littleEndian, this.charset); + + if (tag.value) { + if (tag.isTransformSyntax()) { + // 传输语法已存在 + this.transformSyntaxAlreadyExist = true; + if (tag.value[0] === daikon.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE) { + this.explicit = false; + this.littleEndian = true; + } else if (tag.value[0] === daikon.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG) { + this.explicit = true; + this.littleEndian = false; + } else if (tag.value[0] === daikon.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE) { + this.needsDeflate = true; + this.explicit = true; + this.littleEndian = true; + } else { + this.explicit = true; + this.littleEndian = true; + } + } else if (tag.isMetaLength()) { + this.metaFinishedOffset = tag.value[0] + offset; + } else if (tag.isCharset()) { + var charset = tag.value; + if (charset.length == 2) { + charset = (charset[0] || "ISO 2022 IR 6") + "\\" + charset[1]; + } + else if (charset.length == 1) { + + charset = charset[0]; + } + this.charset = charset; } - } else if (tag.isMetaLength()) { - this.metaFinishedOffset = tag.value[0] + offset; } return tag; @@ -20375,7 +16151,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Parser; } -},{"./dictionary.js":35,"./image.js":36,"./tag.js":44,"./utilities.js":45,"pako":16}],41:[function(require,module,exports){ +},{"./dictionary.js":22,"./image.js":23,"./tag.js":31,"./utilities.js":32,"fflate":7}],28:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -20585,7 +16361,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.RLE; } -},{}],42:[function(require,module,exports){ +},{}],29:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -21170,7 +16946,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Series; } -},{"./image.js":36,"./iterator.js":37,"./orderedmap.js":39,"./parser.js":40,"./utilities.js":45}],43:[function(require,module,exports){ +},{"./image.js":23,"./iterator.js":24,"./orderedmap.js":26,"./parser.js":27,"./utilities.js":32}],30:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -21358,7 +17134,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Siemens; } -},{"./utilities.js":45}],44:[function(require,module,exports){ +},{"./utilities.js":32}],31:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require */ @@ -21386,7 +17162,7 @@ daikon.Siemens = daikon.Siemens || ((typeof require !== 'undefined') ? require(' * @property {number|number[]|string|string[]|object} value * @type {Function} */ -daikon.Tag = daikon.Tag || function (group, element, vr, value, offsetStart, offsetValue, offsetEnd, littleEndian) { +daikon.Tag = daikon.Tag || function (group, element, vr, value, offsetStart, offsetValue, offsetEnd, littleEndian, charset) { this.group = group; this.element = element; this.vr = vr; @@ -21402,7 +17178,7 @@ daikon.Tag = daikon.Tag || function (group, element, vr, value, offsetStart, off this.sublist = true; } else if (value !== null) { var dv = new DataView(value); - this.value = daikon.Tag.convertValue(vr, dv, littleEndian); + this.value = daikon.Tag.convertValue(vr, dv, littleEndian, charset); if ((this.value === dv) && this.isPrivateData()) { this.value = daikon.Tag.convertPrivateValue(group, element, dv); @@ -21495,6 +17271,7 @@ daikon.Tag.TAG_WINDOW_CENTER = [0x0028, 0x1050]; daikon.Tag.TAG_WINDOW_WIDTH = [0x0028, 0x1051]; // descriptors +daikon.Tag.TAG_SPECIFIC_CHAR_SET = [0x0008, 0x0005]; daikon.Tag.TAG_PATIENT_NAME = [0x0010, 0x0010]; daikon.Tag.TAG_PATIENT_ID = [0x0010, 0x0020]; daikon.Tag.TAG_STUDY_DATE = [0x0008, 0x0020]; @@ -21661,13 +17438,13 @@ daikon.Tag.getDoubleElscint = function (rawData) { -daikon.Tag.getFixedLengthStringValue = function (rawData, maxLength) { +daikon.Tag.getFixedLengthStringValue = function (rawData, maxLength, charset, vr) { var data, mul, ctr; mul = Math.floor(rawData.byteLength / maxLength); data = []; for (ctr = 0; ctr < mul; ctr += 1) { - data[ctr] = daikon.Utils.getStringAt(rawData, ctr * maxLength, maxLength); + data[ctr] = daikon.Utils.getStringAt(rawData, ctr * maxLength, maxLength, charset, vr); } return data; @@ -21675,8 +17452,8 @@ daikon.Tag.getFixedLengthStringValue = function (rawData, maxLength) { -daikon.Tag.getStringValue = function (rawData) { - var data = daikon.Utils.getStringAt(rawData, 0, rawData.byteLength).split('\\'), ctr; +daikon.Tag.getStringValue = function (rawData, charset, vr) { + var data = daikon.Utils.getStringAt(rawData, 0, rawData.byteLength, charset, vr).split('\\'), ctr; for (ctr = 0; ctr < data.length; ctr += 1) { data[ctr] = daikon.Utils.trim(data[ctr]); @@ -21849,14 +17626,18 @@ daikon.Tag.getIntegerStringValue = function (rawData) { -daikon.Tag.getSingleStringValue = function (rawData) { - return [daikon.Utils.trim(daikon.Utils.getStringAt(rawData, 0, rawData.byteLength))]; +daikon.Tag.getSingleStringValue = function (rawData, maxLength, charset, vr) { + var len = rawData.byteLength; + if (maxLength) { + len = Math.min(rawData.byteLength, maxLength); + } + return [daikon.Utils.trim(daikon.Utils.getStringAt(rawData, 0, len, charset, vr))]; }; -daikon.Tag.getPersonNameStringValue = function (rawData) { - var stringData = daikon.Tag.getStringValue(rawData), +daikon.Tag.getPersonNameStringValue = function (rawData, charset, vr) { + var stringData = daikon.Tag.getStringValue(rawData, charset, vr), data = [], ctr; @@ -21884,9 +17665,9 @@ daikon.Tag.convertPrivateValue = function (group, element, rawData) { -daikon.Tag.convertValue = function (vr, rawData, littleEndian) { +daikon.Tag.convertValue = function (vr, rawData, littleEndian, charset) { var data = null; - + // http://dicom.nema.org/dicom/2013/output/chtml/part05/sect_6.2.html if (vr === 'AE') { data = daikon.Tag.getSingleStringValue(rawData, daikon.Tag.VR_AE_MAX_LENGTH); } else if (vr === 'AS') { @@ -21910,9 +17691,9 @@ daikon.Tag.convertValue = function (vr, rawData, littleEndian) { } else if (vr === 'IS') { data = daikon.Tag.getIntegerStringValue(rawData); } else if (vr === 'LO') { - data = daikon.Tag.getStringValue(rawData); + data = daikon.Tag.getStringValue(rawData, charset, vr); } else if (vr === 'LT') { - data = daikon.Tag.getSingleStringValue(rawData); + data = daikon.Tag.getSingleStringValue(rawData, daikon.Tag.VR_AT_MAX_LENGTH, charset, vr); } else if (vr === 'OB') { data = rawData; } else if (vr === 'OD') { @@ -21922,9 +17703,9 @@ daikon.Tag.convertValue = function (vr, rawData, littleEndian) { } else if (vr === 'OW') { data = rawData; } else if (vr === 'PN') { - data = daikon.Tag.getPersonNameStringValue(rawData); + data = daikon.Tag.getPersonNameStringValue(rawData, charset, vr); } else if (vr === 'SH') { - data = daikon.Tag.getStringValue(rawData); + data = daikon.Tag.getStringValue(rawData, charset, vr); } else if (vr === 'SL') { data = daikon.Tag.getSignedInteger32(rawData, littleEndian); } else if (vr === 'SQ') { @@ -21932,7 +17713,7 @@ daikon.Tag.convertValue = function (vr, rawData, littleEndian) { } else if (vr === 'SS') { data = daikon.Tag.getSignedInteger16(rawData, littleEndian); } else if (vr === 'ST') { - data = daikon.Tag.getSingleStringValue(rawData); + data = daikon.Tag.getSingleStringValue(rawData, daikon.Tag.VR_ST_MAX_LENGTH, charset, vr); } else if (vr === 'TM') { data = daikon.Tag.getTimeStringValue(rawData); } else if (vr === 'UI') { @@ -21944,7 +17725,7 @@ daikon.Tag.convertValue = function (vr, rawData, littleEndian) { } else if (vr === 'US') { data = daikon.Tag.getUnsignedInteger16(rawData, littleEndian); } else if (vr === 'UT') { - data = daikon.Tag.getSingleStringValue(rawData); + data = daikon.Tag.getSingleStringValue(rawData, Number.MAX_SAFE_INTEGER, charset, vr); } else if (vr === 'UC') { data = daikon.Tag.getStringValue(rawData); } @@ -22040,6 +17821,15 @@ daikon.Tag.prototype.isTransformSyntax = function () { }; +/** + * Returns true if this is the char set tag. + * @returns {boolean} + */ +daikon.Tag.prototype.isCharset = function () { + return (this.group === daikon.Tag.TAG_SPECIFIC_CHAR_SET[0]) && (this.element === daikon.Tag.TAG_SPECIFIC_CHAR_SET[1]); +}; + + /** * Returns true if this is the pixel data tag. * @returns {boolean} @@ -22111,7 +17901,7 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Tag; } -},{"./dictionary.js":35,"./siemens.js":43,"./utilities.js":45}],45:[function(require,module,exports){ +},{"./dictionary.js":22,"./siemens.js":30,"./utilities.js":32}],32:[function(require,module,exports){ /*jslint browser: true, node: true */ /*global require, module */ @@ -22119,6 +17909,7 @@ if ((moduleType !== 'undefined') && module.exports) { "use strict"; /*** Imports ***/ +var convertBytes = require('@wearemothership/dicom-character-set').convertBytes; var daikon = daikon || {}; daikon.Utils = daikon.Utils || {}; @@ -22155,15 +17946,12 @@ daikon.Utils.createArray = function (length) { }; -daikon.Utils.getStringAt = function (dataview, start, length) { - var str = "", ctr, ch; - - for (ctr = 0; ctr < length; ctr += 1) { - ch = dataview.getUint8(start + ctr); - - if (ch !== 0) { - str += String.fromCharCode(ch); - } +daikon.Utils.getStringAt = function (dataview, start, length, charset, vr) { + var strBuff = new Uint8Array(dataview.buffer, dataview.byteOffset + start, length); + var str = convertBytes(charset || "ISO 2022 IR 6", strBuff, {vr: vr} ); + + while (str && str.charCodeAt(str.length - 1) === 0) { + str = str.slice(0,-1); } return str; @@ -22426,5 +18214,5 @@ if ((moduleType !== 'undefined') && module.exports) { module.exports = daikon.Utils; } -},{}]},{},[38])(38) +},{"@wearemothership/dicom-character-set":5}]},{},[25])(25) });