11425 lines
1.2 MiB
11425 lines
1.2 MiB
/**
|
|
* @preserve libde265.js HEVC/H.265 decoder
|
|
* (c)2014 struktur AG, http://www.struktur.de, opensource@struktur.de
|
|
*
|
|
* This file is part of libde265.js
|
|
* https://github.com/strukturag/libde265.js
|
|
*
|
|
* libde265.js is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as
|
|
* published by the Free Software Foundation, either version 3 of
|
|
* the License, or (at your option) any later version.
|
|
*
|
|
* libde265.js is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with libde265.js. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
(function() {
|
|
var Module = {
|
|
print: function(text) {
|
|
text = Array.prototype.slice.call(arguments).join(' ');
|
|
console.log(text);
|
|
},
|
|
printErr: function(text) {
|
|
text = Array.prototype.slice.call(arguments).join(' ');
|
|
console.error(text);
|
|
},
|
|
canvas: {},
|
|
noInitialRun: true
|
|
};
|
|
|
|
// Note: For maximum-speed code, see "Optimizing Code" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code
|
|
// Note: Some Emscripten settings may limit the speed of the generated code.
|
|
// The Module object: Our interface to the outside world. We import
|
|
// and export values on it, and do the work to get that through
|
|
// closure compiler if necessary. There are various ways Module can be used:
|
|
// 1. Not defined. We create it here
|
|
// 2. A function parameter, function(Module) { ..generated code.. }
|
|
// 3. pre-run appended it, var Module = {}; ..generated code..
|
|
// 4. External script tag defines var Module.
|
|
// We need to do an eval in order to handle the closure compiler
|
|
// case, where this code here is minified but Module was defined
|
|
// elsewhere (e.g. case 4 above). We also need to check if Module
|
|
// already exists (e.g. case 3 above).
|
|
// Note that if you want to run closure, and also to use Module
|
|
// after the generated code, you will need to define var Module = {};
|
|
// before the code. Then that object will be used in the code, and you
|
|
// can continue to use Module afterwards as well.
|
|
var Module;
|
|
if (!Module) Module = eval('(function() { try { return Module || {} } catch(e) { return {} } })()');
|
|
|
|
// Sometimes an existing Module object exists with properties
|
|
// meant to overwrite the default module functionality. Here
|
|
// we collect those properties and reapply _after_ we configure
|
|
// the current environment's defaults to avoid having to be so
|
|
// defensive during initialization.
|
|
var moduleOverrides = {};
|
|
for (var key in Module) {
|
|
if (Module.hasOwnProperty(key)) {
|
|
moduleOverrides[key] = Module[key];
|
|
}
|
|
}
|
|
|
|
// The environment setup code below is customized to use Module.
|
|
// *** Environment setup code ***
|
|
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function';
|
|
var ENVIRONMENT_IS_WEB = typeof window === 'object';
|
|
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
|
|
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
|
|
|
|
if (ENVIRONMENT_IS_NODE) {
|
|
// Expose functionality in the same simple way that the shells work
|
|
// Note that we pollute the global namespace here, otherwise we break in node
|
|
if (!Module['print']) Module['print'] = function print(x) {
|
|
process['stdout'].write(x + '\n');
|
|
};
|
|
if (!Module['printErr']) Module['printErr'] = function printErr(x) {
|
|
process['stderr'].write(x + '\n');
|
|
};
|
|
|
|
var nodeFS = require('fs');
|
|
var nodePath = require('path');
|
|
|
|
Module['read'] = function read(filename, binary) {
|
|
filename = nodePath['normalize'](filename);
|
|
var ret = nodeFS['readFileSync'](filename);
|
|
// The path is absolute if the normalized version is the same as the resolved.
|
|
if (!ret && filename != nodePath['resolve'](filename)) {
|
|
filename = path.join(__dirname, '..', 'src', filename);
|
|
ret = nodeFS['readFileSync'](filename);
|
|
}
|
|
if (ret && !binary) ret = ret.toString();
|
|
return ret;
|
|
};
|
|
|
|
Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) };
|
|
|
|
Module['load'] = function load(f) {
|
|
globalEval(read(f));
|
|
};
|
|
|
|
Module['arguments'] = process['argv'].slice(2);
|
|
|
|
module['exports'] = Module;
|
|
}
|
|
else if (ENVIRONMENT_IS_SHELL) {
|
|
if (!Module['print']) Module['print'] = print;
|
|
if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm
|
|
|
|
if (typeof read != 'undefined') {
|
|
Module['read'] = read;
|
|
} else {
|
|
Module['read'] = function read() { throw 'no read() available (jsc?)' };
|
|
}
|
|
|
|
Module['readBinary'] = function readBinary(f) {
|
|
return read(f, 'binary');
|
|
};
|
|
|
|
if (typeof scriptArgs != 'undefined') {
|
|
Module['arguments'] = scriptArgs;
|
|
} else if (typeof arguments != 'undefined') {
|
|
Module['arguments'] = arguments;
|
|
}
|
|
|
|
this['Module'] = Module;
|
|
|
|
eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined"); // wipe out the SpiderMonkey shell 'gc' function, which can confuse closure (uses it as a minified name, and it is then initted to a non-falsey value unexpectedly)
|
|
}
|
|
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 {
|
|
// Probably a worker, and without console.log. We can do very little here...
|
|
var TRY_USE_DUMP = false;
|
|
if (!Module['print']) Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) {
|
|
dump(x);
|
|
}) : (function(x) {
|
|
// self.postMessage(x); // enable this if you want stdout to be sent as messages
|
|
}));
|
|
}
|
|
|
|
if (ENVIRONMENT_IS_WEB) {
|
|
this['Module'] = Module;
|
|
} else {
|
|
Module['load'] = importScripts;
|
|
}
|
|
}
|
|
else {
|
|
// Unreachable because SHELL is dependant on the others
|
|
throw 'Unknown runtime environment. Where are we?';
|
|
}
|
|
|
|
function globalEval(x) {
|
|
eval.call(null, x);
|
|
}
|
|
if (!Module['load'] == 'undefined' && 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'] = [];
|
|
}
|
|
// *** Environment setup code ***
|
|
|
|
// Closure helpers
|
|
Module.print = Module['print'];
|
|
Module.printErr = Module['printErr'];
|
|
|
|
// Callbacks
|
|
Module['preRun'] = [];
|
|
Module['postRun'] = [];
|
|
|
|
// Merge back in the overrides
|
|
for (var key in moduleOverrides) {
|
|
if (moduleOverrides.hasOwnProperty(key)) {
|
|
Module[key] = moduleOverrides[key];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// === Auto-generated preamble library stuff ===
|
|
|
|
//========================================
|
|
// Runtime code shared with compiler
|
|
//========================================
|
|
|
|
var Runtime = {
|
|
stackSave: function () {
|
|
return STACKTOP;
|
|
},
|
|
stackRestore: function (stackTop) {
|
|
STACKTOP = stackTop;
|
|
},
|
|
forceAlign: function (target, quantum) {
|
|
quantum = quantum || 4;
|
|
if (quantum == 1) return target;
|
|
if (isNumber(target) && isNumber(quantum)) {
|
|
return Math.ceil(target/quantum)*quantum;
|
|
} else if (isNumber(quantum) && isPowerOfTwo(quantum)) {
|
|
return '(((' +target + ')+' + (quantum-1) + ')&' + -quantum + ')';
|
|
}
|
|
return 'Math.ceil((' + target + ')/' + quantum + ')*' + quantum;
|
|
},
|
|
isNumberType: function (type) {
|
|
return type in Runtime.INT_TYPES || type in Runtime.FLOAT_TYPES;
|
|
},
|
|
isPointerType: function isPointerType(type) {
|
|
return type[type.length-1] == '*';
|
|
},
|
|
isStructType: function isStructType(type) {
|
|
if (isPointerType(type)) return false;
|
|
if (isArrayType(type)) return true;
|
|
if (/<?\{ ?[^}]* ?\}>?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types
|
|
// See comment in isStructPointerType()
|
|
return type[0] == '%';
|
|
},
|
|
INT_TYPES: {"i1":0,"i8":0,"i16":0,"i32":0,"i64":0},
|
|
FLOAT_TYPES: {"float":0,"double":0},
|
|
or64: function (x, y) {
|
|
var l = (x | 0) | (y | 0);
|
|
var h = (Math.round(x / 4294967296) | Math.round(y / 4294967296)) * 4294967296;
|
|
return l + h;
|
|
},
|
|
and64: function (x, y) {
|
|
var l = (x | 0) & (y | 0);
|
|
var h = (Math.round(x / 4294967296) & Math.round(y / 4294967296)) * 4294967296;
|
|
return l + h;
|
|
},
|
|
xor64: function (x, y) {
|
|
var l = (x | 0) ^ (y | 0);
|
|
var h = (Math.round(x / 4294967296) ^ Math.round(y / 4294967296)) * 4294967296;
|
|
return l + h;
|
|
},
|
|
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; // A pointer
|
|
} 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);
|
|
},
|
|
dedup: function dedup(items, ident) {
|
|
var seen = {};
|
|
if (ident) {
|
|
return items.filter(function(item) {
|
|
if (seen[item[ident]]) return false;
|
|
seen[item[ident]] = true;
|
|
return true;
|
|
});
|
|
} else {
|
|
return items.filter(function(item) {
|
|
if (seen[item]) return false;
|
|
seen[item] = true;
|
|
return true;
|
|
});
|
|
}
|
|
},
|
|
set: function set() {
|
|
var args = typeof arguments[0] === 'object' ? arguments[0] : arguments;
|
|
var ret = {};
|
|
for (var i = 0; i < args.length; i++) {
|
|
ret[args[i]] = 0;
|
|
}
|
|
return ret;
|
|
},
|
|
STACK_ALIGN: 8,
|
|
getAlignSize: function (type, size, vararg) {
|
|
// we align i64s and doubles on 64-bit boundaries, unlike x86
|
|
if (vararg) return 8;
|
|
if (!vararg && (type == 'i64' || type == 'double')) return 8;
|
|
if (!type) return Math.min(size, 8); // align structures internally to 64 bits
|
|
return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);
|
|
},
|
|
calculateStructAlignment: function calculateStructAlignment(type) {
|
|
type.flatSize = 0;
|
|
type.alignSize = 0;
|
|
var diffs = [];
|
|
var prev = -1;
|
|
var index = 0;
|
|
type.flatIndexes = type.fields.map(function(field) {
|
|
index++;
|
|
var size, alignSize;
|
|
if (Runtime.isNumberType(field) || Runtime.isPointerType(field)) {
|
|
size = Runtime.getNativeTypeSize(field); // pack char; char; in structs, also char[X]s.
|
|
alignSize = Runtime.getAlignSize(field, size);
|
|
} else if (Runtime.isStructType(field)) {
|
|
if (field[1] === '0') {
|
|
// this is [0 x something]. When inside another structure like here, it must be at the end,
|
|
// and it adds no size
|
|
// XXX this happens in java-nbody for example... assert(index === type.fields.length, 'zero-length in the middle!');
|
|
size = 0;
|
|
if (Types.types[field]) {
|
|
alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize);
|
|
} else {
|
|
alignSize = type.alignSize || QUANTUM_SIZE;
|
|
}
|
|
} else {
|
|
size = Types.types[field].flatSize;
|
|
alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize);
|
|
}
|
|
} else if (field[0] == 'b') {
|
|
// bN, large number field, like a [N x i8]
|
|
size = field.substr(1)|0;
|
|
alignSize = 1;
|
|
} else if (field[0] === '<') {
|
|
// vector type
|
|
size = alignSize = Types.types[field].flatSize; // fully aligned
|
|
} else if (field[0] === 'i') {
|
|
// illegal integer field, that could not be legalized because it is an internal structure field
|
|
// it is ok to have such fields, if we just use them as markers of field size and nothing more complex
|
|
size = alignSize = parseInt(field.substr(1))/8;
|
|
assert(size % 1 === 0, 'cannot handle non-byte-size field ' + field);
|
|
} else {
|
|
assert(false, 'invalid type for calculateStructAlignment');
|
|
}
|
|
if (type.packed) alignSize = 1;
|
|
type.alignSize = Math.max(type.alignSize, alignSize);
|
|
var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory
|
|
type.flatSize = curr + size;
|
|
if (prev >= 0) {
|
|
diffs.push(curr-prev);
|
|
}
|
|
prev = curr;
|
|
return curr;
|
|
});
|
|
if (type.name_ && type.name_[0] === '[') {
|
|
// arrays have 2 elements, so we get the proper difference. then we scale here. that way we avoid
|
|
// allocating a potentially huge array for [999999 x i8] etc.
|
|
type.flatSize = parseInt(type.name_.substr(1))*type.flatSize/2;
|
|
}
|
|
type.flatSize = Runtime.alignMemory(type.flatSize, type.alignSize);
|
|
if (diffs.length == 0) {
|
|
type.flatFactor = type.flatSize;
|
|
} else if (Runtime.dedup(diffs).length == 1) {
|
|
type.flatFactor = diffs[0];
|
|
}
|
|
type.needsFlattening = (type.flatFactor != 1);
|
|
return type.flatIndexes;
|
|
},
|
|
generateStructInfo: function (struct, typeName, offset) {
|
|
var type, alignment;
|
|
if (typeName) {
|
|
offset = offset || 0;
|
|
type = (typeof Types === 'undefined' ? Runtime.typeInfo : Types.types)[typeName];
|
|
if (!type) return null;
|
|
if (type.fields.length != struct.length) {
|
|
printErr('Number of named fields must match the type for ' + typeName + ': possibly duplicate struct names. Cannot return structInfo');
|
|
return null;
|
|
}
|
|
alignment = type.flatIndexes;
|
|
} else {
|
|
var type = { fields: struct.map(function(item) { return item[0] }) };
|
|
alignment = Runtime.calculateStructAlignment(type);
|
|
}
|
|
var ret = {
|
|
__size__: type.flatSize
|
|
};
|
|
if (typeName) {
|
|
struct.forEach(function(item, i) {
|
|
if (typeof item === 'string') {
|
|
ret[item] = alignment[i] + offset;
|
|
} else {
|
|
// embedded struct
|
|
var key;
|
|
for (var k in item) key = k;
|
|
ret[key] = Runtime.generateStructInfo(item[key], type.fields[i], alignment[i]);
|
|
}
|
|
});
|
|
} else {
|
|
struct.forEach(function(item, i) {
|
|
ret[item[1]] = alignment[i];
|
|
});
|
|
}
|
|
return ret;
|
|
},
|
|
dynCall: function (sig, ptr, args) {
|
|
if (args && args.length) {
|
|
if (!args.splice) args = Array.prototype.slice.call(args);
|
|
args.splice(0, 0, ptr);
|
|
return Module['dynCall_' + sig].apply(null, args);
|
|
} else {
|
|
return Module['dynCall_' + sig].call(null, ptr);
|
|
}
|
|
},
|
|
functionPointers: [],
|
|
addFunction: function (func) {
|
|
for (var i = 0; i < Runtime.functionPointers.length; i++) {
|
|
if (!Runtime.functionPointers[i]) {
|
|
Runtime.functionPointers[i] = func;
|
|
return 2*(1 + i);
|
|
}
|
|
}
|
|
throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.';
|
|
},
|
|
removeFunction: function (index) {
|
|
Runtime.functionPointers[(index-2)/2] = null;
|
|
},
|
|
getAsmConst: function (code, numArgs) {
|
|
// code is a constant string on the heap, so we can cache these
|
|
if (!Runtime.asmConstCache) Runtime.asmConstCache = {};
|
|
var func = Runtime.asmConstCache[code];
|
|
if (func) return func;
|
|
var args = [];
|
|
for (var i = 0; i < numArgs; i++) {
|
|
args.push(String.fromCharCode(36) + i); // $0, $1 etc
|
|
}
|
|
code = Pointer_stringify(code);
|
|
if (code[0] === '"') {
|
|
// tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct
|
|
if (code.indexOf('"', 1) === code.length-1) {
|
|
code = code.substr(1, code.length-2);
|
|
} else {
|
|
// something invalid happened, e.g. EM_ASM("..code($0)..", input)
|
|
abort('invalid EM_ASM input |' + code + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)');
|
|
}
|
|
}
|
|
return Runtime.asmConstCache[code] = eval('(function(' + args.join(',') + '){ ' + code + ' })'); // new Function does not allow upvars in node
|
|
},
|
|
warnOnce: function (text) {
|
|
if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {};
|
|
if (!Runtime.warnOnce.shown[text]) {
|
|
Runtime.warnOnce.shown[text] = 1;
|
|
Module.printErr(text);
|
|
}
|
|
},
|
|
funcWrappers: {},
|
|
getFuncWrapper: function (func, sig) {
|
|
assert(sig);
|
|
if (!Runtime.funcWrappers[func]) {
|
|
Runtime.funcWrappers[func] = function dynCall_wrapper() {
|
|
return Runtime.dynCall(sig, func, arguments);
|
|
};
|
|
}
|
|
return Runtime.funcWrappers[func];
|
|
},
|
|
UTF8Processor: function () {
|
|
var buffer = [];
|
|
var needed = 0;
|
|
this.processCChar = function (code) {
|
|
code = code & 0xFF;
|
|
|
|
if (buffer.length == 0) {
|
|
if ((code & 0x80) == 0x00) { // 0xxxxxxx
|
|
return String.fromCharCode(code);
|
|
}
|
|
buffer.push(code);
|
|
if ((code & 0xE0) == 0xC0) { // 110xxxxx
|
|
needed = 1;
|
|
} else if ((code & 0xF0) == 0xE0) { // 1110xxxx
|
|
needed = 2;
|
|
} else { // 11110xxx
|
|
needed = 3;
|
|
}
|
|
return '';
|
|
}
|
|
|
|
if (needed) {
|
|
buffer.push(code);
|
|
needed--;
|
|
if (needed > 0) return '';
|
|
}
|
|
|
|
var c1 = buffer[0];
|
|
var c2 = buffer[1];
|
|
var c3 = buffer[2];
|
|
var c4 = buffer[3];
|
|
var ret;
|
|
if (buffer.length == 2) {
|
|
ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F));
|
|
} else if (buffer.length == 3) {
|
|
ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F));
|
|
} else {
|
|
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
|
var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) |
|
|
((c3 & 0x3F) << 6) | (c4 & 0x3F);
|
|
ret = String.fromCharCode(
|
|
Math.floor((codePoint - 0x10000) / 0x400) + 0xD800,
|
|
(codePoint - 0x10000) % 0x400 + 0xDC00);
|
|
}
|
|
buffer.length = 0;
|
|
return ret;
|
|
}
|
|
this.processJSString = function processJSString(string) {
|
|
string = unescape(encodeURIComponent(string));
|
|
var ret = [];
|
|
for (var i = 0; i < string.length; i++) {
|
|
ret.push(string.charCodeAt(i));
|
|
}
|
|
return ret;
|
|
}
|
|
},
|
|
getCompilerSetting: function (name) {
|
|
throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work';
|
|
},
|
|
stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+7)&-8); return ret; },
|
|
staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+7)&-8); return ret; },
|
|
dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+7)&-8); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; },
|
|
alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 8))*(quantum ? quantum : 8); 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;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//========================================
|
|
// Runtime essentials
|
|
//========================================
|
|
|
|
var __THREW__ = 0; // Used in checking for thrown exceptions.
|
|
|
|
var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort()
|
|
var EXITSTATUS = 0;
|
|
|
|
var undef = 0;
|
|
// tempInt is used for 32-bit signed values or smaller. tempBigInt is used
|
|
// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt
|
|
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;
|
|
|
|
// C calling interface. A convenient way to call C functions (in C files, or
|
|
// defined with extern "C").
|
|
//
|
|
// Note: LLVM optimizations can inline and remove functions, after which you will not be
|
|
// able to call them. Closure can also do so. To avoid that, add your function to
|
|
// the exports using something like
|
|
//
|
|
// -s EXPORTED_FUNCTIONS='["_main", "_myfunc"]'
|
|
//
|
|
// @param ident The name of the C function (note that C++ functions will be name-mangled - use extern "C")
|
|
// @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and
|
|
// 'array' for JavaScript arrays and typed arrays; note that arrays are 8-bit).
|
|
// @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType,
|
|
// except that 'array' is not possible (there is no way for us to know the length of the array)
|
|
// @param args An array of the arguments to the function, as native JS values (as in returnType)
|
|
// Note that string arguments will be stored on the stack (the JS string will become a C string on the stack).
|
|
// @return The return value, as a native JS value (as in returnType)
|
|
function ccall(ident, returnType, argTypes, args) {
|
|
return ccallFunc(getCFunc(ident), returnType, argTypes, args);
|
|
}
|
|
Module["ccall"] = ccall;
|
|
|
|
// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
|
|
function getCFunc(ident) {
|
|
try {
|
|
var func = Module['_' + ident]; // closure exported function
|
|
if (!func) func = eval('_' + ident); // explicit lookup
|
|
} catch(e) {
|
|
}
|
|
assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');
|
|
return func;
|
|
}
|
|
|
|
// Internal function that does a C call using a function, not an identifier
|
|
function ccallFunc(func, returnType, argTypes, args) {
|
|
var stack = 0;
|
|
function toC(value, type) {
|
|
if (type == 'string') {
|
|
if (value === null || value === undefined || value === 0) return 0; // null string
|
|
value = intArrayFromString(value);
|
|
type = 'array';
|
|
}
|
|
if (type == 'array') {
|
|
if (!stack) stack = Runtime.stackSave();
|
|
var ret = Runtime.stackAlloc(value.length);
|
|
writeArrayToMemory(value, ret);
|
|
return ret;
|
|
}
|
|
return value;
|
|
}
|
|
function fromC(value, type) {
|
|
if (type == 'string') {
|
|
return Pointer_stringify(value);
|
|
}
|
|
assert(type != 'array');
|
|
return value;
|
|
}
|
|
var i = 0;
|
|
var cArgs = args ? args.map(function(arg) {
|
|
return toC(arg, argTypes[i++]);
|
|
}) : [];
|
|
var ret = fromC(func.apply(null, cArgs), returnType);
|
|
if (stack) Runtime.stackRestore(stack);
|
|
return ret;
|
|
}
|
|
|
|
// Returns a native JS wrapper for a C function. This is similar to ccall, but
|
|
// returns a function you can call repeatedly in a normal way. For example:
|
|
//
|
|
// var my_function = cwrap('my_c_function', 'number', ['number', 'number']);
|
|
// alert(my_function(5, 22));
|
|
// alert(my_function(99, 12));
|
|
//
|
|
function cwrap(ident, returnType, argTypes) {
|
|
var func = getCFunc(ident);
|
|
return function() {
|
|
return ccallFunc(func, returnType, argTypes, Array.prototype.slice.call(arguments));
|
|
}
|
|
}
|
|
Module["cwrap"] = cwrap;
|
|
|
|
// Sets a value in memory in a dynamic way at run-time. Uses the
|
|
// type data. This is the same as makeSetValue, except that
|
|
// makeSetValue is done at compile-time and generates the needed
|
|
// code then, whereas this function picks the right code at
|
|
// run-time.
|
|
// Note that setValue and getValue only do *aligned* writes and reads!
|
|
// Note that ccall uses JS types as for defining types, while setValue and
|
|
// getValue need LLVM types ('i8', 'i32') - this is a lower-level operation
|
|
function setValue(ptr, value, type, noSafe) {
|
|
type = type || 'i8';
|
|
if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
|
|
switch(type) {
|
|
case 'i1': HEAP8[(ptr)]=value; break;
|
|
case 'i8': HEAP8[(ptr)]=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;
|
|
|
|
// Parallel to setValue.
|
|
function getValue(ptr, type, noSafe) {
|
|
type = type || 'i8';
|
|
if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
|
|
switch(type) {
|
|
case 'i1': return HEAP8[(ptr)];
|
|
case 'i8': return HEAP8[(ptr)];
|
|
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; // Tries to use _malloc()
|
|
var ALLOC_STACK = 1; // Lives for the duration of the current function call
|
|
var ALLOC_STATIC = 2; // Cannot be freed
|
|
var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk
|
|
var ALLOC_NONE = 4; // Do not allocate
|
|
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;
|
|
|
|
// allocate(): This is for internal use. You can use it yourself as well, but the interface
|
|
// is a little tricky (see docs right below). The reason is that it is optimized
|
|
// for multiple syntaxes to save space in generated code. So you should
|
|
// normally not use allocate(), and instead allocate memory using _malloc(),
|
|
// initialize it with setValue(), and so forth.
|
|
// @slab: An array of data, or a number. If a number, then the size of the block to allocate,
|
|
// in *bytes* (note that this is sometimes confusing: the next parameter does not
|
|
// affect this!)
|
|
// @types: Either an array of types, one for each byte (or 0 if no type at that position),
|
|
// or a single type which is used for the entire block. This only matters if there
|
|
// is initial data - if @slab is a number, then this does not matter at all and is
|
|
// ignored.
|
|
// @allocator: How to allocate memory, see ALLOC_*
|
|
function allocate(slab, types, allocator, ptr) {
|
|
var zeroinit, size;
|
|
if (typeof slab === 'number') {
|
|
zeroinit = true;
|
|
size = slab;
|
|
} else {
|
|
zeroinit = false;
|
|
size = slab.length;
|
|
}
|
|
|
|
var singleType = typeof types === 'string' ? types : null;
|
|
|
|
var ret;
|
|
if (allocator == ALLOC_NONE) {
|
|
ret = ptr;
|
|
} else {
|
|
ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length));
|
|
}
|
|
|
|
if (zeroinit) {
|
|
var ptr = ret, stop;
|
|
assert((ret & 3) == 0);
|
|
stop = ret + (size & ~3);
|
|
for (; ptr < stop; ptr += 4) {
|
|
HEAP32[((ptr)>>2)]=0;
|
|
}
|
|
stop = ret + size;
|
|
while (ptr < stop) {
|
|
HEAP8[((ptr++)|0)]=0;
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
if (singleType === 'i8') {
|
|
if (slab.subarray || slab.slice) {
|
|
HEAPU8.set(slab, ret);
|
|
} else {
|
|
HEAPU8.set(new Uint8Array(slab), ret);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
var i = 0, type, typeSize, previousType;
|
|
while (i < size) {
|
|
var curr = slab[i];
|
|
|
|
if (typeof curr === 'function') {
|
|
curr = Runtime.getFunctionIndex(curr);
|
|
}
|
|
|
|
type = singleType || types[i];
|
|
if (type === 0) {
|
|
i++;
|
|
continue;
|
|
}
|
|
|
|
if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later
|
|
|
|
setValue(ret+i, curr, type);
|
|
|
|
// no need to look up size unless type changes, so cache it
|
|
if (previousType !== type) {
|
|
typeSize = Runtime.getNativeTypeSize(type);
|
|
previousType = type;
|
|
}
|
|
i += typeSize;
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
Module['allocate'] = allocate;
|
|
|
|
function Pointer_stringify(ptr, /* optional */ length) {
|
|
// TODO: use TextDecoder
|
|
// Find the length, and check for UTF while doing so
|
|
var hasUtf = false;
|
|
var t;
|
|
var i = 0;
|
|
while (1) {
|
|
t = HEAPU8[(((ptr)+(i))|0)];
|
|
if (t >= 128) hasUtf = true;
|
|
else if (t == 0 && !length) break;
|
|
i++;
|
|
if (length && i == length) break;
|
|
}
|
|
if (!length) length = i;
|
|
|
|
var ret = '';
|
|
|
|
if (!hasUtf) {
|
|
var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack
|
|
var curr;
|
|
while (length > 0) {
|
|
curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK)));
|
|
ret = ret ? ret + curr : curr;
|
|
ptr += MAX_CHUNK;
|
|
length -= MAX_CHUNK;
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
var utf8 = new Runtime.UTF8Processor();
|
|
for (i = 0; i < length; i++) {
|
|
t = HEAPU8[(((ptr)+(i))|0)];
|
|
ret += utf8.processCChar(t);
|
|
}
|
|
return ret;
|
|
}
|
|
Module['Pointer_stringify'] = Pointer_stringify;
|
|
|
|
// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns
|
|
// a copy of that string as a Javascript String object.
|
|
function UTF16ToString(ptr) {
|
|
var i = 0;
|
|
|
|
var str = '';
|
|
while (1) {
|
|
var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];
|
|
if (codeUnit == 0)
|
|
return str;
|
|
++i;
|
|
// fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.
|
|
str += String.fromCharCode(codeUnit);
|
|
}
|
|
}
|
|
Module['UTF16ToString'] = UTF16ToString;
|
|
|
|
// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
|
|
// null-terminated and encoded in UTF16LE form. The copy will require at most (str.length*2+1)*2 bytes of space in the HEAP.
|
|
function stringToUTF16(str, outPtr) {
|
|
for(var i = 0; i < str.length; ++i) {
|
|
// charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.
|
|
var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
|
|
HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit;
|
|
}
|
|
// Null-terminate the pointer to the HEAP.
|
|
HEAP16[(((outPtr)+(str.length*2))>>1)]=0;
|
|
}
|
|
Module['stringToUTF16'] = stringToUTF16;
|
|
|
|
// Given a pointer 'ptr' to a null-terminated UTF32LE-encoded string in the emscripten HEAP, returns
|
|
// a copy of that string as a Javascript String object.
|
|
function UTF32ToString(ptr) {
|
|
var i = 0;
|
|
|
|
var str = '';
|
|
while (1) {
|
|
var utf32 = HEAP32[(((ptr)+(i*4))>>2)];
|
|
if (utf32 == 0)
|
|
return str;
|
|
++i;
|
|
// Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.
|
|
if (utf32 >= 0x10000) {
|
|
var ch = utf32 - 0x10000;
|
|
str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
|
|
} else {
|
|
str += String.fromCharCode(utf32);
|
|
}
|
|
}
|
|
}
|
|
Module['UTF32ToString'] = UTF32ToString;
|
|
|
|
// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
|
|
// null-terminated and encoded in UTF32LE form. The copy will require at most (str.length+1)*4 bytes of space in the HEAP,
|
|
// but can use less, since str.length does not return the number of characters in the string, but the number of UTF-16 code units in the string.
|
|
function stringToUTF32(str, outPtr) {
|
|
var iChar = 0;
|
|
for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) {
|
|
// Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
|
|
var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate
|
|
if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) {
|
|
var trailSurrogate = str.charCodeAt(++iCodeUnit);
|
|
codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF);
|
|
}
|
|
HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit;
|
|
++iChar;
|
|
}
|
|
// Null-terminate the pointer to the HEAP.
|
|
HEAP32[(((outPtr)+(iChar*4))>>2)]=0;
|
|
}
|
|
Module['stringToUTF32'] = stringToUTF32;
|
|
|
|
function demangle(func) {
|
|
var i = 3;
|
|
// params, etc.
|
|
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) {
|
|
//return;
|
|
if (x) Module.print(x);
|
|
Module.print(func);
|
|
var pre = '';
|
|
for (var a = 0; a < i; a++) pre += ' ';
|
|
Module.print (pre + '^');
|
|
}
|
|
function parseNested() {
|
|
i++;
|
|
if (func[i] === 'K') i++; // ignore const
|
|
var parts = [];
|
|
while (func[i] !== 'E') {
|
|
if (func[i] === 'S') { // substitution
|
|
i++;
|
|
var next = func.indexOf('_', i);
|
|
var num = func.substring(i, next) || 0;
|
|
parts.push(subs[num] || '?');
|
|
i = next+1;
|
|
continue;
|
|
}
|
|
if (func[i] === 'C') { // constructor
|
|
parts.push(parts[parts.length-1]);
|
|
i += 2;
|
|
continue;
|
|
}
|
|
var size = parseInt(func.substr(i));
|
|
var pre = size.toString().length;
|
|
if (!size || !pre) { i--; break; } // counter i++ below us
|
|
var curr = func.substr(i + pre, size);
|
|
parts.push(curr);
|
|
subs.push(curr);
|
|
i += pre + size;
|
|
}
|
|
i++; // skip E
|
|
return parts;
|
|
}
|
|
function parse(rawList, limit, allowVoid) { // main parser
|
|
limit = limit || Infinity;
|
|
var ret = '', list = [];
|
|
function flushList() {
|
|
return '(' + list.join(', ') + ')';
|
|
}
|
|
var name;
|
|
if (func[i] === 'N') {
|
|
// namespaced N-E
|
|
name = parseNested().join('::');
|
|
limit--;
|
|
if (limit === 0) return rawList ? [name] : name;
|
|
} else {
|
|
// not namespaced
|
|
if (func[i] === 'K' || (first && func[i] === 'L')) i++; // ignore const and first 'L'
|
|
var size = parseInt(func.substr(i));
|
|
if (size) {
|
|
var pre = size.toString().length;
|
|
name = func.substr(i + pre, size);
|
|
i += pre + size;
|
|
}
|
|
}
|
|
first = false;
|
|
if (func[i] === 'I') {
|
|
i++;
|
|
var iList = parse(true);
|
|
var iRet = parse(true, 1, true);
|
|
ret += iRet[0] + ' ' + name + '<' + iList.join(', ') + '>';
|
|
} else {
|
|
ret = name;
|
|
}
|
|
paramLoop: while (i < func.length && limit-- > 0) {
|
|
//dump('paramLoop');
|
|
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; // pointer
|
|
case 'R': list.push(parse(true, 1, true)[0] + '&'); break; // reference
|
|
case 'L': { // literal
|
|
i++; // skip basic type
|
|
var end = func.indexOf('E', i);
|
|
var size = end - i;
|
|
list.push(func.substr(i, size));
|
|
i += size + 2; // size + 'EE'
|
|
break;
|
|
}
|
|
case 'A': { // array
|
|
var size = parseInt(func.substr(i));
|
|
i += size.toString().length;
|
|
if (func[i] !== '_') throw '?';
|
|
i++; // skip _
|
|
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 = []; // avoid (void)
|
|
return rawList ? list : ret + flushList();
|
|
}
|
|
try {
|
|
// Special-case the entry point, since its name differs from other name mangling.
|
|
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; // C function
|
|
if (func[2] !== 'Z') return func;
|
|
switch (func[3]) {
|
|
case 'n': return 'operator new()';
|
|
case 'd': return 'operator delete()';
|
|
}
|
|
return parse();
|
|
} catch(e) {
|
|
return func;
|
|
}
|
|
}
|
|
|
|
function demangleAll(text) {
|
|
return text.replace(/__Z[\w\d_]+/g, function(x) { var y = demangle(x); return x === y ? x : (x + ' [' + y + ']') });
|
|
}
|
|
|
|
function stackTrace() {
|
|
var stack = new Error().stack;
|
|
return stack ? demangleAll(stack) : '(no stack trace available)'; // Stack trace is not available at least on IE10 and Safari 6.
|
|
}
|
|
|
|
// Memory management
|
|
|
|
var PAGE_SIZE = 4096;
|
|
function alignMemoryPage(x) {
|
|
return (x+4095)&-4096;
|
|
}
|
|
|
|
var HEAP;
|
|
var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
|
|
|
|
var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area
|
|
var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area
|
|
var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk
|
|
|
|
function enlargeMemory() {
|
|
// TOTAL_MEMORY is the current size of the actual array, and DYNAMICTOP is the new top.
|
|
|
|
while (TOTAL_MEMORY <= DYNAMICTOP) { // Simple heuristic.
|
|
TOTAL_MEMORY = alignMemoryPage(2*TOTAL_MEMORY);
|
|
}
|
|
assert(TOTAL_MEMORY <= Math.pow(2, 30)); // 2^30==1GB is a practical maximum - 2^31 is already close to possible negative numbers etc.
|
|
var oldHEAP8 = HEAP8;
|
|
var buffer = new ArrayBuffer(TOTAL_MEMORY);
|
|
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);
|
|
HEAP8.set(oldHEAP8);
|
|
_emscripten_replace_memory(HEAP8, HEAP16, HEAP32, HEAPU8, HEAPU16, HEAPU32, HEAPF32, HEAPF64);
|
|
}
|
|
|
|
var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880;
|
|
var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;
|
|
var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152;
|
|
|
|
var totalMemory = 4096;
|
|
while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) {
|
|
if (totalMemory < 16*1024*1024) {
|
|
totalMemory *= 2;
|
|
} else {
|
|
totalMemory += 16*1024*1024
|
|
}
|
|
}
|
|
if (totalMemory !== TOTAL_MEMORY) {
|
|
Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be more reasonable');
|
|
TOTAL_MEMORY = totalMemory;
|
|
}
|
|
|
|
// Initialize the runtime's memory
|
|
// check for full engine support (use string 'subarray' to avoid closure compiler confusion)
|
|
assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']),
|
|
'JS engine does not provide full typed array support');
|
|
|
|
var buffer = new ArrayBuffer(TOTAL_MEMORY);
|
|
HEAP8 = new Int8Array(buffer);
|
|
HEAP16 = new Int16Array(buffer);
|
|
HEAP32 = new Int32Array(buffer);
|
|
HEAPU8 = new Uint8Array(buffer);
|
|
HEAPU16 = new Uint16Array(buffer);
|
|
HEAPU32 = new Uint32Array(buffer);
|
|
HEAPF32 = new Float32Array(buffer);
|
|
HEAPF64 = new Float64Array(buffer);
|
|
|
|
// Endianness check (note: assumes compiler arch was little-endian)
|
|
HEAP32[0] = 255;
|
|
assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system');
|
|
|
|
Module['HEAP'] = HEAP;
|
|
Module['HEAP8'] = HEAP8;
|
|
Module['HEAP16'] = HEAP16;
|
|
Module['HEAP32'] = HEAP32;
|
|
Module['HEAPU8'] = HEAPU8;
|
|
Module['HEAPU16'] = HEAPU16;
|
|
Module['HEAPU32'] = HEAPU32;
|
|
Module['HEAPF32'] = HEAPF32;
|
|
Module['HEAPF64'] = HEAPF64;
|
|
|
|
function callRuntimeCallbacks(callbacks) {
|
|
while(callbacks.length > 0) {
|
|
var callback = callbacks.shift();
|
|
if (typeof callback == 'function') {
|
|
callback();
|
|
continue;
|
|
}
|
|
var func = callback.func;
|
|
if (typeof func === 'number') {
|
|
if (callback.arg === undefined) {
|
|
Runtime.dynCall('v', func);
|
|
} else {
|
|
Runtime.dynCall('vi', func, [callback.arg]);
|
|
}
|
|
} else {
|
|
func(callback.arg === undefined ? null : callback.arg);
|
|
}
|
|
}
|
|
}
|
|
|
|
var __ATPRERUN__ = []; // functions called before the runtime is initialized
|
|
var __ATINIT__ = []; // functions called during startup
|
|
var __ATMAIN__ = []; // functions called when main() is to be run
|
|
var __ATEXIT__ = []; // functions called during shutdown
|
|
var __ATPOSTRUN__ = []; // functions called after the runtime has exited
|
|
|
|
var runtimeInitialized = false;
|
|
|
|
function preRun() {
|
|
// compatibility - merge in anything from Module['preRun'] at this time
|
|
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__);
|
|
}
|
|
|
|
function postRun() {
|
|
// compatibility - merge in anything from Module['postRun'] at this time
|
|
if (Module['postRun']) {
|
|
if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
|
|
while (Module['postRun'].length) {
|
|
addOnPostRun(Module['postRun'].shift());
|
|
}
|
|
}
|
|
callRuntimeCallbacks(__ATPOSTRUN__);
|
|
}
|
|
|
|
function addOnPreRun(cb) {
|
|
__ATPRERUN__.unshift(cb);
|
|
}
|
|
Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun;
|
|
|
|
function addOnInit(cb) {
|
|
__ATINIT__.unshift(cb);
|
|
}
|
|
Module['addOnInit'] = Module.addOnInit = addOnInit;
|
|
|
|
function addOnPreMain(cb) {
|
|
__ATMAIN__.unshift(cb);
|
|
}
|
|
Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain;
|
|
|
|
function addOnExit(cb) {
|
|
__ATEXIT__.unshift(cb);
|
|
}
|
|
Module['addOnExit'] = Module.addOnExit = addOnExit;
|
|
|
|
function addOnPostRun(cb) {
|
|
__ATPOSTRUN__.unshift(cb);
|
|
}
|
|
Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun;
|
|
|
|
// Tools
|
|
|
|
// This processes a JS string into a C-line array of numbers, 0-terminated.
|
|
// For LLVM-originating strings, see parser.js:parseLLVMString function
|
|
function intArrayFromString(stringy, dontAddNull, length /* optional */) {
|
|
var ret = (new Runtime.UTF8Processor()).processJSString(stringy);
|
|
if (length) {
|
|
ret.length = length;
|
|
}
|
|
if (!dontAddNull) {
|
|
ret.push(0);
|
|
}
|
|
return ret;
|
|
}
|
|
Module['intArrayFromString'] = intArrayFromString;
|
|
|
|
function intArrayToString(array) {
|
|
var ret = [];
|
|
for (var i = 0; i < array.length; i++) {
|
|
var chr = array[i];
|
|
if (chr > 0xFF) {
|
|
chr &= 0xFF;
|
|
}
|
|
ret.push(String.fromCharCode(chr));
|
|
}
|
|
return ret.join('');
|
|
}
|
|
Module['intArrayToString'] = intArrayToString;
|
|
|
|
// Write a Javascript array to somewhere in the heap
|
|
function writeStringToMemory(string, buffer, dontAddNull) {
|
|
var array = intArrayFromString(string, dontAddNull);
|
|
var i = 0;
|
|
while (i < array.length) {
|
|
var chr = array[i];
|
|
HEAP8[(((buffer)+(i))|0)]=chr;
|
|
i = i + 1;
|
|
}
|
|
}
|
|
Module['writeStringToMemory'] = writeStringToMemory;
|
|
|
|
function writeArrayToMemory(array, buffer) {
|
|
for (var i = 0; i < array.length; i++) {
|
|
HEAP8[(((buffer)+(i))|0)]=array[i];
|
|
}
|
|
}
|
|
Module['writeArrayToMemory'] = writeArrayToMemory;
|
|
|
|
function writeAsciiToMemory(str, buffer, dontAddNull) {
|
|
for (var i = 0; i < str.length; i++) {
|
|
HEAP8[(((buffer)+(i))|0)]=str.charCodeAt(i);
|
|
}
|
|
if (!dontAddNull) HEAP8[(((buffer)+(str.length))|0)]=0;
|
|
}
|
|
Module['writeAsciiToMemory'] = writeAsciiToMemory;
|
|
|
|
function unSign(value, bits, ignore) {
|
|
if (value >= 0) {
|
|
return value;
|
|
}
|
|
return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts
|
|
: Math.pow(2, bits) + value;
|
|
}
|
|
function reSign(value, bits, ignore) {
|
|
if (value <= 0) {
|
|
return value;
|
|
}
|
|
var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32
|
|
: Math.pow(2, bits-1);
|
|
if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that
|
|
// but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors
|
|
// TODO: In i64 mode 1, resign the two parts separately and safely
|
|
value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts
|
|
}
|
|
return value;
|
|
}
|
|
|
|
Math['imul'] = function imul(a, b) {
|
|
return (a*b)|0; // fast but imprecise
|
|
};
|
|
Math.imul = Math['imul'];
|
|
|
|
|
|
var Math_abs = Math.abs;
|
|
var Math_cos = Math.cos;
|
|
var Math_sin = Math.sin;
|
|
var Math_tan = Math.tan;
|
|
var Math_acos = Math.acos;
|
|
var Math_asin = Math.asin;
|
|
var Math_atan = Math.atan;
|
|
var Math_atan2 = Math.atan2;
|
|
var Math_exp = Math.exp;
|
|
var Math_log = Math.log;
|
|
var Math_sqrt = Math.sqrt;
|
|
var Math_ceil = Math.ceil;
|
|
var Math_floor = Math.floor;
|
|
var Math_pow = Math.pow;
|
|
var Math_imul = Math.imul;
|
|
var Math_fround = Math.fround;
|
|
var Math_min = Math.min;
|
|
|
|
// A counter of dependencies for calling run(). If we need to
|
|
// do asynchronous work before running, increment this and
|
|
// decrement it. Incrementing must happen in a place like
|
|
// PRE_RUN_ADDITIONS (used by emcc to add file preloading).
|
|
// Note that you can add dependencies in preRun, even though
|
|
// it happens right before run - run will be postponed until
|
|
// the dependencies are met.
|
|
var runDependencies = 0;
|
|
var runDependencyWatcher = null;
|
|
var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled
|
|
|
|
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(); // can add another dependenciesFulfilled
|
|
}
|
|
}
|
|
}
|
|
Module['removeRunDependency'] = removeRunDependency;
|
|
|
|
Module["preloadedImages"] = {}; // maps url to image data
|
|
Module["preloadedAudios"] = {}; // maps url to audio data
|
|
|
|
|
|
var memoryInitializer = null;
|
|
|
|
// === Body ===
|
|
|
|
|
|
|
|
STATIC_BASE = 8;
|
|
|
|
STATICTOP = STATIC_BASE + 51944;
|
|
|
|
|
|
|
|
var _stdout;
|
|
var _stdout=_stdout=allocate(1, "i32*", ALLOC_STATIC);
|
|
var _stdin;
|
|
var _stdin=_stdin=allocate(1, "i32*", ALLOC_STATIC);
|
|
var _stderr;
|
|
var _stderr=_stderr=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
/* global initializers */ __ATINIT__.push({ func: function() { runPostSets() } },{ func: function() { __GLOBAL__I_a() } });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ___dso_handle;
|
|
var ___dso_handle=___dso_handle=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var __ZTVN10__cxxabiv120__si_class_type_infoE;
|
|
__ZTVN10__cxxabiv120__si_class_type_infoE=allocate([0,0,0,0,160,105,0,0,250,0,0,0,172,0,0,0,70,0,0,0,178,0,0,0,8,0,0,0,10,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC);;
|
|
var __ZTVN10__cxxabiv117__class_type_infoE;
|
|
__ZTVN10__cxxabiv117__class_type_infoE=allocate([0,0,0,0,176,105,0,0,250,0,0,0,38,1,0,0,70,0,0,0,178,0,0,0,8,0,0,0,28,0,0,0,8,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC);;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var __ZTISt9exception;
|
|
var __ZTISt9exception=__ZTISt9exception=allocate([allocate([1,0,0,0,0,0,0], "i8", ALLOC_STATIC)+8, 0], "i32", ALLOC_STATIC);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var __ZN19context_model_tableC1Ev;
|
|
var __ZN19context_model_tableC1ERKS_;
|
|
var __ZN19context_model_tableD1Ev;
|
|
var __ZN15decoder_contextC1Ev;
|
|
var __ZN22decoded_picture_bufferC1Ev;
|
|
var __ZN22decoded_picture_bufferD1Ev;
|
|
var __ZN11de265_imageC1Ev;
|
|
var __ZN11de265_imageD1Ev;
|
|
var __ZN10NAL_ParserC1Ev;
|
|
var __ZN10NAL_ParserD1Ev;
|
|
var __ZN17pic_parameter_setC1Ev;
|
|
var __ZN17pic_parameter_setD1Ev;
|
|
var __ZN17seq_parameter_setC1Ev;
|
|
var __ZN17seq_parameter_setD1Ev;
|
|
var __ZN19de265_progress_lockC1Ev;
|
|
var __ZN19de265_progress_lockD1Ev;
|
|
var __ZN27video_usability_informationC1Ev;
|
|
var __ZNSt13runtime_errorC1EPKc;
|
|
var __ZNSt13runtime_errorD1Ev;
|
|
var __ZNSt12length_errorD1Ev;
|
|
var __ZNSt3__16localeC1Ev;
|
|
var __ZNSt3__16localeC1ERKS0_;
|
|
var __ZNSt3__16localeD1Ev;
|
|
var __ZNSt8bad_castC1Ev;
|
|
var __ZNSt8bad_castD1Ev;
|
|
/* memory initializer */ allocate([29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,34,0,0,0,34,0,0,0,35,0,0,0,35,0,0,0,36,0,0,0,36,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,26,0,0,0,21,0,0,0,17,0,0,0,13,0,0,0,9,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,254,255,255,255,251,255,255,255,247,255,255,255,243,255,255,255,239,255,255,255,235,255,255,255,230,255,255,255,224,255,255,255,230,255,255,255,235,255,255,255,239,255,255,255,243,255,255,255,247,255,255,255,251,255,255,255,254,255,255,255,0,0,0,0,2,0,0,0,5,0,0,0,9,0,0,0,13,0,0,0,17,0,0,0,21,0,0,0,26,0,0,0,32,0,0,0,0,0,0,0,95,112,137,0,255,9,47,15,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,111,118,101,114,115,99,97,110,95,97,112,112,114,111,112,114,105,97,116,101,95,102,108,97,103,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,74,117,108,0,0,0,0,0,118,112,115,95,109,97,120,95,115,117,98,95,108,97,121,101,114,115,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,80,80,83,32,37,100,32,104,97,115,32,110,111,116,32,98,101,101,110,32,114,101,97,100,10,0,0,0,0,0,0,0,74,117,110,0,0,0,0,0,52,58,50,58,48,0,0,0,65,112,114,0,0,0,0,0,77,97,114,0,0,0,0,0,70,101,98,0,0,0,0,0,99,111,110,116,101,120,116,32,62,61,32,48,32,38,38,32,99,111,110,116,101,120,116,32,60,61,32,50,0,0,0,0,108,111,103,50,95,115,97,111,95,111,102,102,115,101,116,95,115,99,97,108,101,95,99,104,114,111,109,97,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,99,97,110,110,111,116,32,115,116,97,114,116,32,100,101,99,111,100,105,110,103,32,116,104,114,101,97,100,115,0,0,0,74,97,110,0,0,0,0,0,102,97,108,115,101,0,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,42,114,101,102,99,110,116,62,49,0,0,0,0,0,0,0,68,101,99,101,109,98,101,114,0,0,0,0,0,0,0,0,105,100,120,60,105,110,116,114,97,80,114,101,100,77,111,100,101,67,46,100,97,116,97,95,115,105,122,101,0,0,0,0,99,111,109,112,111,110,101,110,116,0,0,0,0,0,0,0,78,111,118,101,109,98,101,114,0,0,0,0,0,0,0,0,121,60,115,112,115,46,80,105,99,72,101,105,103,104,116,73,110,77,105,110,80,85,115,0,79,99,116,111,98,101,114,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,0,0,120,60,115,112,115,46,80,105,99,87,105,100,116,104,73,110,77,105,110,80,85,115,0,0,83,101,112,116,101,109,98,101,114,0,0,0,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,0,0,0,111,118,101,114,115,99,97,110,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,0,65,117,103,117,115,116,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,118,112,115,95,109,97,120,95,108,97,121,101,114,115,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,104,100,114,45,62,110,117,109,95,114,101,102,95,105,100,120,95,108,49,95,97,99,116,105,118,101,32,60,61,32,49,54,0,0,0,0,0,0,0,0,74,117,108,121,0,0,0,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,74,117,110,101,0,0,0,0,109,111,110,111,99,104,114,111,109,101,0,0,0,0,0,0,77,97,121,0,0,0,0,0,65,112,114,105,108,0,0,0,115,108,105,99,101,45,115,101,103,109,101,110,116,45,37,100,59,37,100,0,0,0,0,0,108,111,103,50,95,115,97,111,95,111,102,102,115,101,116,95,115,99,97,108,101,95,108,117,109,97,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,68,80,66,47,111,117,116,112,117,116,32,113,117,101,117,101,32,102,117,108,108,0,0,0,69,82,82,58,32,0,0,0,77,97,114,99,104,0,0,0,99,116,98,45,114,111,119,45,37,100,0,0,0,0,0,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,70,101,98,114,117,97,114,121,0,0,0,0,0,0,0,0,37,112,32,97,115,115,105,103,110,32,61,32,37,112,10,0,98,97,115,105,99,95,115,116,114,105,110,103,0,0,0,0,33,40,116,114,97,102,111,68,101,112,116,104,61,61,48,32,38,38,32,108,111,103,50,84,114,97,102,111,83,105,122,101,61,61,50,41,0,0,0,0,74,97,110,117,97,114,121,0,80,114,101,100,77,111,100,101,32,61,61,32,99,117,80,114,101,100,77,111,100,101,0,0,99,98,102,95,108,117,109,97,32,33,61,32,45,49,0,0,68,0,0,0,101,0,0,0,99,0,0,0,0,0,0,0,99,98,102,95,99,114,32,33,61,32,45,49,0,0,0,0,108,101,110,103,116,104,32,62,61,32,48,0,0,0,0,0,99,97,98,97,99,95,98,121,112,97,115,115,95,97,108,105,103,110,109,101,110,116,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,58,32,37,100,10,0,0,0,115,97,109,112,108,101,32,97,115,112,101,99,116,32,114,97,116,105,111,32,32,32,32,32,32,32,32,58,32,37,100,58,37,100,10,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,0,0,0,0,99,98,102,95,99,98,32,33,61,32,45,49,0,0,0,0,112,101,114,115,105,115,116,101,110,116,95,114,105,99,101,95,97,100,97,112,116,97,116,105,111,110,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,118,105,100,101,111,95,112,97,114,97,109,101,116,101,114,95,115,101,116,95,105,100,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,104,100,114,45,62,110,117,109,95,114,101,102,95,105,100,120,95,108,48,95,97,99,116,105,118,101,32,60,61,32,49,54,0,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,0,0,0,0,99,116,120,73,100,120,76,111,111,107,117,112,91,108,111,103,50,119,45,50,93,91,99,73,100,120,93,91,115,99,97,110,73,100,120,93,91,112,114,101,118,67,115,98,102,93,91,120,67,43,40,121,67,60,60,108,111,103,50,119,41,93,32,61,61,32,99,116,120,73,100,120,73,110,99,0,0,0,0,0,104,105,103,104,95,112,114,101,99,105,115,105,111,110,95,111,102,102,115,101,116,115,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,58,32,37,100,10,0,0,0,105,110,105,116,84,121,112,101,32,62,61,32,48,32,38,38,32,105,110,105,116,84,121,112,101,32,60,61,32,50,0,0,100,101,98,108,111,99,107,45,37,100,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,0,0,0,0,99,104,114,111,109,97,95,102,111,114,109,97,116,95,105,100,99,32,32,32,32,32,32,32,58,32,37,100,32,40,37,115,41,10,0,0,0,0,0,0,116,104,114,101,97,100,95,99,111,110,116,101,120,116,115,61,61,78,85,76,76,0,0,0,105,110,116,114,97,95,115,109,111,111,116,104,105,110,103,95,100,105,115,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,0,0,0,0,101,110,116,114,121,32,112,111,105,110,116,32,91,37,105,93,32,58,32,37,100,10,0,0,101,120,116,101,110,100,101,100,95,112,114,101,99,105,115,105,111,110,95,112,114,111,99,101,115,115,105,110,103,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,0,0,0,0,111,102,102,115,101,116,95,108,101,110,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,99,114,95,113,112,95,111,102,102,115,101,116,95,108,105,115,116,91,37,100,93,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,101,120,112,108,105,99,105,116,95,114,100,112,99,109,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,99,111,100,101,100,32,112,97,114,97,109,101,116,101,114,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,110,117,109,95,101,110,116,114,121,95,112,111,105,110,116,95,111,102,102,115,101,116,115,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,110,117,109,77,86,80,67,97,110,100,76,88,61,61,50,0,105,109,112,108,105,99,105,116,95,114,100,112,99,109,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,110,84,104,114,101,97,100,115,82,117,110,110,105,110,103,32,62,61,32,48,0,0,0,0,77,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,99,111,110,116,101,120,116,109,111,100,101,108,46,99,99,0,115,108,105,99,101,95,108,111,111,112,95,102,105,108,116,101,114,95,97,99,114,111,115,115,95,115,108,105,99,101,115,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,116,114,97,110,115,102,111,114,109,95,115,107,105,112,95,99,111,110,116,101,120,116,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,58,32,37,100,10,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,0,0,0,0,115,108,105,99,101,95,116,99,95,111,102,102,115,101,116,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,116,114,97,110,115,102,111,114,109,95,115,107,105,112,95,114,111,116,97,116,105,111,110,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,58,32,37,100,10,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,0,0,0,0,115,108,105,99,101,95,98,101,116,97,95,111,102,102,115,101,116,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,32,83,80,83,45,114,97,110,103,101,45,101,120,116,101,110,115,105,111,110,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,0,0,114,101,102,60,55,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,0,0,0,0,40,102,114,111,109,32,112,112,115,41,0,0,0,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,32,86,85,73,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,0,0,0,0,40,111,118,101,114,114,105,100,101,41,0,0,0,0,0,0,115,99,97,108,105,110,103,95,108,105,115,116,95,112,114,101,100,95,109,97,116,114,105,120,95,105,100,95,100,101,108,116,97,61,61,49,0,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,32,86,80,83,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,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,0,0,0,0,105,100,120,62,61,48,0,0,115,108,105,99,101,95,100,101,98,108,111,99,107,105,110,103,95,102,105,108,116,101,114,95,100,105,115,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,32,37,115,10,0,0,48,0,0,0,0,0,0,0,100,101,98,108,111,99,107,105,110,103,95,102,105,108,116,101,114,95,111,118,101,114,114,105,100,101,95,102,108,97,103,32,58,32,37,100,10,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,0,0,0,0,115,101,113,95,112,97,114,97,109,101,116,101,114,95,115,101,116,95,105,100,32,32,32,32,58,32,37,100,10,0,0,0,114,101,102,80,105,99,81,48,61,61,114,101,102,80,105,99,81,49,0,0,0,0,0,0,83,117,98,72,101,105,103,104,116,67,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,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,105,110,102,105,110,105,116,121,0,0,0,0,0,0,0,0,115,108,105,99,101,95,99,114,95,113,112,95,111,102,102,115,101,116,32,32,32,32,32,58,32,37,100,10,0,0,0,0,83,117,98,87,105,100,116,104,67,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,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,115,108,105,99,101,95,99,98,95,113,112,95,111,102,102,115,101,116,32,32,32,32,32,58,32,37,100,10,0,0,0,0,99,98,95,113,112,95,111,102,102,115,101,116,95,108,105,115,116,91,37,100,93,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,80,105,99,72,101,105,103,104,116,73,110,67,116,98,115,89,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,111,117,116,32,111,102,32,109,101,109,111,114,121,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,0,0,0,0,115,108,105,99,101,95,113,112,95,100,101,108,116,97,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,114,101,102,73,100,120,66,62,61,48,0,0,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,0,0,0,80,105,99,87,105,100,116,104,73,110,67,116,98,115,89,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,101,110,100,32,37,32,50,32,61,61,32,48,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,114,101,102,99,110,116,0,0,102,105,118,101,95,109,105,110,117,115,95,109,97,120,95,110,117,109,95,109,101,114,103,101,95,99,97,110,100,32,32,58,32,37,100,10,0,0,0,0,77,97,120,84,66,83,105,122,101,89,32,32,32,58,32,37,100,10,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,0,0,0,0,67,104,114,111,109,97,79,102,102,115,101,116,95,76,37,100,91,37,100,93,91,37,100,93,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,77,105,110,84,66,83,105,122,101,89,32,32,32,58,32,37,100,10,0,0,0,0,0,0,67,104,114,111,109,97,87,101,105,103,104,116,95,76,37,100,91,37,100,93,91,37,100,93,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,77,97,120,67,98,83,105,122,101,89,32,32,32,58,32,37,100,10,0,0,0,0,0,0,108,117,109,97,95,111,102,102,115,101,116,95,108,37,100,91,37,100,93,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,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,105,110,67,98,83,105,122,101,89,32,32,32,58,32,37,100,10,0,0,0,0,0,0,76,117,109,97,87,101,105,103,104,116,95,76,37,100,91,37,100,93,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,117,110,115,112,101,99,105,102,105,101,100,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,76,111,103,50,77,97,120,84,114,97,110,115,102,111,114,109,83,107,105,112,83,105,122,101,32,32,32,32,40,82,69,120,116,41,32,58,32,37,100,10,0,0,0,0,0,0,0,0,67,116,98,83,105,122,101,89,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,67,104,114,111,109,97,76,111,103,50,87,101,105,103,104,116,68,101,110,111,109,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,99,116,120,45,62,100,112,98,46,104,97,115,95,102,114,101,101,95,100,112,98,95,112,105,99,116,117,114,101,40,116,114,117,101,41,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,0,0,0,0,76,111,103,50,77,105,110,67,117,67,104,114,111,109,97,81,112,79,102,102,115,101,116,83,105,122,101,32,40,82,69,120,116,41,32,58,32,37,100,10,0,0,0,0,0,0,0,0,115,112,115,95,101,120,116,101,110,115,105,111,110,95,54,98,105,116,115,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,108,117,109,97,95,108,111,103,50,95,119,101,105,103,104,116,95,100,101,110,111,109,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,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,115,112,115,95,116,101,109,112,111,114,97,108,95,105,100,95,110,101,115,116,105,110,103,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,76,111,103,50,77,105,110,67,117,81,112,68,101,108,116,97,83,105,122,101,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,115,112,115,95,109,117,108,116,105,108,97,121,101,114,95,101,120,116,101,110,115,105,111,110,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,99,111,108,108,111,99,97,116,101,100,95,114,101,102,95,105,100,120,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,112,112,115,95,101,120,116,101,110,115,105,111,110,95,54,98,105,116,115,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,115,112,115,95,114,97,110,103,101,95,101,120,116,101,110,115,105,111,110,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,99,111,108,108,111,99,97,116,101,100,95,102,114,111,109,95,108,48,95,102,108,97,103,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,80,77,0,0,0,0,0,0,112,112,115,95,109,117,108,116,105,108,97,121,101,114,95,101,120,116,101,110,115,105,111,110,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,99,104,114,111,109,97,95,113,112,95,111,102,102,115,101,116,95,108,105,115,116,95,108,101,110,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,115,112,115,95,101,120,116,101,110,115,105,111,110,95,112,114,101,115,101,110,116,95,102,108,97,103,32,32,32,32,58,32,37,100,10,0,0,0,0,0,99,97,98,97,99,95,105,110,105,116,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,67,84,66,32,111,117,116,115,105,100,101,32,111,102,32,105,109,97,103,101,32,97,114,101,97,0,0,0,0,0,0,0,65,77,0,0,0,0,0,0,82,73,100,120,62,61,48,0,112,112,115,95,114,97,110,103,101,95,101,120,116,101,110,115,105,111,110,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,114,101,102,80,105,99,76,105,115,116,62,61,48,0,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,118,117,105,95,112,97,114,97,109,101,116,101,114,115,95,112,114,101,115,101,110,116,95,102,108,97,103,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,109,118,100,95,108,49,95,122,101,114,111,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,102,105,114,115,116,32,37,32,50,32,61,61,32,48,0,0,112,112,115,95,101,120,116,101,110,115,105,111,110,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,37,112,32,100,101,99,111,117,112,108,101,32,40,37,112,41,10,0,0,0,0,0,0,0,115,116,114,111,110,103,95,105,110,116,114,97,95,115,109,111,111,116,104,105,110,103,95,101,110,97,98,108,101,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,0,114,101,102,95,112,105,99,95,108,105,115,116,95,109,111,100,105,102,105,99,97,116,105,111,110,95,102,108,97,103,95,108,49,32,58,32,37,100,10,0,80,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,115,108,105,99,101,95,115,101,103,109,101,110,116,95,104,101,97,100,101,114,95,101,120,116,101,110,115,105,111,110,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,115,112,115,95,116,101,109,112,111,114,97,108,95,109,118,112,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,37,100,58,32,37,100,10,0,0,0,0,0,0,0,65,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,110,117,109,95,101,120,116,114,97,95,115,108,105,99,101,95,104,101,97,100,101,114,95,98,105,116,115,32,32,32,32,58,32,37,100,10,0,0,0,0,40,117,110,107,110,111,119,110,41,0,0,0,0,0,0,0,108,116,95,114,101,102,95,112,105,99,95,112,111,99,95,108,115,98,95,115,112,115,91,37,100,93,32,58,32,37,100,32,32,32,40,117,115,101,100,95,98,121,95,99,117,114,114,95,112,105,99,95,108,116,95,115,112,115,95,102,108,97,103,61,37,100,41,10,0,0,0,0,114,101,102,95,112,105,99,95,108,105,115,116,95,109,111,100,105,102,105,99,97,116,105,111,110,95,102,108,97,103,95,108,48,32,58,32,37,100,10,0,108,111,103,50,95,112,97,114,97,108,108,101,108,95,109,101,114,103,101,95,108,101,118,101,108,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,70,111,114,109,97,116,82,97,110,103,101,69,120,116,101,110,115,105,111,110,115,0,0,0,110,117,109,95,108,111,110,103,95,116,101,114,109,95,114,101,102,95,112,105,99,115,95,115,112,115,32,58,32,37,100,10,0,0,0,0,0,0,0,0,110,117,109,95,114,101,102,95,105,100,120,95,108,49,95,97,99,116,105,118,101,32,32,32,32,32,32,32,32,32,32,58,32,37,100,32,37,115,10,0,108,105,115,116,115,95,109,111,100,105,102,105,99,97,116,105,111,110,95,112,114,101,115,101,110,116,95,102,108,97,103,58,32,37,100,10,0,0,0,0,77,65,67,0,0,0,0,0,99,104,97,110,110,101,108,62,61,48,32,38,38,32,99,104,97,110,110,101,108,32,60,61,32,50,0,0,0,0,0,0,77,97,105,110,83,116,105,108,108,80,105,99,116,117,114,101,0,0,0,0,0,0,0,0,108,111,110,103,95,116,101,114,109,95,114,101,102,95,112,105,99,115,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,0,40,102,114,111,109,32,80,80,83,41,0,0,0,0,0,0,112,105,99,95,115,99,97,108,105,110,103,95,108,105,115,116,95,100,97,116,97,95,112,114,101,115,101,110,116,95,102,108,97,103,58,32,37,100,10,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,110,97,108,0,0,0,0,0,45,45,45,45,45,45,45,45,45,45,32,80,80,83,32,114,97,110,103,101,45,101,120,116,101,110,115,105,111,110,32,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,100,101,50,54,53,46,99,99,0,0,0,0,0,0,0,0,77,97,105,110,49,48,0,0,114,101,102,95,112,105,99,95,115,101,116,91,32,37,50,100,32,93,58,32,0,0,0,0,116,99,95,111,102,102,115,101,116,58,32,32,32,32,37,100,10,0,0,0,0,0,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,115,112,115,95,109,97,120,95,115,117,98,95,108,97,121,101,114,115,32,32,32,32,32,32,58,32,37,100,10,0,0,0,102,97,108,115,101,0,0,0,77,97,105,110,0,0,0,0,110,117,109,95,115,104,111,114,116,95,116,101,114,109,95,114,101,102,95,112,105,99,95,115,101,116,115,32,58,32,37,100,10,0,0,0,0,0,0,0,110,117,109,95,114,101,102,95,105,100,120,95,108,48,95,97,99,116,105,118,101,32,32,32,32,32,32,32,32,32,32,58,32,37,100,32,37,115,10,0,98,101,116,97,95,111,102,102,115,101,116,58,32,32,37,100,10,0,0,0,0,0,0,0,117,110,107,110,111,119,110,32,101,114,114,111,114,0,0,0,112,99,109,95,108,111,111,112,95,102,105,108,116,101,114,95,100,105,115,97,98,108,101,95,102,108,97,103,32,32,58,32,37,100,10,0,0,0,0,0,112,101,110,100,105,110,103,95,105,110,112,117,116,95,78,65,76,32,61,61,32,78,85,76,76,0,0,0,0,0,0,0,110,117,109,95,114,101,102,95,105,100,120,95,97,99,116,105,118,101,95,111,118,101,114,114,105,100,101,95,102,108,97,103,32,58,32,37,100,10,0,0,115,97,111,45,37,100,0,0,112,105,99,95,100,105,115,97,98,108,101,95,100,101,98,108,111,99,107,105,110,103,95,102,105,108,116,101,114,95,102,108,97,103,58,32,37,100,10,0,99,111,108,108,111,99,97,116,101,100,32,109,111,116,105,111,110,45,118,101,99,116,111,114,32,105,115,32,111,117,116,115,105,100,101,32,105,109,97,103,101,32,97,114,101,97,0,0,32,32,80,114,111,102,105,108,101,47,84,105,101,114,47,76,101,118,101,108,32,91,76,97,121,101,114,32,37,100,93,10,0,0,0,0,0,0,0,0,100,105,102,102,95,99,117,95,99,104,114,111,109,97,95,113,112,95,111,102,102,115,101,116,95,100,101,112,116,104,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,108,111,103,50,95,100,105,102,102,95,109,97,120,95,109,105,110,95,112,99,109,95,108,117,109,97,95,99,111,100,105,110,103,95,98,108,111,99,107,95,115,105,122,101,32,58,32,37,100,10,0,0,0,0,0,0,115,108,105,99,101,95,115,97,111,95,99,104,114,111,109,97,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,100,101,98,108,111,99,107,105,110,103,95,102,105,108,116,101,114,95,111,118,101,114,114,105,100,101,95,101,110,97,98,108,101,100,95,102,108,97,103,58,32,37,100,10,0,0,0,0,105,109,97,103,101,32,99,104,101,99,107,115,117,109,32,109,105,115,109,97,116,99,104,0,83,80,83,32,104,101,97,100,101,114,32,109,105,115,115,105,110,103,44,32,99,97,110,110,111,116,32,100,101,99,111,100,101,32,83,69,73,0,0,0,32,32,37,115,95,108,101,118,101,108,95,105,100,99,32,32,32,32,32,32,32,32,32,58,32,37,100,32,40,37,52,46,50,102,41,10,0,0,0,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,108,111,103,50,95,109,105,110,95,112,99,109,95,108,117,109,97,95,99,111,100,105,110,103,95,98,108,111,99,107,95,115,105,122,101,32,58,32,37,100,10,0,0,0,0,0,0,0,115,108,105,99,101,95,115,97,111,95,108,117,109,97,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,115,116,100,58,58,98,97,100,95,99,97,115,116,0,0,0,100,101,98,108,111,99,107,105,110,103,95,102,105,108,116,101,114,95,99,111,110,116,114,111,108,95,112,114,101,115,101,110,116,95,102,108,97,103,58,32,37,100,10,0,0,0,0,0,102,97,108,115,101,0,0,0,99,97,110,110,111,116,32,97,112,112,108,121,32,83,65,79,32,98,101,99,97,117,115,101,32,119,101,32,114,97,110,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,0,0,32,32,108,111,103,50,95,109,97,120,95,109,118,95,108,101,110,103,116,104,95,118,101,114,116,105,99,97,108,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,32,32,37,115,95,102,114,97,109,101,95,111,110,108,121,95,99,111,110,115,116,114,97,105,110,116,95,102,108,97,103,32,58,32,37,100,10,0,37,112,32,114,101,108,101,97,115,101,32,37,112,10,0,0,112,99,109,95,115,97,109,112,108,101,95,98,105,116,95,100,101,112,116,104,95,99,104,114,111,109,97,32,32,32,58,32,37,100,10,0,0,0,0,0,115,108,105,99,101,95,116,101,109,112,111,114,97,108,95,109,118,112,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,112,112,115,95,108,111,111,112,95,102,105,108,116,101,114,95,97,99,114,111,115,115,95,115,108,105,99,101,115,95,101,110,97,98,108,101,100,95,102,108,97,103,58,32,37,100,10,0,110,111,110,45,101,120,105,115,116,105,110,103,32,108,111,110,103,45,116,101,114,109,32,114,101,102,101,114,101,110,99,101,32,99,97,110,100,105,100,97,116,101,32,115,112,101,99,105,102,105,101,100,32,105,110,32,115,108,105,99,101,32,104,101,97,100,101,114,0,0,0,0,32,32,108,111,103,50,95,109,97,120,95,109,118,95,108,101,110,103,116,104,95,104,111,114,105,122,111,110,116,97,108,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,32,32,37,115,95,110,111,110,95,112,97,99,107,101,100,95,99,111,110,115,116,114,97,105,110,116,95,102,108,97,103,32,58,32,37,100,10,0,112,99,109,95,115,97,109,112,108,101,95,98,105,116,95,100,101,112,116,104,95,108,117,109,97,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,110,117,109,95,108,111,110,103,95,116,101,114,109,95,112,105,99,115,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,108,111,111,112,95,102,105,108,116,101,114,95,97,99,114,111,115,115,95,116,105,108,101,115,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,110,117,109,98,101,114,32,111,102,32,116,104,114,101,97,100,115,32,108,105,109,105,116,101,100,32,116,111,32,109,97,120,105,109,117,109,32,97,109,111,117,110,116,0,0,0,0,0,32,32,109,97,120,95,98,105,116,115,95,112,101,114,95,109,105,110,95,99,117,95,100,101,110,111,109,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,32,32,37,115,95,105,110,116,101,114,108,97,99,101,100,95,115,111,117,114,99,101,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,112,99,109,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,110,117,109,95,108,111,110,103,95,116,101,114,109,95,115,112,115,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,116,105,108,101,32,114,111,119,32,98,111,117,110,100,97,114,105,101,115,58,32,0,0,0,100,101,112,101,110,100,101,110,116,32,115,108,105,99,101,32,119,105,116,104,32,97,100,100,114,101,115,115,32,48,0,0,32,32,109,97,120,95,98,121,116,101,115,95,112,101,114,95,112,105,99,95,100,101,110,111,109,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,32,32,37,115,95,112,114,111,103,114,101,115,115,105,118,101,95,115,111,117,114,99,101,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,115,97,109,112,108,101,95,97,100,97,112,116,105,118,101,95,111,102,102,115,101,116,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,115,108,105,99,101,32,115,101,103,109,101,110,116,32,97,100,100,114,101,115,115,32,105,110,118,97,108,105,100,0,0,0,115,104,111,114,116,95,116,101,114,109,95,114,101,102,95,112,105,99,95,115,101,116,95,105,100,120,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,42,10,0,0,0,0,0,0,83,69,67,65,77,0,0,0,108,111,99,97,108,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,0,0,0,49,46,48,46,50,0,0,0,32,32,109,105,110,95,115,112,97,116,105,97,108,95,115,101,103,109,101,110,116,97,116,105,111,110,95,105,100,99,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,42,10,0,0,0,0,0,0,97,109,112,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,102,97,108,115,101,0,0,0,114,101,102,95,112,105,99,95,115,101,116,91,32,37,50,100,32,93,58,32,0,0,0,0,42,37,100,32,0,0,0,0,114,100,112,99,109,77,111,100,101,61,61,48,0,0,0,0,105,109,103,45,62,110,117,109,95,116,104,114,101,97,100,115,95,97,99,116,105,118,101,40,41,32,61,61,32,48,0,0,105,110,118,97,108,105,100,32,99,104,114,111,109,97,32,102,111,114,109,97,116,32,105,110,32,83,80,83,32,104,101,97,100,101,114,0,0,0,0,0,32,32,114,101,115,116,114,105,99,116,101,100,95,114,101,102,95,112,105,99,95,108,105,115,116,115,95,102,108,97,103,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,42,37,100,0,0,0,0,0,115,104,100,114,45,62,115,108,105,99,101,95,116,121,112,101,32,61,61,32,83,76,73,67,69,95,84,89,80,69,95,66,0,0,0,0,0,0,0,0,115,99,97,108,105,110,103,32,108,105,115,116,32,108,111,103,103,105,110,103,32,111,117,116,112,117,116,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,0,0,0,0,109,97,120,105,109,117,109,32,110,117,109,98,101,114,32,111,102,32,114,101,102,101,114,101,110,99,101,32,112,105,99,116,117,114,101,115,32,101,120,99,101,101,100,101,100,0,0,0,115,104,111,114,116,95,116,101,114,109,95,114,101,102,95,112,105,99,95,115,101,116,95,115,112,115,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,116,105,108,101,32,99,111,108,117,109,110,32,98,111,117,110,100,97,114,105,101,115,58,32,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,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,102,97,108,115,101,0,0,0,118,105,100,101,111,95,112,97,114,97,109,101,116,101,114,95,115,101,116,95,105,100,32,32,58,32,37,100,10,0,0,0,32,32,109,111,116,105,111,110,95,118,101,99,116,111,114,115,95,111,118,101,114,95,112,105,99,95,98,111,117,110,100,97,114,105,101,115,95,102,108,97,103,32,58,32,37,100,10,0,42,44,0,0,0,0,0,0,115,112,115,95,115,99,97,108,105,110,103,95,108,105,115,116,95,100,97,116,97,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,0,115,108,105,99,101,95,112,105,99,95,111,114,100,101,114,95,99,110,116,95,108,115,98,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,117,110,105,102,111,114,109,95,115,112,97,99,105,110,103,95,102,108,97,103,58,32,37,100,10,0,0,0,0,0,0,0,37,73,58,37,77,58,37,83,32,37,112,0,0,0,0,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,101,110,100,95,111,102,95,115,117,98,95,115,116,114,101,97,109,95,111,110,101,95,98,105,116,32,110,111,116,32,115,101,116,32,116,111,32,49,32,119,104,101,110,32,105,116,32,115,104,111,117,108,100,32,98,101,0,0,0,0,0,0,0,0,32,32,116,105,108,101,115,95,102,105,120,101,100,95,115,116,114,117,99,116,117,114,101,95,102,108,97,103,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,37,115,95,112,114,111,102,105,108,101,95,99,111,109,112,97,116,105,98,105,108,105,116,121,95,102,108,97,103,115,58,32,0,0,0,0,0,0,115,99,97,108,105,110,103,95,108,105,115,116,95,101,110,97,98,108,101,95,102,108,97,103,32,58,32,37,100,10,0,0,99,111,108,111,117,114,95,112,108,97,110,101,95,105,100,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,0,0,0,110,117,109,95,116,105,108,101,95,114,111,119,115,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,106,62,61,48,32,38,38,32,106,32,60,32,77,65,88,95,78,85,77,95,82,69,70,95,80,73,67,83,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,102,97,117,108,116,121,32,114,101,102,101,114,101,110,99,101,32,112,105,99,116,117,114,101,32,108,105,115,116,0,0,0,98,105,116,115,116,114,101,97,109,95,114,101,115,116,114,105,99,116,105,111,110,95,102,108,97,103,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,32,32,37,115,95,112,114,111,102,105,108,101,95,105,100,99,32,32,32,32,32,32,32,58,32,37,115,10,0,0,0,0,99,104,114,111,109,97,95,113,112,95,111,102,102,115,101,116,95,108,105,115,116,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,109,97,120,95,116,114,97,110,115,102,111,114,109,95,104,105,101,114,97,114,99,104,121,95,100,101,112,116,104,95,105,110,116,114,97,32,58,32,37,100,10,0,0,0,0,0,0,0,112,105,99,95,111,117,116,112,117,116,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,110,117,109,95,116,105,108,101,95,99,111,108,117,109,110,115,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,99,111,101,102,102,105,99,105,101,110,116,32,111,117,116,32,111,102,32,105,109,97,103,101,32,98,111,117,110,100,115,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,0,0,0,115,104,111,114,116,45,116,101,114,109,32,114,101,102,45,112,105,99,45,115,101,116,32,105,110,100,101,120,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,0,118,117,105,95,104,114,100,95,112,97,114,97,109,101,116,101,114,115,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,0,32,32,37,115,95,116,105,101,114,95,102,108,97,103,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,102,97,108,115,101,0,0,0,105,110,116,114,97,80,114,101,100,77,111,100,101,62,61,50,0,0,0,0,0,0,0,0,109,97,120,95,116,114,97,110,115,102,111,114,109,95,104,105,101,114,97,114,99,104,121,95,100,101,112,116,104,95,105,110,116,101,114,32,58,32,37,100,10,0,0,0,0,0,0,0,115,108,105,99,101,95,116,121,112,101,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,99,10,0,0,0,0,0,0,101,110,116,114,111,112,121,95,99,111,100,105,110,103,95,115,121,110,99,95,101,110,97,98,108,101,100,95,102,108,97,103,58,32,37,100,10,0,0,0,48,0,0,0,0,0,0,0,37,0,0,0,72], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE);
|
|
/* memory initializer */ allocate([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,110,117,109,98,101,114,32,111,102,32,115,104,111,114,116,45,116,101,114,109,32,114,101,102,45,112,105,99,45,115,101,116,115,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,118,117,105,95,110,117,109,95,116,105,99,107,115,95,112,111,99,95,100,105,102,102,95,111,110,101,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,32,32,37,115,95,112,114,111,102,105,108,101,95,115,112,97,99,101,32,32,32,32,32,58,32,37,100,10,0,0,0,0,108,111,103,50,95,100,105,102,102,95,109,97,120,95,109,105,110,95,116,114,97,110,115,102,111,114,109,95,98,108,111,99,107,95,115,105,122,101,32,58,32,37,100,10,0,0,0,0,37,112,32,105,110,105,116,10,0,0,0,0,0,0,0,0,115,108,105,99,101,95,115,101,103,109,101,110,116,95,97,100,100,114,101,115,115,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,116,105,108,101,115,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,37,72,58,37,77,58,37,83,0,0,0,0,0,0,0,0,110,117,109,77,86,95,80,32,33,61,32,110,117,109,77,86,95,81,32,105,110,32,100,101,98,108,111,99,107,105,110,103,0,0,0,0,0,0,0,0,118,117,105,95,112,111,99,95,112,114,111,112,111,114,116,105,111,110,97,108,95,116,111,95,116,105,109,105,110,103,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,115,117,98,95,108,97,121,101,114,0,0,0,0,0,0,0,108,111,103,50,95,109,105,110,95,116,114,97,110,115,102,111,114,109,95,98,108,111,99,107,95,115,105,122,101,32,32,32,58,32,37,100,10,0,0,0,100,101,112,101,110,100,101,110,116,95,115,108,105,99,101,95,115,101,103,109,101,110,116,95,102,108,97,103,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,116,114,97,110,115,113,117,97,110,116,95,98,121,112,97,115,115,95,101,110,97,98,108,101,95,102,108,97,103,58,32,37,100,10,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,110,111,110,45,101,120,105,115,116,105,110,103,32,114,101,102,101,114,101,110,99,101,32,112,105,99,116,117,114,101,32,97,99,99,101,115,115,101,100,0,32,32,118,117,105,95,116,105,109,101,95,115,99,97,108,101,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,103,101,110,101,114,97,108,0,108,111,103,50,95,100,105,102,102,95,109,97,120,95,109,105,110,95,108,117,109,97,95,99,111,100,105,110,103,95,98,108,111,99,107,95,115,105,122,101,32,58,32,37,100,10,0,0,115,108,105,99,101,95,112,105,99,95,112,97,114,97,109,101,116,101,114,95,115,101,116,95,105,100,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,111,117,116,112,117,116,95,102,108,97,103,95,112,114,101,115,101,110,116,95,102,108,97,103,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,37,109,47,37,100,47,37,121,0,0,0,0,0,0,0,0,98,111,116,104,32,112,114,101,100,70,108,97,103,115,91,93,32,97,114,101,32,122,101,114,111,32,105,110,32,77,67,0,32,32,118,117,105,95,110,117,109,95,117,110,105,116,115,95,105,110,95,116,105,99,107,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,118,112,115,95,101,120,116,101,110,115,105,111,110,95,102,108,97,103,32,61,32,37,100,10,0,0,0,0,0,0,0,0,108,111,103,50,95,109,105,110,95,108,117,109,97,95,99,111,100,105,110,103,95,98,108,111,99,107,95,115,105,122,101,32,58,32,37,100,10,0,0,0,110,111,95,111,117,116,112,117,116,95,111,102,95,112,114,105,111,114,95,112,105,99,115,95,102,108,97,103,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,119,101,105,103,104,116,101,100,95,98,105,112,114,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,78,84,83,67,0,0,0,0,33,114,101,111,114,100,101,114,95,111,117,116,112,117,116,95,113,117,101,117,101,46,101,109,112,116,121,40,41,0,0,0,110,111,110,45,101,120,105,115,116,105,110,103,32,83,80,83,32,114,101,102,101,114,101,110,99,101,100,0,0,0,0,0,118,117,105,95,116,105,109,105,110,103,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,32,32,58,32,37,100,10,0,0,0,0,0,32,32,115,112,115,95,109,97,120,95,108,97,116,101,110,99,121,95,105,110,99,114,101,97,115,101,95,112,108,117,115,49,32,58,32,37,100,10,0,0,102,105,114,115,116,76,97,121,101,114,82,101,97,100,32,60,32,77,65,88,95,84,69,77,80,79,82,65,76,95,83,85,66,76,65,89,69,82,83,0,102,105,114,115,116,95,115,108,105,99,101,95,115,101,103,109,101,110,116,95,105,110,95,112,105,99,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,119,101,105,103,104,116,101,100,95,112,114,101,100,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,48,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,110,111,110,45,101,120,105,115,116,105,110,103,32,80,80,83,32,114,101,102,101,114,101,110,99,101,100,0,0,0,0,0,32,32,100,101,102,95,100,105,115,112,95,119,105,110,95,98,111,116,116,111,109,95,111,102,102,115,101,116,32,32,58,32,37,100,10,0,0,0,0,0,102,97,108,115,101,0,0,0,104,114,100,95,108,97,121,101,114,95,115,101,116,95,105,100,120,91,37,100,93,32,61,32,37,100,10,0,0,0,0,0,37,112,0,0,0,0,0,0,32,32,115,112,115,95,109,97,120,95,110,117,109,95,114,101,111,114,100,101,114,95,112,105,99,115,32,32,32,32,32,32,32,58,32,37,100,10,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,32,83,76,73,67,69,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,83,69,73,32,100,101,99,111,100,101,100,32,112,105,99,116,117,114,101,32,104,97,115,104,58,32,37,48,52,120,44,32,100,101,99,111,100,101,100,32,112,105,99,116,117,114,101,58,32,37,48,52,120,32,40,80,79,67,61,37,100,41,10,0,112,112,115,95,115,108,105,99,101,95,99,104,114,111,109,97,95,113,112,95,111,102,102,115,101,116,115,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,102,97,108,115,101,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,32,83,80,83,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,0,0,105,109,112,111,115,115,105,98,108,101,32,109,111,116,105,111,110,32,118,101,99,116,111,114,32,115,99,97,108,105,110,103,0,0,0,0,0,0,0,0,32,32,100,101,102,95,100,105,115,112,95,119,105,110,95,116,111,112,95,111,102,102,115,101,116,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,118,112,115,95,110,117,109,95,104,114,100,95,112,97,114,97,109,101,116,101,114,115,32,32,32,32,32,61,32,37,100,10,0,0,0,0,0,0,0,0,32,32,115,112,115,95,109,97,120,95,100,101,99,95,112,105,99,95,98,117,102,102,101,114,105,110,103,32,32,32,32,32,32,58,32,37,100,10,0,0,115,108,105,99,101,32,104,101,97,100,101,114,32,105,110,118,97,108,105,100,0,0,0,0,115,112,115,45,62,115,112,115,95,114,101,97,100,0,0,0,83,69,73,32,100,101,99,111,100,101,100,32,112,105,99,116,117,114,101,32,77,68,53,32,109,105,115,109,97,116,99,104,32,40,80,79,67,61,37,100,41,10,0,0,0,0,0,0,112,105,99,95,99,114,95,113,112,95,111,102,102,115,101,116,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,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,0,0,0,0,118,97,108,117,101,62,48,0,32,32,100,101,102,95,100,105,115,112,95,119,105,110,95,114,105,103,104,116,95,111,102,102,115,101,116,32,32,32,58,32,37,100,10,0,0,0,0,0,118,112,115,95,110,117,109,95,116,105,99,107,115,95,112,111,99,95,100,105,102,102,95,111,110,101,32,61,32,37,100,10,0,0,0,0,0,0,0,0,76,97,121,101,114,32,37,100,10,0,0,0,0,0,0,0,112,112,115,45,62,112,112,115,95,114,101,97,100,0,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,112,105,99,95,99,98,95,113,112,95,111,102,102,115,101,116,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,82,73,100,120,32,62,61,32,48,32,38,38,32,82,73,100,120,32,60,32,115,101,116,115,46,115,105,122,101,40,41,0,116,114,117,101,0,0,0,0,112,112,115,32,104,101,97,100,101,114,32,105,110,118,97,108,105,100,0,0,0,0,0,0,32,32,100,101,102,95,100,105,115,112,95,119,105,110,95,108,101,102,116,95,111,102,102,115,101,116,32,32,32,32,58,32,37,100,10,0,0,0,0,0,118,112,115,95,112,111,99,95,112,114,111,112,111,114,116,105,111,110,97,108,95,116,111,95,116,105,109,105,110,103,95,102,108,97,103,32,61,32,37,100,10,0,0,0,0,0,0,0,99,114,111,115,115,95,99,111,109,112,111,110,101,110,116,95,112,114,101,100,105,99,116,105,111,110,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,115,112,115,95,115,117,98,95,108,97,121,101,114,95,111,114,100,101,114,105,110,103,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,115,112,115,32,104,101,97,100,101,114,32,105,110,118,97,108,105,100,0,0,0,0,0,0,100,105,102,102,95,99,117,95,113,112,95,100,101,108,116,97,95,100,101,112,116,104,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,58,32,0,0,0,0,0,0,110,111,32,115,117,99,104,32,102,105,108,101,0,0,0,0,37,112,32,99,39,116,111,114,32,61,32,37,112,10,0,0,100,101,102,97,117,108,116,95,100,105,115,112,108,97,121,95,119,105,110,100,111,119,95,102,108,97,103,32,32,32,58,32,37,100,10,0,0,0,0,0,118,112,115,95,116,105,109,101,95,115,99,97,108,101,32,32,32,32,32,32,32,32,61,32,37,100,10,0,0,0,0,0,99,116,120,45,62,104,97,115,95,105,109,97,103,101,40,99,111,108,80,105,99,41,0,0,105,110,116,114,97,80,114,101,100,77,111,100,101,60,51,53,0,0,0,0,0,0,0,0,108,111,103,50,95,109,97,120,95,112,105,99,95,111,114,100,101,114,95,99,110,116,95,108,115,98,32,58,32,37,100,10,0,0,0,0,0,0,0,0,67,84,66,32,111,117,116,115,105,100,101,32,111,102,32,105,109,97,103,101,32,97,114,101,97,32,40,99,111,110,99,101,97,108,105,110,103,32,115,116,114,101,97,109,32,101,114,114,111,114,46,46,46,41,0,0,99,117,95,113,112,95,100,101,108,116,97,95,101,110,97,98,108,101,100,95,102,108,97,103,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,115,112,115,0,0,0,0,0,102,114,97,109,101,95,102,105,101,108,100,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,48,0,0,0,0,0,0,0,118,112,115,95,110,117,109,95,117,110,105,116,115,95,105,110,95,116,105,99,107,32,61,32,37,100,10,0,0,0,0,0,98,105,116,95,100,101,112,116,104,95,99,104,114,111,109,97,32,58,32,37,100,10,0,0,73,110,99,111,114,114,101,99,116,32,101,110,116,114,121,45,112,111,105,110,116,32,111,102,102,115,101,116,115,0,0,0,109,102,114,101,101,32,37,112,10,0,0,0,0,0,0,0,116,114,97,110,115,102,111,114,109,95,115,107,105,112,95,101,110,97,98,108,101,100,95,102,108,97,103,58,32,37,100,10,0,0,0,0,0,0,0,0,108,111,103,50,87,68,62,61,49,0,0,0,0,0,0,0,102,105,101,108,100,95,115,101,113,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,118,112,115,95,116,105,109,105,110,103,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,32,61,32,37,100,10,0,0,0,0,0,0,98,105,116,95,100,101,112,116,104,95,108,117,109,97,32,32,32,58,32,37,100,10,0,0,80,114,101,109,97,116,117,114,101,32,101,110,100,32,111,102,32,115,108,105,99,101,32,115,101,103,109,101,110,116,0,0,99,111,110,115,116,114,97,105,110,101,100,95,105,110,116,114,97,95,112,114,101,100,95,102,108,97,103,58,32,37,100,10,0,0,0,0,0,0,0,0,105,111,115,95,98,97,115,101,58,58,99,108,101,97,114,0,110,101,117,116,114,97,108,95,99,104,114,111,109,97,95,105,110,100,105,99,97,116,105,111,110,95,102,108,97,103,58,32,37,100,10,0,0,0,0,0,108,97,121,101,114,95,105,100,95,105,110,99,108,117,100,101,100,95,102,108,97,103,91,37,100,93,91,37,100,93,32,61,32,37,100,10,0,0,0,0,99,111,110,102,95,119,105,110,95,98,111,116,116,111,109,95,111,102,102,115,101,116,58,32,37,100,10,0,0,0,0,0,84,111,111,32,109,97,110,121,32,119,97,114,110,105,110,103,115,32,113,117,101,117,101,100,0,0,0,0,0,0,0,0,112,105,99,95,105,110,105,116,95,113,112,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,40,119,105,100,116,104,38,49,41,61,61,48,0,0,0,0,32,32,99,104,114,111,109,97,95,115,97,109,112,108,101,95,108,111,99,95,116,121,112,101,95,98,111,116,116,111,109,95,102,105,101,108,100,58,32,37,100,10,0,0,0,0,0,0,118,112,115,95,110,117,109,95,108,97,121,101,114,95,115,101,116,115,32,61,32,37,100,10,0,0,0,0,0,0,0,0,99,111,110,102,95,119,105,110,95,116,111,112,95,111,102,102,115,101,116,32,32,32,58,32,37,100,10,0,0,0,0,0,67,97,110,110,111,116,32,114,117,110,32,100,101,99,111,100,101,114,32,109,117,108,116,105,45,116,104,114,101,97,100,101,100,32,98,101,99,97,117,115,101,32,115,116,114,101,97,109,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,87,80,80,0,0,0,110,117,109,95,114,101,102,95,105,100,120,95,108,49,95,100,101,102,97,117,108,116,95,97,99,116,105,118,101,32,58,32,37,100,10,0,0,0,0,0,80,65,76,0,0,0,0,0,99,97,98,97,99,46,99,99,0,0,0,0,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,0,0,0,32,32,99,104,114,111,109,97,95,115,97,109,112,108,101,95,108,111,99,95,116,121,112,101,95,116,111,112,95,102,105,101,108,100,32,32,32,58,32,37,100,10,0,0,0,0,0,0,118,112,115,95,109,97,120,95,108,97,121,101,114,95,105,100,32,32,32,61,32,37,100,10,0,0,0,0,0,0,0,0,99,111,110,102,95,119,105,110,95,114,105,103,104,116,95,111,102,102,115,101,116,32,58,32,37,100,10,0,0,0,0,0,118,112,115,46,99,99,0,0,48,0,0,0,0,0,0,0,117,110,115,112,101,99,105,102,105,101,100,32,100,101,99,111,100,105,110,103,32,101,114,114,111,114,0,0,0,0,0,0,110,117,109,95,114,101,102,95,105,100,120,95,108,48,95,100,101,102,97,117,108,116,95,97,99,116,105,118,101,32,58,32,37,100,10,0,0,0,0,0,73,78,70,79,58,32,0,0,116,114,97,110,115,102,111,114,109,46,99,99,0,0,0,0,99,104,114,111,109,97,95,108,111,99,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,58,32,37,100,10,0,0,0,0,0,0,0,46,46,47,108,105,98,100,101,50,54,53,47,105,109,97,103,101,46,104,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,118,112,115,95,109,97,120,95,108,97,116,101,110,99,121,95,105,110,99,114,101,97,115,101,32,32,61,32,37,100,10,0,0,0,0,100,101,99,99,116,120,46,99,99,0,0,0,0,0,0,0,99,111,110,102,95,119,105,110,95,108,101,102,116,95,111,102,102,115,101,116,32,32,58,32,37,100,10,0,0,0,0,0,110,97,110,0,0,0,0,0,112,114,101,109,97,116,117,114,101,32,101,110,100,32,111,102,32,115,108,105,99,101,32,100,97,116,97,0,0,0,0,0,99,97,98,97,99,95,105,110,105,116,95,112,114,101,115,101,110,116,95,102,108,97,103,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,115,112,115,46,99,99,0,0,32,32,109,97,116,114,105,120,95,99,111,101,102,102,115,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,32,32,118,112,115,95,109,97,120,95,110,117,109,95,114,101,111,114,100,101,114,95,112,105,99,115,32,32,61,32,37,100,10,0,0,0,0,100,101,98,108,111,99,107,46,99,99,0,0,0,0,0,0,99,111,110,102,111,114,109,97,110,99,101,95,119,105,110,100,111,119,95,102,108,97,103,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,102,105,114,115,116,32,115,108,105,99,101,32,109,105,115,115,105,110,103,44,32,99,97,110,110,111,116,32,100,101,99,111,100,101,32,100,101,112,101,110,100,101,110,116,32,115,108,105,99,101,0,0,0,0,0,0,115,105,103,110,95,100,97,116,97,95,104,105,100,105,110,103,95,102,108,97,103,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,118,101,99,116,111,114,0,0,115,108,105,99,101,46,99,99,0,0,0,0,0,0,0,0,32,32,116,114,97,110,115,102,101,114,95,99,104,97,114,97,99,116,101,114,105,115,116,105,99,115,32,32,32,32,58,32,37,100,10,0,0,0,0,0,108,97,121,101,114,32,40,97,108,108,41,58,32,118,112,115,95,109,97,120,95,100,101,99,95,112,105,99,95,98,117,102,102,101,114,105,110,103,32,61,32,37,100,10,0,0,0,0,112,105,99,95,104,101,105,103,104,116,95,105,110,95,108,117,109,97,95,115,97,109,112,108,101,115,32,58,32,37,100,10,0,0,0,0,0,0,0,0,117,110,105,116,88,32,62,61,32,48,32,38,38,32,117,110,105,116,88,32,60,32,119,105,100,116,104,95,105,110,95,117,110,105,116,115,0,0,0,0,99,111,109,109,97,110,100,45,108,105,110,101,32,112,97,114,97,109,101,116,101,114,32,101,114,114,111,114,0,0,0,0,100,101,112,101,110,100,101,110,116,95,115,108,105,99,101,95,115,101,103,109,101,110,116,115,95,101,110,97,98,108,101,100,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,114,101,102,112,105,99,46,99,99,0,0,0,0,0,0,0,37,46,48,76,102,0,0,0,98,105,116,115,116,114,101,97,109,46,99,99,0,0,0,0,32,32,99,111,108,111,117,114,95,112,114,105,109,97,114,105,101,115,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,32,32,32,32,32,32,32,32,32,118,112,115,95,109,97,120,95,108,97,116,101,110,99,121,95,105,110,99,114,101,97,115,101,32,32,61,32,37,100,10,0,0,0,0,0,0,0,0,108,111,103,50,95,109,97,120,95,116,114,97,110,115,102,111,114,109,95,115,107,105,112,95,98,108,111,99,107,95,115,105,122,101,32,32,32,32,32,32,58,32,37,100,10,0,0,0,112,105,99,95,119,105,100,116,104,95,105,110,95,108,117,109,97,95,115,97,109,112,108,101,115,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,110,97,108,45,112,97,114,115,101,114,46,99,99,0,0,0,83,69,73,32,100,97,116,97,32,99,97,110,110,111,116,32,98,101,32,112,114,111,99,101,115,115,101,100,0,0,0,0,115,101,113,95,112,97,114,97,109,101,116,101,114,95,115,101,116,95,105,100,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,105,109,103,45,62,115,112,115,46,66,105,116,68,101,112,116,104,95,67,32,62,61,32,56,32,38,38,32,105,109,103,45,62,115,112,115,46,66,105,116,68,101,112,116,104,95,67,32,60,61,32,49,54,0,0,0,109,111,110,101,121,95,103,101,116,32,101,114,114,111,114,0,110,111,32,101,114,114,111,114,0,0,0,0,0,0,0,0,32,32,99,111,108,111,117,114,95,100,101,115,99,114,105,112,116,105,111,110,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,46,47,100,101,99,99,116,120,46,104,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,118,112,115,95,109,97,120,95,110,117,109,95,114,101,111,114,100,101,114,95,112,105,99,115,32,32,61,32,37,100,10,0,0,0,0,0,0,0,0,109,111,116,105,111,110,46,99,99,0,0,0,0,0,0,0,105,110,116,114,97,112,114,101,100,46,99,99,0,0,0,0,115,101,112,97,114,97,116,101,95,99,111,108,111,117,114,95,112,108,97,110,101,95,102,108,97,103,32,58,32,37,100,10,0,0,0,0,0,0,0,0,42,37,115,10,0,0,0,0,110,111,32,109,111,114,101,32,105,110,112,117,116,32,100,97,116,97,44,32,100,101,99,111,100,101,114,32,115,116,97,108,108,101,100,0,0,0,0,0,105,111,115,116,114,101,97,109,0,0,0,0,0,0,0,0,112,105,99,95,112,97,114,97,109,101,116,101,114,95,115,101,116,95,105,100,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,0,0,0,83,97,116,0,0,0,0,0,105,109,103,45,62,115,112,115,46,66,105,116,68,101,112,116,104,95,89,32,62,61,32,56,32,38,38,32,105,109,103,45,62,115,112,115,46,66,105,116,68,101,112,116,104,95,89,32,60,61,32,49,54,0,0,0,70,114,105,0,0,0,0,0,37,76,102,0,0,0,0,0,105,109,97,103,101,46,99,99,0,0,0,0,0,0,0,0,84,104,117,0,0,0,0,0,87,101,100,0,0,0,0,0,84,117,101,0,0,0,0,0,32,32,118,105,100,101,111,95,102,117,108,108,95,114,97,110,103,101,95,102,108,97,103,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,100,112,98,46,99,99,0,0,110,32,60,32,110,84,104,114,101,97,100,67,111,110,116,101,120,116,115,0,0,0,0,0,77,111,110,0,0,0,0,0,108,97,121,101,114,32,37,100,58,32,118,112,115,95,109,97,120,95,100,101,99,95,112,105,99,95,98,117,102,102,101,114,105,110,103,32,61,32,37,100,10,0,0,0,0,0,0,0,83,117,110,0,0,0,0,0,48,0,0,0,0,0,0,0,117,110,107,110,111,119,110,0,83,97,116,117,114,100,97,121,0,0,0,0,0,0,0,0,70,114,105,100,97,121,0,0,42,37,100,37,99,32,0,0,84,104,117,114,115,100,97,121,0,0,0,0,0,0,0,0,117,110,105,109,112,108,101,109,101,110,116,101,100,32,100,101,99,111,100,101,114,32,102,101,97,116,117,114,101,0,0,0,37,112,32,100,101,115,116,114,117,99,116,111,114,10,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,32,80,80,83,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,10,0,0,0,0,0,0,0,0,87,101,100,110,101,115,100,97,121,0,0,0,0,0,0,0,109,111,100,101,108,91,105,93,46,115,116,97,116,101,32,60,61,32,54,50,0,0,0,0,84,117,101,115,100,97,121,0,77,111,110,100,97,121,0,0,83,117,110,100,97,121,0,0,102,97,108,108,98,97,99,107,45,109,111,116,105,111,110,46,99,99,0,0,0,0,0,0,32,32,118,105,100,101,111,95,102,111,114,109,97,116,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,37,115,10,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,0,0,0,0,118,112,115,95,115,117,98,95,108,97,121,101,114,95,111,114,100,101,114,105,110,103,95,105,110,102,111,95,112,114,101,115,101,110,116,95,102,108,97,103,32,58,32,37,100,10,0,0,70,0,0,0,114,0,0,0,105,0,0,0,0,0,0,0,52,58,52,58,52,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,0,0,0,0,99,97,110,110,111,116,32,102,114,101,101,32,108,105,98,114,97,114,121,32,100,97,116,97,32,40,110,111,116,32,105,110,105,116,105,97,108,105,122,101,100,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,112,112,115,46,99,99,0,0,77,0,0,0,111,0,0,0,110,0,0,0,0,0,0,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,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,102,97,108,108,98,97,99,107,45,100,99,116,46,99,99,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,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,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,0,0,0,0,118,105,100,101,111,95,115,105,103,110,97,108,95,116,121,112,101,95,112,114,101,115,101,110,116,95,102,108,97,103,58,32,37,100,10,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,118,112,115,95,116,101,109,112,111,114,97,108,95,105,100,95,110,101,115,116,105,110,103,95,102,108,97,103,32,32,32,32,32,32,32,32,32,32,58,32,37,100,10,0,0,0,0,0,109,111,114,101,62,61,45,49,32,38,38,32,109,111,114,101,60,61,49,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,52,58,50,58,50,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,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,0,0,0,0,116,105,108,101,88,62,61,48,32,38,38,32,116,105,108,101,89,62,61,48,0,0,0,0,103,108,111,98,97,108,32,108,105,98,114,97,114,121,32,105,110,105,116,105,97,108,105,122,97,116,105,111,110,32,102,97,105,108,101,100,0,0,0,0,68,101,99,0,0,0,0,0,117,110,105,116,89,32,62,61,32,48,32,38,38,32,117,110,105,116,89,32,60,32,104,101,105,103,104,116,95,105,110,95,117,110,105,116,115,0,0,0,37,112,32,40,97,108,108,111,99,41,10,0,0,0,0,0,46,47,105,109,97,103,101,46,104,0,0,0,0,0,0,0,78,111,118,0,0,0,0,0,79,99,116,0,0,0,0,0,83,101,112,0,0,0,0,0,65,117,103,0,0,0,0,0,100,101,50,54,53,95,115,101,116,95,112,97,114,97,109,101,116,101,114,95,105,110,116,0,100,101,50,54,53,95,115,101,116,95,112,97,114,97,109,101,116,101,114,95,98,111,111,108,0,0,0,0,0,0,0,0,100,101,50,54,53,95,103,101,116,95,112,97,114,97,109,101,116,101,114,95,98,111,111,108,0,0,0,0,0,0,0,0,100,101,50,54,53,95,103,101,116,95,105,109,97,103,101,95,112,108,97,110,101,95,117,115,101,114,95,100,97,116,97,0,100,101,50,54,53,95,103,101,116,95,105,109,97,103,101,95,112,108,97,110,101,0,0,0,100,117,109,112,95,115,108,105,99,101,95,115,101,103,109,101,110,116,95,104,101,97,100,101,114,0,0,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,103,101,116,0,0,0,0,0,110,101,119,95,105,109,97,103,101,0,0,0,0,0,0,0,111,117,116,112,117,116,95,110,101,120,116,95,112,105,99,116,117,114,101,95,105,110,95,114,101,111,114,100,101,114,95,98,117,102,102,101,114,0,0,0,114,101,97,100,0,0,0,0,100,101,99,111,117,112,108,101,0,0,0,0,0,0,0,0,100,101,99,111,117,112,108,101,95,111,114,95,97,108,108,111,99,95,119,105,116,104,95,101,109,112,116,121,95,100,97,116,97,0,0,0,0,0,0,0,114,101,97,100,0,0,0,0,115,101,116,95,100,101,114,105,118,101,100,95,118,97,108,117,101,115,0,0,0,0,0,0,100,101,99,111,100,101,0,0,103,101,110,101,114,97,116,101,95,117,110,97,118,97,105,108,97,98,108,101,95,114,101,102,101,114,101,110,99,101,95,112,105,99,116,117,114,101,0,0,99,111,110,115,116,114,117,99,116,95,114,101,102,101,114,101,110,99,101,95,112,105,99,116,117,114,101,95,108,105,115,116,115,0,0,0,0,0,0,0,112,114,111,99,101,115,115,95,115,108,105,99,101,95,115,101,103,109,101,110,116,95,104,101,97,100,101,114,0,0,0,0,100,101,99,111,100,101,95,115,108,105,99,101,95,117,110,105,116,95,112,97,114,97,108,108,101,108,0,0,0,0,0,0,100,101,99,111,100,101,95,115,108,105,99,101,95,117,110,105,116,95,116,105,108,101,115,0,100,101,99,111,100,101,95,115,108,105,99,101,95,117,110,105,116,95,87,80,80,0,0,0,99,104,97,110,103,101,95,102,114,97,109,101,114,97,116,101,0,0,0,0,0,0,0,0,115,101,116,95,73,110,116,114,97,80,114,101,100,77,111,100,101,67,0,0,0,0,0,0,116,104,114,101,97,100,95,102,105,110,105,115,104,101,115,0,99,111,112,121,95,108,105,110,101,115,95,102,114,111,109,0,97,108,108,111,99,95,105,109,97,103,101,0,0,0,0,0,97,108,108,111,99,97,116,101,95,116,104,114,101,97,100,95,99,111,110,116,101,120,116,115,0,0,0,0,0,0,0,0,103,101,116,95,116,104,114,101,97,100,95,99,111,110,116,101,120,116,0,0,0,0,0,0,112,117,115,104,95,78,65,76,0,0,0,0,0,0,0,0,100,101,99,111,100,101,95,115,112,108,105,116,95,116,114,97,110,115,102,111,114,109,95,102,108,97,103,0,0,0,0,0,100,101,50,54,53,95,105,109,97,103,101,95,103,101,116,95,98,117,102,102,101,114,0,0,100,101,99,111,100,101,95,112,97,114,116,95,109,111,100,101,0,0,0,0,0,0,0,0,115,101,116,95,105,110,105,116,86,97,108,117,101,0,0,0,109,99,95,99,104,114,111,109,97,0,0,0,0,0,0,0,103,101,116,95,117,118,108,99,0,0,0,0,0,0,0,0,97,108,108,111,99,95,97,110,100,95,105,110,105,116,95,115,105,103,110,105,102,105,99,97,110,116,95,99,111,101,102,102,95,99,116,120,73,100,120,95,108,111,111,107,117,112,84,97,98,108,101,0,0,0,0,0,100,101,114,105,118,101,95,99,111,109,98,105,110,101,100,95,98,105,112,114,101,100,105,99,116,105,118,101,95,109,101,114,103,105,110,103,95,99,97,110,100,105,100,97,116,101,115,0,100,101,114,105,118,101,95,115,112,97,116,105,97,108,95,108,117,109,97,95,118,101,99,116,111,114,95,112,114,101,100,105,99,116,105,111,110,0,0,0,102,105,108,108,95,108,117,109,97,95,109,111,116,105,111,110,95,118,101,99,116,111,114,95,112,114,101,100,105,99,116,111,114,115,0,0,0,0,0,0,112,117,116,95,119,101,105,103,104,116,101,100,95,112,114,101,100,95,97,118,103,95,49,54,95,102,97,108,108,98,97,99,107,0,0,0,0,0,0,0,105,110,116,114,97,95,112,114,101,100,105,99,116,105,111,110,95,115,97,109,112,108,101,95,102,105,108,116,101,114,105,110,103,0,0,0,0,0,0,0,103,101,110,101,114,97,116,101,95,105,110,116,101,114,95,112,114,101,100,105,99,116,105,111,110,95,115,97,109,112,108,101,115,0,0,0,0,0,0,0,112,117,116,95,119,101,105,103,104,116,101,100,95,112,114,101,100,95,97,118,103,95,56,95,102,97,108,108,98,97,99,107,0,0,0,0,0,0,0,0,100,101,114,105,118,101,95,99,111,108,108,111,99,97,116,101,100,95,109,111,116,105,111,110,95,118,101,99,116,111,114,115,0,0,0,0,0,0,0,0,112,117,116,95,119,101,105,103,104,116,101,100,95,98,105,112,114,101,100,95,49,54,95,102,97,108,108,98,97,99,107,0,112,117,116,95,117,110,119,101,105,103,104,116,101,100,95,112,114,101,100,95,49,54,95,102,97,108,108,98,97,99,107,0,112,117,116,95,119,101,105,103,104,116,101,100,95,98,105,112,114,101,100,95,56,95,102,97,108,108,98,97,99,107,0,0,112,117,116,95,117,110,119,101,105,103,104,116,101,100,95,112,114,101,100,95,56,95,102,97,108,108,98,97,99,107,0,0,112,117,116,95,119,101,105,103,104,116,101,100,95,112,114,101,100,95,49,54,95,102,97,108,108,98,97,99,107,0,0,0,112,117,116,95,119,101,105,103,104,116,101,100,95,112,114,101,100,95,56,95,102,97,108,108,98,97,99,107,0,0,0,0,115,99,97,108,101,95,99,111,101,102,102,105,99,105,101,110,116,115,95,105,110,116,101,114,110,97,108,0,0,0,0,0,114,101,97,100,95,115,104,111,114,116,95,116,101,114,109,95,114,101,102,95,112,105,99,95,115,101,116,0,0,0,0,0,116,114,97,110,115,102,111,114,109,95,115,107,105,112,95,49,54,95,102,97,108,108,98,97,99,107,0,0,0,0,0,0,116,114,97,110,115,102,111,114,109,95,115,107,105,112,95,56,95,102,97,108,108,98,97,99,107,0,0,0,0,0,0,0,105,110,116,114,97,95,112,114,101,100,105,99,116,105,111,110,95,97,110,103,117,108,97,114,0,0,0,0,0,0,0,0,105,110,105,116,105,97,108,105,122,101,95,67,65,66,65,67,95,109,111,100,101,108,115,0,100,101,114,105,118,101,95,98,111,117,110,100,97,114,121,83,116,114,101,110,103,116,104,0,114,101,97,100,95,116,114,97,110,115,102,111,114,109,95,117,110,105,116,0,0,0,0,0,114,101,97,100,95,116,114,97,110,115,102,111,114,109,95,116,114,101,101,0,0,0,0,0,102,105,108,108,95,115,99,97,108,105,110,103,95,102,97,99,116,111,114,0,0,0,0,0,105,110,105,116,95,67,65,66,65,67,95,100,101,99,111,100,101,114,0,0,0,0,0,0,114,101,97,100,95,115,99,97,108,105,110,103,95,108,105,115,116,0,0,0,0,0,0,0,114,101,97,100,95,99,111,100,105,110,103,95,117,110,105,116,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,0,0,0,0,48,49,50,51,52,53,54,55,56,57,0,0,0,0,0,0,48,49,50,51,52,53,54,55,56,57,0,0,0,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,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,72,0,0,0,58,0,0,0,37,0,0,0,77,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,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,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,72,58,37,77,58,37,83,37,72,58,37,77,0,0,0,37,73,58,37,77,58,37,83,32,37,112,0,0,0,0,0,37,89,45,37,109,45,37,100,37,109,47,37,100,47,37,121,37,72,58,37,77,58,37,83,37,0,0,0,0,0,0,0,37,112,0,0,0,0,0,0,0,0,0,0,26,0,0,0,10,0,0,0,1,0,0,0,0,0,0,0,184,99,0,0,174,0,0,0,138,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,99,0,0,236,0,0,0,190,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,99,0,0,76,0,0,0,62,1,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,99,0,0,110,0,0,0,8,0,0,0,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,99,0,0,110,0,0,0,26,0,0,0,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,100,0,0,228,0,0,0,90,0,0,0,56,0,0,0,2,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,100,0,0,54,1,0,0,220,0,0,0,56,0,0,0,4,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,100,0,0,188,0,0,0,222,0,0,0,56,0,0,0,30,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,100,0,0,56,1,0,0,162,0,0,0,56,0,0,0,28,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,101,0,0,48,1,0,0,108,0,0,0,56,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,101,0,0,186,0,0,0,128,0,0,0,56,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,101,0,0,46,0,0,0,130,0,0,0,56,0,0,0,120,0,0,0,4,0,0,0,60,0,0,0,10,0,0,0,38,0,0,0,88,0,0,0,4,0,0,0,248,255,255,255,80,101,0,0,22,0,0,0,10,0,0,0,34,0,0,0,16,0,0,0,2,0,0,0,32,0,0,0,124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,101,0,0,36,1,0,0,20,1,0,0,56,0,0,0,20,0,0,0,24,0,0,0,92,0,0,0,54,0,0,0,34,0,0,0,2,0,0,0,8,0,0,0,248,255,255,255,120,101,0,0,64,0,0,0,100,0,0,0,114,0,0,0,44,0,0,0,88,0,0,0,42,0,0,0,54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,101,0,0,84,0,0,0,226,0,0,0,56,0,0,0,46,0,0,0,122,0,0,0,8,0,0,0,50,0,0,0,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,101,0,0,68,0,0,0,72,0,0,0,56,0,0,0,40,0,0,0,76,0,0,0,12,0,0,0,64,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,101,0,0,40,1,0,0,2,0,0,0,56,0,0,0,24,0,0,0,32,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,101,0,0,54,0,0,0,6,1,0,0,56,0,0,0,38,0,0,0,14,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,102,0,0,10,1,0,0,132,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,102,0,0,38,0,0,0,160,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,102,0,0,6,0,0,0,202,0,0,0,56,0,0,0,8,0,0,0,6,0,0,0,18,0,0,0,4,0,0,0,16,0,0,0,4,0,0,0,2,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,102,0,0,116,0,0,0,24,0,0,0,56,0,0,0,22,0,0,0,26,0,0,0,62,0,0,0,24,0,0,0,42,0,0,0,8,0,0,0,6,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,102,0,0,48,0,0,0,32,0,0,0,56,0,0,0,78,0,0,0,76,0,0,0,68,0,0,0,70,0,0,0,58,0,0,0,74,0,0,0,66,0,0,0,46,0,0,0,82,0,0,0,80,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,102,0,0,60,0,0,0,4], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240);
|
|
/* memory initializer */ allocate([56,0,0,0,110,0,0,0,102,0,0,0,96,0,0,0,98,0,0,0,90,0,0,0,100,0,0,0,94,0,0,0,108,0,0,0,106,0,0,0,104,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,102,0,0,78,0,0,0,106,0,0,0,56,0,0,0,6,0,0,0,32,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,102,0,0,36,0,0,0,204,0,0,0,56,0,0,0,16,0,0,0,38,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,102,0,0,14,0,0,0,218,0,0,0,56,0,0,0,2,0,0,0,10,0,0,0,14,0,0,0,118,0,0,0,94,0,0,0,24,0,0,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,102,0,0,210,0,0,0,154,0,0,0,56,0,0,0,14,0,0,0,16,0,0,0,18,0,0,0,50,0,0,0,8,0,0,0,20,0,0,0,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,102,0,0,210,0,0,0,28,0,0,0,56,0,0,0,6,0,0,0,4,0,0,0,4,0,0,0,92,0,0,0,60,0,0,0,10,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,103,0,0,210,0,0,0,118,0,0,0,56,0,0,0,12,0,0,0,8,0,0,0,22,0,0,0,30,0,0,0,14,0,0,0,8,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,103,0,0,210,0,0,0,42,0,0,0,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,103,0,0,64,0,0,0,182,0,0,0,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,103,0,0,210,0,0,0,86,0,0,0,56,0,0,0,20,0,0,0,2,0,0,0,6,0,0,0,12,0,0,0,20,0,0,0,28,0,0,0,26,0,0,0,6,0,0,0,6,0,0,0,10,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,103,0,0,60,1,0,0,44,0,0,0,56,0,0,0,14,0,0,0,4,0,0,0,2,0,0,0,36,0,0,0,10,0,0,0,8,0,0,0,26,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,103,0,0,74,0,0,0,94,0,0,0,70,0,0,0,34,0,0,0,14,0,0,0,32,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,103,0,0,210,0,0,0,92,0,0,0,56,0,0,0,12,0,0,0,8,0,0,0,22,0,0,0,30,0,0,0,14,0,0,0,8,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,103,0,0,210,0,0,0,192,0,0,0,56,0,0,0,12,0,0,0,8,0,0,0,22,0,0,0,30,0,0,0,14,0,0,0,8,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,103,0,0,150,0,0,0,30,1,0,0,84,0,0,0,22,0,0,0,16,0,0,0,34,0,0,0,80,0,0,0,96,0,0,0,34,0,0,0,28,0,0,0,26,0,0,0,8,0,0,0,44,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,103,0,0,12,0,0,0,140,0,0,0,68,0,0,0,40,0,0,0,30,0,0,0,30,0,0,0,48,0,0,0,78,0,0,0,18,0,0,0,6,0,0,0,12,0,0,0,30,0,0,0,16,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,16,104,0,0,52,0,0,0,2,1,0,0,252,255,255,255,252,255,255,255,16,104,0,0,168,0,0,0,148,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,40,104,0,0,12,1,0,0,32,1,0,0,252,255,255,255,252,255,255,255,40,104,0,0,126,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,64,104,0,0,98,0,0,0,44,1,0,0,248,255,255,255,248,255,255,255,64,104,0,0,212,0,0,0,28,1,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,88,104,0,0,124,0,0,0,248,0,0,0,248,255,255,255,248,255,255,255,88,104,0,0,158,0,0,0,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,104,0,0,244,0,0,0,214,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,104,0,0,42,1,0,0,216,0,0,0,18,0,0,0,22,0,0,0,16,0,0,0,34,0,0,0,56,0,0,0,96,0,0,0,34,0,0,0,28,0,0,0,26,0,0,0,8,0,0,0,30,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,104,0,0,180,0,0,0,206,0,0,0,42,0,0,0,40,0,0,0,30,0,0,0,30,0,0,0,82,0,0,0,78,0,0,0,18,0,0,0,6,0,0,0,12,0,0,0,30,0,0,0,42,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,104,0,0,18,1,0,0,166,0,0,0,56,0,0,0,62,0,0,0,116,0,0,0,34,0,0,0,90,0,0,0,4,0,0,0,38,0,0,0,52,0,0,0,28,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,104,0,0,122,0,0,0,62,0,0,0,56,0,0,0,108,0,0,0,4,0,0,0,74,0,0,0,24,0,0,0,86,0,0,0,30,0,0,0,112,0,0,0,60,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,105,0,0,22,1,0,0,134,0,0,0,56,0,0,0,18,0,0,0,58,0,0,0,6,0,0,0,54,0,0,0,92,0,0,0,62,0,0,0,86,0,0,0,66,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,105,0,0,82,0,0,0,200,0,0,0,56,0,0,0,98,0,0,0,102,0,0,0,36,0,0,0,82,0,0,0,32,0,0,0,26,0,0,0,72,0,0,0,80,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,105,0,0,100,0,0,0,22,0,0,0,44,0,0,0,22,0,0,0,16,0,0,0,34,0,0,0,80,0,0,0,96,0,0,0,34,0,0,0,66,0,0,0,74,0,0,0,16,0,0,0,44,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,105,0,0,18,0,0,0,14,1,0,0,70,0,0,0,40,0,0,0,30,0,0,0,30,0,0,0,48,0,0,0,78,0,0,0,18,0,0,0,90,0,0,0,24,0,0,0,4,0,0,0,16,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,105,0,0,250,0,0,0,238,0,0,0,70,0,0,0,178,0,0,0,8,0,0,0,2,0,0,0,12,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,105,0,0,50,1,0,0,26,1,0,0,0,1,0,0,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,105,0,0,4,1,0,0,8,1,0,0,246,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,105,0,0,46,1,0,0,80,0,0,0,104,0,0,0,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,106,0,0,34,1,0,0,66,0,0,0,184,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,106,0,0,24,1,0,0,242,0,0,0,12,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,106,0,0,254,0,0,0,120,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,83,116,57,116,121,112,101,95,105,110,102,111,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,56,98,97,100,95,99,97,115,116,0,0,0,0,0,83,116,49,51,114,117,110,116,105,109,101,95,101,114,114,111,114,0,0,0,0,0,0,0,83,116,49,50,108,101,110,103,116,104,95,101,114,114,111,114,0,0,0,0,0,0,0,0,83,116,49,49,108,111,103,105,99,95,101,114,114,111,114,0,78,83,116,51,95,95,49,57,116,105,109,101,95,98,97,115,101,69,0,0,0,0,0,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,0,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,0,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,0,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,0,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,0,0,0,0,0,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,0,0,0,0,0,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,119,69,69,0,0,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,99,69,69,0,0,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,119,69,69,0,0,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,99,69,69,0,0,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,0,0,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,0,0,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,0,0,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,0,0,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,119,69,69,0,0,0,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,99,69,69,0,0,0,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,119,69,69,0,0,0,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,99,69,69,0,0,0,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,69,0,0,0,0,0,0,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,0,0,0,0,0,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,0,0,0,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,0,0,0,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,0,0,0,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,0,0,0,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,119,69,69,0,0,0,0,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,99,69,69,0,0,0,0,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,0,0,0,0,0,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,0,0,0,0,0,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,0,0,0,0,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,0,0,0,0,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,102,97,99,101,116,69,0,0,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,95,95,105,109,112,69,0,0,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,119,69,69,0,0,0,0,0,0,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,99,69,69,0,0,0,0,0,0,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,0,0,0,0,0,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,0,0,0,0,0,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,0,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,0,0,0,0,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,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,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,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,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,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,0,78,83,116,51,95,95,49,49,50,115,121,115,116,101,109,95,101,114,114,111,114,69,0,0,78,83,116,51,95,95,49,49,50,99,111,100,101,99,118,116,95,98,97,115,101,69,0,0,78,83,116,51,95,95,49,49,50,95,95,100,111,95,109,101,115,115,97,103,101,69,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,0,0,0,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,0,0,0,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,0,0,0,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,0,0,0,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,0,0,0,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,95,98,97,115,101,69,0,0,0,0,78,83,116,51,95,95,49,49,48,99,116,121,112,101,95,98,97,115,101,69,0,0,0,0,78,83,116,51,95,95,49,49,48,95,95,116,105,109,101,95,112,117,116,69,0,0,0,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,48,95,95,115,116,100,105,110,98,117,102,73,99,69,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,0,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,0,0,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,0,0,0,0,0,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,0,0,0,0,0,0,0,50,54,116,104,114,101,97,100,95,116,97,115,107,95,100,101,98,108,111,99,107,95,67,84,66,82,111,119,0,0,0,0,50,53,116,104,114,101,97,100,95,116,97,115,107,95,115,108,105,99,101,95,115,101,103,109,101,110,116,0,0,0,0,0,49,57,116,104,114,101,97,100,95,116,97,115,107,95,99,116,98,95,114,111,119,0,0,0,49,53,116,104,114,101,97,100,95,116,97,115,107,95,115,97,111,0,0,0,0,0,0,0,49,53,100,101,99,111,100,101,114,95,99,111,110,116,101,120,116,0,0,0,0,0,0,0,49,50,98,97,115,101,95,99,111,110,116,101,120,116,0,0,49,49,116,104,114,101,97,100,95,116,97,115,107,0,0,0,49,49,101,114,114,111,114,95,113,117,101,117,101,0,0,0,0,0,0,0,96,87,0,0,0,0,0,0,112,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,87,0,0,248,99,0,0,0,0,0,0,0,0,0,0,192,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,87,0,0,120,86,0,0,232,87,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,184,104,0,0,0,0,0,0,120,86,0,0,48,88,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,192,104,0,0,0,0,0,0,120,86,0,0,120,88,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,200,104,0,0,0,0,0,0,120,86,0,0,192,88,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,208,104,0,0,0,0,0,0,0,0,0,0,8,89,0,0,0,102,0,0,0,0,0,0,0,0,0,0,56,89,0,0,0,102,0,0,0,0,0,0,120,86,0,0,104,89,0,0,0,0,0,0,1,0,0,0,248,103,0,0,0,0,0,0,120,86,0,0,128,89,0,0,0,0,0,0,1,0,0,0,248,103,0,0,0,0,0,0,120,86,0,0,152,89,0,0,0,0,0,0,1,0,0,0,0,104,0,0,0,0,0,0,120,86,0,0,176,89,0,0,0,0,0,0,1,0,0,0,0,104,0,0,0,0,0,0,120,86,0,0,200,89,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,104,105,0,0,0,8,0,0,120,86,0,0,16,90,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,104,105,0,0,0,8,0,0,120,86,0,0,88,90,0,0,0,0,0,0,3,0,0,0,56,103,0,0,2,0,0,0,8,100,0,0,2,0,0,0,152,103,0,0,0,8,0,0,120,86,0,0,160,90,0,0,0,0,0,0,3,0,0,0,56,103,0,0,2,0,0,0,8,100,0,0,2,0,0,0,160,103,0,0,0,8,0,0,0,0,0,0,232,90,0,0,56,103,0,0,0,0,0,0,0,0,0,0,0,91,0,0,56,103,0,0,0,0,0,0,120,86,0,0,24,91,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,8,104,0,0,2,0,0,0,120,86,0,0,48,91,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,8,104,0,0,2,0,0,0,0,0,0,0,72,91,0,0,0,0,0,0,96,91,0,0,112,104,0,0,0,0,0,0,120,86,0,0,128,91,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,176,100,0,0,0,0,0,0,120,86,0,0,200,91,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,200,100,0,0,0,0,0,0,120,86,0,0,16,92,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,224,100,0,0,0,0,0,0,120,86,0,0,88,92,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,248,100,0,0,0,0,0,0,0,0,0,0,160,92,0,0,56,103,0,0,0,0,0,0,0,0,0,0,184,92,0,0,56,103,0,0,0,0,0,0,120,86,0,0,208,92,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,128,104,0,0,2,0,0,0,120,86,0,0,248,92,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,128,104,0,0,2,0,0,0,120,86,0,0,32,93,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,128,104,0,0,2,0,0,0,120,86,0,0,72,93,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,128,104,0,0,2,0,0,0,0,0,0,0,112,93,0,0,240,103,0,0,0,0,0,0,0,0,0,0,136,93,0,0,56,103,0,0,0,0,0,0,120,86,0,0,160,93,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,96,105,0,0,2,0,0,0,120,86,0,0,184,93,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,96,105,0,0,2,0,0,0,0,0,0,0,208,93,0,0,0,0,0,0,248,93,0,0,0,0,0,0,32,94,0,0,136,104,0,0,0,0,0,0,0,0,0,0,64,94,0,0,24,103,0,0,0,0,0,0,0,0,0,0,104,94,0,0,24,103,0,0,0,0,0,0,0,0,0,0,144,94,0,0,0,0,0,0,200,94,0,0,0,0,0,0,0,95,0,0,0,0,0,0,32,95,0,0,0,0,0,0,64,95,0,0,0,0,0,0,96,95,0,0,0,0,0,0,128,95,0,0,120,86,0,0,152,95,0,0,0,0,0,0,1,0,0,0,144,100,0,0,3,244,255,255,120,86,0,0,200,95,0,0,0,0,0,0,1,0,0,0,160,100,0,0,3,244,255,255,120,86,0,0,248,95,0,0,0,0,0,0,1,0,0,0,144,100,0,0,3,244,255,255,120,86,0,0,40,96,0,0,0,0,0,0,1,0,0,0,160,100,0,0,3,244,255,255,0,0,0,0,88,96,0,0,216,99,0,0,0,0,0,0,0,0,0,0,112,96,0,0,0,0,0,0,136,96,0,0,232,103,0,0,0,0,0,0,0,0,0,0,160,96,0,0,216,103,0,0,0,0,0,0,0,0,0,0,192,96,0,0,224,103,0,0,0,0,0,0,0,0,0,0,224,96,0,0,0,0,0,0,0,97,0,0,0,0,0,0,32,97,0,0,0,0,0,0,64,97,0,0,120,86,0,0,96,97,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,88,105,0,0,2,0,0,0,120,86,0,0,128,97,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,88,105,0,0,2,0,0,0,120,86,0,0,160,97,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,88,105,0,0,2,0,0,0,120,86,0,0,192,97,0,0,0,0,0,0,2,0,0,0,56,103,0,0,2,0,0,0,88,105,0,0,2,0,0,0,0,0,0,0,224,97,0,0,0,0,0,0,248,97,0,0,0,0,0,0,16,98,0,0,0,0,0,0,40,98,0,0,216,103,0,0,0,0,0,0,0,0,0,0,64,98,0,0,224,103,0,0,0,0,0,0,0,0,0,0,88,98,0,0,176,105,0,0,0,0,0,0,0,0,0,0,128,98,0,0,176,105,0,0,0,0,0,0,0,0,0,0,168,98,0,0,192,105,0,0,0,0,0,0,0,0,0,0,208,98,0,0,176,99,0,0,0,0,0,0,0,0,0,0,248,98,0,0,56,106,0,0,0,0,0,0,0,0,0,0,24,99,0,0,56,106,0,0,0,0,0,0,0,0,0,0,56,99,0,0,56,106,0,0,0,0,0,0,0,0,0,0,80,99,0,0,56,106,0,0,0,0,0,0,0,0,0,0,104,99,0,0,32,106,0,0,0,0,0,0,120,86,0,0,128,99,0,0,0,0,0,0,1,0,0,0,64,106,0,0,2,4,0,0,0,0,0,0,144,99,0,0,0,0,0,0,160,99,0,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,0,0,0,0,0,0,0,4,0,0,0,42,0,0,0,29,55,74,84,74,74,0,182,84,227,182,55,55,172,74,227,0,1,4,5,2,3,4,5,6,6,8,8,7,7,8,99,128,176,208,240,128,167,197,227,128,158,187,216,123,150,178,205,116,142,169,195,111,135,160,185,105,128,152,175,100,122,144,166,95,116,137,158,90,110,130,150,85,104,123,142,81,99,117,135,77,94,111,128,73,89,105,122,69,85,100,116,66,80,95,110,62,76,90,104,59,72,86,99,56,69,81,94,53,65,77,89,51,62,73,85,48,59,69,80,46,56,66,76,43,53,63,72,41,50,59,69,39,48,56,65,37,45,54,62,35,43,51,59,33,41,48,56,32,39,46,53,30,37,43,50,29,35,41,48,27,33,39,45,26,31,37,43,24,30,35,41,23,28,33,39,22,27,32,37,21,26,30,35,20,24,29,33,19,23,27,31,18,22,26,30,17,21,25,28,16,20,23,27,15,19,22,25,14,18,21,24,14,17,20,23,13,16,19,22,12,15,18,21,12,14,17,20,11,14,16,19,11,13,15,18,10,12,15,17,10,12,14,16,9,11,13,15,9,11,12,14,8,10,12,14,8,9,11,13,7,9,11,12,7,9,10,12,7,8,10,11,6,8,9,11,6,7,9,10,6,7,8,9,2,2,2,2,0,0,0,0,0,0,0,0,232,201,0,0,104,201,0,0,104,199,0,0,104,191,0,0,0,0,0,0,0,0,0,0,72,191,0,0,200,190,0,0,200,188,0,0,200,180,0,0,0,0,0,0,0,0,0,0,168,180,0,0,40,180,0,0,40,178,0,0,40,170,0,0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,90,90,88,85,82,78,73,67,61,54,46,38,31,22,13,4,252,243,234,225,218,210,202,195,189,183,178,174,171,168,166,166,90,87,80,70,57,43,25,9,247,231,213,199,186,176,169,166,166,169,176,186,199,213,231,247,9,25,43,57,70,80,87,90,90,82,67,46,22,252,225,202,183,171,166,168,178,195,218,243,13,38,61,78,88,90,85,73,54,31,4,234,210,189,174,166,89,75,50,18,238,206,181,167,167,181,206,238,18,50,75,89,89,75,50,18,238,206,181,167,167,181,206,238,18,50,75,89,88,67,31,243,202,174,166,178,210,252,38,73,90,85,61,22,234,195,171,166,183,218,4,46,78,90,82,54,13,225,189,168,87,57,9,213,176,166,186,231,25,70,90,80,43,247,199,169,169,199,247,43,80,90,70,25,231,186,166,176,213,9,57,87,85,46,243,189,166,183,234,38,82,88,54,252,195,166,178,225,31,78,90,61,4,202,168,174,218,22,73,90,67,13,210,171,83,36,220,173,173,220,36,83,83,36,220,173,173,220,36,83,83,36,220,173,173,220,36,83,83,36,220,173,173,220,36,83,82,22,202,166,195,13,78,85,31,210,166,189,4,73,88,38,218,168,183,252,67,90,46,225,171,178,243,61,90,54,234,174,80,9,186,169,231,57,90,43,213,166,199,25,87,70,247,176,176,247,70,87,25,199,166,213,43,90,57,231,169,186,9,80,78,252,174,183,13,85,67,234,168,195,31,90,54,218,166,210,46,90,38,202,166,225,61,88,22,189,171,243,73,82,4,178,75,238,167,206,50,89,18,181,181,18,89,50,206,167,238,75,75,238,167,206,50,89,18,181,181,18,89,50,206,167,238,75,73,225,166,234,78,67,218,166,243,82,61,210,168,252,85,54,202,171,4,88,46,195,174,13,90,38,189,178,22,90,31,183,70,213,169,9,90,25,176,199,57,80,231,166,247,87,43,186,186,43,87,247,166,231,80,57,199,176,25,90,9,169,213,70,67,202,178,38,85,234,166,4,90,13,168,225,82,46,183,195,61,73,210,174,31,88,243,166,252,90,22,171,218,78,54,189,64,192,192,64,64,192,192,64,64,192,192,64,64,192,192,64,64,192,192,64,64,192,192,64,64,192,192,64,64,192,192,64,61,183,210,82,31,168,243,90,252,166,22,85,218,178,54,67,189,202,78,38,171,234,90,4,166,13,88,225,174,46,73,195,57,176,231,90,247,169,43,70,186,213,87,9,166,25,80,199,199,80,25,166,9,87,213,186,70,43,169,247,90,231,176,57,54,171,252,88,210,195,82,13,166,38,67,178,234,90,225,183,73,31,166,22,78,189,218,90,243,174,61,46,168,4,85,202,50,167,18,75,181,238,89,206,206,89,238,181,75,18,167,50,50,167,18,75,181,238,89,206,206,89,238,181,75,18,167,50,46,166,38,54,166,31,61,168,22,67,171,13,73,174,4,78,178,252,82,183,243,85,189,234,88,195,225,90,202,218,90,210,43,166,57,25,169,70,9,176,80,247,186,87,231,199,90,213,213,90,199,231,87,186,247,80,176,9,70,169,25,57,166,43,38,168,73,252,189,90,210,225,85,178,13,61,166,54,22,174,82,234,202,90,195,243,78,171,31,46,166,67,4,183,88,218,36,173,83,220,220,83,173,36,36,173,83,220,220,83,173,36,36,173,83,220,220,83,173,36,36,173,83,220,220,83,173,36,31,178,90,195,4,54,168,82,218,234,73,166,67,243,210,85,171,46,13,189,90,183,22,38,174,88,202,252,61,166,78,225,25,186,90,176,43,9,199,87,169,57,247,213,80,166,70,231,231,70,166,80,213,247,57,169,87,199,9,43,176,90,186,25,22,195,85,166,73,218,252,46,178,90,174,54,243,225,67,168,88,189,31,13,202,82,166,78,210,4,38,183,90,171,61,234,18,206,75,167,89,181,50,238,238,50,181,89,167,75,206,18,18,206,75,167,89,181,50,238,238,50,181,89,167,75,206,18,13,218,61,178,88,166,85,183,54,225,4,22,210,67,174,90,166,82,189,46,234,252,31,202,73,171,90,168,78,195,38,243,9,231,43,199,70,176,87,166,90,169,80,186,57,213,25,247,247,25,213,57,186,80,169,90,166,87,176,70,199,43,231,9,4,243,22,225,38,210,54,195,67,183,78,174,85,168,90,166,90,166,88,171,82,178,73,189,61,202,46,218,31,234,13,252,24,170,0,0,192,148,0,0,160,148,0,0,32,148,0,0,32,146,0,0,32,138,0,0,0,0,0,0,0,0,0,0,24,170,0,0,104,159,0,0,72,159,0,0,200,158,0,0,200,156,0,0,200,148,0,0,0,0,0,0,0,0,0,0,24,170,0,0,16,170,0,0,240,169,0,0,112,169,0,0,112,167,0,0,112,159,0,0,0,0,0,0,0,0,0,0,110,0,0,0,110,0,0,0,124,0,0,0,125,0,0,0,140,0,0,0,153,0,0,0,125,0,0,0,127,0,0,0,140,0,0,0,109,0,0,0,111,0,0,0,143,0,0,0,127,0,0,0,111,0,0,0,79,0,0,0,108,0,0,0,123,0,0,0,63,0,0,0,125,0,0,0,110,0,0,0,94,0,0,0,110,0,0,0,95,0,0,0,79,0,0,0,125,0,0,0,111,0,0,0,110,0,0,0,78,0,0,0,110,0,0,0,111,0,0,0,111,0,0,0,95,0,0,0,94,0,0,0,108,0,0,0,123,0,0,0,108,0,0,0,125,0,0,0,110,0,0,0,124,0,0,0,110,0,0,0,95,0,0,0,94,0,0,0,125,0,0,0,111,0,0,0,111,0,0,0,79,0,0,0,125,0,0,0,126,0,0,0,111,0,0,0,111,0,0,0,79,0,0,0,108,0,0,0,123,0,0,0,93,0,0,0,141,0,0,0,111,0,0,0,140,0,0,0,140,0,0,0,140,0,0,0,140,0,0,0,138,0,0,0,153,0,0,0,136,0,0,0,167,0,0,0,152,0,0,0,152,0,0,0,107,0,0,0,167,0,0,0,91,0,0,0,122,0,0,0,107,0,0,0,167,0,0,0,107,0,0,0,167,0,0,0,91,0,0,0,107,0,0,0,107,0,0,0,167,0,0,0,140,0,0,0,92,0,0,0,137,0,0,0,138,0,0,0,140,0,0,0,152,0,0,0,138,0,0,0,139,0,0,0,153,0,0,0,74,0,0,0,149,0,0,0,92,0,0,0,139,0,0,0,107,0,0,0,122,0,0,0,152,0,0,0,140,0,0,0,179,0,0,0,166,0,0,0,182,0,0,0,140,0,0,0,227,0,0,0,122,0,0,0,197,0,0,0,154,0,0,0,196,0,0,0,196,0,0,0,167,0,0,0,154,0,0,0,152,0,0,0,167,0,0,0,182,0,0,0,182,0,0,0,134,0,0,0,149,0,0,0,136,0,0,0,153,0,0,0,121,0,0,0,136,0,0,0,137,0,0,0,169,0,0,0,194,0,0,0,166,0,0,0,167,0,0,0,154,0,0,0,167,0,0,0,137,0,0,0,182,0,0,0,154,0,0,0,196,0,0,0,167,0,0,0,167,0,0,0,154,0,0,0,152,0,0,0,167,0,0,0,182,0,0,0,182,0,0,0,134,0,0,0,149,0,0,0,136,0,0,0,153,0,0,0,121,0,0,0,136,0,0,0,122,0,0,0,169,0,0,0,208,0,0,0,166,0,0,0,167,0,0,0,154,0,0,0,152,0,0,0,167,0,0,0,182,0,0,0,200,0,0,0,185,0,0,0,160,0,0,0,0,0,0,0,184,0,0,0,154,0,0,0,183,0,0,0,0,0,0,0,154,0,0,0,154,0,0,0,154,0,0,0,0,0,0,0,111,0,0,0,111,0,0,0,125,0,0,0,110,0,0,0,110,0,0,0,94,0,0,0,124,0,0,0,108,0,0,0,124,0,0,0,107,0,0,0,125,0,0,0,141,0,0,0,179,0,0,0,153,0,0,0,125,0,0,0,107,0,0,0,125,0,0,0,141,0,0,0,179,0,0,0,153,0,0,0,125,0,0,0,107,0,0,0,125,0,0,0,141,0,0,0,179,0,0,0,153,0,0,0,125,0,0,0,140,0,0,0,139,0,0,0,182,0,0,0,182,0,0,0,152,0,0,0,136,0,0,0,152,0,0,0,136,0,0,0,153,0,0,0,136,0,0,0,139,0,0,0,111,0,0,0,136,0,0,0,139,0,0,0,111,0,0,0,155,0,0,0,154,0,0,0,139,0,0,0,153,0,0,0,139,0,0,0,123,0,0,0,123,0,0,0,63,0,0,0,153,0,0,0,166,0,0,0,183,0,0,0,140,0,0,0,136,0,0,0,153,0,0,0,154,0,0,0,166,0,0,0,183,0,0,0,140,0,0,0,136,0,0,0,153,0,0,0,154,0,0,0,166,0,0,0,183,0,0,0,140,0,0,0,136,0,0,0,153,0,0,0,154,0,0,0,170,0,0,0,153,0,0,0,123,0,0,0,123,0,0,0,107,0,0,0,121,0,0,0,107,0,0,0,121,0,0,0,167,0,0,0,151,0,0,0,183,0,0,0,140,0,0,0,151,0,0,0,183,0,0,0,140,0,0,0,170,0,0,0,154,0,0,0,139,0,0,0,153,0,0,0,139,0,0,0,123,0,0,0,123,0,0,0,63,0,0,0,124,0,0,0,166,0,0,0,183,0,0,0,140,0,0,0,136,0,0,0,153,0,0,0,154,0,0,0,166,0,0,0,183,0,0,0,140,0,0,0,136,0,0,0,153,0,0,0,154,0,0,0,166,0,0,0,183,0,0,0,140,0,0,0,136,0,0,0,153,0,0,0,154,0,0,0,170,0,0,0,153,0,0,0,138,0,0,0,138,0,0,0,122,0,0,0,121,0,0,0,122,0,0,0,121,0,0,0,167,0,0,0,151,0,0,0,183,0,0,0,140,0,0,0,151,0,0,0,183,0,0,0,140,0,0,0,63,0,0,0,152,0,0,0,152,0,0,0,0,0,0,0,140,0,0,0,198,0,0,0,169,0,0,0,198,0,0,0,153,0,0,0,153,0,0,0,153,0,0,0,0,0,0,0,153,0,0,0,138,0,0,0,138,0,0,0,124,0,0,0,138,0,0,0,94,0,0,0,224,0,0,0,167,0,0,0,122,0,0,0,0,0,0,0,91,0,0,0,171,0,0,0,134,0,0,0,141,0,0,0,121,0,0,0,140,0,0,0,61,0,0,0,154,0,0,0,121,0,0,0,140,0,0,0,61,0,0,0,154,0,0,0,16,16,16,16,16,16,16,16,16,16,17,16,17,16,17,18,17,18,18,17,18,21,19,20,21,20,19,21,24,22,22,24,24,22,22,24,25,25,27,30,27,25,25,29,31,35,35,31,29,36,41,44,41,36,47,54,54,47,65,70,65,88,88,115,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,18,18,18,18,18,18,20,20,20,20,20,20,20,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,28,28,28,28,28,28,33,33,33,33,33,41,41,41,41,54,54,54,71,71,91,149,0,0,0,134,0,0,0,139,0,0,0,141,0,0,0,157,0,0,0,107,0,0,0,139,0,0,0,126,0,0,0,107,0,0,0,139,0,0,0,126,0,0,0,0,0,0,0,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,197,0,0,0,185,0,0,0,201,0,0,0,197,0,0,0,185,0,0,0,201,0,0,0,110,0,0,0,154,0,0,0,94,0,0,0,138,0,0,0,182,0,0,0,154,0,0,0,149,0,0,0,107,0,0,0,167,0,0,0,154,0,0,0,149,0,0,0,92,0,0,0,167,0,0,0,154,0,0,0,184,0,0,0,154,0,0,0,139,0,0,0,154,0,0,0,154,0,0,0,154,0,0,0,139,0,0,0,154,0,0,0,154,0,0,0,0,0,0,0,122,0,0,0,137,0,0,0,111,0,0,0,141,0,0,0,153,0,0,0,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,0,0,0,0,1,2,3,4,5,6,7,8,9,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,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,62,63,0,0,1,2,2,4,4,5,6,7,8,9,9,11,11,12,13,13,15,15,16,16,18,18,19,19,21,21,22,22,23,24,24,25,26,26,27,27,28,29,29,30,30,30,31,32,32,33,33,33,34,34,35,35,35,36,36,36,37,37,37,38,38,63,0,1,2,2,2,2,3,5,7,8,10,12,13,15,17,18,19,20,21,22,23,23,24,24,25,25,26,27,27,28,28,29,29,30,31,0,0,0,0,0,0,240,255,255,154,249,255,255,114,252,255,255,138,253,255,255,30,254,255,255,122,254,255,255,197,254,255,255,0,255,255,255,197,254,255,255,122,254,255,255,30,254,255,255,138,253,255,255,114,252,255,255,154,249,255,255,0,240,255,255,0,0,0,0,255,255,255,255,2,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,24,0,0,255,255,255,255,2], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480);
|
|
/* memory initializer */ allocate([2,0,0,0,1,0,0,0,6,5,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,1,0,1,0,12,0,11,0,10,0,11,0,16,0,11,0,40,0,33,0,24,0,11,0,20,0,11,0,32,0,11,0,80,0,33,0,18,0,11,0,15,0,11,0,64,0,33,0,160,0,99,0,4,0,3,0,3,0,2,0,2,0,1,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,2,0,0,0,40,0,0,0,45,0,0,0,51,0,0,0,57,0,0,0,64,0,0,0,72,0,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720);
|
|
|
|
|
|
|
|
var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8);
|
|
|
|
assert(tempDoublePtr % 8 == 0);
|
|
|
|
function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much
|
|
|
|
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 __ZSt18uncaught_exceptionv() { // std::uncaught_exception()
|
|
return !!__ZSt18uncaught_exceptionv.uncaught_exception;
|
|
}
|
|
|
|
|
|
|
|
function ___cxa_is_number_type(type) {
|
|
var isNumber = false;
|
|
try { if (type == __ZTIi) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIj) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIl) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIm) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIx) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIy) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIf) isNumber = true } catch(e){}
|
|
try { if (type == __ZTId) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIe) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIc) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIa) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIh) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIs) isNumber = true } catch(e){}
|
|
try { if (type == __ZTIt) isNumber = true } catch(e){}
|
|
return isNumber;
|
|
}function ___cxa_does_inherit(definiteType, possibilityType, possibility) {
|
|
if (possibility == 0) return false;
|
|
if (possibilityType == 0 || possibilityType == definiteType)
|
|
return true;
|
|
var possibility_type_info;
|
|
if (___cxa_is_number_type(possibilityType)) {
|
|
possibility_type_info = possibilityType;
|
|
} else {
|
|
var possibility_type_infoAddr = HEAP32[((possibilityType)>>2)] - 8;
|
|
possibility_type_info = HEAP32[((possibility_type_infoAddr)>>2)];
|
|
}
|
|
switch (possibility_type_info) {
|
|
case 0: // possibility is a pointer
|
|
// See if definite type is a pointer
|
|
var definite_type_infoAddr = HEAP32[((definiteType)>>2)] - 8;
|
|
var definite_type_info = HEAP32[((definite_type_infoAddr)>>2)];
|
|
if (definite_type_info == 0) {
|
|
// Also a pointer; compare base types of pointers
|
|
var defPointerBaseAddr = definiteType+8;
|
|
var defPointerBaseType = HEAP32[((defPointerBaseAddr)>>2)];
|
|
var possPointerBaseAddr = possibilityType+8;
|
|
var possPointerBaseType = HEAP32[((possPointerBaseAddr)>>2)];
|
|
return ___cxa_does_inherit(defPointerBaseType, possPointerBaseType, possibility);
|
|
} else
|
|
return false; // one pointer and one non-pointer
|
|
case 1: // class with no base class
|
|
return false;
|
|
case 2: // class with base class
|
|
var parentTypeAddr = possibilityType + 8;
|
|
var parentType = HEAP32[((parentTypeAddr)>>2)];
|
|
return ___cxa_does_inherit(definiteType, parentType, possibility);
|
|
default:
|
|
return false; // some unencountered type
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var ___cxa_last_thrown_exception=0;function ___resumeException(ptr) {
|
|
if (!___cxa_last_thrown_exception) { ___cxa_last_thrown_exception = ptr; }
|
|
throw ptr + " - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
|
}
|
|
|
|
var ___cxa_exception_header_size=8;function ___cxa_find_matching_catch(thrown, throwntype) {
|
|
if (thrown == -1) thrown = ___cxa_last_thrown_exception;
|
|
header = thrown - ___cxa_exception_header_size;
|
|
if (throwntype == -1) throwntype = HEAP32[((header)>>2)];
|
|
var typeArray = Array.prototype.slice.call(arguments, 2);
|
|
|
|
// If throwntype is a pointer, this means a pointer has been
|
|
// thrown. When a pointer is thrown, actually what's thrown
|
|
// is a pointer to the pointer. We'll dereference it.
|
|
if (throwntype != 0 && !___cxa_is_number_type(throwntype)) {
|
|
var throwntypeInfoAddr= HEAP32[((throwntype)>>2)] - 8;
|
|
var throwntypeInfo= HEAP32[((throwntypeInfoAddr)>>2)];
|
|
if (throwntypeInfo == 0)
|
|
thrown = HEAP32[((thrown)>>2)];
|
|
}
|
|
// The different catch blocks are denoted by different types.
|
|
// Due to inheritance, those types may not precisely match the
|
|
// type of the thrown object. Find one which matches, and
|
|
// return the type of the catch block which should be called.
|
|
for (var i = 0; i < typeArray.length; i++) {
|
|
if (___cxa_does_inherit(typeArray[i], throwntype, thrown))
|
|
return ((asm["setTempRet0"](typeArray[i]),thrown)|0);
|
|
}
|
|
// Shouldn't happen unless we have bogus data in typeArray
|
|
// or encounter a type for which emscripten doesn't have suitable
|
|
// typeinfo defined. Best-efforts match just in case.
|
|
return ((asm["setTempRet0"](throwntype),thrown)|0);
|
|
}function ___gxx_personality_v0() {
|
|
}
|
|
|
|
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 _emscripten_memcpy_big(dest, src, num) {
|
|
HEAPU8.set(HEAPU8.subarray(src, src+num), dest);
|
|
return dest;
|
|
}
|
|
Module["_memcpy"] = _memcpy;var _llvm_memcpy_p0i8_p0i8_i32=_memcpy;
|
|
|
|
function ___cxa_allocate_exception(size) {
|
|
var ptr = _malloc(size + ___cxa_exception_header_size);
|
|
return ptr + ___cxa_exception_header_size;
|
|
}
|
|
|
|
function ___cxa_free_exception(ptr) {
|
|
try {
|
|
return _free(ptr - ___cxa_exception_header_size);
|
|
} catch(e) { // XXX FIXME
|
|
}
|
|
}
|
|
|
|
function ___cxa_throw(ptr, type, destructor) {
|
|
if (!___cxa_throw.initialized) {
|
|
try {
|
|
HEAP32[((__ZTVN10__cxxabiv119__pointer_type_infoE)>>2)]=0; // Workaround for libcxxabi integration bug
|
|
} catch(e){}
|
|
try {
|
|
HEAP32[((__ZTVN10__cxxabiv117__class_type_infoE)>>2)]=1; // Workaround for libcxxabi integration bug
|
|
} catch(e){}
|
|
try {
|
|
HEAP32[((__ZTVN10__cxxabiv120__si_class_type_infoE)>>2)]=2; // Workaround for libcxxabi integration bug
|
|
} catch(e){}
|
|
___cxa_throw.initialized = true;
|
|
}
|
|
var header = ptr - ___cxa_exception_header_size;
|
|
HEAP32[((header)>>2)]=type;
|
|
HEAP32[(((header)+(4))>>2)]=destructor;
|
|
___cxa_last_thrown_exception = ptr;
|
|
if (!("uncaught_exception" in __ZSt18uncaught_exceptionv)) {
|
|
__ZSt18uncaught_exceptionv.uncaught_exception = 1;
|
|
} else {
|
|
__ZSt18uncaught_exceptionv.uncaught_exception++;
|
|
}
|
|
throw ptr + " - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
|
}
|
|
|
|
|
|
|
|
var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};
|
|
|
|
var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};
|
|
|
|
|
|
var ___errno_state=0;function ___setErrNo(value) {
|
|
// For convenient setting and returning of errno.
|
|
HEAP32[((___errno_state)>>2)]=value;
|
|
return value;
|
|
}
|
|
|
|
var PATH={splitPath:function (filename) {
|
|
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
|
return splitPathRe.exec(filename).slice(1);
|
|
},normalizeArray:function (parts, allowAboveRoot) {
|
|
// if the path tries to go above the root, `up` ends up > 0
|
|
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 the path is allowed to go above the root, restore leading ..s
|
|
if (allowAboveRoot) {
|
|
for (; up--; up) {
|
|
parts.unshift('..');
|
|
}
|
|
}
|
|
return parts;
|
|
},normalize:function (path) {
|
|
var isAbsolute = path.charAt(0) === '/',
|
|
trailingSlash = path.substr(-1) === '/';
|
|
// Normalize the path
|
|
path = PATH.normalizeArray(path.split('/').filter(function(p) {
|
|
return !!p;
|
|
}), !isAbsolute).join('/');
|
|
if (!path && !isAbsolute) {
|
|
path = '.';
|
|
}
|
|
if (path && trailingSlash) {
|
|
path += '/';
|
|
}
|
|
return (isAbsolute ? '/' : '') + path;
|
|
},dirname:function (path) {
|
|
var result = PATH.splitPath(path),
|
|
root = result[0],
|
|
dir = result[1];
|
|
if (!root && !dir) {
|
|
// No dirname whatsoever
|
|
return '.';
|
|
}
|
|
if (dir) {
|
|
// It has a dirname, strip trailing slash
|
|
dir = dir.substr(0, dir.length - 1);
|
|
}
|
|
return root + dir;
|
|
},basename:function (path) {
|
|
// EMSCRIPTEN return '/'' for '/', not an empty string
|
|
if (path === '/') return '/';
|
|
var lastSlash = path.lastIndexOf('/');
|
|
if (lastSlash === -1) return path;
|
|
return path.substr(lastSlash+1);
|
|
},extname:function (path) {
|
|
return PATH.splitPath(path)[3];
|
|
},join:function () {
|
|
var paths = Array.prototype.slice.call(arguments, 0);
|
|
return PATH.normalize(paths.join('/'));
|
|
},join2:function (l, r) {
|
|
return PATH.normalize(l + '/' + r);
|
|
},resolve:function () {
|
|
var resolvedPath = '',
|
|
resolvedAbsolute = false;
|
|
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
var path = (i >= 0) ? arguments[i] : FS.cwd();
|
|
// Skip empty and invalid entries
|
|
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) === '/';
|
|
}
|
|
// At this point the path should be resolved to a full absolute path, but
|
|
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) {
|
|
return !!p;
|
|
}), !resolvedAbsolute).join('/');
|
|
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
|
},relative:function (from, to) {
|
|
from = PATH.resolve(from).substr(1);
|
|
to = PATH.resolve(to).substr(1);
|
|
function trim(arr) {
|
|
var start = 0;
|
|
for (; start < arr.length; start++) {
|
|
if (arr[start] !== '') break;
|
|
}
|
|
var end = arr.length - 1;
|
|
for (; end >= 0; end--) {
|
|
if (arr[end] !== '') break;
|
|
}
|
|
if (start > end) return [];
|
|
return arr.slice(start, end - start + 1);
|
|
}
|
|
var fromParts = trim(from.split('/'));
|
|
var toParts = trim(to.split('/'));
|
|
var length = Math.min(fromParts.length, toParts.length);
|
|
var samePartsLength = length;
|
|
for (var i = 0; i < length; i++) {
|
|
if (fromParts[i] !== toParts[i]) {
|
|
samePartsLength = i;
|
|
break;
|
|
}
|
|
}
|
|
var outputParts = [];
|
|
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
outputParts.push('..');
|
|
}
|
|
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
return outputParts.join('/');
|
|
}};
|
|
|
|
var TTY={ttys:[],init:function () {
|
|
// https://github.com/kripken/emscripten/pull/1555
|
|
// if (ENVIRONMENT_IS_NODE) {
|
|
// // currently, FS.init does not distinguish if process.stdin is a file or TTY
|
|
// // device, it always assumes it's a TTY device. because of this, we're forcing
|
|
// // process.stdin to UTF8 encoding to at least make stdin reading compatible
|
|
// // with text files until FS.init can be refactored.
|
|
// process['stdin']['setEncoding']('utf8');
|
|
// }
|
|
},shutdown:function () {
|
|
// https://github.com/kripken/emscripten/pull/1555
|
|
// if (ENVIRONMENT_IS_NODE) {
|
|
// // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?
|
|
// // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation
|
|
// // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?
|
|
// // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle
|
|
// // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call
|
|
// process['stdin']['pause']();
|
|
// }
|
|
},register:function (dev, ops) {
|
|
TTY.ttys[dev] = { input: [], output: [], ops: ops };
|
|
FS.registerDevice(dev, TTY.stream_ops);
|
|
},stream_ops:{open:function (stream) {
|
|
var tty = TTY.ttys[stream.node.rdev];
|
|
if (!tty) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
|
|
}
|
|
stream.tty = tty;
|
|
stream.seekable = false;
|
|
},close:function (stream) {
|
|
// flush any pending line data
|
|
if (stream.tty.output.length) {
|
|
stream.tty.ops.put_char(stream.tty, 10);
|
|
}
|
|
},read:function (stream, buffer, offset, length, pos /* ignored */) {
|
|
if (!stream.tty || !stream.tty.ops.get_char) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENXIO);
|
|
}
|
|
var bytesRead = 0;
|
|
for (var i = 0; i < length; i++) {
|
|
var result;
|
|
try {
|
|
result = stream.tty.ops.get_char(stream.tty);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
if (result === undefined && bytesRead === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
if (result === null || result === undefined) break;
|
|
bytesRead++;
|
|
buffer[offset+i] = result;
|
|
}
|
|
if (bytesRead) {
|
|
stream.node.timestamp = Date.now();
|
|
}
|
|
return bytesRead;
|
|
},write:function (stream, buffer, offset, length, pos) {
|
|
if (!stream.tty || !stream.tty.ops.put_char) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENXIO);
|
|
}
|
|
for (var i = 0; i < length; i++) {
|
|
try {
|
|
stream.tty.ops.put_char(stream.tty, buffer[offset+i]);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
}
|
|
if (length) {
|
|
stream.node.timestamp = Date.now();
|
|
}
|
|
return i;
|
|
}},default_tty_ops:{get_char:function (tty) {
|
|
if (!tty.input.length) {
|
|
var result = null;
|
|
if (ENVIRONMENT_IS_NODE) {
|
|
result = process['stdin']['read']();
|
|
if (!result) {
|
|
if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) {
|
|
return null; // EOF
|
|
}
|
|
return undefined; // no data available
|
|
}
|
|
} else if (typeof window != 'undefined' &&
|
|
typeof window.prompt == 'function') {
|
|
// Browser.
|
|
result = window.prompt('Input: '); // returns null on cancel
|
|
if (result !== null) {
|
|
result += '\n';
|
|
}
|
|
} else if (typeof readline == 'function') {
|
|
// Command line.
|
|
result = readline();
|
|
if (result !== null) {
|
|
result += '\n';
|
|
}
|
|
}
|
|
if (!result) {
|
|
return null;
|
|
}
|
|
tty.input = intArrayFromString(result, true);
|
|
}
|
|
return tty.input.shift();
|
|
},put_char:function (tty, val) {
|
|
if (val === null || val === 10) {
|
|
Module['print'](tty.output.join(''));
|
|
tty.output = [];
|
|
} else {
|
|
tty.output.push(TTY.utf8.processCChar(val));
|
|
}
|
|
}},default_tty1_ops:{put_char:function (tty, val) {
|
|
if (val === null || val === 10) {
|
|
Module['printErr'](tty.output.join(''));
|
|
tty.output = [];
|
|
} else {
|
|
tty.output.push(TTY.utf8.processCChar(val));
|
|
}
|
|
}}};
|
|
|
|
var MEMFS={ops_table:null,CONTENT_OWNING:1,CONTENT_FLEXIBLE:2,CONTENT_FIXED:3,mount:function (mount) {
|
|
return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0);
|
|
},createNode:function (parent, name, mode, dev) {
|
|
if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
|
|
// no supported
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
if (!MEMFS.ops_table) {
|
|
MEMFS.ops_table = {
|
|
dir: {
|
|
node: {
|
|
getattr: MEMFS.node_ops.getattr,
|
|
setattr: MEMFS.node_ops.setattr,
|
|
lookup: MEMFS.node_ops.lookup,
|
|
mknod: MEMFS.node_ops.mknod,
|
|
rename: MEMFS.node_ops.rename,
|
|
unlink: MEMFS.node_ops.unlink,
|
|
rmdir: MEMFS.node_ops.rmdir,
|
|
readdir: MEMFS.node_ops.readdir,
|
|
symlink: MEMFS.node_ops.symlink
|
|
},
|
|
stream: {
|
|
llseek: MEMFS.stream_ops.llseek
|
|
}
|
|
},
|
|
file: {
|
|
node: {
|
|
getattr: MEMFS.node_ops.getattr,
|
|
setattr: MEMFS.node_ops.setattr
|
|
},
|
|
stream: {
|
|
llseek: MEMFS.stream_ops.llseek,
|
|
read: MEMFS.stream_ops.read,
|
|
write: MEMFS.stream_ops.write,
|
|
allocate: MEMFS.stream_ops.allocate,
|
|
mmap: MEMFS.stream_ops.mmap
|
|
}
|
|
},
|
|
link: {
|
|
node: {
|
|
getattr: MEMFS.node_ops.getattr,
|
|
setattr: MEMFS.node_ops.setattr,
|
|
readlink: MEMFS.node_ops.readlink
|
|
},
|
|
stream: {}
|
|
},
|
|
chrdev: {
|
|
node: {
|
|
getattr: MEMFS.node_ops.getattr,
|
|
setattr: MEMFS.node_ops.setattr
|
|
},
|
|
stream: FS.chrdev_stream_ops
|
|
},
|
|
};
|
|
}
|
|
var node = FS.createNode(parent, name, mode, dev);
|
|
if (FS.isDir(node.mode)) {
|
|
node.node_ops = MEMFS.ops_table.dir.node;
|
|
node.stream_ops = MEMFS.ops_table.dir.stream;
|
|
node.contents = {};
|
|
} else if (FS.isFile(node.mode)) {
|
|
node.node_ops = MEMFS.ops_table.file.node;
|
|
node.stream_ops = MEMFS.ops_table.file.stream;
|
|
node.contents = [];
|
|
node.contentMode = MEMFS.CONTENT_FLEXIBLE;
|
|
} else if (FS.isLink(node.mode)) {
|
|
node.node_ops = MEMFS.ops_table.link.node;
|
|
node.stream_ops = MEMFS.ops_table.link.stream;
|
|
} else if (FS.isChrdev(node.mode)) {
|
|
node.node_ops = MEMFS.ops_table.chrdev.node;
|
|
node.stream_ops = MEMFS.ops_table.chrdev.stream;
|
|
}
|
|
node.timestamp = Date.now();
|
|
// add the new node to the parent
|
|
if (parent) {
|
|
parent.contents[name] = node;
|
|
}
|
|
return node;
|
|
},ensureFlexible:function (node) {
|
|
if (node.contentMode !== MEMFS.CONTENT_FLEXIBLE) {
|
|
var contents = node.contents;
|
|
node.contents = Array.prototype.slice.call(contents);
|
|
node.contentMode = MEMFS.CONTENT_FLEXIBLE;
|
|
}
|
|
},node_ops:{getattr:function (node) {
|
|
var attr = {};
|
|
// device numbers reuse inode numbers.
|
|
attr.dev = FS.isChrdev(node.mode) ? node.id : 1;
|
|
attr.ino = node.id;
|
|
attr.mode = node.mode;
|
|
attr.nlink = 1;
|
|
attr.uid = 0;
|
|
attr.gid = 0;
|
|
attr.rdev = node.rdev;
|
|
if (FS.isDir(node.mode)) {
|
|
attr.size = 4096;
|
|
} else if (FS.isFile(node.mode)) {
|
|
attr.size = node.contents.length;
|
|
} else if (FS.isLink(node.mode)) {
|
|
attr.size = node.link.length;
|
|
} else {
|
|
attr.size = 0;
|
|
}
|
|
attr.atime = new Date(node.timestamp);
|
|
attr.mtime = new Date(node.timestamp);
|
|
attr.ctime = new Date(node.timestamp);
|
|
// NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),
|
|
// but this is not required by the standard.
|
|
attr.blksize = 4096;
|
|
attr.blocks = Math.ceil(attr.size / attr.blksize);
|
|
return attr;
|
|
},setattr:function (node, attr) {
|
|
if (attr.mode !== undefined) {
|
|
node.mode = attr.mode;
|
|
}
|
|
if (attr.timestamp !== undefined) {
|
|
node.timestamp = attr.timestamp;
|
|
}
|
|
if (attr.size !== undefined) {
|
|
MEMFS.ensureFlexible(node);
|
|
var contents = node.contents;
|
|
if (attr.size < contents.length) contents.length = attr.size;
|
|
else while (attr.size > contents.length) contents.push(0);
|
|
}
|
|
},lookup:function (parent, name) {
|
|
throw FS.genericErrors[ERRNO_CODES.ENOENT];
|
|
},mknod:function (parent, name, mode, dev) {
|
|
return MEMFS.createNode(parent, name, mode, dev);
|
|
},rename:function (old_node, new_dir, new_name) {
|
|
// if we're overwriting a directory at new_name, make sure it's empty.
|
|
if (FS.isDir(old_node.mode)) {
|
|
var new_node;
|
|
try {
|
|
new_node = FS.lookupNode(new_dir, new_name);
|
|
} catch (e) {
|
|
}
|
|
if (new_node) {
|
|
for (var i in new_node.contents) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
|
|
}
|
|
}
|
|
}
|
|
// do the internal rewiring
|
|
delete old_node.parent.contents[old_node.name];
|
|
old_node.name = new_name;
|
|
new_dir.contents[new_name] = old_node;
|
|
old_node.parent = new_dir;
|
|
},unlink:function (parent, name) {
|
|
delete parent.contents[name];
|
|
},rmdir:function (parent, name) {
|
|
var node = FS.lookupNode(parent, name);
|
|
for (var i in node.contents) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
|
|
}
|
|
delete parent.contents[name];
|
|
},readdir:function (node) {
|
|
var entries = ['.', '..']
|
|
for (var key in node.contents) {
|
|
if (!node.contents.hasOwnProperty(key)) {
|
|
continue;
|
|
}
|
|
entries.push(key);
|
|
}
|
|
return entries;
|
|
},symlink:function (parent, newname, oldpath) {
|
|
var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0);
|
|
node.link = oldpath;
|
|
return node;
|
|
},readlink:function (node) {
|
|
if (!FS.isLink(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
return node.link;
|
|
}},stream_ops:{read:function (stream, buffer, offset, length, position) {
|
|
var contents = stream.node.contents;
|
|
if (position >= contents.length)
|
|
return 0;
|
|
var size = Math.min(contents.length - position, length);
|
|
assert(size >= 0);
|
|
if (size > 8 && contents.subarray) { // non-trivial, and typed array
|
|
buffer.set(contents.subarray(position, position + size), offset);
|
|
} else
|
|
{
|
|
for (var i = 0; i < size; i++) {
|
|
buffer[offset + i] = contents[position + i];
|
|
}
|
|
}
|
|
return size;
|
|
},write:function (stream, buffer, offset, length, position, canOwn) {
|
|
var node = stream.node;
|
|
node.timestamp = Date.now();
|
|
var contents = node.contents;
|
|
if (length && contents.length === 0 && position === 0 && buffer.subarray) {
|
|
// just replace it with the new data
|
|
if (canOwn && offset === 0) {
|
|
node.contents = buffer; // this could be a subarray of Emscripten HEAP, or allocated from some other source.
|
|
node.contentMode = (buffer.buffer === HEAP8.buffer) ? MEMFS.CONTENT_OWNING : MEMFS.CONTENT_FIXED;
|
|
} else {
|
|
node.contents = new Uint8Array(buffer.subarray(offset, offset+length));
|
|
node.contentMode = MEMFS.CONTENT_FIXED;
|
|
}
|
|
return length;
|
|
}
|
|
MEMFS.ensureFlexible(node);
|
|
var contents = node.contents;
|
|
while (contents.length < position) contents.push(0);
|
|
for (var i = 0; i < length; i++) {
|
|
contents[position + i] = buffer[offset + i];
|
|
}
|
|
return length;
|
|
},llseek:function (stream, offset, whence) {
|
|
var position = offset;
|
|
if (whence === 1) { // SEEK_CUR.
|
|
position += stream.position;
|
|
} else if (whence === 2) { // SEEK_END.
|
|
if (FS.isFile(stream.node.mode)) {
|
|
position += stream.node.contents.length;
|
|
}
|
|
}
|
|
if (position < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
stream.ungotten = [];
|
|
stream.position = position;
|
|
return position;
|
|
},allocate:function (stream, offset, length) {
|
|
MEMFS.ensureFlexible(stream.node);
|
|
var contents = stream.node.contents;
|
|
var limit = offset + length;
|
|
while (limit > contents.length) contents.push(0);
|
|
},mmap:function (stream, buffer, offset, length, position, prot, flags) {
|
|
if (!FS.isFile(stream.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
|
|
}
|
|
var ptr;
|
|
var allocated;
|
|
var contents = stream.node.contents;
|
|
// Only make a new copy when MAP_PRIVATE is specified.
|
|
if ( !(flags & 2) &&
|
|
(contents.buffer === buffer || contents.buffer === buffer.buffer) ) {
|
|
// We can't emulate MAP_SHARED when the file is not backed by the buffer
|
|
// we're mapping to (e.g. the HEAP buffer).
|
|
allocated = false;
|
|
ptr = contents.byteOffset;
|
|
} else {
|
|
// Try to avoid unnecessary slices.
|
|
if (position > 0 || position + length < contents.length) {
|
|
if (contents.subarray) {
|
|
contents = contents.subarray(position, position + length);
|
|
} else {
|
|
contents = Array.prototype.slice.call(contents, position, position + length);
|
|
}
|
|
}
|
|
allocated = true;
|
|
ptr = _malloc(length);
|
|
if (!ptr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);
|
|
}
|
|
buffer.set(contents, ptr);
|
|
}
|
|
return { ptr: ptr, allocated: allocated };
|
|
}}};
|
|
|
|
var IDBFS={dbs:{},indexedDB:function () {
|
|
return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
|
|
},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function (mount) {
|
|
// reuse all of the core MEMFS functionality
|
|
return MEMFS.mount.apply(null, arguments);
|
|
},syncfs:function (mount, populate, callback) {
|
|
IDBFS.getLocalSet(mount, function(err, local) {
|
|
if (err) return callback(err);
|
|
|
|
IDBFS.getRemoteSet(mount, function(err, remote) {
|
|
if (err) return callback(err);
|
|
|
|
var src = populate ? remote : local;
|
|
var dst = populate ? local : remote;
|
|
|
|
IDBFS.reconcile(src, dst, callback);
|
|
});
|
|
});
|
|
},getDB:function (name, callback) {
|
|
// check the cache first
|
|
var db = IDBFS.dbs[name];
|
|
if (db) {
|
|
return callback(null, db);
|
|
}
|
|
|
|
var req;
|
|
try {
|
|
req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION);
|
|
} catch (e) {
|
|
return callback(e);
|
|
}
|
|
req.onupgradeneeded = function(e) {
|
|
var db = e.target.result;
|
|
var transaction = e.target.transaction;
|
|
|
|
var fileStore;
|
|
|
|
if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) {
|
|
fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME);
|
|
} else {
|
|
fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME);
|
|
}
|
|
|
|
fileStore.createIndex('timestamp', 'timestamp', { unique: false });
|
|
};
|
|
req.onsuccess = function() {
|
|
db = req.result;
|
|
|
|
// add to the cache
|
|
IDBFS.dbs[name] = db;
|
|
callback(null, db);
|
|
};
|
|
req.onerror = function() {
|
|
callback(this.error);
|
|
};
|
|
},getLocalSet:function (mount, callback) {
|
|
var entries = {};
|
|
|
|
function isRealDir(p) {
|
|
return p !== '.' && p !== '..';
|
|
};
|
|
function toAbsolute(root) {
|
|
return function(p) {
|
|
return PATH.join2(root, p);
|
|
}
|
|
};
|
|
|
|
var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));
|
|
|
|
while (check.length) {
|
|
var path = check.pop();
|
|
var stat;
|
|
|
|
try {
|
|
stat = FS.stat(path);
|
|
} catch (e) {
|
|
return callback(e);
|
|
}
|
|
|
|
if (FS.isDir(stat.mode)) {
|
|
check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path)));
|
|
}
|
|
|
|
entries[path] = { timestamp: stat.mtime };
|
|
}
|
|
|
|
return callback(null, { type: 'local', entries: entries });
|
|
},getRemoteSet:function (mount, callback) {
|
|
var entries = {};
|
|
|
|
IDBFS.getDB(mount.mountpoint, function(err, db) {
|
|
if (err) return callback(err);
|
|
|
|
var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly');
|
|
transaction.onerror = function() { callback(this.error); };
|
|
|
|
var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
|
|
var index = store.index('timestamp');
|
|
|
|
index.openKeyCursor().onsuccess = function(event) {
|
|
var cursor = event.target.result;
|
|
|
|
if (!cursor) {
|
|
return callback(null, { type: 'remote', db: db, entries: entries });
|
|
}
|
|
|
|
entries[cursor.primaryKey] = { timestamp: cursor.key };
|
|
|
|
cursor.continue();
|
|
};
|
|
});
|
|
},loadLocalEntry:function (path, callback) {
|
|
var stat, node;
|
|
|
|
try {
|
|
var lookup = FS.lookupPath(path);
|
|
node = lookup.node;
|
|
stat = FS.stat(path);
|
|
} catch (e) {
|
|
return callback(e);
|
|
}
|
|
|
|
if (FS.isDir(stat.mode)) {
|
|
return callback(null, { timestamp: stat.mtime, mode: stat.mode });
|
|
} else if (FS.isFile(stat.mode)) {
|
|
return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents });
|
|
} else {
|
|
return callback(new Error('node type not supported'));
|
|
}
|
|
},storeLocalEntry:function (path, entry, callback) {
|
|
try {
|
|
if (FS.isDir(entry.mode)) {
|
|
FS.mkdir(path, entry.mode);
|
|
} else if (FS.isFile(entry.mode)) {
|
|
FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true });
|
|
} else {
|
|
return callback(new Error('node type not supported'));
|
|
}
|
|
|
|
FS.utime(path, entry.timestamp, entry.timestamp);
|
|
} catch (e) {
|
|
return callback(e);
|
|
}
|
|
|
|
callback(null);
|
|
},removeLocalEntry:function (path, callback) {
|
|
try {
|
|
var lookup = FS.lookupPath(path);
|
|
var stat = FS.stat(path);
|
|
|
|
if (FS.isDir(stat.mode)) {
|
|
FS.rmdir(path);
|
|
} else if (FS.isFile(stat.mode)) {
|
|
FS.unlink(path);
|
|
}
|
|
} catch (e) {
|
|
return callback(e);
|
|
}
|
|
|
|
callback(null);
|
|
},loadRemoteEntry:function (store, path, callback) {
|
|
var req = store.get(path);
|
|
req.onsuccess = function(event) { callback(null, event.target.result); };
|
|
req.onerror = function() { callback(this.error); };
|
|
},storeRemoteEntry:function (store, path, entry, callback) {
|
|
var req = store.put(entry, path);
|
|
req.onsuccess = function() { callback(null); };
|
|
req.onerror = function() { callback(this.error); };
|
|
},removeRemoteEntry:function (store, path, callback) {
|
|
var req = store.delete(path);
|
|
req.onsuccess = function() { callback(null); };
|
|
req.onerror = function() { callback(this.error); };
|
|
},reconcile:function (src, dst, callback) {
|
|
var total = 0;
|
|
|
|
var create = [];
|
|
Object.keys(src.entries).forEach(function (key) {
|
|
var e = src.entries[key];
|
|
var e2 = dst.entries[key];
|
|
if (!e2 || e.timestamp > e2.timestamp) {
|
|
create.push(key);
|
|
total++;
|
|
}
|
|
});
|
|
|
|
var remove = [];
|
|
Object.keys(dst.entries).forEach(function (key) {
|
|
var e = dst.entries[key];
|
|
var e2 = src.entries[key];
|
|
if (!e2) {
|
|
remove.push(key);
|
|
total++;
|
|
}
|
|
});
|
|
|
|
if (!total) {
|
|
return callback(null);
|
|
}
|
|
|
|
var errored = false;
|
|
var completed = 0;
|
|
var db = src.type === 'remote' ? src.db : dst.db;
|
|
var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite');
|
|
var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
|
|
|
|
function done(err) {
|
|
if (err) {
|
|
if (!done.errored) {
|
|
done.errored = true;
|
|
return callback(err);
|
|
}
|
|
return;
|
|
}
|
|
if (++completed >= total) {
|
|
return callback(null);
|
|
}
|
|
};
|
|
|
|
transaction.onerror = function() { done(this.error); };
|
|
|
|
// sort paths in ascending order so directory entries are created
|
|
// before the files inside them
|
|
create.sort().forEach(function (path) {
|
|
if (dst.type === 'local') {
|
|
IDBFS.loadRemoteEntry(store, path, function (err, entry) {
|
|
if (err) return done(err);
|
|
IDBFS.storeLocalEntry(path, entry, done);
|
|
});
|
|
} else {
|
|
IDBFS.loadLocalEntry(path, function (err, entry) {
|
|
if (err) return done(err);
|
|
IDBFS.storeRemoteEntry(store, path, entry, done);
|
|
});
|
|
}
|
|
});
|
|
|
|
// sort paths in descending order so files are deleted before their
|
|
// parent directories
|
|
remove.sort().reverse().forEach(function(path) {
|
|
if (dst.type === 'local') {
|
|
IDBFS.removeLocalEntry(path, done);
|
|
} else {
|
|
IDBFS.removeRemoteEntry(store, path, done);
|
|
}
|
|
});
|
|
}};
|
|
|
|
var NODEFS={isWindows:false,staticInit:function () {
|
|
NODEFS.isWindows = !!process.platform.match(/^win/);
|
|
},mount:function (mount) {
|
|
assert(ENVIRONMENT_IS_NODE);
|
|
return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0);
|
|
},createNode:function (parent, name, mode, dev) {
|
|
if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var node = FS.createNode(parent, name, mode);
|
|
node.node_ops = NODEFS.node_ops;
|
|
node.stream_ops = NODEFS.stream_ops;
|
|
return node;
|
|
},getMode:function (path) {
|
|
var stat;
|
|
try {
|
|
stat = fs.lstatSync(path);
|
|
if (NODEFS.isWindows) {
|
|
// On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so
|
|
// propagate write bits to execute bits.
|
|
stat.mode = stat.mode | ((stat.mode & 146) >> 1);
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
return stat.mode;
|
|
},realPath:function (node) {
|
|
var parts = [];
|
|
while (node.parent !== node) {
|
|
parts.push(node.name);
|
|
node = node.parent;
|
|
}
|
|
parts.push(node.mount.opts.root);
|
|
parts.reverse();
|
|
return PATH.join.apply(null, parts);
|
|
},flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) {
|
|
if (flags in NODEFS.flagsToPermissionStringMap) {
|
|
return NODEFS.flagsToPermissionStringMap[flags];
|
|
} else {
|
|
return flags;
|
|
}
|
|
},node_ops:{getattr:function (node) {
|
|
var path = NODEFS.realPath(node);
|
|
var stat;
|
|
try {
|
|
stat = fs.lstatSync(path);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
// node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096.
|
|
// See http://support.microsoft.com/kb/140365
|
|
if (NODEFS.isWindows && !stat.blksize) {
|
|
stat.blksize = 4096;
|
|
}
|
|
if (NODEFS.isWindows && !stat.blocks) {
|
|
stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0;
|
|
}
|
|
return {
|
|
dev: stat.dev,
|
|
ino: stat.ino,
|
|
mode: stat.mode,
|
|
nlink: stat.nlink,
|
|
uid: stat.uid,
|
|
gid: stat.gid,
|
|
rdev: stat.rdev,
|
|
size: stat.size,
|
|
atime: stat.atime,
|
|
mtime: stat.mtime,
|
|
ctime: stat.ctime,
|
|
blksize: stat.blksize,
|
|
blocks: stat.blocks
|
|
};
|
|
},setattr:function (node, attr) {
|
|
var path = NODEFS.realPath(node);
|
|
try {
|
|
if (attr.mode !== undefined) {
|
|
fs.chmodSync(path, attr.mode);
|
|
// update the common node structure mode as well
|
|
node.mode = attr.mode;
|
|
}
|
|
if (attr.timestamp !== undefined) {
|
|
var date = new Date(attr.timestamp);
|
|
fs.utimesSync(path, date, date);
|
|
}
|
|
if (attr.size !== undefined) {
|
|
fs.truncateSync(path, attr.size);
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},lookup:function (parent, name) {
|
|
var path = PATH.join2(NODEFS.realPath(parent), name);
|
|
var mode = NODEFS.getMode(path);
|
|
return NODEFS.createNode(parent, name, mode);
|
|
},mknod:function (parent, name, mode, dev) {
|
|
var node = NODEFS.createNode(parent, name, mode, dev);
|
|
// create the backing node for this in the fs root as well
|
|
var path = NODEFS.realPath(node);
|
|
try {
|
|
if (FS.isDir(node.mode)) {
|
|
fs.mkdirSync(path, node.mode);
|
|
} else {
|
|
fs.writeFileSync(path, '', { mode: node.mode });
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
return node;
|
|
},rename:function (oldNode, newDir, newName) {
|
|
var oldPath = NODEFS.realPath(oldNode);
|
|
var newPath = PATH.join2(NODEFS.realPath(newDir), newName);
|
|
try {
|
|
fs.renameSync(oldPath, newPath);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},unlink:function (parent, name) {
|
|
var path = PATH.join2(NODEFS.realPath(parent), name);
|
|
try {
|
|
fs.unlinkSync(path);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},rmdir:function (parent, name) {
|
|
var path = PATH.join2(NODEFS.realPath(parent), name);
|
|
try {
|
|
fs.rmdirSync(path);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},readdir:function (node) {
|
|
var path = NODEFS.realPath(node);
|
|
try {
|
|
return fs.readdirSync(path);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},symlink:function (parent, newName, oldPath) {
|
|
var newPath = PATH.join2(NODEFS.realPath(parent), newName);
|
|
try {
|
|
fs.symlinkSync(oldPath, newPath);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},readlink:function (node) {
|
|
var path = NODEFS.realPath(node);
|
|
try {
|
|
return fs.readlinkSync(path);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
}},stream_ops:{open:function (stream) {
|
|
var path = NODEFS.realPath(stream.node);
|
|
try {
|
|
if (FS.isFile(stream.node.mode)) {
|
|
stream.nfd = fs.openSync(path, NODEFS.flagsToPermissionString(stream.flags));
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},close:function (stream) {
|
|
try {
|
|
if (FS.isFile(stream.node.mode) && stream.nfd) {
|
|
fs.closeSync(stream.nfd);
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},read:function (stream, buffer, offset, length, position) {
|
|
// FIXME this is terrible.
|
|
var nbuffer = new Buffer(length);
|
|
var res;
|
|
try {
|
|
res = fs.readSync(stream.nfd, nbuffer, 0, length, position);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
if (res > 0) {
|
|
for (var i = 0; i < res; i++) {
|
|
buffer[offset + i] = nbuffer[i];
|
|
}
|
|
}
|
|
return res;
|
|
},write:function (stream, buffer, offset, length, position) {
|
|
// FIXME this is terrible.
|
|
var nbuffer = new Buffer(buffer.subarray(offset, offset + length));
|
|
var res;
|
|
try {
|
|
res = fs.writeSync(stream.nfd, nbuffer, 0, length, position);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
return res;
|
|
},llseek:function (stream, offset, whence) {
|
|
var position = offset;
|
|
if (whence === 1) { // SEEK_CUR.
|
|
position += stream.position;
|
|
} else if (whence === 2) { // SEEK_END.
|
|
if (FS.isFile(stream.node.mode)) {
|
|
try {
|
|
var stat = fs.fstatSync(stream.nfd);
|
|
position += stat.size;
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (position < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
|
|
stream.position = position;
|
|
return position;
|
|
}}};
|
|
|
|
var _stdin=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
var _stdout=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
var _stderr=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
function _fflush(stream) {
|
|
// int fflush(FILE *stream);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html
|
|
// we don't currently perform any user-space buffering of data
|
|
}var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},handleFSError:function (e) {
|
|
if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace();
|
|
return ___setErrNo(e.errno);
|
|
},lookupPath:function (path, opts) {
|
|
path = PATH.resolve(FS.cwd(), path);
|
|
opts = opts || {};
|
|
|
|
var defaults = {
|
|
follow_mount: true,
|
|
recurse_count: 0
|
|
};
|
|
for (var key in defaults) {
|
|
if (opts[key] === undefined) {
|
|
opts[key] = defaults[key];
|
|
}
|
|
}
|
|
|
|
if (opts.recurse_count > 8) { // max recursive lookup of 8
|
|
throw new FS.ErrnoError(ERRNO_CODES.ELOOP);
|
|
}
|
|
|
|
// split the path
|
|
var parts = PATH.normalizeArray(path.split('/').filter(function(p) {
|
|
return !!p;
|
|
}), false);
|
|
|
|
// start at the root
|
|
var current = FS.root;
|
|
var current_path = '/';
|
|
|
|
for (var i = 0; i < parts.length; i++) {
|
|
var islast = (i === parts.length-1);
|
|
if (islast && opts.parent) {
|
|
// stop resolving
|
|
break;
|
|
}
|
|
|
|
current = FS.lookupNode(current, parts[i]);
|
|
current_path = PATH.join2(current_path, parts[i]);
|
|
|
|
// jump to the mount's root node if this is a mountpoint
|
|
if (FS.isMountpoint(current)) {
|
|
if (!islast || (islast && opts.follow_mount)) {
|
|
current = current.mounted.root;
|
|
}
|
|
}
|
|
|
|
// by default, lookupPath will not follow a symlink if it is the final path component.
|
|
// setting opts.follow = true will override this behavior.
|
|
if (!islast || opts.follow) {
|
|
var count = 0;
|
|
while (FS.isLink(current.mode)) {
|
|
var link = FS.readlink(current_path);
|
|
current_path = PATH.resolve(PATH.dirname(current_path), link);
|
|
|
|
var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count });
|
|
current = lookup.node;
|
|
|
|
if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX).
|
|
throw new FS.ErrnoError(ERRNO_CODES.ELOOP);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return { path: current_path, node: current };
|
|
},getPath:function (node) {
|
|
var path;
|
|
while (true) {
|
|
if (FS.isRoot(node)) {
|
|
var mount = node.mount.mountpoint;
|
|
if (!path) return mount;
|
|
return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path;
|
|
}
|
|
path = path ? node.name + '/' + path : node.name;
|
|
node = node.parent;
|
|
}
|
|
},hashName:function (parentid, name) {
|
|
var hash = 0;
|
|
|
|
|
|
for (var i = 0; i < name.length; i++) {
|
|
hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;
|
|
}
|
|
return ((parentid + hash) >>> 0) % FS.nameTable.length;
|
|
},hashAddNode:function (node) {
|
|
var hash = FS.hashName(node.parent.id, node.name);
|
|
node.name_next = FS.nameTable[hash];
|
|
FS.nameTable[hash] = node;
|
|
},hashRemoveNode:function (node) {
|
|
var hash = FS.hashName(node.parent.id, node.name);
|
|
if (FS.nameTable[hash] === node) {
|
|
FS.nameTable[hash] = node.name_next;
|
|
} else {
|
|
var current = FS.nameTable[hash];
|
|
while (current) {
|
|
if (current.name_next === node) {
|
|
current.name_next = node.name_next;
|
|
break;
|
|
}
|
|
current = current.name_next;
|
|
}
|
|
}
|
|
},lookupNode:function (parent, name) {
|
|
var err = FS.mayLookup(parent);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
var hash = FS.hashName(parent.id, name);
|
|
for (var node = FS.nameTable[hash]; node; node = node.name_next) {
|
|
var nodeName = node.name;
|
|
if (node.parent.id === parent.id && nodeName === name) {
|
|
return node;
|
|
}
|
|
}
|
|
// if we failed to find it in the cache, call into the VFS
|
|
return FS.lookup(parent, name);
|
|
},createNode:function (parent, name, mode, rdev) {
|
|
if (!FS.FSNode) {
|
|
FS.FSNode = function(parent, name, mode, rdev) {
|
|
if (!parent) {
|
|
parent = this; // root node sets parent to itself
|
|
}
|
|
this.parent = parent;
|
|
this.mount = parent.mount;
|
|
this.mounted = null;
|
|
this.id = FS.nextInode++;
|
|
this.name = name;
|
|
this.mode = mode;
|
|
this.node_ops = {};
|
|
this.stream_ops = {};
|
|
this.rdev = rdev;
|
|
};
|
|
|
|
FS.FSNode.prototype = {};
|
|
|
|
// compatibility
|
|
var readMode = 292 | 73;
|
|
var writeMode = 146;
|
|
|
|
// NOTE we must use Object.defineProperties instead of individual calls to
|
|
// Object.defineProperty in order to make closure compiler happy
|
|
Object.defineProperties(FS.FSNode.prototype, {
|
|
read: {
|
|
get: function() { return (this.mode & readMode) === readMode; },
|
|
set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; }
|
|
},
|
|
write: {
|
|
get: function() { return (this.mode & writeMode) === writeMode; },
|
|
set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; }
|
|
},
|
|
isFolder: {
|
|
get: function() { return FS.isDir(this.mode); },
|
|
},
|
|
isDevice: {
|
|
get: function() { return FS.isChrdev(this.mode); },
|
|
},
|
|
});
|
|
}
|
|
|
|
var node = new FS.FSNode(parent, name, mode, rdev);
|
|
|
|
FS.hashAddNode(node);
|
|
|
|
return node;
|
|
},destroyNode:function (node) {
|
|
FS.hashRemoveNode(node);
|
|
},isRoot:function (node) {
|
|
return node === node.parent;
|
|
},isMountpoint:function (node) {
|
|
return !!node.mounted;
|
|
},isFile:function (mode) {
|
|
return (mode & 61440) === 32768;
|
|
},isDir:function (mode) {
|
|
return (mode & 61440) === 16384;
|
|
},isLink:function (mode) {
|
|
return (mode & 61440) === 40960;
|
|
},isChrdev:function (mode) {
|
|
return (mode & 61440) === 8192;
|
|
},isBlkdev:function (mode) {
|
|
return (mode & 61440) === 24576;
|
|
},isFIFO:function (mode) {
|
|
return (mode & 61440) === 4096;
|
|
},isSocket:function (mode) {
|
|
return (mode & 49152) === 49152;
|
|
},flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function (str) {
|
|
var flags = FS.flagModes[str];
|
|
if (typeof flags === 'undefined') {
|
|
throw new Error('Unknown file open mode: ' + str);
|
|
}
|
|
return flags;
|
|
},flagsToPermissionString:function (flag) {
|
|
var accmode = flag & 2097155;
|
|
var perms = ['r', 'w', 'rw'][accmode];
|
|
if ((flag & 512)) {
|
|
perms += 'w';
|
|
}
|
|
return perms;
|
|
},nodePermissions:function (node, perms) {
|
|
if (FS.ignorePermissions) {
|
|
return 0;
|
|
}
|
|
// return 0 if any user, group or owner bits are set.
|
|
if (perms.indexOf('r') !== -1 && !(node.mode & 292)) {
|
|
return ERRNO_CODES.EACCES;
|
|
} else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) {
|
|
return ERRNO_CODES.EACCES;
|
|
} else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) {
|
|
return ERRNO_CODES.EACCES;
|
|
}
|
|
return 0;
|
|
},mayLookup:function (dir) {
|
|
return FS.nodePermissions(dir, 'x');
|
|
},mayCreate:function (dir, name) {
|
|
try {
|
|
var node = FS.lookupNode(dir, name);
|
|
return ERRNO_CODES.EEXIST;
|
|
} catch (e) {
|
|
}
|
|
return FS.nodePermissions(dir, 'wx');
|
|
},mayDelete:function (dir, name, isdir) {
|
|
var node;
|
|
try {
|
|
node = FS.lookupNode(dir, name);
|
|
} catch (e) {
|
|
return e.errno;
|
|
}
|
|
var err = FS.nodePermissions(dir, 'wx');
|
|
if (err) {
|
|
return err;
|
|
}
|
|
if (isdir) {
|
|
if (!FS.isDir(node.mode)) {
|
|
return ERRNO_CODES.ENOTDIR;
|
|
}
|
|
if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {
|
|
return ERRNO_CODES.EBUSY;
|
|
}
|
|
} else {
|
|
if (FS.isDir(node.mode)) {
|
|
return ERRNO_CODES.EISDIR;
|
|
}
|
|
}
|
|
return 0;
|
|
},mayOpen:function (node, flags) {
|
|
if (!node) {
|
|
return ERRNO_CODES.ENOENT;
|
|
}
|
|
if (FS.isLink(node.mode)) {
|
|
return ERRNO_CODES.ELOOP;
|
|
} else if (FS.isDir(node.mode)) {
|
|
if ((flags & 2097155) !== 0 || // opening for write
|
|
(flags & 512)) {
|
|
return ERRNO_CODES.EISDIR;
|
|
}
|
|
}
|
|
return FS.nodePermissions(node, FS.flagsToPermissionString(flags));
|
|
},MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) {
|
|
fd_start = fd_start || 0;
|
|
fd_end = fd_end || FS.MAX_OPEN_FDS;
|
|
for (var fd = fd_start; fd <= fd_end; fd++) {
|
|
if (!FS.streams[fd]) {
|
|
return fd;
|
|
}
|
|
}
|
|
throw new FS.ErrnoError(ERRNO_CODES.EMFILE);
|
|
},getStream:function (fd) {
|
|
return FS.streams[fd];
|
|
},createStream:function (stream, fd_start, fd_end) {
|
|
if (!FS.FSStream) {
|
|
FS.FSStream = function(){};
|
|
FS.FSStream.prototype = {};
|
|
// compatibility
|
|
Object.defineProperties(FS.FSStream.prototype, {
|
|
object: {
|
|
get: function() { return this.node; },
|
|
set: function(val) { this.node = val; }
|
|
},
|
|
isRead: {
|
|
get: function() { return (this.flags & 2097155) !== 1; }
|
|
},
|
|
isWrite: {
|
|
get: function() { return (this.flags & 2097155) !== 0; }
|
|
},
|
|
isAppend: {
|
|
get: function() { return (this.flags & 1024); }
|
|
}
|
|
});
|
|
}
|
|
if (stream.__proto__) {
|
|
// reuse the object
|
|
stream.__proto__ = FS.FSStream.prototype;
|
|
} else {
|
|
var newStream = new FS.FSStream();
|
|
for (var p in stream) {
|
|
newStream[p] = stream[p];
|
|
}
|
|
stream = newStream;
|
|
}
|
|
var fd = FS.nextfd(fd_start, fd_end);
|
|
stream.fd = fd;
|
|
FS.streams[fd] = stream;
|
|
return stream;
|
|
},closeStream:function (fd) {
|
|
FS.streams[fd] = null;
|
|
},getStreamFromPtr:function (ptr) {
|
|
return FS.streams[ptr - 1];
|
|
},getPtrForStream:function (stream) {
|
|
return stream ? stream.fd + 1 : 0;
|
|
},chrdev_stream_ops:{open:function (stream) {
|
|
var device = FS.getDevice(stream.node.rdev);
|
|
// override node's stream ops with the device's
|
|
stream.stream_ops = device.stream_ops;
|
|
// forward the open call
|
|
if (stream.stream_ops.open) {
|
|
stream.stream_ops.open(stream);
|
|
}
|
|
},llseek:function () {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}},major:function (dev) {
|
|
return ((dev) >> 8);
|
|
},minor:function (dev) {
|
|
return ((dev) & 0xff);
|
|
},makedev:function (ma, mi) {
|
|
return ((ma) << 8 | (mi));
|
|
},registerDevice:function (dev, ops) {
|
|
FS.devices[dev] = { stream_ops: ops };
|
|
},getDevice:function (dev) {
|
|
return FS.devices[dev];
|
|
},getMounts:function (mount) {
|
|
var mounts = [];
|
|
var check = [mount];
|
|
|
|
while (check.length) {
|
|
var m = check.pop();
|
|
|
|
mounts.push(m);
|
|
|
|
check.push.apply(check, m.mounts);
|
|
}
|
|
|
|
return mounts;
|
|
},syncfs:function (populate, callback) {
|
|
if (typeof(populate) === 'function') {
|
|
callback = populate;
|
|
populate = false;
|
|
}
|
|
|
|
var mounts = FS.getMounts(FS.root.mount);
|
|
var completed = 0;
|
|
|
|
function done(err) {
|
|
if (err) {
|
|
if (!done.errored) {
|
|
done.errored = true;
|
|
return callback(err);
|
|
}
|
|
return;
|
|
}
|
|
if (++completed >= mounts.length) {
|
|
callback(null);
|
|
}
|
|
};
|
|
|
|
// sync all mounts
|
|
mounts.forEach(function (mount) {
|
|
if (!mount.type.syncfs) {
|
|
return done(null);
|
|
}
|
|
mount.type.syncfs(mount, populate, done);
|
|
});
|
|
},mount:function (type, opts, mountpoint) {
|
|
var root = mountpoint === '/';
|
|
var pseudo = !mountpoint;
|
|
var node;
|
|
|
|
if (root && FS.root) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
} else if (!root && !pseudo) {
|
|
var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
|
|
|
|
mountpoint = lookup.path; // use the absolute path
|
|
node = lookup.node;
|
|
|
|
if (FS.isMountpoint(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
|
|
if (!FS.isDir(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
}
|
|
|
|
var mount = {
|
|
type: type,
|
|
opts: opts,
|
|
mountpoint: mountpoint,
|
|
mounts: []
|
|
};
|
|
|
|
// create a root node for the fs
|
|
var mountRoot = type.mount(mount);
|
|
mountRoot.mount = mount;
|
|
mount.root = mountRoot;
|
|
|
|
if (root) {
|
|
FS.root = mountRoot;
|
|
} else if (node) {
|
|
// set as a mountpoint
|
|
node.mounted = mount;
|
|
|
|
// add the new mount to the current mount's children
|
|
if (node.mount) {
|
|
node.mount.mounts.push(mount);
|
|
}
|
|
}
|
|
|
|
return mountRoot;
|
|
},unmount:function (mountpoint) {
|
|
var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
|
|
|
|
if (!FS.isMountpoint(lookup.node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
|
|
// destroy the nodes for this mount, and all its child mounts
|
|
var node = lookup.node;
|
|
var mount = node.mounted;
|
|
var mounts = FS.getMounts(mount);
|
|
|
|
Object.keys(FS.nameTable).forEach(function (hash) {
|
|
var current = FS.nameTable[hash];
|
|
|
|
while (current) {
|
|
var next = current.name_next;
|
|
|
|
if (mounts.indexOf(current.mount) !== -1) {
|
|
FS.destroyNode(current);
|
|
}
|
|
|
|
current = next;
|
|
}
|
|
});
|
|
|
|
// no longer a mountpoint
|
|
node.mounted = null;
|
|
|
|
// remove this mount from the child mounts
|
|
var idx = node.mount.mounts.indexOf(mount);
|
|
assert(idx !== -1);
|
|
node.mount.mounts.splice(idx, 1);
|
|
},lookup:function (parent, name) {
|
|
return parent.node_ops.lookup(parent, name);
|
|
},mknod:function (path, mode, dev) {
|
|
var lookup = FS.lookupPath(path, { parent: true });
|
|
var parent = lookup.node;
|
|
var name = PATH.basename(path);
|
|
var err = FS.mayCreate(parent, name);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!parent.node_ops.mknod) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
return parent.node_ops.mknod(parent, name, mode, dev);
|
|
},create:function (path, mode) {
|
|
mode = mode !== undefined ? mode : 438 /* 0666 */;
|
|
mode &= 4095;
|
|
mode |= 32768;
|
|
return FS.mknod(path, mode, 0);
|
|
},mkdir:function (path, mode) {
|
|
mode = mode !== undefined ? mode : 511 /* 0777 */;
|
|
mode &= 511 | 512;
|
|
mode |= 16384;
|
|
return FS.mknod(path, mode, 0);
|
|
},mkdev:function (path, mode, dev) {
|
|
if (typeof(dev) === 'undefined') {
|
|
dev = mode;
|
|
mode = 438 /* 0666 */;
|
|
}
|
|
mode |= 8192;
|
|
return FS.mknod(path, mode, dev);
|
|
},symlink:function (oldpath, newpath) {
|
|
var lookup = FS.lookupPath(newpath, { parent: true });
|
|
var parent = lookup.node;
|
|
var newname = PATH.basename(newpath);
|
|
var err = FS.mayCreate(parent, newname);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!parent.node_ops.symlink) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
return parent.node_ops.symlink(parent, newname, oldpath);
|
|
},rename:function (old_path, new_path) {
|
|
var old_dirname = PATH.dirname(old_path);
|
|
var new_dirname = PATH.dirname(new_path);
|
|
var old_name = PATH.basename(old_path);
|
|
var new_name = PATH.basename(new_path);
|
|
// parents must exist
|
|
var lookup, old_dir, new_dir;
|
|
try {
|
|
lookup = FS.lookupPath(old_path, { parent: true });
|
|
old_dir = lookup.node;
|
|
lookup = FS.lookupPath(new_path, { parent: true });
|
|
new_dir = lookup.node;
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
// need to be part of the same mount
|
|
if (old_dir.mount !== new_dir.mount) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EXDEV);
|
|
}
|
|
// source must exist
|
|
var old_node = FS.lookupNode(old_dir, old_name);
|
|
// old path should not be an ancestor of the new path
|
|
var relative = PATH.relative(old_path, new_dirname);
|
|
if (relative.charAt(0) !== '.') {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
// new path should not be an ancestor of the old path
|
|
relative = PATH.relative(new_path, old_dirname);
|
|
if (relative.charAt(0) !== '.') {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
|
|
}
|
|
// see if the new path already exists
|
|
var new_node;
|
|
try {
|
|
new_node = FS.lookupNode(new_dir, new_name);
|
|
} catch (e) {
|
|
// not fatal
|
|
}
|
|
// early out if nothing needs to change
|
|
if (old_node === new_node) {
|
|
return;
|
|
}
|
|
// we'll need to delete the old entry
|
|
var isdir = FS.isDir(old_node.mode);
|
|
var err = FS.mayDelete(old_dir, old_name, isdir);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
// need delete permissions if we'll be overwriting.
|
|
// need create permissions if new doesn't already exist.
|
|
err = new_node ?
|
|
FS.mayDelete(new_dir, new_name, isdir) :
|
|
FS.mayCreate(new_dir, new_name);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!old_dir.node_ops.rename) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
// if we are going to change the parent, check write permissions
|
|
if (new_dir !== old_dir) {
|
|
err = FS.nodePermissions(old_dir, 'w');
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
}
|
|
// remove the node from the lookup hash
|
|
FS.hashRemoveNode(old_node);
|
|
// do the underlying fs rename
|
|
try {
|
|
old_dir.node_ops.rename(old_node, new_dir, new_name);
|
|
} catch (e) {
|
|
throw e;
|
|
} finally {
|
|
// add the node back to the hash (in case node_ops.rename
|
|
// changed its name)
|
|
FS.hashAddNode(old_node);
|
|
}
|
|
},rmdir:function (path) {
|
|
var lookup = FS.lookupPath(path, { parent: true });
|
|
var parent = lookup.node;
|
|
var name = PATH.basename(path);
|
|
var node = FS.lookupNode(parent, name);
|
|
var err = FS.mayDelete(parent, name, true);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!parent.node_ops.rmdir) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isMountpoint(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
parent.node_ops.rmdir(parent, name);
|
|
FS.destroyNode(node);
|
|
},readdir:function (path) {
|
|
var lookup = FS.lookupPath(path, { follow: true });
|
|
var node = lookup.node;
|
|
if (!node.node_ops.readdir) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
return node.node_ops.readdir(node);
|
|
},unlink:function (path) {
|
|
var lookup = FS.lookupPath(path, { parent: true });
|
|
var parent = lookup.node;
|
|
var name = PATH.basename(path);
|
|
var node = FS.lookupNode(parent, name);
|
|
var err = FS.mayDelete(parent, name, false);
|
|
if (err) {
|
|
// POSIX says unlink should set EPERM, not EISDIR
|
|
if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM;
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!parent.node_ops.unlink) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isMountpoint(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
parent.node_ops.unlink(parent, name);
|
|
FS.destroyNode(node);
|
|
},readlink:function (path) {
|
|
var lookup = FS.lookupPath(path);
|
|
var link = lookup.node;
|
|
if (!link.node_ops.readlink) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
return link.node_ops.readlink(link);
|
|
},stat:function (path, dontFollow) {
|
|
var lookup = FS.lookupPath(path, { follow: !dontFollow });
|
|
var node = lookup.node;
|
|
if (!node.node_ops.getattr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
return node.node_ops.getattr(node);
|
|
},lstat:function (path) {
|
|
return FS.stat(path, true);
|
|
},chmod:function (path, mode, dontFollow) {
|
|
var node;
|
|
if (typeof path === 'string') {
|
|
var lookup = FS.lookupPath(path, { follow: !dontFollow });
|
|
node = lookup.node;
|
|
} else {
|
|
node = path;
|
|
}
|
|
if (!node.node_ops.setattr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
node.node_ops.setattr(node, {
|
|
mode: (mode & 4095) | (node.mode & ~4095),
|
|
timestamp: Date.now()
|
|
});
|
|
},lchmod:function (path, mode) {
|
|
FS.chmod(path, mode, true);
|
|
},fchmod:function (fd, mode) {
|
|
var stream = FS.getStream(fd);
|
|
if (!stream) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
FS.chmod(stream.node, mode);
|
|
},chown:function (path, uid, gid, dontFollow) {
|
|
var node;
|
|
if (typeof path === 'string') {
|
|
var lookup = FS.lookupPath(path, { follow: !dontFollow });
|
|
node = lookup.node;
|
|
} else {
|
|
node = path;
|
|
}
|
|
if (!node.node_ops.setattr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
node.node_ops.setattr(node, {
|
|
timestamp: Date.now()
|
|
// we ignore the uid / gid for now
|
|
});
|
|
},lchown:function (path, uid, gid) {
|
|
FS.chown(path, uid, gid, true);
|
|
},fchown:function (fd, uid, gid) {
|
|
var stream = FS.getStream(fd);
|
|
if (!stream) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
FS.chown(stream.node, uid, gid);
|
|
},truncate:function (path, len) {
|
|
if (len < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var node;
|
|
if (typeof path === 'string') {
|
|
var lookup = FS.lookupPath(path, { follow: true });
|
|
node = lookup.node;
|
|
} else {
|
|
node = path;
|
|
}
|
|
if (!node.node_ops.setattr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isDir(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
|
|
}
|
|
if (!FS.isFile(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var err = FS.nodePermissions(node, 'w');
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
node.node_ops.setattr(node, {
|
|
size: len,
|
|
timestamp: Date.now()
|
|
});
|
|
},ftruncate:function (fd, len) {
|
|
var stream = FS.getStream(fd);
|
|
if (!stream) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if ((stream.flags & 2097155) === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
FS.truncate(stream.node, len);
|
|
},utime:function (path, atime, mtime) {
|
|
var lookup = FS.lookupPath(path, { follow: true });
|
|
var node = lookup.node;
|
|
node.node_ops.setattr(node, {
|
|
timestamp: Math.max(atime, mtime)
|
|
});
|
|
},open:function (path, flags, mode, fd_start, fd_end) {
|
|
flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags;
|
|
mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode;
|
|
if ((flags & 64)) {
|
|
mode = (mode & 4095) | 32768;
|
|
} else {
|
|
mode = 0;
|
|
}
|
|
var node;
|
|
if (typeof path === 'object') {
|
|
node = path;
|
|
} else {
|
|
path = PATH.normalize(path);
|
|
try {
|
|
var lookup = FS.lookupPath(path, {
|
|
follow: !(flags & 131072)
|
|
});
|
|
node = lookup.node;
|
|
} catch (e) {
|
|
// ignore
|
|
}
|
|
}
|
|
// perhaps we need to create the node
|
|
if ((flags & 64)) {
|
|
if (node) {
|
|
// if O_CREAT and O_EXCL are set, error out if the node already exists
|
|
if ((flags & 128)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EEXIST);
|
|
}
|
|
} else {
|
|
// node doesn't exist, try to create it
|
|
node = FS.mknod(path, mode, 0);
|
|
}
|
|
}
|
|
if (!node) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
|
|
}
|
|
// can't truncate a device
|
|
if (FS.isChrdev(node.mode)) {
|
|
flags &= ~512;
|
|
}
|
|
// check permissions
|
|
var err = FS.mayOpen(node, flags);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
// do truncation if necessary
|
|
if ((flags & 512)) {
|
|
FS.truncate(node, 0);
|
|
}
|
|
// we've already handled these, don't pass down to the underlying vfs
|
|
flags &= ~(128 | 512);
|
|
|
|
// register the stream with the filesystem
|
|
var stream = FS.createStream({
|
|
node: node,
|
|
path: FS.getPath(node), // we want the absolute path to the node
|
|
flags: flags,
|
|
seekable: true,
|
|
position: 0,
|
|
stream_ops: node.stream_ops,
|
|
// used by the file family libc calls (fopen, fwrite, ferror, etc.)
|
|
ungotten: [],
|
|
error: false
|
|
}, fd_start, fd_end);
|
|
// call the new stream's open function
|
|
if (stream.stream_ops.open) {
|
|
stream.stream_ops.open(stream);
|
|
}
|
|
if (Module['logReadFiles'] && !(flags & 1)) {
|
|
if (!FS.readFiles) FS.readFiles = {};
|
|
if (!(path in FS.readFiles)) {
|
|
FS.readFiles[path] = 1;
|
|
Module['printErr']('read file: ' + path);
|
|
}
|
|
}
|
|
return stream;
|
|
},close:function (stream) {
|
|
try {
|
|
if (stream.stream_ops.close) {
|
|
stream.stream_ops.close(stream);
|
|
}
|
|
} catch (e) {
|
|
throw e;
|
|
} finally {
|
|
FS.closeStream(stream.fd);
|
|
}
|
|
},llseek:function (stream, offset, whence) {
|
|
if (!stream.seekable || !stream.stream_ops.llseek) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}
|
|
return stream.stream_ops.llseek(stream, offset, whence);
|
|
},read:function (stream, buffer, offset, length, position) {
|
|
if (length < 0 || position < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
if ((stream.flags & 2097155) === 1) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if (FS.isDir(stream.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
|
|
}
|
|
if (!stream.stream_ops.read) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var seeking = true;
|
|
if (typeof position === 'undefined') {
|
|
position = stream.position;
|
|
seeking = false;
|
|
} else if (!stream.seekable) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}
|
|
var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);
|
|
if (!seeking) stream.position += bytesRead;
|
|
return bytesRead;
|
|
},write:function (stream, buffer, offset, length, position, canOwn) {
|
|
if (length < 0 || position < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
if ((stream.flags & 2097155) === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if (FS.isDir(stream.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
|
|
}
|
|
if (!stream.stream_ops.write) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var seeking = true;
|
|
if (typeof position === 'undefined') {
|
|
position = stream.position;
|
|
seeking = false;
|
|
} else if (!stream.seekable) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}
|
|
if (stream.flags & 1024) {
|
|
// seek to the end before writing in append mode
|
|
FS.llseek(stream, 0, 2);
|
|
}
|
|
var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);
|
|
if (!seeking) stream.position += bytesWritten;
|
|
return bytesWritten;
|
|
},allocate:function (stream, offset, length) {
|
|
if (offset < 0 || length <= 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
if ((stream.flags & 2097155) === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
|
|
}
|
|
if (!stream.stream_ops.allocate) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);
|
|
}
|
|
stream.stream_ops.allocate(stream, offset, length);
|
|
},mmap:function (stream, buffer, offset, length, position, prot, flags) {
|
|
// TODO if PROT is PROT_WRITE, make sure we have write access
|
|
if ((stream.flags & 2097155) === 1) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EACCES);
|
|
}
|
|
if (!stream.stream_ops.mmap) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
|
|
}
|
|
return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags);
|
|
},ioctl:function (stream, cmd, arg) {
|
|
if (!stream.stream_ops.ioctl) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);
|
|
}
|
|
return stream.stream_ops.ioctl(stream, cmd, arg);
|
|
},readFile:function (path, opts) {
|
|
opts = opts || {};
|
|
opts.flags = opts.flags || 'r';
|
|
opts.encoding = opts.encoding || 'binary';
|
|
if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
|
|
throw new Error('Invalid encoding type "' + opts.encoding + '"');
|
|
}
|
|
var ret;
|
|
var stream = FS.open(path, opts.flags);
|
|
var stat = FS.stat(path);
|
|
var length = stat.size;
|
|
var buf = new Uint8Array(length);
|
|
FS.read(stream, buf, 0, length, 0);
|
|
if (opts.encoding === 'utf8') {
|
|
ret = '';
|
|
var utf8 = new Runtime.UTF8Processor();
|
|
for (var i = 0; i < length; i++) {
|
|
ret += utf8.processCChar(buf[i]);
|
|
}
|
|
} else if (opts.encoding === 'binary') {
|
|
ret = buf;
|
|
}
|
|
FS.close(stream);
|
|
return ret;
|
|
},writeFile:function (path, data, opts) {
|
|
opts = opts || {};
|
|
opts.flags = opts.flags || 'w';
|
|
opts.encoding = opts.encoding || 'utf8';
|
|
if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
|
|
throw new Error('Invalid encoding type "' + opts.encoding + '"');
|
|
}
|
|
var stream = FS.open(path, opts.flags, opts.mode);
|
|
if (opts.encoding === 'utf8') {
|
|
var utf8 = new Runtime.UTF8Processor();
|
|
var buf = new Uint8Array(utf8.processJSString(data));
|
|
FS.write(stream, buf, 0, buf.length, 0, opts.canOwn);
|
|
} else if (opts.encoding === 'binary') {
|
|
FS.write(stream, data, 0, data.length, 0, opts.canOwn);
|
|
}
|
|
FS.close(stream);
|
|
},cwd:function () {
|
|
return FS.currentPath;
|
|
},chdir:function (path) {
|
|
var lookup = FS.lookupPath(path, { follow: true });
|
|
if (!FS.isDir(lookup.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
var err = FS.nodePermissions(lookup.node, 'x');
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
FS.currentPath = lookup.path;
|
|
},createDefaultDirectories:function () {
|
|
FS.mkdir('/tmp');
|
|
},createDefaultDevices:function () {
|
|
// create /dev
|
|
FS.mkdir('/dev');
|
|
// setup /dev/null
|
|
FS.registerDevice(FS.makedev(1, 3), {
|
|
read: function() { return 0; },
|
|
write: function() { return 0; }
|
|
});
|
|
FS.mkdev('/dev/null', FS.makedev(1, 3));
|
|
// setup /dev/tty and /dev/tty1
|
|
// stderr needs to print output using Module['printErr']
|
|
// so we register a second tty just for it.
|
|
TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);
|
|
TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);
|
|
FS.mkdev('/dev/tty', FS.makedev(5, 0));
|
|
FS.mkdev('/dev/tty1', FS.makedev(6, 0));
|
|
// we're not going to emulate the actual shm device,
|
|
// just create the tmp dirs that reside in it commonly
|
|
FS.mkdir('/dev/shm');
|
|
FS.mkdir('/dev/shm/tmp');
|
|
},createStandardStreams:function () {
|
|
// TODO deprecate the old functionality of a single
|
|
// input / output callback and that utilizes FS.createDevice
|
|
// and instead require a unique set of stream ops
|
|
|
|
// by default, we symlink the standard streams to the
|
|
// default tty devices. however, if the standard streams
|
|
// have been overwritten we create a unique device for
|
|
// them instead.
|
|
if (Module['stdin']) {
|
|
FS.createDevice('/dev', 'stdin', Module['stdin']);
|
|
} else {
|
|
FS.symlink('/dev/tty', '/dev/stdin');
|
|
}
|
|
if (Module['stdout']) {
|
|
FS.createDevice('/dev', 'stdout', null, Module['stdout']);
|
|
} else {
|
|
FS.symlink('/dev/tty', '/dev/stdout');
|
|
}
|
|
if (Module['stderr']) {
|
|
FS.createDevice('/dev', 'stderr', null, Module['stderr']);
|
|
} else {
|
|
FS.symlink('/dev/tty1', '/dev/stderr');
|
|
}
|
|
|
|
// open default streams for the stdin, stdout and stderr devices
|
|
var stdin = FS.open('/dev/stdin', 'r');
|
|
HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin);
|
|
assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')');
|
|
|
|
var stdout = FS.open('/dev/stdout', 'w');
|
|
HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout);
|
|
assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')');
|
|
|
|
var stderr = FS.open('/dev/stderr', 'w');
|
|
HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr);
|
|
assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')');
|
|
},ensureErrnoError:function () {
|
|
if (FS.ErrnoError) return;
|
|
FS.ErrnoError = function ErrnoError(errno) {
|
|
this.errno = errno;
|
|
for (var key in ERRNO_CODES) {
|
|
if (ERRNO_CODES[key] === errno) {
|
|
this.code = key;
|
|
break;
|
|
}
|
|
}
|
|
this.message = ERRNO_MESSAGES[errno];
|
|
};
|
|
FS.ErrnoError.prototype = new Error();
|
|
FS.ErrnoError.prototype.constructor = FS.ErrnoError;
|
|
// Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info)
|
|
[ERRNO_CODES.ENOENT].forEach(function(code) {
|
|
FS.genericErrors[code] = new FS.ErrnoError(code);
|
|
FS.genericErrors[code].stack = '<generic error, no stack>';
|
|
});
|
|
},staticInit:function () {
|
|
FS.ensureErrnoError();
|
|
|
|
FS.nameTable = new Array(4096);
|
|
|
|
FS.mount(MEMFS, {}, '/');
|
|
|
|
FS.createDefaultDirectories();
|
|
FS.createDefaultDevices();
|
|
},init:function (input, output, error) {
|
|
assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)');
|
|
FS.init.initialized = true;
|
|
|
|
FS.ensureErrnoError();
|
|
|
|
// Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here
|
|
Module['stdin'] = input || Module['stdin'];
|
|
Module['stdout'] = output || Module['stdout'];
|
|
Module['stderr'] = error || Module['stderr'];
|
|
|
|
FS.createStandardStreams();
|
|
},quit:function () {
|
|
FS.init.initialized = false;
|
|
for (var i = 0; i < FS.streams.length; i++) {
|
|
var stream = FS.streams[i];
|
|
if (!stream) {
|
|
continue;
|
|
}
|
|
FS.close(stream);
|
|
}
|
|
},getMode:function (canRead, canWrite) {
|
|
var mode = 0;
|
|
if (canRead) mode |= 292 | 73;
|
|
if (canWrite) mode |= 146;
|
|
return mode;
|
|
},joinPath:function (parts, forceRelative) {
|
|
var path = PATH.join.apply(null, parts);
|
|
if (forceRelative && path[0] == '/') path = path.substr(1);
|
|
return path;
|
|
},absolutePath:function (relative, base) {
|
|
return PATH.resolve(base, relative);
|
|
},standardizePath:function (path) {
|
|
return PATH.normalize(path);
|
|
},findObject:function (path, dontResolveLastLink) {
|
|
var ret = FS.analyzePath(path, dontResolveLastLink);
|
|
if (ret.exists) {
|
|
return ret.object;
|
|
} else {
|
|
___setErrNo(ret.error);
|
|
return null;
|
|
}
|
|
},analyzePath:function (path, dontResolveLastLink) {
|
|
// operate from within the context of the symlink's target
|
|
try {
|
|
var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
|
|
path = lookup.path;
|
|
} catch (e) {
|
|
}
|
|
var ret = {
|
|
isRoot: false, exists: false, error: 0, name: null, path: null, object: null,
|
|
parentExists: false, parentPath: null, parentObject: null
|
|
};
|
|
try {
|
|
var lookup = FS.lookupPath(path, { parent: true });
|
|
ret.parentExists = true;
|
|
ret.parentPath = lookup.path;
|
|
ret.parentObject = lookup.node;
|
|
ret.name = PATH.basename(path);
|
|
lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
|
|
ret.exists = true;
|
|
ret.path = lookup.path;
|
|
ret.object = lookup.node;
|
|
ret.name = lookup.node.name;
|
|
ret.isRoot = lookup.path === '/';
|
|
} catch (e) {
|
|
ret.error = e.errno;
|
|
};
|
|
return ret;
|
|
},createFolder:function (parent, name, canRead, canWrite) {
|
|
var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
|
|
var mode = FS.getMode(canRead, canWrite);
|
|
return FS.mkdir(path, mode);
|
|
},createPath:function (parent, path, canRead, canWrite) {
|
|
parent = typeof parent === 'string' ? parent : FS.getPath(parent);
|
|
var parts = path.split('/').reverse();
|
|
while (parts.length) {
|
|
var part = parts.pop();
|
|
if (!part) continue;
|
|
var current = PATH.join2(parent, part);
|
|
try {
|
|
FS.mkdir(current);
|
|
} catch (e) {
|
|
// ignore EEXIST
|
|
}
|
|
parent = current;
|
|
}
|
|
return current;
|
|
},createFile:function (parent, name, properties, canRead, canWrite) {
|
|
var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
|
|
var mode = FS.getMode(canRead, canWrite);
|
|
return FS.create(path, mode);
|
|
},createDataFile:function (parent, name, data, canRead, canWrite, canOwn) {
|
|
var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent;
|
|
var mode = FS.getMode(canRead, canWrite);
|
|
var node = FS.create(path, mode);
|
|
if (data) {
|
|
if (typeof data === 'string') {
|
|
var arr = new Array(data.length);
|
|
for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
|
|
data = arr;
|
|
}
|
|
// make sure we can write to the file
|
|
FS.chmod(node, mode | 146);
|
|
var stream = FS.open(node, 'w');
|
|
FS.write(stream, data, 0, data.length, 0, canOwn);
|
|
FS.close(stream);
|
|
FS.chmod(node, mode);
|
|
}
|
|
return node;
|
|
},createDevice:function (parent, name, input, output) {
|
|
var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
|
|
var mode = FS.getMode(!!input, !!output);
|
|
if (!FS.createDevice.major) FS.createDevice.major = 64;
|
|
var dev = FS.makedev(FS.createDevice.major++, 0);
|
|
// Create a fake device that a set of stream ops to emulate
|
|
// the old behavior.
|
|
FS.registerDevice(dev, {
|
|
open: function(stream) {
|
|
stream.seekable = false;
|
|
},
|
|
close: function(stream) {
|
|
// flush any pending line data
|
|
if (output && output.buffer && output.buffer.length) {
|
|
output(10);
|
|
}
|
|
},
|
|
read: function(stream, buffer, offset, length, pos /* ignored */) {
|
|
var bytesRead = 0;
|
|
for (var i = 0; i < length; i++) {
|
|
var result;
|
|
try {
|
|
result = input();
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
if (result === undefined && bytesRead === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
if (result === null || result === undefined) break;
|
|
bytesRead++;
|
|
buffer[offset+i] = result;
|
|
}
|
|
if (bytesRead) {
|
|
stream.node.timestamp = Date.now();
|
|
}
|
|
return bytesRead;
|
|
},
|
|
write: function(stream, buffer, offset, length, pos) {
|
|
for (var i = 0; i < length; i++) {
|
|
try {
|
|
output(buffer[offset+i]);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
}
|
|
if (length) {
|
|
stream.node.timestamp = Date.now();
|
|
}
|
|
return i;
|
|
}
|
|
});
|
|
return FS.mkdev(path, mode, dev);
|
|
},createLink:function (parent, name, target, canRead, canWrite) {
|
|
var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
|
|
return FS.symlink(target, path);
|
|
},forceLoadFile:function (obj) {
|
|
if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;
|
|
var success = true;
|
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
|
|
} else if (Module['read']) {
|
|
// Command-line.
|
|
try {
|
|
// WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as
|
|
// read() will try to parse UTF8.
|
|
obj.contents = intArrayFromString(Module['read'](obj.url), true);
|
|
} catch (e) {
|
|
success = false;
|
|
}
|
|
} else {
|
|
throw new Error('Cannot load without read() or XMLHttpRequest.');
|
|
}
|
|
if (!success) ___setErrNo(ERRNO_CODES.EIO);
|
|
return success;
|
|
},createLazyFile:function (parent, name, url, canRead, canWrite) {
|
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
|
|
// Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
|
|
function LazyUint8Array() {
|
|
this.lengthKnown = false;
|
|
this.chunks = []; // Loaded chunks. Index is the chunk number
|
|
}
|
|
LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) {
|
|
if (idx > this.length-1 || idx < 0) {
|
|
return undefined;
|
|
}
|
|
var chunkOffset = idx % this.chunkSize;
|
|
var chunkNum = Math.floor(idx / this.chunkSize);
|
|
return this.getter(chunkNum)[chunkOffset];
|
|
}
|
|
LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {
|
|
this.getter = getter;
|
|
}
|
|
LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {
|
|
// Find length
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('HEAD', url, false);
|
|
xhr.send(null);
|
|
if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
|
|
var datalength = Number(xhr.getResponseHeader("Content-length"));
|
|
var header;
|
|
var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
|
|
var chunkSize = 1024*1024; // Chunk size in bytes
|
|
|
|
if (!hasByteServing) chunkSize = datalength;
|
|
|
|
// Function to get a range from the remote URL.
|
|
var doXHR = (function(from, to) {
|
|
if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
|
|
if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!");
|
|
|
|
// TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('GET', url, false);
|
|
if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
|
|
|
|
// Some hints to the browser that we want binary data.
|
|
if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';
|
|
if (xhr.overrideMimeType) {
|
|
xhr.overrideMimeType('text/plain; charset=x-user-defined');
|
|
}
|
|
|
|
xhr.send(null);
|
|
if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
|
|
if (xhr.response !== undefined) {
|
|
return new Uint8Array(xhr.response || []);
|
|
} else {
|
|
return intArrayFromString(xhr.responseText || '', true);
|
|
}
|
|
});
|
|
var lazyArray = this;
|
|
lazyArray.setDataGetter(function(chunkNum) {
|
|
var start = chunkNum * chunkSize;
|
|
var end = (chunkNum+1) * chunkSize - 1; // including this byte
|
|
end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block
|
|
if (typeof(lazyArray.chunks[chunkNum]) === "undefined") {
|
|
lazyArray.chunks[chunkNum] = doXHR(start, end);
|
|
}
|
|
if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!");
|
|
return lazyArray.chunks[chunkNum];
|
|
});
|
|
|
|
this._length = datalength;
|
|
this._chunkSize = chunkSize;
|
|
this.lengthKnown = true;
|
|
}
|
|
|
|
var lazyArray = new LazyUint8Array();
|
|
Object.defineProperty(lazyArray, "length", {
|
|
get: function() {
|
|
if(!this.lengthKnown) {
|
|
this.cacheLength();
|
|
}
|
|
return this._length;
|
|
}
|
|
});
|
|
Object.defineProperty(lazyArray, "chunkSize", {
|
|
get: function() {
|
|
if(!this.lengthKnown) {
|
|
this.cacheLength();
|
|
}
|
|
return this._chunkSize;
|
|
}
|
|
});
|
|
|
|
var properties = { isDevice: false, contents: lazyArray };
|
|
} else {
|
|
var properties = { isDevice: false, url: url };
|
|
}
|
|
|
|
var node = FS.createFile(parent, name, properties, canRead, canWrite);
|
|
// This is a total hack, but I want to get this lazy file code out of the
|
|
// core of MEMFS. If we want to keep this lazy file concept I feel it should
|
|
// be its own thin LAZYFS proxying calls to MEMFS.
|
|
if (properties.contents) {
|
|
node.contents = properties.contents;
|
|
} else if (properties.url) {
|
|
node.contents = null;
|
|
node.url = properties.url;
|
|
}
|
|
// override each stream op with one that tries to force load the lazy file first
|
|
var stream_ops = {};
|
|
var keys = Object.keys(node.stream_ops);
|
|
keys.forEach(function(key) {
|
|
var fn = node.stream_ops[key];
|
|
stream_ops[key] = function forceLoadLazyFile() {
|
|
if (!FS.forceLoadFile(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
return fn.apply(null, arguments);
|
|
};
|
|
});
|
|
// use a custom read function
|
|
stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) {
|
|
if (!FS.forceLoadFile(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
var contents = stream.node.contents;
|
|
if (position >= contents.length)
|
|
return 0;
|
|
var size = Math.min(contents.length - position, length);
|
|
assert(size >= 0);
|
|
if (contents.slice) { // normal array
|
|
for (var i = 0; i < size; i++) {
|
|
buffer[offset + i] = contents[position + i];
|
|
}
|
|
} else {
|
|
for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR
|
|
buffer[offset + i] = contents.get(position + i);
|
|
}
|
|
}
|
|
return size;
|
|
};
|
|
node.stream_ops = stream_ops;
|
|
return node;
|
|
},createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) {
|
|
Browser.init();
|
|
// TODO we should allow people to just pass in a complete filename instead
|
|
// of parent and name being that we just join them anyways
|
|
var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent;
|
|
function processData(byteArray) {
|
|
function finish(byteArray) {
|
|
if (!dontCreateFile) {
|
|
FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
|
|
}
|
|
if (onload) onload();
|
|
removeRunDependency('cp ' + fullname);
|
|
}
|
|
var handled = false;
|
|
Module['preloadPlugins'].forEach(function(plugin) {
|
|
if (handled) return;
|
|
if (plugin['canHandle'](fullname)) {
|
|
plugin['handle'](byteArray, fullname, finish, function() {
|
|
if (onerror) onerror();
|
|
removeRunDependency('cp ' + fullname);
|
|
});
|
|
handled = true;
|
|
}
|
|
});
|
|
if (!handled) finish(byteArray);
|
|
}
|
|
addRunDependency('cp ' + fullname);
|
|
if (typeof url == 'string') {
|
|
Browser.asyncLoad(url, function(byteArray) {
|
|
processData(byteArray);
|
|
}, onerror);
|
|
} else {
|
|
processData(url);
|
|
}
|
|
},indexedDB:function () {
|
|
return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
|
|
},DB_NAME:function () {
|
|
return 'EM_FS_' + window.location.pathname;
|
|
},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function (paths, onload, onerror) {
|
|
onload = onload || function(){};
|
|
onerror = onerror || function(){};
|
|
var indexedDB = FS.indexedDB();
|
|
try {
|
|
var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
|
|
} catch (e) {
|
|
return onerror(e);
|
|
}
|
|
openRequest.onupgradeneeded = function openRequest_onupgradeneeded() {
|
|
console.log('creating db');
|
|
var db = openRequest.result;
|
|
db.createObjectStore(FS.DB_STORE_NAME);
|
|
};
|
|
openRequest.onsuccess = function openRequest_onsuccess() {
|
|
var db = openRequest.result;
|
|
var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite');
|
|
var files = transaction.objectStore(FS.DB_STORE_NAME);
|
|
var ok = 0, fail = 0, total = paths.length;
|
|
function finish() {
|
|
if (fail == 0) onload(); else onerror();
|
|
}
|
|
paths.forEach(function(path) {
|
|
var putRequest = files.put(FS.analyzePath(path).object.contents, path);
|
|
putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() };
|
|
putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() };
|
|
});
|
|
transaction.onerror = onerror;
|
|
};
|
|
openRequest.onerror = onerror;
|
|
},loadFilesFromDB:function (paths, onload, onerror) {
|
|
onload = onload || function(){};
|
|
onerror = onerror || function(){};
|
|
var indexedDB = FS.indexedDB();
|
|
try {
|
|
var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
|
|
} catch (e) {
|
|
return onerror(e);
|
|
}
|
|
openRequest.onupgradeneeded = onerror; // no database to load from
|
|
openRequest.onsuccess = function openRequest_onsuccess() {
|
|
var db = openRequest.result;
|
|
try {
|
|
var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly');
|
|
} catch(e) {
|
|
onerror(e);
|
|
return;
|
|
}
|
|
var files = transaction.objectStore(FS.DB_STORE_NAME);
|
|
var ok = 0, fail = 0, total = paths.length;
|
|
function finish() {
|
|
if (fail == 0) onload(); else onerror();
|
|
}
|
|
paths.forEach(function(path) {
|
|
var getRequest = files.get(path);
|
|
getRequest.onsuccess = function getRequest_onsuccess() {
|
|
if (FS.analyzePath(path).exists) {
|
|
FS.unlink(path);
|
|
}
|
|
FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);
|
|
ok++;
|
|
if (ok + fail == total) finish();
|
|
};
|
|
getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() };
|
|
});
|
|
transaction.onerror = onerror;
|
|
};
|
|
openRequest.onerror = onerror;
|
|
}};
|
|
|
|
|
|
|
|
|
|
function _mkport() { throw 'TODO' }var SOCKFS={mount:function (mount) {
|
|
return FS.createNode(null, '/', 16384 | 511 /* 0777 */, 0);
|
|
},createSocket:function (family, type, protocol) {
|
|
var streaming = type == 1;
|
|
if (protocol) {
|
|
assert(streaming == (protocol == 6)); // if SOCK_STREAM, must be tcp
|
|
}
|
|
|
|
// create our internal socket structure
|
|
var sock = {
|
|
family: family,
|
|
type: type,
|
|
protocol: protocol,
|
|
server: null,
|
|
peers: {},
|
|
pending: [],
|
|
recv_queue: [],
|
|
sock_ops: SOCKFS.websocket_sock_ops
|
|
};
|
|
|
|
// create the filesystem node to store the socket structure
|
|
var name = SOCKFS.nextname();
|
|
var node = FS.createNode(SOCKFS.root, name, 49152, 0);
|
|
node.sock = sock;
|
|
|
|
// and the wrapping stream that enables library functions such
|
|
// as read and write to indirectly interact with the socket
|
|
var stream = FS.createStream({
|
|
path: name,
|
|
node: node,
|
|
flags: FS.modeStringToFlags('r+'),
|
|
seekable: false,
|
|
stream_ops: SOCKFS.stream_ops
|
|
});
|
|
|
|
// map the new stream to the socket structure (sockets have a 1:1
|
|
// relationship with a stream)
|
|
sock.stream = stream;
|
|
|
|
return sock;
|
|
},getSocket:function (fd) {
|
|
var stream = FS.getStream(fd);
|
|
if (!stream || !FS.isSocket(stream.node.mode)) {
|
|
return null;
|
|
}
|
|
return stream.node.sock;
|
|
},stream_ops:{poll:function (stream) {
|
|
var sock = stream.node.sock;
|
|
return sock.sock_ops.poll(sock);
|
|
},ioctl:function (stream, request, varargs) {
|
|
var sock = stream.node.sock;
|
|
return sock.sock_ops.ioctl(sock, request, varargs);
|
|
},read:function (stream, buffer, offset, length, position /* ignored */) {
|
|
var sock = stream.node.sock;
|
|
var msg = sock.sock_ops.recvmsg(sock, length);
|
|
if (!msg) {
|
|
// socket is closed
|
|
return 0;
|
|
}
|
|
buffer.set(msg.buffer, offset);
|
|
return msg.buffer.length;
|
|
},write:function (stream, buffer, offset, length, position /* ignored */) {
|
|
var sock = stream.node.sock;
|
|
return sock.sock_ops.sendmsg(sock, buffer, offset, length);
|
|
},close:function (stream) {
|
|
var sock = stream.node.sock;
|
|
sock.sock_ops.close(sock);
|
|
}},nextname:function () {
|
|
if (!SOCKFS.nextname.current) {
|
|
SOCKFS.nextname.current = 0;
|
|
}
|
|
return 'socket[' + (SOCKFS.nextname.current++) + ']';
|
|
},websocket_sock_ops:{createPeer:function (sock, addr, port) {
|
|
var ws;
|
|
|
|
if (typeof addr === 'object') {
|
|
ws = addr;
|
|
addr = null;
|
|
port = null;
|
|
}
|
|
|
|
if (ws) {
|
|
// for sockets that've already connected (e.g. we're the server)
|
|
// we can inspect the _socket property for the address
|
|
if (ws._socket) {
|
|
addr = ws._socket.remoteAddress;
|
|
port = ws._socket.remotePort;
|
|
}
|
|
// if we're just now initializing a connection to the remote,
|
|
// inspect the url property
|
|
else {
|
|
var result = /ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);
|
|
if (!result) {
|
|
throw new Error('WebSocket URL must be in the format ws(s)://address:port');
|
|
}
|
|
addr = result[1];
|
|
port = parseInt(result[2], 10);
|
|
}
|
|
} else {
|
|
// create the actual websocket object and connect
|
|
try {
|
|
var url = 'ws://' + addr + ':' + port;
|
|
// the node ws library API is slightly different than the browser's
|
|
var opts = ENVIRONMENT_IS_NODE ? {headers: {'websocket-protocol': ['binary']}} : ['binary'];
|
|
// If node we use the ws library.
|
|
var WebSocket = ENVIRONMENT_IS_NODE ? require('ws') : window['WebSocket'];
|
|
ws = new WebSocket(url, opts);
|
|
ws.binaryType = 'arraybuffer';
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH);
|
|
}
|
|
}
|
|
|
|
|
|
var peer = {
|
|
addr: addr,
|
|
port: port,
|
|
socket: ws,
|
|
dgram_send_queue: []
|
|
};
|
|
|
|
SOCKFS.websocket_sock_ops.addPeer(sock, peer);
|
|
SOCKFS.websocket_sock_ops.handlePeerEvents(sock, peer);
|
|
|
|
// if this is a bound dgram socket, send the port number first to allow
|
|
// us to override the ephemeral port reported to us by remotePort on the
|
|
// remote end.
|
|
if (sock.type === 2 && typeof sock.sport !== 'undefined') {
|
|
peer.dgram_send_queue.push(new Uint8Array([
|
|
255, 255, 255, 255,
|
|
'p'.charCodeAt(0), 'o'.charCodeAt(0), 'r'.charCodeAt(0), 't'.charCodeAt(0),
|
|
((sock.sport & 0xff00) >> 8) , (sock.sport & 0xff)
|
|
]));
|
|
}
|
|
|
|
return peer;
|
|
},getPeer:function (sock, addr, port) {
|
|
return sock.peers[addr + ':' + port];
|
|
},addPeer:function (sock, peer) {
|
|
sock.peers[peer.addr + ':' + peer.port] = peer;
|
|
},removePeer:function (sock, peer) {
|
|
delete sock.peers[peer.addr + ':' + peer.port];
|
|
},handlePeerEvents:function (sock, peer) {
|
|
var first = true;
|
|
|
|
var handleOpen = function () {
|
|
try {
|
|
var queued = peer.dgram_send_queue.shift();
|
|
while (queued) {
|
|
peer.socket.send(queued);
|
|
queued = peer.dgram_send_queue.shift();
|
|
}
|
|
} catch (e) {
|
|
// not much we can do here in the way of proper error handling as we've already
|
|
// lied and said this data was sent. shut it down.
|
|
peer.socket.close();
|
|
}
|
|
};
|
|
|
|
function handleMessage(data) {
|
|
assert(typeof data !== 'string' && data.byteLength !== undefined); // must receive an ArrayBuffer
|
|
data = new Uint8Array(data); // make a typed array view on the array buffer
|
|
|
|
|
|
// if this is the port message, override the peer's port with it
|
|
var wasfirst = first;
|
|
first = false;
|
|
if (wasfirst &&
|
|
data.length === 10 &&
|
|
data[0] === 255 && data[1] === 255 && data[2] === 255 && data[3] === 255 &&
|
|
data[4] === 'p'.charCodeAt(0) && data[5] === 'o'.charCodeAt(0) && data[6] === 'r'.charCodeAt(0) && data[7] === 't'.charCodeAt(0)) {
|
|
// update the peer's port and it's key in the peer map
|
|
var newport = ((data[8] << 8) | data[9]);
|
|
SOCKFS.websocket_sock_ops.removePeer(sock, peer);
|
|
peer.port = newport;
|
|
SOCKFS.websocket_sock_ops.addPeer(sock, peer);
|
|
return;
|
|
}
|
|
|
|
sock.recv_queue.push({ addr: peer.addr, port: peer.port, data: data });
|
|
};
|
|
|
|
if (ENVIRONMENT_IS_NODE) {
|
|
peer.socket.on('open', handleOpen);
|
|
peer.socket.on('message', function(data, flags) {
|
|
if (!flags.binary) {
|
|
return;
|
|
}
|
|
handleMessage((new Uint8Array(data)).buffer); // copy from node Buffer -> ArrayBuffer
|
|
});
|
|
peer.socket.on('error', function() {
|
|
// don't throw
|
|
});
|
|
} else {
|
|
peer.socket.onopen = handleOpen;
|
|
peer.socket.onmessage = function peer_socket_onmessage(event) {
|
|
handleMessage(event.data);
|
|
};
|
|
}
|
|
},poll:function (sock) {
|
|
if (sock.type === 1 && sock.server) {
|
|
// listen sockets should only say they're available for reading
|
|
// if there are pending clients.
|
|
return sock.pending.length ? (64 | 1) : 0;
|
|
}
|
|
|
|
var mask = 0;
|
|
var dest = sock.type === 1 ? // we only care about the socket state for connection-based sockets
|
|
SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport) :
|
|
null;
|
|
|
|
if (sock.recv_queue.length ||
|
|
!dest || // connection-less sockets are always ready to read
|
|
(dest && dest.socket.readyState === dest.socket.CLOSING) ||
|
|
(dest && dest.socket.readyState === dest.socket.CLOSED)) { // let recv return 0 once closed
|
|
mask |= (64 | 1);
|
|
}
|
|
|
|
if (!dest || // connection-less sockets are always ready to write
|
|
(dest && dest.socket.readyState === dest.socket.OPEN)) {
|
|
mask |= 4;
|
|
}
|
|
|
|
if ((dest && dest.socket.readyState === dest.socket.CLOSING) ||
|
|
(dest && dest.socket.readyState === dest.socket.CLOSED)) {
|
|
mask |= 16;
|
|
}
|
|
|
|
return mask;
|
|
},ioctl:function (sock, request, arg) {
|
|
switch (request) {
|
|
case 21531:
|
|
var bytes = 0;
|
|
if (sock.recv_queue.length) {
|
|
bytes = sock.recv_queue[0].data.length;
|
|
}
|
|
HEAP32[((arg)>>2)]=bytes;
|
|
return 0;
|
|
default:
|
|
return ERRNO_CODES.EINVAL;
|
|
}
|
|
},close:function (sock) {
|
|
// if we've spawned a listen server, close it
|
|
if (sock.server) {
|
|
try {
|
|
sock.server.close();
|
|
} catch (e) {
|
|
}
|
|
sock.server = null;
|
|
}
|
|
// close any peer connections
|
|
var peers = Object.keys(sock.peers);
|
|
for (var i = 0; i < peers.length; i++) {
|
|
var peer = sock.peers[peers[i]];
|
|
try {
|
|
peer.socket.close();
|
|
} catch (e) {
|
|
}
|
|
SOCKFS.websocket_sock_ops.removePeer(sock, peer);
|
|
}
|
|
return 0;
|
|
},bind:function (sock, addr, port) {
|
|
if (typeof sock.saddr !== 'undefined' || typeof sock.sport !== 'undefined') {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already bound
|
|
}
|
|
sock.saddr = addr;
|
|
sock.sport = port || _mkport();
|
|
// in order to emulate dgram sockets, we need to launch a listen server when
|
|
// binding on a connection-less socket
|
|
// note: this is only required on the server side
|
|
if (sock.type === 2) {
|
|
// close the existing server if it exists
|
|
if (sock.server) {
|
|
sock.server.close();
|
|
sock.server = null;
|
|
}
|
|
// swallow error operation not supported error that occurs when binding in the
|
|
// browser where this isn't supported
|
|
try {
|
|
sock.sock_ops.listen(sock, 0);
|
|
} catch (e) {
|
|
if (!(e instanceof FS.ErrnoError)) throw e;
|
|
if (e.errno !== ERRNO_CODES.EOPNOTSUPP) throw e;
|
|
}
|
|
}
|
|
},connect:function (sock, addr, port) {
|
|
if (sock.server) {
|
|
throw new FS.ErrnoError(ERRNO_CODS.EOPNOTSUPP);
|
|
}
|
|
|
|
// TODO autobind
|
|
// if (!sock.addr && sock.type == 2) {
|
|
// }
|
|
|
|
// early out if we're already connected / in the middle of connecting
|
|
if (typeof sock.daddr !== 'undefined' && typeof sock.dport !== 'undefined') {
|
|
var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport);
|
|
if (dest) {
|
|
if (dest.socket.readyState === dest.socket.CONNECTING) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EALREADY);
|
|
} else {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISCONN);
|
|
}
|
|
}
|
|
}
|
|
|
|
// add the socket to our peer list and set our
|
|
// destination address / port to match
|
|
var peer = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port);
|
|
sock.daddr = peer.addr;
|
|
sock.dport = peer.port;
|
|
|
|
// always "fail" in non-blocking mode
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINPROGRESS);
|
|
},listen:function (sock, backlog) {
|
|
if (!ENVIRONMENT_IS_NODE) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);
|
|
}
|
|
if (sock.server) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already listening
|
|
}
|
|
var WebSocketServer = require('ws').Server;
|
|
var host = sock.saddr;
|
|
sock.server = new WebSocketServer({
|
|
host: host,
|
|
port: sock.sport
|
|
// TODO support backlog
|
|
});
|
|
|
|
sock.server.on('connection', function(ws) {
|
|
if (sock.type === 1) {
|
|
var newsock = SOCKFS.createSocket(sock.family, sock.type, sock.protocol);
|
|
|
|
// create a peer on the new socket
|
|
var peer = SOCKFS.websocket_sock_ops.createPeer(newsock, ws);
|
|
newsock.daddr = peer.addr;
|
|
newsock.dport = peer.port;
|
|
|
|
// push to queue for accept to pick up
|
|
sock.pending.push(newsock);
|
|
} else {
|
|
// create a peer on the listen socket so calling sendto
|
|
// with the listen socket and an address will resolve
|
|
// to the correct client
|
|
SOCKFS.websocket_sock_ops.createPeer(sock, ws);
|
|
}
|
|
});
|
|
sock.server.on('closed', function() {
|
|
sock.server = null;
|
|
});
|
|
sock.server.on('error', function() {
|
|
// don't throw
|
|
});
|
|
},accept:function (listensock) {
|
|
if (!listensock.server) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var newsock = listensock.pending.shift();
|
|
newsock.stream.flags = listensock.stream.flags;
|
|
return newsock;
|
|
},getname:function (sock, peer) {
|
|
var addr, port;
|
|
if (peer) {
|
|
if (sock.daddr === undefined || sock.dport === undefined) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);
|
|
}
|
|
addr = sock.daddr;
|
|
port = sock.dport;
|
|
} else {
|
|
// TODO saddr and sport will be set for bind()'d UDP sockets, but what
|
|
// should we be returning for TCP sockets that've been connect()'d?
|
|
addr = sock.saddr || 0;
|
|
port = sock.sport || 0;
|
|
}
|
|
return { addr: addr, port: port };
|
|
},sendmsg:function (sock, buffer, offset, length, addr, port) {
|
|
if (sock.type === 2) {
|
|
// connection-less sockets will honor the message address,
|
|
// and otherwise fall back to the bound destination address
|
|
if (addr === undefined || port === undefined) {
|
|
addr = sock.daddr;
|
|
port = sock.dport;
|
|
}
|
|
// if there was no address to fall back to, error out
|
|
if (addr === undefined || port === undefined) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EDESTADDRREQ);
|
|
}
|
|
} else {
|
|
// connection-based sockets will only use the bound
|
|
addr = sock.daddr;
|
|
port = sock.dport;
|
|
}
|
|
|
|
// find the peer for the destination address
|
|
var dest = SOCKFS.websocket_sock_ops.getPeer(sock, addr, port);
|
|
|
|
// early out if not connected with a connection-based socket
|
|
if (sock.type === 1) {
|
|
if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);
|
|
} else if (dest.socket.readyState === dest.socket.CONNECTING) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
}
|
|
|
|
// create a copy of the incoming data to send, as the WebSocket API
|
|
// doesn't work entirely with an ArrayBufferView, it'll just send
|
|
// the entire underlying buffer
|
|
var data;
|
|
if (buffer instanceof Array || buffer instanceof ArrayBuffer) {
|
|
data = buffer.slice(offset, offset + length);
|
|
} else { // ArrayBufferView
|
|
data = buffer.buffer.slice(buffer.byteOffset + offset, buffer.byteOffset + offset + length);
|
|
}
|
|
|
|
// if we're emulating a connection-less dgram socket and don't have
|
|
// a cached connection, queue the buffer to send upon connect and
|
|
// lie, saying the data was sent now.
|
|
if (sock.type === 2) {
|
|
if (!dest || dest.socket.readyState !== dest.socket.OPEN) {
|
|
// if we're not connected, open a new connection
|
|
if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) {
|
|
dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port);
|
|
}
|
|
dest.dgram_send_queue.push(data);
|
|
return length;
|
|
}
|
|
}
|
|
|
|
try {
|
|
// send the actual data
|
|
dest.socket.send(data);
|
|
return length;
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
},recvmsg:function (sock, length) {
|
|
// http://pubs.opengroup.org/onlinepubs/7908799/xns/recvmsg.html
|
|
if (sock.type === 1 && sock.server) {
|
|
// tcp servers should not be recv()'ing on the listen socket
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);
|
|
}
|
|
|
|
var queued = sock.recv_queue.shift();
|
|
if (!queued) {
|
|
if (sock.type === 1) {
|
|
var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport);
|
|
|
|
if (!dest) {
|
|
// if we have a destination address but are not connected, error out
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);
|
|
}
|
|
else if (dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) {
|
|
// return null if the socket has closed
|
|
return null;
|
|
}
|
|
else {
|
|
// else, our socket is in a valid state but truly has nothing available
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
} else {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
}
|
|
|
|
// queued.data will be an ArrayBuffer if it's unadulterated, but if it's
|
|
// requeued TCP data it'll be an ArrayBufferView
|
|
var queuedLength = queued.data.byteLength || queued.data.length;
|
|
var queuedOffset = queued.data.byteOffset || 0;
|
|
var queuedBuffer = queued.data.buffer || queued.data;
|
|
var bytesRead = Math.min(length, queuedLength);
|
|
var res = {
|
|
buffer: new Uint8Array(queuedBuffer, queuedOffset, bytesRead),
|
|
addr: queued.addr,
|
|
port: queued.port
|
|
};
|
|
|
|
|
|
// push back any unread data for TCP connections
|
|
if (sock.type === 1 && bytesRead < queuedLength) {
|
|
var bytesRemaining = queuedLength - bytesRead;
|
|
queued.data = new Uint8Array(queuedBuffer, queuedOffset + bytesRead, bytesRemaining);
|
|
sock.recv_queue.unshift(queued);
|
|
}
|
|
|
|
return res;
|
|
}}};function _send(fd, buf, len, flags) {
|
|
var sock = SOCKFS.getSocket(fd);
|
|
if (!sock) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return -1;
|
|
}
|
|
// TODO honor flags
|
|
return _write(fd, buf, len);
|
|
}
|
|
|
|
function _pwrite(fildes, buf, nbyte, offset) {
|
|
// ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html
|
|
var stream = FS.getStream(fildes);
|
|
if (!stream) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return -1;
|
|
}
|
|
try {
|
|
var slab = HEAP8;
|
|
return FS.write(stream, slab, buf, nbyte, offset);
|
|
} catch (e) {
|
|
FS.handleFSError(e);
|
|
return -1;
|
|
}
|
|
}function _write(fildes, buf, nbyte) {
|
|
// ssize_t write(int fildes, const void *buf, size_t nbyte);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html
|
|
var stream = FS.getStream(fildes);
|
|
if (!stream) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return -1;
|
|
}
|
|
|
|
|
|
try {
|
|
var slab = HEAP8;
|
|
return FS.write(stream, slab, buf, nbyte);
|
|
} catch (e) {
|
|
FS.handleFSError(e);
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
function _fileno(stream) {
|
|
// int fileno(FILE *stream);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html
|
|
return FS.getStreamFromPtr(stream).fd;
|
|
}function _fwrite(ptr, size, nitems, stream) {
|
|
// size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html
|
|
var bytesToWrite = nitems * size;
|
|
if (bytesToWrite == 0) return 0;
|
|
var fd = _fileno(stream);
|
|
var bytesWritten = _write(fd, ptr, bytesToWrite);
|
|
if (bytesWritten == -1) {
|
|
var streamObj = FS.getStreamFromPtr(stream);
|
|
if (streamObj) streamObj.error = true;
|
|
return 0;
|
|
} else {
|
|
return Math.floor(bytesWritten / size);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Module["_memset"] = _memset;var _llvm_memset_p0i8_i64=_memset;
|
|
|
|
function ___cxa_pure_virtual() {
|
|
ABORT = true;
|
|
throw 'Pure virtual function called!';
|
|
}
|
|
|
|
function _llvm_lifetime_start() {}
|
|
|
|
function _llvm_lifetime_end() {}
|
|
|
|
|
|
|
|
|
|
Module["_strlen"] = _strlen;
|
|
|
|
function __reallyNegative(x) {
|
|
return x < 0 || (x === 0 && (1/x) === -Infinity);
|
|
}function __formatString(format, varargs) {
|
|
var textIndex = format;
|
|
var argIndex = 0;
|
|
function getNextArg(type) {
|
|
// NOTE: Explicitly ignoring type safety. Otherwise this fails:
|
|
// int x = 4; printf("%c\n", (char)x);
|
|
var ret;
|
|
if (type === 'double') {
|
|
ret = HEAPF64[(((varargs)+(argIndex))>>3)];
|
|
} else if (type == 'i64') {
|
|
ret = [HEAP32[(((varargs)+(argIndex))>>2)],
|
|
HEAP32[(((varargs)+(argIndex+8))>>2)]];
|
|
argIndex += 8; // each 32-bit chunk is in a 64-bit block
|
|
|
|
} else {
|
|
type = 'i32'; // varargs are always i32, i64, or double
|
|
ret = HEAP32[(((varargs)+(argIndex))>>2)];
|
|
}
|
|
argIndex += Math.max(Runtime.getNativeFieldSize(type), Runtime.getAlignSize(type, null, true));
|
|
return ret;
|
|
}
|
|
|
|
var ret = [];
|
|
var curr, next, currArg;
|
|
while(1) {
|
|
var startTextIndex = textIndex;
|
|
curr = HEAP8[(textIndex)];
|
|
if (curr === 0) break;
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
if (curr == 37) {
|
|
// Handle flags.
|
|
var flagAlwaysSigned = false;
|
|
var flagLeftAlign = false;
|
|
var flagAlternative = false;
|
|
var flagZeroPad = false;
|
|
var flagPadSign = false;
|
|
flagsLoop: while (1) {
|
|
switch (next) {
|
|
case 43:
|
|
flagAlwaysSigned = true;
|
|
break;
|
|
case 45:
|
|
flagLeftAlign = true;
|
|
break;
|
|
case 35:
|
|
flagAlternative = true;
|
|
break;
|
|
case 48:
|
|
if (flagZeroPad) {
|
|
break flagsLoop;
|
|
} else {
|
|
flagZeroPad = true;
|
|
break;
|
|
}
|
|
case 32:
|
|
flagPadSign = true;
|
|
break;
|
|
default:
|
|
break flagsLoop;
|
|
}
|
|
textIndex++;
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
}
|
|
|
|
// Handle width.
|
|
var width = 0;
|
|
if (next == 42) {
|
|
width = getNextArg('i32');
|
|
textIndex++;
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
} else {
|
|
while (next >= 48 && next <= 57) {
|
|
width = width * 10 + (next - 48);
|
|
textIndex++;
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
}
|
|
}
|
|
|
|
// Handle precision.
|
|
var precisionSet = false, precision = -1;
|
|
if (next == 46) {
|
|
precision = 0;
|
|
precisionSet = true;
|
|
textIndex++;
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
if (next == 42) {
|
|
precision = getNextArg('i32');
|
|
textIndex++;
|
|
} else {
|
|
while(1) {
|
|
var precisionChr = HEAP8[((textIndex+1)|0)];
|
|
if (precisionChr < 48 ||
|
|
precisionChr > 57) break;
|
|
precision = precision * 10 + (precisionChr - 48);
|
|
textIndex++;
|
|
}
|
|
}
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
}
|
|
if (precision < 0) {
|
|
precision = 6; // Standard default.
|
|
precisionSet = false;
|
|
}
|
|
|
|
// Handle integer sizes. WARNING: These assume a 32-bit architecture!
|
|
var argSize;
|
|
switch (String.fromCharCode(next)) {
|
|
case 'h':
|
|
var nextNext = HEAP8[((textIndex+2)|0)];
|
|
if (nextNext == 104) {
|
|
textIndex++;
|
|
argSize = 1; // char (actually i32 in varargs)
|
|
} else {
|
|
argSize = 2; // short (actually i32 in varargs)
|
|
}
|
|
break;
|
|
case 'l':
|
|
var nextNext = HEAP8[((textIndex+2)|0)];
|
|
if (nextNext == 108) {
|
|
textIndex++;
|
|
argSize = 8; // long long
|
|
} else {
|
|
argSize = 4; // long
|
|
}
|
|
break;
|
|
case 'L': // long long
|
|
case 'q': // int64_t
|
|
case 'j': // intmax_t
|
|
argSize = 8;
|
|
break;
|
|
case 'z': // size_t
|
|
case 't': // ptrdiff_t
|
|
case 'I': // signed ptrdiff_t or unsigned size_t
|
|
argSize = 4;
|
|
break;
|
|
default:
|
|
argSize = null;
|
|
}
|
|
if (argSize) textIndex++;
|
|
next = HEAP8[((textIndex+1)|0)];
|
|
|
|
// Handle type specifier.
|
|
switch (String.fromCharCode(next)) {
|
|
case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': {
|
|
// Integer.
|
|
var signed = next == 100 || next == 105;
|
|
argSize = argSize || 4;
|
|
var currArg = getNextArg('i' + (argSize * 8));
|
|
var origArg = currArg;
|
|
var argText;
|
|
// Flatten i64-1 [low, high] into a (slightly rounded) double
|
|
if (argSize == 8) {
|
|
currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 117);
|
|
}
|
|
// Truncate to requested size.
|
|
if (argSize <= 4) {
|
|
var limit = Math.pow(256, argSize) - 1;
|
|
currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8);
|
|
}
|
|
// Format the number.
|
|
var currAbsArg = Math.abs(currArg);
|
|
var prefix = '';
|
|
if (next == 100 || next == 105) {
|
|
if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], null); else
|
|
argText = reSign(currArg, 8 * argSize, 1).toString(10);
|
|
} else if (next == 117) {
|
|
if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], true); else
|
|
argText = unSign(currArg, 8 * argSize, 1).toString(10);
|
|
currArg = Math.abs(currArg);
|
|
} else if (next == 111) {
|
|
argText = (flagAlternative ? '0' : '') + currAbsArg.toString(8);
|
|
} else if (next == 120 || next == 88) {
|
|
prefix = (flagAlternative && currArg != 0) ? '0x' : '';
|
|
if (argSize == 8 && i64Math) {
|
|
if (origArg[1]) {
|
|
argText = (origArg[1]>>>0).toString(16);
|
|
var lower = (origArg[0]>>>0).toString(16);
|
|
while (lower.length < 8) lower = '0' + lower;
|
|
argText += lower;
|
|
} else {
|
|
argText = (origArg[0]>>>0).toString(16);
|
|
}
|
|
} else
|
|
if (currArg < 0) {
|
|
// Represent negative numbers in hex as 2's complement.
|
|
currArg = -currArg;
|
|
argText = (currAbsArg - 1).toString(16);
|
|
var buffer = [];
|
|
for (var i = 0; i < argText.length; i++) {
|
|
buffer.push((0xF - parseInt(argText[i], 16)).toString(16));
|
|
}
|
|
argText = buffer.join('');
|
|
while (argText.length < argSize * 2) argText = 'f' + argText;
|
|
} else {
|
|
argText = currAbsArg.toString(16);
|
|
}
|
|
if (next == 88) {
|
|
prefix = prefix.toUpperCase();
|
|
argText = argText.toUpperCase();
|
|
}
|
|
} else if (next == 112) {
|
|
if (currAbsArg === 0) {
|
|
argText = '(nil)';
|
|
} else {
|
|
prefix = '0x';
|
|
argText = currAbsArg.toString(16);
|
|
}
|
|
}
|
|
if (precisionSet) {
|
|
while (argText.length < precision) {
|
|
argText = '0' + argText;
|
|
}
|
|
}
|
|
|
|
// Add sign if needed
|
|
if (currArg >= 0) {
|
|
if (flagAlwaysSigned) {
|
|
prefix = '+' + prefix;
|
|
} else if (flagPadSign) {
|
|
prefix = ' ' + prefix;
|
|
}
|
|
}
|
|
|
|
// Move sign to prefix so we zero-pad after the sign
|
|
if (argText.charAt(0) == '-') {
|
|
prefix = '-' + prefix;
|
|
argText = argText.substr(1);
|
|
}
|
|
|
|
// Add padding.
|
|
while (prefix.length + argText.length < width) {
|
|
if (flagLeftAlign) {
|
|
argText += ' ';
|
|
} else {
|
|
if (flagZeroPad) {
|
|
argText = '0' + argText;
|
|
} else {
|
|
prefix = ' ' + prefix;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Insert the result into the buffer.
|
|
argText = prefix + argText;
|
|
argText.split('').forEach(function(chr) {
|
|
ret.push(chr.charCodeAt(0));
|
|
});
|
|
break;
|
|
}
|
|
case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': {
|
|
// Float.
|
|
var currArg = getNextArg('double');
|
|
var argText;
|
|
if (isNaN(currArg)) {
|
|
argText = 'nan';
|
|
flagZeroPad = false;
|
|
} else if (!isFinite(currArg)) {
|
|
argText = (currArg < 0 ? '-' : '') + 'inf';
|
|
flagZeroPad = false;
|
|
} else {
|
|
var isGeneral = false;
|
|
var effectivePrecision = Math.min(precision, 20);
|
|
|
|
// Convert g/G to f/F or e/E, as per:
|
|
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html
|
|
if (next == 103 || next == 71) {
|
|
isGeneral = true;
|
|
precision = precision || 1;
|
|
var exponent = parseInt(currArg.toExponential(effectivePrecision).split('e')[1], 10);
|
|
if (precision > exponent && exponent >= -4) {
|
|
next = ((next == 103) ? 'f' : 'F').charCodeAt(0);
|
|
precision -= exponent + 1;
|
|
} else {
|
|
next = ((next == 103) ? 'e' : 'E').charCodeAt(0);
|
|
precision--;
|
|
}
|
|
effectivePrecision = Math.min(precision, 20);
|
|
}
|
|
|
|
if (next == 101 || next == 69) {
|
|
argText = currArg.toExponential(effectivePrecision);
|
|
// Make sure the exponent has at least 2 digits.
|
|
if (/[eE][-+]\d$/.test(argText)) {
|
|
argText = argText.slice(0, -1) + '0' + argText.slice(-1);
|
|
}
|
|
} else if (next == 102 || next == 70) {
|
|
argText = currArg.toFixed(effectivePrecision);
|
|
if (currArg === 0 && __reallyNegative(currArg)) {
|
|
argText = '-' + argText;
|
|
}
|
|
}
|
|
|
|
var parts = argText.split('e');
|
|
if (isGeneral && !flagAlternative) {
|
|
// Discard trailing zeros and periods.
|
|
while (parts[0].length > 1 && parts[0].indexOf('.') != -1 &&
|
|
(parts[0].slice(-1) == '0' || parts[0].slice(-1) == '.')) {
|
|
parts[0] = parts[0].slice(0, -1);
|
|
}
|
|
} else {
|
|
// Make sure we have a period in alternative mode.
|
|
if (flagAlternative && argText.indexOf('.') == -1) parts[0] += '.';
|
|
// Zero pad until required precision.
|
|
while (precision > effectivePrecision++) parts[0] += '0';
|
|
}
|
|
argText = parts[0] + (parts.length > 1 ? 'e' + parts[1] : '');
|
|
|
|
// Capitalize 'E' if needed.
|
|
if (next == 69) argText = argText.toUpperCase();
|
|
|
|
// Add sign.
|
|
if (currArg >= 0) {
|
|
if (flagAlwaysSigned) {
|
|
argText = '+' + argText;
|
|
} else if (flagPadSign) {
|
|
argText = ' ' + argText;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Add padding.
|
|
while (argText.length < width) {
|
|
if (flagLeftAlign) {
|
|
argText += ' ';
|
|
} else {
|
|
if (flagZeroPad && (argText[0] == '-' || argText[0] == '+')) {
|
|
argText = argText[0] + '0' + argText.slice(1);
|
|
} else {
|
|
argText = (flagZeroPad ? '0' : ' ') + argText;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Adjust case.
|
|
if (next < 97) argText = argText.toUpperCase();
|
|
|
|
// Insert the result into the buffer.
|
|
argText.split('').forEach(function(chr) {
|
|
ret.push(chr.charCodeAt(0));
|
|
});
|
|
break;
|
|
}
|
|
case 's': {
|
|
// String.
|
|
var arg = getNextArg('i8*');
|
|
var argLength = arg ? _strlen(arg) : '(null)'.length;
|
|
if (precisionSet) argLength = Math.min(argLength, precision);
|
|
if (!flagLeftAlign) {
|
|
while (argLength < width--) {
|
|
ret.push(32);
|
|
}
|
|
}
|
|
if (arg) {
|
|
for (var i = 0; i < argLength; i++) {
|
|
ret.push(HEAPU8[((arg++)|0)]);
|
|
}
|
|
} else {
|
|
ret = ret.concat(intArrayFromString('(null)'.substr(0, argLength), true));
|
|
}
|
|
if (flagLeftAlign) {
|
|
while (argLength < width--) {
|
|
ret.push(32);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 'c': {
|
|
// Character.
|
|
if (flagLeftAlign) ret.push(getNextArg('i8'));
|
|
while (--width > 0) {
|
|
ret.push(32);
|
|
}
|
|
if (!flagLeftAlign) ret.push(getNextArg('i8'));
|
|
break;
|
|
}
|
|
case 'n': {
|
|
// Write the length written so far to the next parameter.
|
|
var ptr = getNextArg('i32*');
|
|
HEAP32[((ptr)>>2)]=ret.length;
|
|
break;
|
|
}
|
|
case '%': {
|
|
// Literal percent sign.
|
|
ret.push(curr);
|
|
break;
|
|
}
|
|
default: {
|
|
// Unknown specifiers remain untouched.
|
|
for (var i = startTextIndex; i < textIndex + 2; i++) {
|
|
ret.push(HEAP8[(i)]);
|
|
}
|
|
}
|
|
}
|
|
textIndex += 2;
|
|
// TODO: Support a/A (hex float) and m (last error) specifiers.
|
|
// TODO: Support %1${specifier} for arg selection.
|
|
} else {
|
|
ret.push(curr);
|
|
textIndex += 1;
|
|
}
|
|
}
|
|
return ret;
|
|
}function _fprintf(stream, format, varargs) {
|
|
// int fprintf(FILE *restrict stream, const char *restrict format, ...);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html
|
|
var result = __formatString(format, varargs);
|
|
var stack = Runtime.stackSave();
|
|
var ret = _fwrite(allocate(result, 'i8', ALLOC_STACK), 1, result.length, stream);
|
|
Runtime.stackRestore(stack);
|
|
return ret;
|
|
}
|
|
|
|
|
|
var ___cxa_caught_exceptions=[];function ___cxa_begin_catch(ptr) {
|
|
__ZSt18uncaught_exceptionv.uncaught_exception--;
|
|
___cxa_caught_exceptions.push(___cxa_last_thrown_exception);
|
|
return ptr;
|
|
}
|
|
|
|
|
|
|
|
function __exit(status) {
|
|
// void _exit(int status);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html
|
|
Module['exit'](status);
|
|
}function _exit(status) {
|
|
__exit(status);
|
|
}function __ZSt9terminatev() {
|
|
_exit(-1234);
|
|
}
|
|
|
|
function ___cxa_end_catch() {
|
|
if (___cxa_end_catch.rethrown) {
|
|
___cxa_end_catch.rethrown = false;
|
|
return;
|
|
}
|
|
// Clear state flag.
|
|
asm['setThrew'](0);
|
|
// Call destructor if one is registered then clear it.
|
|
var ptr = ___cxa_caught_exceptions.pop();
|
|
if (ptr) {
|
|
header = ptr - ___cxa_exception_header_size;
|
|
var destructor = HEAP32[(((header)+(4))>>2)];
|
|
if (destructor) {
|
|
Runtime.dynCall('vi', destructor, [ptr]);
|
|
HEAP32[(((header)+(4))>>2)]=0;
|
|
}
|
|
___cxa_free_exception(ptr);
|
|
___cxa_last_thrown_exception = 0;
|
|
}
|
|
}
|
|
|
|
|
|
var _llvm_memset_p0i8_i32=_memset;
|
|
|
|
|
|
|
|
|
|
Module["_memmove"] = _memmove;var _llvm_memmove_p0i8_p0i8_i32=_memmove;
|
|
|
|
function _printf(format, varargs) {
|
|
// int printf(const char *restrict format, ...);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html
|
|
var stdout = HEAP32[((_stdout)>>2)];
|
|
return _fprintf(stdout, format, varargs);
|
|
}
|
|
|
|
|
|
function _snprintf(s, n, format, varargs) {
|
|
// int snprintf(char *restrict s, size_t n, const char *restrict format, ...);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html
|
|
var result = __formatString(format, varargs);
|
|
var limit = (n === undefined) ? result.length
|
|
: Math.min(result.length, Math.max(n - 1, 0));
|
|
if (s < 0) {
|
|
s = -s;
|
|
var buf = _malloc(limit+1);
|
|
HEAP32[((s)>>2)]=buf;
|
|
s = buf;
|
|
}
|
|
for (var i = 0; i < limit; i++) {
|
|
HEAP8[(((s)+(i))|0)]=result[i];
|
|
}
|
|
if (limit < n || (n === undefined)) HEAP8[(((s)+(i))|0)]=0;
|
|
return result.length;
|
|
}function _sprintf(s, format, varargs) {
|
|
// int sprintf(char *restrict s, const char *restrict format, ...);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html
|
|
return _snprintf(s, undefined, format, varargs);
|
|
}
|
|
|
|
function _llvm_umul_with_overflow_i32(x, y) {
|
|
x = x>>>0;
|
|
y = y>>>0;
|
|
return ((asm["setTempRet0"](x*y > 4294967295),(x*y)>>>0)|0);
|
|
}
|
|
|
|
function _llvm_uadd_with_overflow_i32(x, y) {
|
|
x = x>>>0;
|
|
y = y>>>0;
|
|
return ((asm["setTempRet0"](x+y > 4294967295),(x+y)>>>0)|0);
|
|
}
|
|
|
|
var _llvm_memcpy_p0i8_p0i8_i64=_memcpy;
|
|
|
|
function ___cxa_rethrow() {
|
|
___cxa_end_catch.rethrown = true;
|
|
var ptr = ___cxa_caught_exceptions.pop();
|
|
throw ptr + " - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.";
|
|
}
|
|
|
|
|
|
function _pthread_create() {
|
|
Module['printErr']('missing function: pthread_create'); abort(-1);
|
|
}
|
|
|
|
function _pthread_join() { throw 'TODO: ' + aborter }
|
|
|
|
function _pthread_mutex_init() {}
|
|
|
|
function _pthread_mutex_destroy() {}
|
|
|
|
function _pthread_mutex_lock() {}
|
|
|
|
function _pthread_mutex_unlock() {}
|
|
|
|
function _pthread_cond_init() {}
|
|
|
|
function _pthread_cond_destroy() {}
|
|
|
|
function _pthread_cond_broadcast() {
|
|
return 0;
|
|
}
|
|
|
|
function _pthread_cond_wait() {
|
|
return 0;
|
|
}
|
|
|
|
function _pthread_cond_signal() { throw 'TODO: ' + aborter }
|
|
|
|
var _llvm_va_start=undefined;
|
|
|
|
function _vfprintf(s, f, va_arg) {
|
|
return _fprintf(s, f, HEAP32[((va_arg)>>2)]);
|
|
}
|
|
|
|
function _llvm_va_end() {}
|
|
|
|
function ___cxa_guard_acquire(variable) {
|
|
if (!HEAP8[(variable)]) { // ignore SAFE_HEAP stuff because llvm mixes i64 and i8 here
|
|
HEAP8[(variable)]=1;
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
function ___cxa_guard_release() {}
|
|
|
|
|
|
function _atexit(func, arg) {
|
|
__ATEXIT__.unshift({ func: func, arg: arg });
|
|
}var ___cxa_atexit=_atexit;
|
|
|
|
function _ungetc(c, stream) {
|
|
// int ungetc(int c, FILE *stream);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/ungetc.html
|
|
stream = FS.getStreamFromPtr(stream);
|
|
if (!stream) {
|
|
return -1;
|
|
}
|
|
if (c === -1) {
|
|
// do nothing for EOF character
|
|
return c;
|
|
}
|
|
c = unSign(c & 0xFF);
|
|
stream.ungotten.push(c);
|
|
stream.eof = false;
|
|
return c;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function _recv(fd, buf, len, flags) {
|
|
var sock = SOCKFS.getSocket(fd);
|
|
if (!sock) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return -1;
|
|
}
|
|
// TODO honor flags
|
|
return _read(fd, buf, len);
|
|
}
|
|
|
|
function _pread(fildes, buf, nbyte, offset) {
|
|
// ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html
|
|
var stream = FS.getStream(fildes);
|
|
if (!stream) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return -1;
|
|
}
|
|
try {
|
|
var slab = HEAP8;
|
|
return FS.read(stream, slab, buf, nbyte, offset);
|
|
} catch (e) {
|
|
FS.handleFSError(e);
|
|
return -1;
|
|
}
|
|
}function _read(fildes, buf, nbyte) {
|
|
// ssize_t read(int fildes, void *buf, size_t nbyte);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html
|
|
var stream = FS.getStream(fildes);
|
|
if (!stream) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return -1;
|
|
}
|
|
|
|
|
|
try {
|
|
var slab = HEAP8;
|
|
return FS.read(stream, slab, buf, nbyte);
|
|
} catch (e) {
|
|
FS.handleFSError(e);
|
|
return -1;
|
|
}
|
|
}function _fread(ptr, size, nitems, stream) {
|
|
// size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fread.html
|
|
var bytesToRead = nitems * size;
|
|
if (bytesToRead == 0) {
|
|
return 0;
|
|
}
|
|
var bytesRead = 0;
|
|
var streamObj = FS.getStreamFromPtr(stream);
|
|
if (!streamObj) {
|
|
___setErrNo(ERRNO_CODES.EBADF);
|
|
return 0;
|
|
}
|
|
while (streamObj.ungotten.length && bytesToRead > 0) {
|
|
HEAP8[((ptr++)|0)]=streamObj.ungotten.pop();
|
|
bytesToRead--;
|
|
bytesRead++;
|
|
}
|
|
var err = _read(streamObj.fd, ptr, bytesToRead);
|
|
if (err == -1) {
|
|
if (streamObj) streamObj.error = true;
|
|
return 0;
|
|
}
|
|
bytesRead += err;
|
|
if (bytesRead < bytesToRead) streamObj.eof = true;
|
|
return Math.floor(bytesRead / size);
|
|
}function _fgetc(stream) {
|
|
// int fgetc(FILE *stream);
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fgetc.html
|
|
var streamObj = FS.getStreamFromPtr(stream);
|
|
if (!streamObj) return -1;
|
|
if (streamObj.eof || streamObj.error) return -1;
|
|
var ret = _fread(_fgetc.ret, 1, 1, stream);
|
|
if (ret == 0) {
|
|
return -1;
|
|
} else if (ret == -1) {
|
|
streamObj.error = true;
|
|
return -1;
|
|
} else {
|
|
return HEAPU8[((_fgetc.ret)|0)];
|
|
}
|
|
}var _getc=_fgetc;
|
|
|
|
function __ZNSt9exceptionD2Ev() {}
|
|
|
|
function ___errno_location() {
|
|
return ___errno_state;
|
|
}
|
|
|
|
|
|
function _strerror_r(errnum, strerrbuf, buflen) {
|
|
if (errnum in ERRNO_MESSAGES) {
|
|
if (ERRNO_MESSAGES[errnum].length > buflen - 1) {
|
|
return ___setErrNo(ERRNO_CODES.ERANGE);
|
|
} else {
|
|
var msg = ERRNO_MESSAGES[errnum];
|
|
writeAsciiToMemory(msg, strerrbuf);
|
|
return 0;
|
|
}
|
|
} else {
|
|
return ___setErrNo(ERRNO_CODES.EINVAL);
|
|
}
|
|
}function _strerror(errnum) {
|
|
if (!_strerror.buffer) _strerror.buffer = _malloc(256);
|
|
_strerror_r(errnum, _strerror.buffer, 256);
|
|
return _strerror.buffer;
|
|
}
|
|
|
|
function _abort() {
|
|
Module['abort']();
|
|
}
|
|
|
|
|
|
function _sysconf(name) {
|
|
// long sysconf(int name);
|
|
// http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html
|
|
switch(name) {
|
|
case 30: return PAGE_SIZE;
|
|
case 132:
|
|
case 133:
|
|
case 12:
|
|
case 137:
|
|
case 138:
|
|
case 15:
|
|
case 235:
|
|
case 16:
|
|
case 17:
|
|
case 18:
|
|
case 19:
|
|
case 20:
|
|
case 149:
|
|
case 13:
|
|
case 10:
|
|
case 236:
|
|
case 153:
|
|
case 9:
|
|
case 21:
|
|
case 22:
|
|
case 159:
|
|
case 154:
|
|
case 14:
|
|
case 77:
|
|
case 78:
|
|
case 139:
|
|
case 80:
|
|
case 81:
|
|
case 79:
|
|
case 82:
|
|
case 68:
|
|
case 67:
|
|
case 164:
|
|
case 11:
|
|
case 29:
|
|
case 47:
|
|
case 48:
|
|
case 95:
|
|
case 52:
|
|
case 51:
|
|
case 46:
|
|
return 200809;
|
|
case 27:
|
|
case 246:
|
|
case 127:
|
|
case 128:
|
|
case 23:
|
|
case 24:
|
|
case 160:
|
|
case 161:
|
|
case 181:
|
|
case 182:
|
|
case 242:
|
|
case 183:
|
|
case 184:
|
|
case 243:
|
|
case 244:
|
|
case 245:
|
|
case 165:
|
|
case 178:
|
|
case 179:
|
|
case 49:
|
|
case 50:
|
|
case 168:
|
|
case 169:
|
|
case 175:
|
|
case 170:
|
|
case 171:
|
|
case 172:
|
|
case 97:
|
|
case 76:
|
|
case 32:
|
|
case 173:
|
|
case 35:
|
|
return -1;
|
|
case 176:
|
|
case 177:
|
|
case 7:
|
|
case 155:
|
|
case 8:
|
|
case 157:
|
|
case 125:
|
|
case 126:
|
|
case 92:
|
|
case 93:
|
|
case 129:
|
|
case 130:
|
|
case 131:
|
|
case 94:
|
|
case 91:
|
|
return 1;
|
|
case 74:
|
|
case 60:
|
|
case 69:
|
|
case 70:
|
|
case 4:
|
|
return 1024;
|
|
case 31:
|
|
case 42:
|
|
case 72:
|
|
return 32;
|
|
case 87:
|
|
case 26:
|
|
case 33:
|
|
return 2147483647;
|
|
case 34:
|
|
case 1:
|
|
return 47839;
|
|
case 38:
|
|
case 36:
|
|
return 99;
|
|
case 43:
|
|
case 37:
|
|
return 2048;
|
|
case 0: return 2097152;
|
|
case 3: return 65536;
|
|
case 28: return 32768;
|
|
case 44: return 32767;
|
|
case 75: return 16384;
|
|
case 39: return 1000;
|
|
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: return 1;
|
|
}
|
|
___setErrNo(ERRNO_CODES.EINVAL);
|
|
return -1;
|
|
}
|
|
|
|
function ___cxa_guard_abort() {}
|
|
|
|
|
|
function _isxdigit(chr) {
|
|
return (chr >= 48 && chr <= 57) ||
|
|
(chr >= 97 && chr <= 102) ||
|
|
(chr >= 65 && chr <= 70);
|
|
}function _isxdigit_l(chr) {
|
|
return _isxdigit(chr); // no locale support yet
|
|
}
|
|
|
|
|
|
function _isdigit(chr) {
|
|
return chr >= 48 && chr <= 57;
|
|
}function _isdigit_l(chr) {
|
|
return _isdigit(chr); // no locale support yet
|
|
}
|
|
|
|
|
|
|
|
function __getFloat(text) {
|
|
return /^[+-]?[0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?/.exec(text);
|
|
}function __scanString(format, get, unget, varargs) {
|
|
if (!__scanString.whiteSpace) {
|
|
__scanString.whiteSpace = {};
|
|
__scanString.whiteSpace[32] = 1;
|
|
__scanString.whiteSpace[9] = 1;
|
|
__scanString.whiteSpace[10] = 1;
|
|
__scanString.whiteSpace[11] = 1;
|
|
__scanString.whiteSpace[12] = 1;
|
|
__scanString.whiteSpace[13] = 1;
|
|
}
|
|
// Supports %x, %4x, %d.%d, %lld, %s, %f, %lf.
|
|
// TODO: Support all format specifiers.
|
|
format = Pointer_stringify(format);
|
|
var soFar = 0;
|
|
if (format.indexOf('%n') >= 0) {
|
|
// need to track soFar
|
|
var _get = get;
|
|
get = function get() {
|
|
soFar++;
|
|
return _get();
|
|
}
|
|
var _unget = unget;
|
|
unget = function unget() {
|
|
soFar--;
|
|
return _unget();
|
|
}
|
|
}
|
|
var formatIndex = 0;
|
|
var argsi = 0;
|
|
var fields = 0;
|
|
var argIndex = 0;
|
|
var next;
|
|
|
|
mainLoop:
|
|
for (var formatIndex = 0; formatIndex < format.length;) {
|
|
if (format[formatIndex] === '%' && format[formatIndex+1] == 'n') {
|
|
var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];
|
|
argIndex += Runtime.getAlignSize('void*', null, true);
|
|
HEAP32[((argPtr)>>2)]=soFar;
|
|
formatIndex += 2;
|
|
continue;
|
|
}
|
|
|
|
if (format[formatIndex] === '%') {
|
|
var nextC = format.indexOf('c', formatIndex+1);
|
|
if (nextC > 0) {
|
|
var maxx = 1;
|
|
if (nextC > formatIndex+1) {
|
|
var sub = format.substring(formatIndex+1, nextC);
|
|
maxx = parseInt(sub);
|
|
if (maxx != sub) maxx = 0;
|
|
}
|
|
if (maxx) {
|
|
var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];
|
|
argIndex += Runtime.getAlignSize('void*', null, true);
|
|
fields++;
|
|
for (var i = 0; i < maxx; i++) {
|
|
next = get();
|
|
HEAP8[((argPtr++)|0)]=next;
|
|
if (next === 0) return i > 0 ? fields : fields-1; // we failed to read the full length of this field
|
|
}
|
|
formatIndex += nextC - formatIndex + 1;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
// handle %[...]
|
|
if (format[formatIndex] === '%' && format.indexOf('[', formatIndex+1) > 0) {
|
|
var match = /\%([0-9]*)\[(\^)?(\]?[^\]]*)\]/.exec(format.substring(formatIndex));
|
|
if (match) {
|
|
var maxNumCharacters = parseInt(match[1]) || Infinity;
|
|
var negateScanList = (match[2] === '^');
|
|
var scanList = match[3];
|
|
|
|
// expand "middle" dashs into character sets
|
|
var middleDashMatch;
|
|
while ((middleDashMatch = /([^\-])\-([^\-])/.exec(scanList))) {
|
|
var rangeStartCharCode = middleDashMatch[1].charCodeAt(0);
|
|
var rangeEndCharCode = middleDashMatch[2].charCodeAt(0);
|
|
for (var expanded = ''; rangeStartCharCode <= rangeEndCharCode; expanded += String.fromCharCode(rangeStartCharCode++));
|
|
scanList = scanList.replace(middleDashMatch[1] + '-' + middleDashMatch[2], expanded);
|
|
}
|
|
|
|
var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];
|
|
argIndex += Runtime.getAlignSize('void*', null, true);
|
|
fields++;
|
|
|
|
for (var i = 0; i < maxNumCharacters; i++) {
|
|
next = get();
|
|
if (negateScanList) {
|
|
if (scanList.indexOf(String.fromCharCode(next)) < 0) {
|
|
HEAP8[((argPtr++)|0)]=next;
|
|
} else {
|
|
unget();
|
|
break;
|
|
}
|
|
} else {
|
|
if (scanList.indexOf(String.fromCharCode(next)) >= 0) {
|
|
HEAP8[((argPtr++)|0)]=next;
|
|
} else {
|
|
unget();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
// write out null-terminating character
|
|
HEAP8[((argPtr++)|0)]=0;
|
|
formatIndex += match[0].length;
|
|
|
|
continue;
|
|
}
|
|
}
|
|
// remove whitespace
|
|
while (1) {
|
|
next = get();
|
|
if (next == 0) return fields;
|
|
if (!(next in __scanString.whiteSpace)) break;
|
|
}
|
|
unget();
|
|
|
|
if (format[formatIndex] === '%') {
|
|
formatIndex++;
|
|
var suppressAssignment = false;
|
|
if (format[formatIndex] == '*') {
|
|
suppressAssignment = true;
|
|
formatIndex++;
|
|
}
|
|
var maxSpecifierStart = formatIndex;
|
|
while (format[formatIndex].charCodeAt(0) >= 48 &&
|
|
format[formatIndex].charCodeAt(0) <= 57) {
|
|
formatIndex++;
|
|
}
|
|
var max_;
|
|
if (formatIndex != maxSpecifierStart) {
|
|
max_ = parseInt(format.slice(maxSpecifierStart, formatIndex), 10);
|
|
}
|
|
var long_ = false;
|
|
var half = false;
|
|
var longLong = false;
|
|
if (format[formatIndex] == 'l') {
|
|
long_ = true;
|
|
formatIndex++;
|
|
if (format[formatIndex] == 'l') {
|
|
longLong = true;
|
|
formatIndex++;
|
|
}
|
|
} else if (format[formatIndex] == 'h') {
|
|
half = true;
|
|
formatIndex++;
|
|
}
|
|
var type = format[formatIndex];
|
|
formatIndex++;
|
|
var curr = 0;
|
|
var buffer = [];
|
|
// Read characters according to the format. floats are trickier, they may be in an unfloat state in the middle, then be a valid float later
|
|
if (type == 'f' || type == 'e' || type == 'g' ||
|
|
type == 'F' || type == 'E' || type == 'G') {
|
|
next = get();
|
|
while (next > 0 && (!(next in __scanString.whiteSpace))) {
|
|
buffer.push(String.fromCharCode(next));
|
|
next = get();
|
|
}
|
|
var m = __getFloat(buffer.join(''));
|
|
var last = m ? m[0].length : 0;
|
|
for (var i = 0; i < buffer.length - last + 1; i++) {
|
|
unget();
|
|
}
|
|
buffer.length = last;
|
|
} else {
|
|
next = get();
|
|
var first = true;
|
|
|
|
// Strip the optional 0x prefix for %x.
|
|
if ((type == 'x' || type == 'X') && (next == 48)) {
|
|
var peek = get();
|
|
if (peek == 120 || peek == 88) {
|
|
next = get();
|
|
} else {
|
|
unget();
|
|
}
|
|
}
|
|
|
|
while ((curr < max_ || isNaN(max_)) && next > 0) {
|
|
if (!(next in __scanString.whiteSpace) && // stop on whitespace
|
|
(type == 's' ||
|
|
((type === 'd' || type == 'u' || type == 'i') && ((next >= 48 && next <= 57) ||
|
|
(first && next == 45))) ||
|
|
((type === 'x' || type === 'X') && (next >= 48 && next <= 57 ||
|
|
next >= 97 && next <= 102 ||
|
|
next >= 65 && next <= 70))) &&
|
|
(formatIndex >= format.length || next !== format[formatIndex].charCodeAt(0))) { // Stop when we read something that is coming up
|
|
buffer.push(String.fromCharCode(next));
|
|
next = get();
|
|
curr++;
|
|
first = false;
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
unget();
|
|
}
|
|
if (buffer.length === 0) return 0; // Failure.
|
|
if (suppressAssignment) continue;
|
|
|
|
var text = buffer.join('');
|
|
var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];
|
|
argIndex += Runtime.getAlignSize('void*', null, true);
|
|
switch (type) {
|
|
case 'd': case 'u': case 'i':
|
|
if (half) {
|
|
HEAP16[((argPtr)>>1)]=parseInt(text, 10);
|
|
} else if (longLong) {
|
|
(tempI64 = [parseInt(text, 10)>>>0,(tempDouble=parseInt(text, 10),(+(Math_abs(tempDouble))) >= (+1) ? (tempDouble > (+0) ? ((Math_min((+(Math_floor((tempDouble)/(+4294967296)))), (+4294967295)))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/(+4294967296))))))>>>0) : 0)],HEAP32[((argPtr)>>2)]=tempI64[0],HEAP32[(((argPtr)+(4))>>2)]=tempI64[1]);
|
|
} else {
|
|
HEAP32[((argPtr)>>2)]=parseInt(text, 10);
|
|
}
|
|
break;
|
|
case 'X':
|
|
case 'x':
|
|
HEAP32[((argPtr)>>2)]=parseInt(text, 16);
|
|
break;
|
|
case 'F':
|
|
case 'f':
|
|
case 'E':
|
|
case 'e':
|
|
case 'G':
|
|
case 'g':
|
|
case 'E':
|
|
// fallthrough intended
|
|
if (long_) {
|
|
HEAPF64[((argPtr)>>3)]=parseFloat(text);
|
|
} else {
|
|
HEAPF32[((argPtr)>>2)]=parseFloat(text);
|
|
}
|
|
break;
|
|
case 's':
|
|
var array = intArrayFromString(text);
|
|
for (var j = 0; j < array.length; j++) {
|
|
HEAP8[(((argPtr)+(j))|0)]=array[j];
|
|
}
|
|
break;
|
|
}
|
|
fields++;
|
|
} else if (format[formatIndex].charCodeAt(0) in __scanString.whiteSpace) {
|
|
next = get();
|
|
while (next in __scanString.whiteSpace) {
|
|
if (next <= 0) break mainLoop; // End of input.
|
|
next = get();
|
|
}
|
|
unget(next);
|
|
formatIndex++;
|
|
} else {
|
|
// Not a specifier.
|
|
next = get();
|
|
if (format[formatIndex].charCodeAt(0) !== next) {
|
|
unget(next);
|
|
break mainLoop;
|
|
}
|
|
formatIndex++;
|
|
}
|
|
}
|
|
return fields;
|
|
}function _sscanf(s, format, varargs) {
|
|
// int sscanf(const char *restrict s, const char *restrict format, ... );
|
|
// http://pubs.opengroup.org/onlinepubs/000095399/functions/scanf.html
|
|
var index = 0;
|
|
function get() { return HEAP8[(((s)+(index++))|0)]; };
|
|
function unget() { index--; };
|
|
return __scanString(format, get, unget, varargs);
|
|
}
|
|
|
|
function _catopen(name, oflag) {
|
|
// nl_catd catopen (const char *name, int oflag)
|
|
return -1;
|
|
}
|
|
|
|
function _catgets(catd, set_id, msg_id, s) {
|
|
// char *catgets (nl_catd catd, int set_id, int msg_id, const char *s)
|
|
return s;
|
|
}
|
|
|
|
function _catclose(catd) {
|
|
// int catclose (nl_catd catd)
|
|
return 0;
|
|
}
|
|
|
|
function _newlocale(mask, locale, base) {
|
|
return _malloc(4);
|
|
}
|
|
|
|
function _freelocale(locale) {
|
|
_free(locale);
|
|
}
|
|
|
|
function ___ctype_b_loc() {
|
|
// http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/baselib---ctype-b-loc.html
|
|
var me = ___ctype_b_loc;
|
|
if (!me.ret) {
|
|
var values = [
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,2,2,2,2,2,2,2,2,8195,8194,8194,8194,8194,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,24577,49156,49156,49156,
|
|
49156,49156,49156,49156,49156,49156,49156,49156,49156,49156,49156,49156,55304,55304,55304,55304,55304,55304,55304,55304,
|
|
55304,55304,49156,49156,49156,49156,49156,49156,49156,54536,54536,54536,54536,54536,54536,50440,50440,50440,50440,50440,
|
|
50440,50440,50440,50440,50440,50440,50440,50440,50440,50440,50440,50440,50440,50440,50440,49156,49156,49156,49156,49156,
|
|
49156,54792,54792,54792,54792,54792,54792,50696,50696,50696,50696,50696,50696,50696,50696,50696,50696,50696,50696,50696,
|
|
50696,50696,50696,50696,50696,50696,50696,49156,49156,49156,49156,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
|
|
];
|
|
var i16size = 2;
|
|
var arr = _malloc(values.length * i16size);
|
|
for (var i = 0; i < values.length; i++) {
|
|
HEAP16[(((arr)+(i * i16size))>>1)]=values[i];
|
|
}
|
|
me.ret = allocate([arr + 128 * i16size], 'i16*', ALLOC_NORMAL);
|
|
}
|
|
return me.ret;
|
|
}
|
|
|
|
function ___ctype_tolower_loc() {
|
|
// http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/libutil---ctype-tolower-loc.html
|
|
var me = ___ctype_tolower_loc;
|
|
if (!me.ret) {
|
|
var values = [
|
|
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,
|
|
158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,
|
|
188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,
|
|
218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
248,249,250,251,252,253,254,-1,0,1,2,3,4,5,6,7,8,9,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,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,97,98,99,100,101,102,103,
|
|
104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,91,92,93,94,95,96,97,98,99,100,101,102,103,
|
|
104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,
|
|
134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,
|
|
164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,
|
|
194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
|
|
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,
|
|
254,255
|
|
];
|
|
var i32size = 4;
|
|
var arr = _malloc(values.length * i32size);
|
|
for (var i = 0; i < values.length; i++) {
|
|
HEAP32[(((arr)+(i * i32size))>>2)]=values[i];
|
|
}
|
|
me.ret = allocate([arr + 128 * i32size], 'i32*', ALLOC_NORMAL);
|
|
}
|
|
return me.ret;
|
|
}
|
|
|
|
function ___ctype_toupper_loc() {
|
|
// http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/libutil---ctype-toupper-loc.html
|
|
var me = ___ctype_toupper_loc;
|
|
if (!me.ret) {
|
|
var values = [
|
|
128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,
|
|
158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,
|
|
188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,
|
|
218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,
|
|
248,249,250,251,252,253,254,-1,0,1,2,3,4,5,6,7,8,9,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,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,
|
|
73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,
|
|
81,82,83,84,85,86,87,88,89,90,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,
|
|
145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,
|
|
175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,
|
|
205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,
|
|
235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
|
|
];
|
|
var i32size = 4;
|
|
var arr = _malloc(values.length * i32size);
|
|
for (var i = 0; i < values.length; i++) {
|
|
HEAP32[(((arr)+(i * i32size))>>2)]=values[i];
|
|
}
|
|
me.ret = allocate([arr + 128 * i32size], 'i32*', ALLOC_NORMAL);
|
|
}
|
|
return me.ret;
|
|
}
|
|
|
|
|
|
|
|
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()) {
|
|
// we spill over to next month
|
|
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 {
|
|
// we stay in current month
|
|
newDate.setDate(newDate.getDate()+days);
|
|
return newDate;
|
|
}
|
|
}
|
|
|
|
return newDate;
|
|
}function _strftime(s, maxsize, format, tm) {
|
|
// size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr);
|
|
// http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
|
|
|
|
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)]
|
|
};
|
|
|
|
var pattern = Pointer_stringify(format);
|
|
|
|
// expand format
|
|
var EXPANSION_RULES_1 = {
|
|
'%c': '%a %b %d %H:%M:%S %Y', // Replaced by the locale's appropriate date and time representation - e.g., Mon Aug 3 14:02:01 2013
|
|
'%D': '%m/%d/%y', // Equivalent to %m / %d / %y
|
|
'%F': '%Y-%m-%d', // Equivalent to %Y - %m - %d
|
|
'%h': '%b', // Equivalent to %b
|
|
'%r': '%I:%M:%S %p', // Replaced by the time in a.m. and p.m. notation
|
|
'%R': '%H:%M', // Replaced by the time in 24-hour notation
|
|
'%T': '%H:%M:%S', // Replaced by the time
|
|
'%x': '%m/%d/%y', // Replaced by the locale's appropriate date representation
|
|
'%X': '%H:%M:%S', // Replaced by the locale's appropriate date representation
|
|
};
|
|
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.length < digits) {
|
|
str = character[0]+str;
|
|
}
|
|
return str;
|
|
};
|
|
|
|
function leadingNulls(value, digits) {
|
|
return leadingSomething(value, digits, '0');
|
|
};
|
|
|
|
function compareByDay(date1, date2) {
|
|
function sgn(value) {
|
|
return value < 0 ? -1 : (value > 0 ? 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: // Sunday
|
|
return new Date(janFourth.getFullYear()-1, 11, 29);
|
|
case 1: // Monday
|
|
return janFourth;
|
|
case 2: // Tuesday
|
|
return new Date(janFourth.getFullYear(), 0, 3);
|
|
case 3: // Wednesday
|
|
return new Date(janFourth.getFullYear(), 0, 2);
|
|
case 4: // Thursday
|
|
return new Date(janFourth.getFullYear(), 0, 1);
|
|
case 5: // Friday
|
|
return new Date(janFourth.getFullYear()-1, 11, 31);
|
|
case 6: // Saturday
|
|
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) {
|
|
// this date is after the start of the first week of this year
|
|
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(Math.floor(year/100),2);
|
|
},
|
|
'%d': function(date) {
|
|
return leadingNulls(date.tm_mday, 2);
|
|
},
|
|
'%e': function(date) {
|
|
return leadingSomething(date.tm_mday, 2, ' ');
|
|
},
|
|
'%g': function(date) {
|
|
// %g, %G, and %V give values according to the ISO 8601:2000 standard week-based year.
|
|
// In this system, weeks begin on a Monday and week 1 of the year is the week that includes
|
|
// January 4th, which is also the week that includes the first Thursday of the year, and
|
|
// is also the first week that contains at least four days in the year.
|
|
// If the first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of
|
|
// the last week of the preceding year; thus, for Saturday 2nd January 1999,
|
|
// %G is replaced by 1998 and %V is replaced by 53. If December 29th, 30th,
|
|
// or 31st is a Monday, it and any following days are part of week 1 of the following year.
|
|
// Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and %V is replaced by 01.
|
|
|
|
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) {
|
|
// Day of the year (001-366)
|
|
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) {
|
|
// Replaced by the week number of the year as a decimal number [00,53].
|
|
// The first Sunday of January is the first day of week 1;
|
|
// days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]
|
|
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);
|
|
|
|
// is target date after the first Sunday?
|
|
if (compareByDay(firstSunday, endDate) < 0) {
|
|
// calculate difference in days between first Sunday and endDate
|
|
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) {
|
|
// Replaced by the week number of the year (Monday as the first day of the week)
|
|
// as a decimal number [01,53]. If the week containing 1 January has four
|
|
// or more days in the new year, then it is considered week 1.
|
|
// Otherwise, it is the last week of the previous year, and the next week is week 1.
|
|
// Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday]
|
|
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) {
|
|
// if given date is before this years first week, then it belongs to the 53rd week of last year
|
|
return '53';
|
|
}
|
|
|
|
if (compareByDay(firstWeekStartNextYear, endDate) <= 0) {
|
|
// if given date is after next years first week, then it belongs to the 01th week of next year
|
|
return '01';
|
|
}
|
|
|
|
// given date is in between CW 01..53 of this calendar year
|
|
var daysDifference;
|
|
if (firstWeekStartThisYear.getFullYear() < date.tm_year+1900) {
|
|
// first CW of this year starts last year
|
|
daysDifference = date.tm_yday+32-firstWeekStartThisYear.getDate()
|
|
} else {
|
|
// first CW of this year starts this year
|
|
daysDifference = date.tm_yday+1-firstWeekStartThisYear.getDate();
|
|
}
|
|
return leadingNulls(Math.ceil(daysDifference/7), 2);
|
|
},
|
|
'%w': function(date) {
|
|
var day = new Date(date.tm_year+1900, date.tm_mon+1, date.tm_mday, 0, 0, 0, 0);
|
|
return day.getDay();
|
|
},
|
|
'%W': function(date) {
|
|
// Replaced by the week number of the year as a decimal number [00,53].
|
|
// The first Monday of January is the first day of week 1;
|
|
// days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]
|
|
var janFirst = new Date(date.tm_year, 0, 1);
|
|
var firstMonday = janFirst.getDay() === 1 ? janFirst : __addDays(janFirst, janFirst.getDay() === 0 ? 1 : 7-janFirst.getDay()+1);
|
|
var endDate = new Date(date.tm_year+1900, date.tm_mon, date.tm_mday);
|
|
|
|
// is target date after the first Monday?
|
|
if (compareByDay(firstMonday, endDate) < 0) {
|
|
var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth()-1)-31;
|
|
var firstMondayUntilEndJanuary = 31-firstMonday.getDate();
|
|
var days = firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();
|
|
return leadingNulls(Math.ceil(days/7), 2);
|
|
}
|
|
return compareByDay(firstMonday, janFirst) === 0 ? '01': '00';
|
|
},
|
|
'%y': function(date) {
|
|
// Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year]
|
|
return (date.tm_year+1900).toString().substring(2);
|
|
},
|
|
'%Y': function(date) {
|
|
// Replaced by the year as a decimal number (for example, 1997). [ tm_year]
|
|
return date.tm_year+1900;
|
|
},
|
|
'%z': function(date) {
|
|
// Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ),
|
|
// or by no characters if no timezone is determinable.
|
|
// For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich).
|
|
// If tm_isdst is zero, the standard time offset is used.
|
|
// If tm_isdst is greater than zero, the daylight savings time offset is used.
|
|
// If tm_isdst is negative, no characters are returned.
|
|
// FIXME: we cannot determine time zone (or can we?)
|
|
return '';
|
|
},
|
|
'%Z': function(date) {
|
|
// Replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. [ tm_isdst]
|
|
// FIXME: we cannot determine time zone (or can we?)
|
|
return '';
|
|
},
|
|
'%%': 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); // no locale support yet
|
|
}
|
|
|
|
|
|
|
|
|
|
function _isspace(chr) {
|
|
return (chr == 32) || (chr >= 9 && chr <= 13);
|
|
}
|
|
function __parseInt64(str, endptr, base, min, max, unsign) {
|
|
var isNegative = false;
|
|
// Skip space.
|
|
while (_isspace(HEAP8[(str)])) str++;
|
|
|
|
// Check for a plus/minus sign.
|
|
if (HEAP8[(str)] == 45) {
|
|
str++;
|
|
isNegative = true;
|
|
} else if (HEAP8[(str)] == 43) {
|
|
str++;
|
|
}
|
|
|
|
// Find base.
|
|
var ok = false;
|
|
var finalBase = base;
|
|
if (!finalBase) {
|
|
if (HEAP8[(str)] == 48) {
|
|
if (HEAP8[((str+1)|0)] == 120 ||
|
|
HEAP8[((str+1)|0)] == 88) {
|
|
finalBase = 16;
|
|
str += 2;
|
|
} else {
|
|
finalBase = 8;
|
|
ok = true; // we saw an initial zero, perhaps the entire thing is just "0"
|
|
}
|
|
}
|
|
} else if (finalBase==16) {
|
|
if (HEAP8[(str)] == 48) {
|
|
if (HEAP8[((str+1)|0)] == 120 ||
|
|
HEAP8[((str+1)|0)] == 88) {
|
|
str += 2;
|
|
}
|
|
}
|
|
}
|
|
if (!finalBase) finalBase = 10;
|
|
var start = str;
|
|
|
|
// Get digits.
|
|
var chr;
|
|
while ((chr = HEAP8[(str)]) != 0) {
|
|
var digit = parseInt(String.fromCharCode(chr), finalBase);
|
|
if (isNaN(digit)) {
|
|
break;
|
|
} else {
|
|
str++;
|
|
ok = true;
|
|
}
|
|
}
|
|
|
|
if (!ok) {
|
|
___setErrNo(ERRNO_CODES.EINVAL);
|
|
return ((asm["setTempRet0"](0),0)|0);
|
|
}
|
|
|
|
// Set end pointer.
|
|
if (endptr) {
|
|
HEAP32[((endptr)>>2)]=str;
|
|
}
|
|
|
|
try {
|
|
var numberString = isNegative ? '-'+Pointer_stringify(start, str - start) : Pointer_stringify(start, str - start);
|
|
i64Math.fromString(numberString, finalBase, min, max, unsign);
|
|
} catch(e) {
|
|
___setErrNo(ERRNO_CODES.ERANGE); // not quite correct
|
|
}
|
|
|
|
return ((asm["setTempRet0"](((HEAP32[(((tempDoublePtr)+(4))>>2)])|0)),((HEAP32[((tempDoublePtr)>>2)])|0))|0);
|
|
}function _strtoull(str, endptr, base) {
|
|
return __parseInt64(str, endptr, base, 0, '18446744073709551615', true); // ULONG_MAX.
|
|
}function _strtoull_l(str, endptr, base) {
|
|
return _strtoull(str, endptr, base); // no locale support yet
|
|
}
|
|
|
|
|
|
function _strtoll(str, endptr, base) {
|
|
return __parseInt64(str, endptr, base, '-9223372036854775808', '9223372036854775807'); // LLONG_MIN, LLONG_MAX.
|
|
}function _strtoll_l(str, endptr, base) {
|
|
return _strtoll(str, endptr, base); // no locale support yet
|
|
}
|
|
|
|
function _uselocale(locale) {
|
|
return 0;
|
|
}
|
|
|
|
|
|
function _asprintf(s, format, varargs) {
|
|
return _sprintf(-s, format, varargs);
|
|
}function _vasprintf(s, format, va_arg) {
|
|
return _asprintf(s, format, HEAP32[((va_arg)>>2)]);
|
|
}
|
|
|
|
function _vsnprintf(s, n, format, va_arg) {
|
|
return _snprintf(s, n, format, HEAP32[((va_arg)>>2)]);
|
|
}
|
|
|
|
function _vsscanf(s, format, va_arg) {
|
|
return _sscanf(s, format, HEAP32[((va_arg)>>2)]);
|
|
}
|
|
|
|
|
|
var _fabs=Math_abs;
|
|
|
|
function _sbrk(bytes) {
|
|
// Implement a Linux-like 'memory area' for our 'process'.
|
|
// Changes the size of the memory area by |bytes|; returns the
|
|
// address of the previous top ('break') of the memory area
|
|
// We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP
|
|
var self = _sbrk;
|
|
if (!self.called) {
|
|
DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned
|
|
self.called = true;
|
|
assert(Runtime.dynamicAlloc);
|
|
self.alloc = Runtime.dynamicAlloc;
|
|
Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') };
|
|
}
|
|
var ret = DYNAMICTOP;
|
|
if (bytes != 0) self.alloc(bytes);
|
|
return ret; // Previous break location.
|
|
}
|
|
|
|
function _time(ptr) {
|
|
var ret = Math.floor(Date.now()/1000);
|
|
if (ptr) {
|
|
HEAP32[((ptr)>>2)]=ret;
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
function ___cxa_call_unexpected(exception) {
|
|
Module.printErr('Unexpected exception thrown, this is not properly supported - aborting');
|
|
ABORT = true;
|
|
throw exception;
|
|
}
|
|
|
|
|
|
function _copysign(a, b) {
|
|
return __reallyNegative(a) === __reallyNegative(b) ? a : -a;
|
|
}var _copysignl=_copysign;
|
|
|
|
|
|
function _fmod(x, y) {
|
|
return x % y;
|
|
}var _fmodl=_fmod;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module["_emscripten_replace_memory"] = _emscripten_replace_memory;
|
|
FS.staticInit();__ATINIT__.unshift({ func: function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;
|
|
___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0;
|
|
__ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor();
|
|
if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); NODEFS.staticInit(); }
|
|
__ATINIT__.push({ func: function() { SOCKFS.root = FS.mount(SOCKFS, {}, null); } });
|
|
_fgetc.ret = allocate([0], "i8", ALLOC_STATIC);
|
|
STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP);
|
|
|
|
staticSealed = true; // seal the static portion of memory
|
|
|
|
STACK_MAX = STACK_BASE + 5242880;
|
|
|
|
DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX);
|
|
|
|
assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack");
|
|
|
|
var ctlz_i8 = allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "i8", ALLOC_DYNAMIC);
|
|
var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC);
|
|
|
|
var Math_min = Math.min;
|
|
function invoke_viiiii(index,a1,a2,a3,a4,a5) {
|
|
try {
|
|
Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_vi(index,a1) {
|
|
try {
|
|
Module["dynCall_vi"](index,a1);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_vii(index,a1,a2) {
|
|
try {
|
|
Module["dynCall_vii"](index,a1,a2);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_ii(index,a1) {
|
|
try {
|
|
return Module["dynCall_ii"](index,a1);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_iiiiii(index,a1,a2,a3,a4,a5) {
|
|
try {
|
|
return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_iiii(index,a1,a2,a3) {
|
|
try {
|
|
return Module["dynCall_iiii"](index,a1,a2,a3);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiid(index,a1,a2,a3,a4,a5,a6) {
|
|
try {
|
|
Module["dynCall_viiiiid"](index,a1,a2,a3,a4,a5,a6);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
try {
|
|
Module["dynCall_viiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6) {
|
|
try {
|
|
Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) {
|
|
try {
|
|
Module["dynCall_viiiiiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
try {
|
|
Module["dynCall_viiiiiii"](index,a1,a2,a3,a4,a5,a6,a7);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiid(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
try {
|
|
Module["dynCall_viiiiiid"](index,a1,a2,a3,a4,a5,a6,a7);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
try {
|
|
Module["dynCall_viiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
|
|
try {
|
|
Module["dynCall_viiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_iii(index,a1,a2) {
|
|
try {
|
|
return Module["dynCall_iii"](index,a1,a2);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) {
|
|
try {
|
|
Module["dynCall_viiiiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_iiiii(index,a1,a2,a3,a4) {
|
|
try {
|
|
return Module["dynCall_iiiii"](index,a1,a2,a3,a4);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viii(index,a1,a2,a3) {
|
|
try {
|
|
Module["dynCall_viii"](index,a1,a2,a3);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_v(index) {
|
|
try {
|
|
Module["dynCall_v"](index);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
try {
|
|
return Module["dynCall_iiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viiii(index,a1,a2,a3,a4) {
|
|
try {
|
|
Module["dynCall_viiii"](index,a1,a2,a3,a4);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function asmPrintInt(x, y) {
|
|
Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack);
|
|
}
|
|
function asmPrintFloat(x, y) {
|
|
Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack);
|
|
}
|
|
// EMSCRIPTEN_START_ASM
|
|
var asm=(function(global,env,buffer){"almost asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.cttz_i8|0;var n=env.ctlz_i8|0;var o=env._stdin|0;var p=env.__ZTVN10__cxxabiv117__class_type_infoE|0;var q=env._stderr|0;var r=env.__ZTISt9exception|0;var s=env.__ZTVN10__cxxabiv120__si_class_type_infoE|0;var t=env._stdout|0;var u=env.___dso_handle|0;var v=+env.NaN;var w=+env.Infinity;var x=0;var y=0;var z=0;var A=0;var B=0,C=0,D=0,E=0,F=0.0,G=0,H=0,I=0,J=0.0;var K=0;var L=0;var M=0;var N=0;var O=0;var P=0;var Q=0;var R=0;var S=0;var T=0;var U=global.Math.floor;var V=global.Math.abs;var W=global.Math.sqrt;var X=global.Math.pow;var Y=global.Math.cos;var Z=global.Math.sin;var _=global.Math.tan;var $=global.Math.acos;var aa=global.Math.asin;var ba=global.Math.atan;var ca=global.Math.atan2;var da=global.Math.exp;var ea=global.Math.log;var fa=global.Math.ceil;var ga=global.Math.imul;var ha=env.abort;var ia=env.assert;var ja=env.asmPrintInt;var ka=env.asmPrintFloat;var la=env.min;var ma=env.invoke_viiiii;var na=env.invoke_vi;var oa=env.invoke_vii;var pa=env.invoke_ii;var qa=env.invoke_iiiiii;var ra=env.invoke_iiii;var sa=env.invoke_viiiiid;var ta=env.invoke_viiiiiiii;var ua=env.invoke_viiiiii;var va=env.invoke_viiiiiiiiiiiii;var wa=env.invoke_viiiiiii;var xa=env.invoke_viiiiiid;var ya=env.invoke_viiiiiiiii;var za=env.invoke_viiiiiiiiii;var Aa=env.invoke_iii;var Ba=env.invoke_viiiiiiiiiiii;var Ca=env.invoke_iiiii;var Da=env.invoke_viii;var Ea=env.invoke_v;var Fa=env.invoke_iiiiiiiii;var Ga=env.invoke_viiii;var Ha=env._llvm_lifetime_end;var Ia=env.__scanString;var Ja=env._pthread_mutex_lock;var Ka=env.___cxa_end_catch;var La=env._strtoull;var Ma=env._fflush;var Na=env.__isLeapYear;var Oa=env._fwrite;var Pa=env._send;var Qa=env._pthread_mutex_init;var Ra=env._llvm_umul_with_overflow_i32;var Sa=env._isspace;var Ta=env._read;var Ua=env._isxdigit_l;var Va=env._fileno;var Wa=env.___cxa_guard_abort;var Xa=env._newlocale;var Ya=env.___gxx_personality_v0;var Za=env._pthread_cond_wait;var _a=env.___cxa_rethrow;var $a=env._fmod;var ab=env.___resumeException;var bb=env._llvm_va_end;var cb=env._vsscanf;var db=env._snprintf;var eb=env._fgetc;var fb=env.__getFloat;var gb=env._pthread_cond_signal;var hb=env.___cxa_free_exception;var ib=env._isdigit_l;var jb=env.___setErrNo;var kb=env._isxdigit;var lb=env._exit;var mb=env._sprintf;var nb=env._asprintf;var ob=env.___ctype_b_loc;var pb=env._freelocale;var qb=env._catgets;var rb=env.___cxa_is_number_type;var sb=env._llvm_uadd_with_overflow_i32;var tb=env.___cxa_does_inherit;var ub=env.___cxa_guard_acquire;var vb=env.___cxa_begin_catch;var wb=env._emscripten_memcpy_big;var xb=env._recv;var yb=env.__parseInt64;var zb=env.__ZSt18uncaught_exceptionv;var Ab=env.__ZNSt9exceptionD2Ev;var Bb=env._mkport;var Cb=env._copysign;var Db=env.__exit;var Eb=env._strftime;var Fb=env.___cxa_throw;var Gb=env._printf;var Hb=env._pread;var Ib=env._strtoull_l;var Jb=env.__arraySum;var Kb=env._sysconf;var Lb=env._strtoll_l;var Mb=env.___cxa_find_matching_catch;var Nb=env.__formatString;var Ob=env._pthread_cond_broadcast;var Pb=env.__ZSt9terminatev;var Qb=env._vfprintf;var Rb=env._pthread_mutex_unlock;var Sb=env.___cxa_call_unexpected;var Tb=env._sbrk;var Ub=env._atexit;var Vb=env.___errno_location;var Wb=env._strerror;var Xb=env._pthread_mutex_destroy;var Yb=env._catclose;var Zb=env._llvm_lifetime_start;var _b=env.___cxa_guard_release;var $b=env._ungetc;var ac=env._pthread_cond_destroy;var bc=env._uselocale;var cc=env._vsnprintf;var dc=env._sscanf;var ec=env.___assert_fail;var fc=env._fread;var gc=env._strftime_l;var hc=env._abort;var ic=env._fprintf;var jc=env._isdigit;var kc=env._strtoll;var lc=env.__addDays;var mc=env._fabs;var nc=env.__reallyNegative;var oc=env._write;var pc=env.___cxa_allocate_exception;var qc=env.___cxa_pure_virtual;var rc=env._vasprintf;var sc=env._catopen;var tc=env.___ctype_toupper_loc;var uc=env.___ctype_tolower_loc;var vc=env._pthread_join;var wc=env._pthread_cond_init;var xc=env._pwrite;var yc=env._strerror_r;var zc=env._pthread_create;var Ac=env._time;var Bc=0.0;
|
|
// EMSCRIPTEN_START_FUNCS
|
|
function Xc(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+7&-8;return b|0}function Yc(){return i|0}function Zc(a){a=a|0;i=a}function _c(a,b){a=a|0;b=b|0;if((x|0)==0){x=a;y=b}}function $c(b){b=b|0;a[k]=a[b];a[k+1|0]=a[b+1|0];a[k+2|0]=a[b+2|0];a[k+3|0]=a[b+3|0]}function ad(b){b=b|0;a[k]=a[b];a[k+1|0]=a[b+1|0];a[k+2|0]=a[b+2|0];a[k+3|0]=a[b+3|0];a[k+4|0]=a[b+4|0];a[k+5|0]=a[b+5|0];a[k+6|0]=a[b+6|0];a[k+7|0]=a[b+7|0]}function bd(a){a=a|0;K=a}function cd(a){a=a|0;L=a}function dd(a){a=a|0;M=a}function ed(a){a=a|0;N=a}function fd(a){a=a|0;O=a}function gd(a){a=a|0;P=a}function hd(a){a=a|0;Q=a}function id(a){a=a|0;R=a}function jd(a){a=a|0;S=a}function kd(a){a=a|0;T=a}function ld(){c[6380]=p+8;c[6382]=s+8;c[6384]=r;c[6386]=s+8;c[6388]=r;c[6390]=s+8;c[6392]=r;c[6394]=s+8;c[6398]=s+8;c[6400]=r;c[6402]=p+8;c[6436]=s+8;c[6440]=s+8;c[6504]=s+8;c[6508]=s+8;c[6528]=p+8;c[6530]=s+8;c[6566]=s+8;c[6570]=s+8;c[6606]=s+8;c[6610]=s+8;c[6630]=p+8;c[6632]=p+8;c[6634]=s+8;c[6638]=s+8;c[6642]=s+8;c[6646]=p+8;c[6648]=p+8;c[6650]=p+8;c[6652]=p+8;c[6654]=p+8;c[6656]=p+8;c[6658]=p+8;c[6684]=s+8;c[6688]=p+8;c[6690]=s+8;c[6694]=s+8;c[6698]=s+8;c[6702]=p+8;c[6704]=p+8;c[6706]=p+8;c[6708]=p+8;c[6742]=p+8;c[6744]=p+8;c[6746]=p+8;c[6748]=s+8;c[6752]=s+8;c[6756]=s+8;c[6760]=s+8;c[6764]=s+8;c[6768]=s+8;c[6772]=s+8;c[6776]=s+8;c[6780]=s+8;c[6784]=s+8;c[6788]=s+8;c[6798]=p+8;c[6800]=p+8}function md(a,b,e){a=a|0;b=b|0;e=e|0;var 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;f=a|0;c[f>>2]=b;g=a+4|0;c[g>>2]=e;h=a+8|0;c[h>>2]=0;c[h+4>>2]=0;i=a+16|0;c[i>>2]=0;a=64;j=e;e=b;b=0;k=0;while(1){if((j|0)==0){l=a;m=4;break}n=e+1|0;c[f>>2]=n;o=d[e]|0;p=j-1|0;c[g>>2]=p;q=a-8|0;r=jv(o|0,0,q|0)|0;o=r|k;r=K|b;c[h>>2]=o;c[h+4>>2]=r;if((q|0)>7){a=q;j=p;e=n;b=r;k=o}else{l=q;m=4;break}}if((m|0)==4){c[i>>2]=64-l;return}}function nd(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+16|0;f=c[e>>2]|0;if((f|0)<(b|0)){g=64-f|0;h=a+4|0;a:do{if((g|0)>7){i=a|0;j=a+8|0;k=g;l=c[h>>2]|0;while(1){if((l|0)==0){m=k;break a}n=c[i>>2]|0;c[i>>2]=n+1;o=d[n]|0;n=l-1|0;c[h>>2]=n;p=k-8|0;q=jv(o|0,0,p|0)|0;o=K|c[j+4>>2];c[j>>2]=q|c[j>>2];c[j+4>>2]=o;if((p|0)>7){k=p;l=n}else{m=p;break}}}else{m=g}}while(0);g=64-m|0;c[e>>2]=g;r=g}else{r=f}f=a+8|0;a=c[f>>2]|0;g=c[f+4>>2]|0;m=kv(a|0,g|0,64-b|0)|0;h=jv(a|0,g|0,b|0)|0;c[f>>2]=h;c[f+4>>2]=K;c[e>>2]=r-b;return m|0}function od(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+16|0;f=c[e>>2]|0;if((f|0)<(b|0)){g=64-f|0;h=a+4|0;a:do{if((g|0)>7){i=a|0;j=a+8|0;k=g;l=c[h>>2]|0;while(1){if((l|0)==0){m=k;break a}n=c[i>>2]|0;c[i>>2]=n+1;o=d[n]|0;n=l-1|0;c[h>>2]=n;p=k-8|0;q=jv(o|0,0,p|0)|0;o=K|c[j+4>>2];c[j>>2]=q|c[j>>2];c[j+4>>2]=o;if((p|0)>7){k=p;l=n}else{m=p;break}}}else{m=g}}while(0);g=64-m|0;c[e>>2]=g;r=g}else{r=f}f=a+8|0;a=jv(c[f>>2]|0,c[f+4>>2]|0,b|0)|0;c[f>>2]=a;c[f+4>>2]=K;c[e>>2]=r-b;return}function pd(a){a=a|0;var b=0,d=0,e=0,f=0;b=a+16|0;d=a+8|0;e=(c[b>>2]&-8|0)/8|0;f=a|0;c[f>>2]=(c[f>>2]|0)+(-e|0);f=a+4|0;c[f>>2]=(c[f>>2]|0)+e;c[d>>2]=0;c[d+4>>2]=0;c[b>>2]=0;return}function qd(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;b=a+16|0;e=a+4|0;f=a|0;g=a+8|0;a=0;h=c[b>>2]|0;while(1){if((h|0)<1){i=64-h|0;a:do{if((i|0)>7){j=i;k=c[e>>2]|0;while(1){if((k|0)==0){l=j;break a}m=c[f>>2]|0;c[f>>2]=m+1;n=d[m]|0;m=k-1|0;c[e>>2]=m;o=j-8|0;p=jv(n|0,0,o|0)|0;n=K|c[g+4>>2];c[g>>2]=p|c[g>>2];c[g+4>>2]=n;if((o|0)>7){j=o;k=m}else{l=o;break}}}else{l=i}}while(0);i=64-l|0;c[b>>2]=i;q=i}else{q=h}i=c[g>>2]|0;k=c[g+4>>2]|0;r=i<<1|0>>>31;s=k<<1|i>>>31;c[g>>2]=r;c[g+4>>2]=s;t=q-1|0;c[b>>2]=t;j=-1;if(!((k|0)>(j|0)|(k|0)==(j|0)&i>>>0>-1>>>0)){break}if((a|0)>19){u=-99999;v=19;break}else{a=a+1|0;h=t}}if((v|0)==19){return u|0}if((a|0)==0){u=0;return u|0}if((q|0)>(a|0)){w=t;x=s;y=r}else{t=65-q|0;b:do{if((t|0)>7){q=t;v=c[e>>2]|0;h=s;l=r;while(1){if((v|0)==0){z=q;A=h;B=l;break b}i=c[f>>2]|0;c[f>>2]=i+1;j=d[i]|0;i=v-1|0;c[e>>2]=i;k=q-8|0;o=jv(j|0,0,k|0)|0;j=o|l;o=K|h;c[g>>2]=j;c[g+4>>2]=o;if((k|0)>7){q=k;v=i;h=o;l=j}else{z=k;A=o;B=j;break}}}else{z=t;A=s;B=r}}while(0);r=64-z|0;c[b>>2]=r;w=r;x=A;y=B}B=kv(y|0,x|0,64-a|0)|0;A=jv(y|0,x|0,a|0)|0;c[g>>2]=A;c[g+4>>2]=K;c[b>>2]=w-a;w=(1<<a)-1+B|0;if((w|0)>0){u=w;return u|0}else{ec(12320,15064,146,17992);return 0}return 0}function rd(a){a=a|0;var b=0,c=0;b=qd(a)|0;if((b|0)==(-99999|0)){c=-99999}else if((b|0)==0){c=0}else{c=(((b&1|0)==0?-b|0:b+1|0)|0)/2|0}return c|0}function sd(a,b,d){a=a|0;b=b|0;d=d|0;if((d|0)>-1){c[a>>2]=b;c[a+4>>2]=b;c[a+8>>2]=b+d;return}else{ec(1440,13952,138,18864)}}function td(a){a=a|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=a+4|0;f=c[e>>2]|0;g=(c[a+8>>2]|0)-f|0;c[a+12>>2]=510;h=a+20|0;b[h>>1]=8;i=a+16|0;c[i>>2]=0;if((g|0)<=0){return}a=f+1|0;c[e>>2]=a;j=(d[f]|0)<<8;c[i>>2]=j;b[h>>1]=0;if((g|0)<=1){return}c[e>>2]=f+2;c[i>>2]=j|(d[a]|0);b[h>>1]=-8;return}function ud(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;h=f+12|0;i=c[h>>2]|0;j=g|0;g=d[(i>>>6)-4+(27288+(((d[j]|0)>>>1&255)<<2))|0]|0;k=i-g|0;c[h>>2]=k;i=k<<7;l=f+16|0;m=c[l>>2]|0;if(m>>>0<i>>>0){n=a[j]|0;o=n&1;p=o&255;a[j]=a[30416+((n&255)>>>1&255)|0]<<1|o;if(!(i>>>0<32768>>>0)){q=p;return q|0}c[h>>2]=k<<1&67108862;k=c[l>>2]<<1;c[l>>2]=k;o=f+20|0;n=(b[o>>1]|0)+1&65535;b[o>>1]=n;if(!(n<<16>>16==0)){q=p;return q|0}b[o>>1]=-8;o=f+4|0;n=c[o>>2]|0;if(!(n>>>0<(c[f+8>>2]|0)>>>0)){q=p;return q|0}c[o>>2]=n+1;c[l>>2]=k|(d[n]|0);q=p;return q|0}else{p=d[30736+(g>>>3)|0]|0;c[l>>2]=m-i<<p;c[h>>2]=g<<p;g=a[j]|0;h=g&1^1;if((g&255)>>>0<2>>>0){i=h&255|g&-2;a[j]=i;r=i}else{r=g}a[j]=a[30480+((r&255)>>>1&255)|0]<<1|r&1;r=f+20|0;j=(e[r>>1]|0)+p&65535;b[r>>1]=j;if(!(j<<16>>16>-1)){q=h;return q|0}p=f+4|0;g=c[p>>2]|0;if(g>>>0<(c[f+8>>2]|0)>>>0){c[p>>2]=g+1;c[l>>2]=(d[g]|0)<<(j<<16>>16)|c[l>>2]}b[r>>1]=j-8;q=h;return q|0}return 0}function vd(a){a=a|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=a+12|0;f=(c[e>>2]|0)-2|0;c[e>>2]=f;g=f<<7;h=a+16|0;i=c[h>>2]|0;if(!(i>>>0<g>>>0)){j=1;return j|0}if(!(g>>>0<32768>>>0)){j=0;return j|0}c[e>>2]=f<<1&67108862;f=i<<1;c[h>>2]=f;i=a+20|0;e=(b[i>>1]|0)+1&65535;b[i>>1]=e;if(!(e<<16>>16==0)){j=0;return j|0}b[i>>1]=-8;i=a+4|0;e=c[i>>2]|0;if(!(e>>>0<(c[a+8>>2]|0)>>>0)){j=0;return j|0}c[i>>2]=e+1;c[h>>2]=f+(d[e]|0);j=0;return j|0}function wd(a){a=a|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=a+16|0;f=c[e>>2]<<1;c[e>>2]=f;g=a+20|0;h=(b[g>>1]|0)+1&65535;b[g>>1]=h;do{if(h<<16>>16>-1){i=a+4|0;j=c[i>>2]|0;if(!((c[a+8>>2]|0)>>>0>j>>>0)){k=f;break}b[g>>1]=-8;c[i>>2]=j+1;i=f|(d[j]|0);c[e>>2]=i;k=i}else{k=f}}while(0);f=c[a+12>>2]<<7;if(k>>>0<f>>>0){l=0;return l|0}c[e>>2]=k-f;l=1;return l|0}function xd(a,e){a=a|0;e=e|0;var 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;if((e|0)<=0){f=e;return f|0}g=a+16|0;h=a+20|0;i=a+8|0;j=a+4|0;k=a+12|0;a=0;l=c[g>>2]|0;m=b[h>>1]|0;while(1){n=l<<1;c[g>>2]=n;o=m+1&65535;b[h>>1]=o;do{if(o<<16>>16>-1){p=c[j>>2]|0;if(!((c[i>>2]|0)>>>0>p>>>0)){q=n;r=o;break}b[h>>1]=-8;c[j>>2]=p+1;s=d[p]|0|n;c[g>>2]=s;q=s;r=-8}else{q=n;r=o}}while(0);o=c[k>>2]<<7;if(q>>>0<o>>>0){f=a;t=8;break}n=q-o|0;c[g>>2]=n;o=a+1|0;if((o|0)<(e|0)){a=o;l=n;m=r}else{f=e;t=8;break}}if((t|0)==8){return f|0}return 0}function yd(a,f){a=a|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if((f|0)<9){if((f|0)==0){g=0;return g|0}h=a+16|0;i=c[h>>2]<<f;c[h>>2]=i;j=a+20|0;k=(e[j>>1]|0)+f&65535;b[j>>1]=k;do{if(k<<16>>16>-1){l=a+4|0;m=c[l>>2]|0;if(!((c[a+8>>2]|0)>>>0>m>>>0)){n=i;break}c[l>>2]=m+1;l=(d[m]|0)<<(k<<16>>16);b[j>>1]=k-8;m=l|i;c[h>>2]=m;n=m}else{n=i}}while(0);i=c[a+12>>2]<<7;k=(n>>>0)/(i>>>0)|0;j=1<<f;m=(k|0)<(j|0)?k:j-1|0;j=n-(ga(m,i)|0)|0;c[h>>2]=j;g=m;return g|0}m=a+16|0;j=c[m>>2]<<8;c[m>>2]=j;h=a+20|0;i=b[h>>1]|0;n=i+8&65535;b[h>>1]=n;do{if(n<<16>>16>-1){k=a+4|0;l=c[k>>2]|0;if(!((c[a+8>>2]|0)>>>0>l>>>0)){o=j;p=n;break}c[k>>2]=l+1;k=(d[l]|0)<<(n<<16>>16);b[h>>1]=i;l=k|j;c[m>>2]=l;o=l;p=i}else{o=j;p=n}}while(0);n=c[a+12>>2]<<7;j=(o>>>0)/(n>>>0)|0;i=(j|0)>255?255:j;j=o-(ga(i,n)|0)|0;c[m>>2]=j;o=f-8|0;if((o|0)==0){g=i;return g|0}f=a+8|0;l=a+4|0;a=o;o=i;i=j;j=p;while(1){p=a-1|0;k=o<<1;q=i<<1;c[m>>2]=q;r=j+1&65535;b[h>>1]=r;do{if(r<<16>>16>-1){s=c[l>>2]|0;if(!((c[f>>2]|0)>>>0>s>>>0)){t=q;u=r;break}b[h>>1]=-8;c[l>>2]=s+1;v=d[s]|0|q;c[m>>2]=v;t=v;u=-8}else{t=q;u=r}}while(0);if(t>>>0<n>>>0){w=0;x=t}else{r=t-n|0;c[m>>2]=r;w=1;x=r}r=w|k;if((p|0)==0){g=r;break}else{a=p;o=r;i=x;j=u}}return g|0}function zd(a,e){a=a|0;e=e|0;var 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;f=a+16|0;g=a+20|0;h=a+8|0;i=a+4|0;j=a+12|0;k=e+31|0;l=0;m=e;e=c[f>>2]|0;n=b[g>>1]|0;while(1){o=e<<1;c[f>>2]=o;p=n+1&65535;b[g>>1]=p;do{if(p<<16>>16>-1){q=c[i>>2]|0;if(!((c[h>>2]|0)>>>0>q>>>0)){r=o;s=p;break}b[g>>1]=-8;c[i>>2]=q+1;t=d[q]|0|o;c[f>>2]=t;r=t;s=-8}else{r=o;s=p}}while(0);p=c[j>>2]<<7;if(r>>>0<p>>>0){break}o=r-p|0;c[f>>2]=o;if((m|0)==(k|0)){u=0;v=8;break}else{l=l+(1<<m)|0;m=m+1|0;e=o;n=s}}if((v|0)==8){return u|0}u=(yd(a,m)|0)+l|0;return u|0}function Ad(a){a=a|0;vb(a|0)|0;Pb()}function Bd(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;k=i;i=i+16|0;l=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[l>>2];l=k|0;m=d|0;d=c[m>>2]|0;if((d|0)==0){c[b>>2]=0;i=k;return}n=g;g=e;o=n-g|0;p=h+12|0;h=c[p>>2]|0;q=(h|0)>(o|0)?h-o|0:0;o=f;h=o-g|0;do{if((h|0)>0){if((Hc[c[(c[d>>2]|0)+48>>2]&63](d,e,h)|0)==(h|0)){break}c[m>>2]=0;c[b>>2]=0;i=k;return}}while(0);do{if((q|0)>0){if(q>>>0<11>>>0){h=q<<1&255;e=l;a[e]=h;r=l+1|0;s=h;t=e}else{e=q+16&-16;h=Nu(e)|0;c[l+8>>2]=h;g=e|1;c[l>>2]=g;c[l+4>>2]=q;r=h;s=g&255;t=l}dv(r|0,j|0,q|0)|0;a[r+q|0]=0;if((s&1)==0){u=l+1|0}else{u=c[l+8>>2]|0}if((Hc[c[(c[d>>2]|0)+48>>2]&63](d,u,q)|0)==(q|0)){if((a[t]&1)==0){break}Pu(c[l+8>>2]|0);break}c[m>>2]=0;c[b>>2]=0;if((a[t]&1)==0){i=k;return}Pu(c[l+8>>2]|0);i=k;return}}while(0);l=n-o|0;do{if((l|0)>0){if((Hc[c[(c[d>>2]|0)+48>>2]&63](d,f,l)|0)==(l|0)){break}c[m>>2]=0;c[b>>2]=0;i=k;return}}while(0);c[p>>2]=0;c[b>>2]=d;i=k;return}function Cd(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;return}function Dd(b,d){b=b|0;d=d|0;var e=0,f=0;e=i;if((a[51944]|0)!=0){Gb(12840,(f=i,i=i+16|0,c[f>>2]=b,c[f+8>>2]=d,f)|0)|0;i=f}f=c[d+4>>2]|0;if((f|0)!=0){c[f>>2]=(c[f>>2]|0)+1}c[b+4>>2]=f;c[b>>2]=c[d>>2];i=e;return}function Ed(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;if((a[51944]|0)!=0){Gb(16064,(e=i,i=i+8|0,c[e>>2]=b,e)|0)|0;i=e}f=b+4|0;g=c[f>>2]|0;if((g|0)==0){i=d;return}h=(c[g>>2]|0)-1|0;c[g>>2]=h;if((h|0)!=0){i=d;return}h=b|0;if((a[51944]|0)!=0){Gb(13256,(e=i,i=i+8|0,c[e>>2]=c[h>>2],e)|0)|0;i=e}e=c[h>>2]|0;if((e|0)!=0){Qu(e|0)}e=c[f>>2]|0;if((e|0)==0){i=d;return}Pu(e);i=d;return}function Fd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;if((a[51944]|0)!=0){Gb(10456,(g=i,i=i+8|0,c[g>>2]=b,g)|0)|0;i=g}h=b+4|0;j=c[h>>2]|0;do{if((j|0)!=0){k=c[j>>2]|0;if((k|0)==1){l=c[b>>2]|0;Gd(l,d,e);i=f;return}if((k|0)>1){c[j>>2]=k-1;break}else{ec(608,2464,177,17440)}}}while(0);if((a[51944]|0)!=0){Gb(17056,(g=i,i=i+8|0,c[g>>2]=b,g)|0)|0;i=g}g=Ou(172)|0;c[b>>2]=g;b=Nu(4)|0;c[h>>2]=b;c[b>>2]=1;l=g;Gd(l,d,e);i=f;return}function Gd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;do{if((d|0)>0){f=d-1|0;Kd(e,b+5|0,c[30216+(f*12|0)>>2]|0,1);Kd(e,b+6|0,c[30220+(f*12|0)>>2]|0,1);Kd(e,b+7|0,c[30224+(f*12|0)>>2]|0,1);Kd(e,b+149|0,c[30152+(f<<2)>>2]|0,1);Kd(e,b+147|0,c[30240+(f<<2)>>2]|0,1);Kd(e,b+148|0,c[30336+(f<<2)>>2]|0,1);Kd(e,b+156|0,95,1);Kd(e,b+157|0,79,1);Kd(e,b+158|0,63,1);Kd(e,b+159|0,31,1);Kd(e,b+160|0,31,1);Kd(e,b+154|0,153,1);Kd(e,b+155|0,153,1);f=(d|0)==1?0:2;Kd(e,b+150|0,c[29904+(f<<2)>>2]|0,1);Kd(e,b+151|0,c[29904+((f|1)<<2)>>2]|0,1);Kd(e,b+152|0,168,1);Kd(e,b+153|0,79,1);f=(e|0)<0;do{if(f){g=72}else{h=((e*-5|0)>>4)+72|0;i=(e|0)<52;if((h|0)<1&i){g=1;break}if((h|0)>126&i){g=126;break}g=(e|0)>51?56:h}}while(0);h=(g|0)>63;i=h?g+64|0:63-g|0;j=(i&255)<<1|h&1;h=b+143|0;if(!((i&127)>>>0<63>>>0)){a[h]=j;ec(16144,2464,210,17960)}dv(h|0,j|0,2)|0;do{if(f){k=72}else{j=((e*-5|0)>>4)+72|0;h=(e|0)<52;if((j|0)<1&h){k=1;break}if((j|0)>126&h){k=126;break}k=(e|0)>51?56:j}}while(0);f=(k|0)>63;j=f?k+64|0:63-k|0;h=(j&255)<<1|f&1;f=b+145|0;if((j&127)>>>0<63>>>0){dv(f|0,h|0,2)|0;break}else{a[f]=h;ec(16144,2464,210,17960)}}}while(0);Kd(e,b+2|0,c[30160+(d*12|0)>>2]|0,1);Kd(e,b+3|0,c[30164+(d*12|0)>>2]|0,1);Kd(e,b+4|0,c[30168+(d*12|0)>>2]|0,1);k=(d|0)!=2?d:5;Kd(e,b+8|0,c[30296+(k<<2)>>2]|0,1);Kd(e,b+9|0,c[30296+(k+1<<2)>>2]|0,1);Kd(e,b+10|0,c[30296+(k+2<<2)>>2]|0,1);Kd(e,b+11|0,c[30296+(k+3<<2)>>2]|0,1);Kd(e,b+12|0,c[29352+(d<<2)>>2]|0,1);Kd(e,b+13|0,c[29888+(d<<2)>>2]|0,1);k=(d|0)==0?0:2;Kd(e,b+14|0,c[30344+(k<<2)>>2]|0,1);Kd(e,b+15|0,c[30344+((k|1)<<2)>>2]|0,1);k=d<<2;Kd(e,b+16|0,c[30248+(k<<2)>>2]|0,1);g=k|1;Kd(e,b+17|0,c[30248+(g<<2)>>2]|0,1);h=k|2;Kd(e,b+18|0,c[30248+(h<<2)>>2]|0,1);f=k|3;Kd(e,b+19|0,c[30248+(f<<2)>>2]|0,1);j=d*3|0;Kd(e,b+20|0,c[29936+(j<<2)>>2]|0,1);Kd(e,b+21|0,c[29936+(j+1<<2)>>2]|0,1);Kd(e,b+22|0,c[29936+(j+2<<2)>>2]|0,1);j=d*18|0;i=0;while(1){Kd(e,b+(i+25)|0,c[28736+(i+j<<2)>>2]|0,1);l=i+1|0;if((l|0)<18){i=l}else{m=0;break}}do{Kd(e,b+(m+43)|0,c[28736+(m+j<<2)>>2]|0,1);m=m+1|0;}while((m|0)<18);Kd(e,b+61|0,c[29976+(k<<2)>>2]|0,1);Kd(e,b+62|0,c[29976+(g<<2)>>2]|0,1);Kd(e,b+63|0,c[29976+(h<<2)>>2]|0,1);Kd(e,b+64|0,c[29976+(f<<2)>>2]|0,1);f=0;do{Kd(e,b+(f+65)|0,c[29384+(d*168|0)+(f<<2)>>2]|0,1);f=f+1|0;}while((f|0)<42);Kd(e,b+107|0,c[28952+(d<<3)>>2]|0,1);Kd(e,b+108|0,c[28956+(d<<3)>>2]|0,1);f=d*24|0;h=0;do{Kd(e,b+(h+109)|0,c[29048+(h+f<<2)>>2]|0,1);h=h+1|0;}while((h|0)<24);h=d*6|0;Kd(e,b+133|0,c[28976+(h<<2)>>2]|0,1);Kd(e,b+134|0,c[28976+((h|1)<<2)>>2]|0,1);Kd(e,b+135|0,c[28976+(h+2<<2)>>2]|0,1);Kd(e,b+136|0,c[28976+(h+3<<2)>>2]|0,1);Kd(e,b+137|0,c[28976+(h+4<<2)>>2]|0,1);Kd(e,b+138|0,c[28976+(h+5<<2)>>2]|0,1);Kd(e,b,c[29920+(d<<2)>>2]|0,1);Kd(e,b+1|0,c[29336+(d<<2)>>2]|0,1);Kd(e,b+139|0,154,1);Kd(e,b+140|0,154,1);Kd(e,b+141|0,139,1);Kd(e,b+142|0,139,1);Kd(e,b+161|0,c[29368+(d<<2)>>2]|0,1);a[b+23|0]=1;a[b+24|0]=1;dv(b+162|0,1,10)|0;return}function Hd(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=b+4|0;if((a[51944]|0)!=0){f=c[e>>2]|0;Gb(7336,(g=i,i=i+16|0,c[g>>2]=b,c[g+8>>2]=f,g)|0)|0;i=g}g=c[e>>2]|0;if((g|0)==0){i=d;return}c[g>>2]=(c[g>>2]|0)-1;c[b>>2]=0;c[e>>2]=0;i=d;return}function Id(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=b+4|0;if((a[51944]|0)!=0){f=c[e>>2]|0;Gb(5320,(g=i,i=i+16|0,c[g>>2]=b,c[g+8>>2]=f,g)|0)|0;i=g}g=c[e>>2]|0;if((g|0)==0){ec(3784,2464,95,17424)}f=c[g>>2]|0;if((f|0)<=1){i=d;return}c[g>>2]=f-1;f=b|0;b=c[f>>2]|0;g=Ou(172)|0;c[f>>2]=g;f=Nu(4)|0;c[e>>2]=f;c[f>>2]=1;cv(g|0,b|0,172)|0;i=d;return}function Jd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;if((a[51944]|0)!=0){Gb(1288,(f=i,i=i+16|0,c[f>>2]=b,c[f+8>>2]=d,f)|0)|0;i=f}g=d+4|0;h=c[g>>2]|0;if((h|0)==0){j=b+4|0;if((a[51944]|0)!=0){k=c[j>>2]|0;Gb(7336,(f=i,i=i+16|0,c[f>>2]=b,c[f+8>>2]=k,f)|0)|0;i=f}k=c[j>>2]|0;if((k|0)==0){i=e;return b|0}c[k>>2]=(c[k>>2]|0)-1;c[b>>2]=0;c[j>>2]=0;i=e;return b|0}c[h>>2]=(c[h>>2]|0)+1;h=b+4|0;if((a[51944]|0)!=0){j=c[h>>2]|0;Gb(7336,(f=i,i=i+16|0,c[f>>2]=b,c[f+8>>2]=j,f)|0)|0;i=f}f=c[h>>2]|0;if((f|0)==0){l=b|0}else{c[f>>2]=(c[f>>2]|0)-1;f=b|0;c[f>>2]=0;c[h>>2]=0;l=f}c[l>>2]=c[d>>2];c[h>>2]=c[g>>2];i=e;return b|0}function Kd(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=((d>>4)*5|0)-45|0;g=(d<<3&120)-16|0;d=(b|0)<0;if(d){h=0}else{h=(b|0)>51?51:b}do{if((((ga(h,f)|0)>>4)+g|0)<1){i=1}else{if(d){j=0}else{j=(b|0)>51?51:b}if((((ga(j,f)|0)>>4)+g|0)>126){i=126;break}if(d){k=0}else{k=(b|0)>51?51:b}i=((ga(k,f)|0)>>4)+g|0}}while(0);if((e|0)<=0){return}g=(i|0)>63;f=g?i+64|0:63-i|0;i=(f&255)<<1|g&1;if((f&127)>>>0<63>>>0){l=0}else{a[c|0]=i;ec(16144,2464,210,17960)}do{a[c+l|0]=i;l=l+1|0;}while((l|0)<(e|0));return}function Ld(){return 8320}function Md(){return 16777728}function Nd(a){a=a|0;var b=0;switch(a|0){case 1006:{b=12544;break};case 1007:{b=12168;break};case 1008:{b=12008;break};case 1009:{b=11632;break};case 15:{b=14960;break};case 1015:{b=9944;break};case 1016:{b=9600;break};case 1017:{b=9176;break};case 1018:{b=8704;break};case 1019:{b=8520;break};case 502:{b=16032;break};case 1004:{b=13016;break};case 1005:{b=12752;break};case 1002:{b=13432;break};case 1003:{b=13224;break};case 11:{b=16968;break};case 1:{b=12824;break};case 4:{b=9888;break};case 17:{b=14400;break};case 18:{b=14136;break};case 1020:{b=8200;break};case 1021:{b=8032;break};case 1022:{b=7776;break};case 1023:{b=7480;break};case 1024:{b=7200;break};case 1025:{b=6920;break};case 1026:{b=6616;break};case 0:{b=15416;break};case 1e3:{b=13832;break};case 1001:{b=13632;break};case 16:{b=14672;break};case 1010:{b=11360;break};case 1011:{b=11088;break};case 1012:{b=10848;break};case 1013:{b=10576;break};case 1014:{b=10280;break};case 12:{b=16376;break};case 13:{b=15616;break};case 14:{b=15272;break};case 8:{b=2272;break};case 7:{b=3576;break};case 5:{b=6896;break};case 6:{b=5048;break};case 9:{b=1176;break};case 10:{b=496;break};default:{b=6440}}return b|0}function Od(a){a=a|0;var b=0;if((a|0)==0){b=1}else{b=(a|0)>999|0}return b|0}function Pd(){var a=0,b=0;do{if(((I=c[12984]|0,c[12984]=I+1,I)+1|0)<=1){Ej();if(Mj()|0){break}I=c[12984]|0,c[12984]=I-1,I;a=0;return a|0}}while(0);b=Nu(377228)|0;Le(b);if((b|0)!=0){a=b;return a|0}b=(I=c[12984]|0,c[12984]=I-1,I)-1|0;if((b|0)<0){I=c[12984]|0,c[12984]=I+1,I;a=0;return a|0}if((b|0)!=0){a=0;return a|0}Nj();a=0;return a|0}function Qd(a){a=a|0;var b=0,d=0;b=a;Oe(b);if((a|0)!=0){Dc[c[(c[a>>2]|0)+4>>2]&511](b)}b=(I=c[12984]|0,c[12984]=I-1,I)-1|0;if((b|0)<0){I=c[12984]|0,c[12984]=I+1,I;d=12;return d|0}if((b|0)!=0){d=0;return d|0}Nj();d=0;return d|0}function Rd(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 Xi(a+548|0,b,c,d,e,f)|0}function Sd(b){b=b|0;var c=0;c=b+548|0;b=c;Zi(b)|0;Zi(b)|0;a[c]=1;return 0}function Td(a,b){a=a|0;b=b|0;return cf(a,b)|0}function Ud(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 Yi(a+548|0,b,c,d,e,f)|0}function Vd(a){a=a|0;Zi(a+548|0)|0;return}function Wd(b){b=b|0;Zi(b+548|0)|0;a[b+549|0]=1;return}function Xd(a){a=a|0;Pe(a);return}function Yd(b){b=b|0;var d=0,e=0,f=0;if((c[b+376196>>2]|0)<=0){d=0;return d|0}e=c[b+376192>>2]|0;f=c[(c[(c[b+376180>>2]|0)+(e>>>10<<2)>>2]|0)+((e&1023)<<2)>>2]|0;if((f|0)==0){d=0;return d|0}a[f+100|0]=0;Dh(b+376144|0);d=f;return d|0}function Zd(a){a=a|0;var b=0,d=0;if((c[a+376196>>2]|0)<=0){b=0;return b|0}d=c[a+376192>>2]|0;b=c[(c[(c[a+376180>>2]|0)+(d>>>10<<2)>>2]|0)+((d&1023)<<2)>>2]|0;return b|0}function _d(b){b=b|0;var d=0;if((c[b+376196>>2]|0)==0){return}d=c[b+376192>>2]|0;a[(c[(c[(c[b+376180>>2]|0)+(d>>>10<<2)>>2]|0)+((d&1023)<<2)>>2]|0)+100|0]=0;Dh(b+376144|0);return}function $d(a){a=a|0;return jf(a)|0}function ae(a){a=a|0;return c[a+375908>>2]|0}function be(a,b){a=a|0;b=b|0;kf(a,b);return}function ce(a,b){a=a|0;b=b|0;mf(a,b);return}function de(a,b){a=a|0;b=b|0;return lf(a,b)|0}function ee(a){a=a|0;return nf(a+4|0)|0}function fe(b,c,d){b=b|0;c=c|0;d=d|0;if((c|0)==8){a[b+533|0]=(d|0)!=0|0;return}else if((c|0)==7){a[b+532|0]=(d|0)!=0|0;return}else if((c|0)==6){a[b+514|0]=(d|0)!=0|0;return}else if((c|0)==0){a[b+512|0]=(d|0)!=0|0;return}else{ec(6320,6192,503,17144)}}function ge(a,b,d){a=a|0;b=b|0;d=d|0;switch(b|0){case 4:{c[a+528>>2]=d;return};case 5:{Ke(a,d);return};case 1:{c[a+516>>2]=d;return};case 2:{c[a+520>>2]=d;return};case 3:{c[a+524>>2]=d;return};default:{ec(6320,6192,536,17120)}}}function he(a,b){a=a|0;b=b|0;var c=0;if((b|0)==8){c=a+533|0}else if((b|0)==7){c=a+532|0}else if((b|0)==0){c=a+512|0}else if((b|0)==6){c=a+514|0}else{ec(6320,6192,571,17176);return 0}return d[c]|0|0}function ie(a){a=a|0;var b=0,d=0,e=0;b=c[a+584>>2]|0;d=c[a+556>>2]|0;if((d|0)==0){e=b;return e|0}e=(c[d+24>>2]|0)+b|0;return e|0}function je(a){a=a|0;return((c[a+556>>2]|0)!=0)+(c[a+580>>2]|0)|0}function ke(a,b){a=a|0;b=b|0;var d=0;if((b|0)==1|(b|0)==2){d=c[a+80>>2]|0}else if((b|0)==0){d=c[a+72>>2]|0}else{d=0}return d|0}function le(a,b){a=a|0;b=b|0;var d=0;if((b|0)==0){d=c[a+76>>2]|0}else if((b|0)==1|(b|0)==2){d=c[a+84>>2]|0}else{d=0}return d|0}function me(a,b){a=a|0;b=b|0;var d=0;if((b|0)==1|(b|0)==2){d=c[a+5768>>2]|0}else if((b|0)==0){d=c[a+5760>>2]|0}else{d=0}return d|0}function ne(a){a=a|0;return c[a+20>>2]|0}function oe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if(!(b>>>0<3>>>0)){ec(5944,6192,639,17240);return 0}e=c[a+60+(b<<2)>>2]|0;if((d|0)==0){return e|0}f=c[((b|0)==0?a+40|0:a+44|0)>>2]|0;if((b|0)==1|(b|0)==2){g=c[a+5768>>2]|0}else if((b|0)==0){g=c[a+5760>>2]|0}else{g=0}a=ga((g+7|0)/8|0,f)|0;c[d>>2]=a;return e|0}function pe(a,b){a=a|0;b=b|0;if(b>>>0<3>>>0){return c[a+10492+(b<<2)>>2]|0}else{ec(5944,6192,650,17208);return 0}return 0}function qe(a){a=a|0;var b=0;b=a+10480|0;return(K=c[b+4>>2]|0,c[b>>2]|0)|0}function re(a){a=a|0;return c[a+10488>>2]|0}function se(a,b){a=a|0;b=b|0;c[a+10488>>2]=b;return}function te(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;k=b+10448|0;l=c[k>>2]|0;m=e>>l;if(!((m|0)>-1)){ec(8880,6264,118,17352)}n=b+10452|0;o=b+10456|0;p=b+10440|0;q=e;e=f;r=g;g=h;h=i;i=j;j=m;m=f>>l;while(1){l=c[n>>2]|0;if((j|0)>=(l|0)){s=4;break}if(!((m|0)>-1)){s=7;break}if((m|0)>=(c[o>>2]|0)){s=7;break}f=(ga(l,m)|0)+j|0;t=1<<r;if(((d[(c[p>>2]|0)+f|0]|0)&1<<g|0)==0){s=9;break}f=t>>1;l=f+q|0;u=f+e|0;f=r-1|0;v=g+1|0;te(b,q,e,f,v,h,i);te(b,l,e,f,v,16,i);te(b,q,u,f,v,h,32);w=c[k>>2]|0;x=l>>w;if((x|0)>-1){q=l;e=u;r=f;g=v;h=16;i=32;j=x;m=u>>w}else{s=4;break}}if((s|0)==4){ec(8880,6264,118,17352)}else if((s|0)==7){ec(4520,6264,119,17352)}else if((s|0)==9){s=(t|0)>0;if(!s){return}m=h&255;h=(q|0)/4|0;j=b+10472|0;g=b+10476|0;r=b+10460|0;k=0;do{p=(k+e|0)/4|0;o=c[j>>2]|0;do{if((h|0)<(o|0)){if((p|0)>=(c[g>>2]|0)){break}n=(ga(o,p)|0)+h|0;w=(c[r>>2]|0)+n|0;a[w]=a[w]|m}}while(0);k=k+4|0;}while((k|0)<(t|0));if(!s){return}s=i&255;i=(e|0)/4|0;e=b+10472|0;k=b+10476|0;m=b+10460|0;b=0;do{r=(b+q|0)/4|0;h=c[e>>2]|0;do{if((r|0)<(h|0)){if((i|0)>=(c[k>>2]|0)){break}g=(ga(h,i)|0)+r|0;j=(c[m>>2]|0)+g|0;a[j]=a[j]|s}}while(0);b=b+4|0;}while((b|0)<(t|0));return}}function ue(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;i=c[b+10368>>2]|0;h=e>>i;j=f>>i;if(!((h|0)>-1)){ec(8880,6264,118,17352)}i=c[b+10372>>2]|0;if((h|0)>=(i|0)){ec(8880,6264,118,17352)}if(!((j|0)>-1)){ec(4520,6264,119,17352)}if((j|0)>=(c[b+10376>>2]|0)){ec(4520,6264,119,17352)}k=(ga(i,j)|0)+h|0;h=(c[b+10360>>2]|0)+(k*3|0)|0;k=1<<g;j=1<<g-1;i=1<<g-2;switch(((d[h]|d[h+1|0]<<8)<<16>>16&65535)>>>3&255&7|0){case 2:{if((k|0)<=0){return}h=(j+e|0)/4|0;g=b+10472|0;l=b+10476|0;m=b+10460|0;n=0;do{o=(n+f|0)/4|0;p=c[g>>2]|0;do{if((h|0)<(p|0)){if((o|0)>=(c[l>>2]|0)){break}q=(ga(p,o)|0)+h|0;r=(c[m>>2]|0)+q|0;a[r]=a[r]|64}}while(0);n=n+1|0;}while((n|0)<(k|0));return};case 3:{if((k|0)<=0){return}n=(j+e|0)/4|0;m=b+10472|0;h=b+10476|0;l=b+10460|0;g=(j+f|0)/4|0;o=0;do{p=(o+f|0)/4|0;r=c[m>>2]|0;do{if((n|0)<(r|0)){if((p|0)>=(c[h>>2]|0)){s=r;break}q=(ga(r,p)|0)+n|0;t=(c[l>>2]|0)+q|0;a[t]=a[t]|64;s=c[m>>2]|0}else{s=r}}while(0);r=(o+e|0)/4|0;do{if((r|0)<(s|0)){if((g|0)>=(c[h>>2]|0)){break}p=(ga(s,g)|0)+r|0;t=(c[l>>2]|0)+p|0;a[t]=a[t]|-128}}while(0);o=o+1|0;}while((o|0)<(k|0));return};case 6:{if((k|0)<=0){return}o=(i+e|0)/4|0;l=b+10472|0;g=b+10476|0;s=b+10460|0;h=0;do{m=(h+f|0)/4|0;n=c[l>>2]|0;do{if((o|0)<(n|0)){if((m|0)>=(c[g>>2]|0)){break}r=(ga(n,m)|0)+o|0;t=(c[s>>2]|0)+r|0;a[t]=a[t]|64}}while(0);h=h+1|0;}while((h|0)<(k|0));return};case 4:{if((k|0)<=0){return}h=(i+f|0)/4|0;s=b+10472|0;o=b+10476|0;g=b+10460|0;l=0;do{m=(l+e|0)/4|0;n=c[s>>2]|0;do{if((m|0)<(n|0)){if((h|0)>=(c[o>>2]|0)){break}t=(ga(n,h)|0)+m|0;r=(c[g>>2]|0)+t|0;a[r]=a[r]|-128}}while(0);l=l+1|0;}while((l|0)<(k|0));return};case 7:{if((k|0)<=0){return}l=(j+e+i|0)/4|0;g=b+10472|0;h=b+10476|0;o=b+10460|0;s=0;do{m=(s+f|0)/4|0;n=c[g>>2]|0;do{if((l|0)<(n|0)){if((m|0)>=(c[h>>2]|0)){break}r=(ga(n,m)|0)+l|0;t=(c[o>>2]|0)+r|0;a[t]=a[t]|64}}while(0);s=s+1|0;}while((s|0)<(k|0));return};case 1:{if((k|0)<=0){return}s=(j+f|0)/4|0;o=b+10472|0;l=b+10476|0;h=b+10460|0;g=0;do{m=(g+e|0)/4|0;n=c[o>>2]|0;do{if((m|0)<(n|0)){if((s|0)>=(c[l>>2]|0)){break}t=(ga(n,s)|0)+m|0;r=(c[h>>2]|0)+t|0;a[r]=a[r]|-128}}while(0);g=g+1|0;}while((g|0)<(k|0));return};case 5:{if((k|0)<=0){return}g=(j+f+i|0)/4|0;i=b+10472|0;f=b+10476|0;j=b+10460|0;b=0;do{h=(b+e|0)/4|0;s=c[i>>2]|0;do{if((h|0)<(s|0)){if((g|0)>=(c[f>>2]|0)){break}l=(ga(s,g)|0)+h|0;o=(c[j>>2]|0)+l|0;a[o]=a[o]|-128}}while(0);b=b+1|0;}while((b|0)<(k|0));return};default:{return}}}function ve(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0;g=c[b+5808>>2]|0;h=c[b+5804>>2]|0;i=(1<<h)-1|0;j=c[b+5820>>2]|0;k=c[b+5800>>2]|0;l=f<<h>>k;m=f+1<<h>>k;k=c[b+5824>>2]|0;f=(k|0)<(m|0)?k:m;if((l|0)>=(f|0)){n=0;return n|0}m=b+5816|0;k=b+10372|0;o=b+10360|0;p=b+10348|0;q=b+10352|0;r=b+10356|0;s=b+10340|0;t=b+52|0;u=b+48|0;v=b+5977|0;w=b+10308|0;x=l;l=0;y=c[m>>2]|0;a:while(1){if((y|0)>0){z=ga(x,g)|0;A=(z|0)==0;B=A?0:32;C=z&i;D=z-1|0;E=ga(z>>h,j)|0;F=ga(D>>h,j)|0;G=0;H=l;I=y;while(1){J=(ga(c[k>>2]|0,x)|0)+G|0;K=(c[o>>2]|0)+(J*3|0)|0;J=(d[K]|d[K+1|0]<<8)<<16>>16&7;K=J&255;do{if(J<<24>>24==0){L=H;M=I}else{N=ga(G,g)|0;O=N>>h;P=c[p>>2]|0;Q=N>>P;R=z>>P;if(!((Q|0)>-1)){S=8;break a}T=c[q>>2]|0;if((Q|0)>=(T|0)){S=8;break a}if(!((R|0)>-1)){S=11;break a}U=c[r>>2]|0;if((R|0)>=(U|0)){S=11;break a}V=ga(T,R)|0;R=c[s>>2]|0;W=e[R+((V+Q|0)*24|0)+2>>1]|0;X=c[u>>2]|0;Y=(c[t>>2]|0)-X>>2;if(!(W>>>0<Y>>>0)){n=0;S=34;break a}Z=c[X+(W<<2)>>2]|0;W=(N|0)==0;_=W?0:16;b:do{if(W){$=_}else{if((N&i|0)!=0){$=_;break}do{if((a[Z+764|0]|0)==0){aa=N-1>>P;if(!((aa|0)>-1&(aa|0)<(T|0))){S=17;break a}ba=e[R+((V+aa|0)*24|0)+2>>1]|0;if(!(ba>>>0<Y>>>0)){break}if((c[Z+800>>2]|0)!=(c[(c[X+(ba<<2)>>2]|0)+800>>2]|0)){$=0;break b}}}while(0);if((a[v]|0)!=0){$=_;break}ba=c[w>>2]|0;$=(c[ba+(O+E<<2)>>2]|0)==(c[ba+((N-1>>h)+E<<2)>>2]|0)?_:0}}while(0);c:do{if(A|(C|0)!=0){ca=B}else{do{if((a[Z+764|0]|0)==0){_=D>>P;if(!((_|0)>-1&(_|0)<(U|0))){S=25;break a}V=R+(((ga(T,_)|0)+Q|0)*24|0)+2|0;_=e[V>>1]|0;if(!(_>>>0<Y>>>0)){break}if((c[Z+800>>2]|0)!=(c[(c[X+(_<<2)>>2]|0)+800>>2]|0)){ca=0;break c}}}while(0);if((a[v]|0)!=0){ca=B;break}_=c[w>>2]|0;ca=(c[_+(O+E<<2)>>2]|0)==(c[_+(O+F<<2)>>2]|0)?B:0}}while(0);if((a[Z+754|0]|0)!=0){L=H;M=I;break}te(b,N,z,K,0,$&255,ca&255);ue(b,N,z,K,0,0);L=1;M=c[m>>2]|0}}while(0);K=G+1|0;if((K|0)<(M|0)){G=K;H=L;I=M}else{da=L;ea=M;break}}}else{da=l;ea=y}I=x+1|0;if((I|0)<(f|0)){x=I;l=da;y=ea}else{n=da;S=34;break}}if((S|0)==8){ec(8880,6264,118,17352);return 0}else if((S|0)==11){ec(4520,6264,119,17352);return 0}else if((S|0)==17){ec(8880,6264,118,17352);return 0}else if((S|0)==25){ec(4520,6264,119,17352);return 0}else if((S|0)==34){return n|0}return 0}function we(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0;l=g?2:1;m=g?1:2;n=g&1;o=n^1;p=g?80:160;q=g?16:32;g=f+10472|0;r=c[g>>2]|0;s=(r|0)>(k|0)?k:r;r=c[f+10476>>2]|0;k=(r|0)>(i|0)?i:r;if((k|0)<=(h|0)){return}r=(s|0)>(j|0);i=f+10460|0;t=f+10368|0;u=f+10372|0;v=f+10376|0;w=f+10360|0;x=f+10388|0;y=f+10392|0;z=f+10396|0;A=f+10380|0;B=f+10348|0;C=f+10352|0;D=f+10356|0;E=f+10340|0;F=f+52|0;G=f+48|0;H=f+10332|0;I=f+10516|0;J=f+10448|0;K=f+10452|0;L=f+10456|0;M=f+10440|0;f=h;a:while(1){if(r){h=f<<2;N=(h|0)/4|0;O=h-o|0;P=j;do{Q=P<<2;R=(Q|0)/4|0;S=(ga(c[g>>2]|0,N)|0)+R|0;T=(c[i>>2]|0)+S|0;S=a[T]|0;U=S&255;if((U&p|0)==0){a[T]=S&-4}else{S=Q-n|0;T=c[t>>2]|0;V=S>>T;W=O>>T;if(!((V|0)>-1)){X=8;break a}Y=c[u>>2]|0;if((V|0)>=(Y|0)){X=8;break a}if(!((W|0)>-1)){X=11;break a}Z=c[v>>2]|0;if((W|0)>=(Z|0)){X=11;break a}_=(ga(Y,W)|0)+V|0;V=c[w>>2]|0;W=V+(_*3|0)|0;_=Q>>T;$=h>>T;if(!((_|0)>-1&(_|0)<(Y|0))){X=13;break a}if(!(($|0)>-1&($|0)<(Z|0))){X=15;break a}Z=V+(((ga(Y,$)|0)+_|0)*3|0)|0;b:do{if(((d[W]|d[W+1|0]<<8)<<16>>16&768)==0|((d[Z]|d[Z+1|0]<<8)<<16>>16&768)==0){aa=2}else{if((U&q|0)!=0){_=c[J>>2]|0;$=Q>>_;Y=h>>_;if(!(($|0)>-1)){X=20;break a}V=c[K>>2]|0;if(($|0)>=(V|0)){X=20;break a}if(!((Y|0)>-1)){X=23;break a}T=c[L>>2]|0;if((Y|0)>=(T|0)){X=23;break a}ba=(ga(V,Y)|0)+$|0;$=c[M>>2]|0;if(!((a[$+ba|0]|0)>-1)){aa=1;break}ba=S>>_;Y=O>>_;if(!((ba|0)>-1&(ba|0)<(V|0))){X=26;break a}if(!((Y|0)>-1&(Y|0)<(T|0))){X=28;break a}T=$+((ga(V,Y)|0)+ba)|0;if(!((a[T]|0)>-1)){aa=1;break}}T=c[x>>2]|0;ba=S>>T;Y=O>>T;if(!((ba|0)>-1)){X=32;break a}V=c[y>>2]|0;if((ba|0)>=(V|0)){X=32;break a}if(!((Y|0)>-1)){X=35;break a}$=c[z>>2]|0;if((Y|0)>=($|0)){X=35;break a}_=(ga(V,Y)|0)+ba|0;ba=c[A>>2]|0;Y=Q>>T;ca=h>>T;if(!((Y|0)>-1&(Y|0)<(V|0))){X=37;break a}if(!((ca|0)>-1&(ca|0)<($|0))){X=39;break a}$=(ga(V,ca)|0)+Y|0;Y=c[B>>2]|0;ca=S>>Y;V=O>>Y;if(!((ca|0)>-1)){X=42;break a}T=c[C>>2]|0;if((ca|0)>=(T|0)){X=42;break a}if(!((V|0)>-1)){X=45;break a}da=c[D>>2]|0;if((V|0)>=(da|0)){X=45;break a}ea=(ga(T,V)|0)+ca|0;ca=c[E>>2]|0;V=e[ca+(ea*24|0)+2>>1]|0;ea=c[G>>2]|0;fa=(c[F>>2]|0)-ea>>2;if(V>>>0<fa>>>0){ha=c[ea+(V<<2)>>2]|0}else{ha=0}V=Q>>Y;ia=h>>Y;if(!((V|0)>-1&(V|0)<(T|0))){X=49;break a}if(!((ia|0)>-1&(ia|0)<(da|0))){X=51;break a}da=ca+(((ga(T,ia)|0)+V|0)*24|0)+2|0;V=e[da>>1]|0;if(V>>>0<fa>>>0){ja=c[ea+(V<<2)>>2]|0}else{ja=0}V=a[ba+(_*12|0)|0]|0;ea=V<<24>>24==0;if(ea){ka=-1}else{ka=c[ha+916+(a[ba+(_*12|0)+2|0]<<2)>>2]|0}fa=a[ba+(_*12|0)+1|0]|0;da=fa<<24>>24==0;if(da){la=-1}else{la=c[ha+980+(a[ba+(_*12|0)+3|0]<<2)>>2]|0}ia=a[ba+($*12|0)|0]|0;T=ia<<24>>24==0;if(T){ma=-1}else{ma=c[ja+916+(a[ba+($*12|0)+2|0]<<2)>>2]|0}ca=a[ba+($*12|0)+1|0]|0;Y=ca<<24>>24==0;if(Y){na=-1}else{na=c[ja+980+(a[ba+($*12|0)+3|0]<<2)>>2]|0}oa=(ka|0)==(ma|0);if(!(oa&(la|0)==(na|0))){if(!((ka|0)==(na|0)&(la|0)==(ma|0))){aa=1;break}}pa=ea?0:b[ba+(_*12|0)+6>>1]|0;qa=ea?0:b[ba+(_*12|0)+4>>1]|0;ea=da?0:b[ba+(_*12|0)+10>>1]|0;ra=da?0:b[ba+(_*12|0)+8>>1]|0;_=T?0:b[ba+($*12|0)+6>>1]|0;da=T?0:b[ba+($*12|0)+4>>1]|0;T=Y?0:b[ba+($*12|0)+10>>1]|0;sa=Y?0:b[ba+($*12|0)+8>>1]|0;if(((fa&255)+(V&255)|0)!=((ca&255)+(ia&255)|0)){Ue((c[H>>2]|0)+4|0,1013,0);a[I]=3}if((ka|0)==(la|0)){if((ma|0)!=(na|0)){X=79;break a}ia=qa<<16>>16;ca=da<<16>>16;V=ia-ca|0;do{if((((V|0)<0?-V|0:V)|0)<=3){fa=(pa<<16>>16)-(_<<16>>16)|0;if((((fa|0)<0?-fa|0:fa)|0)>3){break}fa=(ra<<16>>16)-(sa<<16>>16)|0;if((((fa|0)<0?-fa|0:fa)|0)>3){break}fa=(ea<<16>>16)-(T<<16>>16)|0;if((((fa|0)<0?-fa|0:fa)|0)<=3){aa=0;break b}}}while(0);V=ia-(sa<<16>>16)|0;do{if((((V|0)<0?-V|0:V)|0)<=3){fa=(pa<<16>>16)-(T<<16>>16)|0;if((((fa|0)<0?-fa|0:fa)|0)>3){break}fa=(ra<<16>>16)-ca|0;if((((fa|0)<0?-fa|0:fa)|0)>3){break}fa=(ea<<16>>16)-(_<<16>>16)|0;if((((fa|0)<0?-fa|0:fa)|0)<=3){aa=0;break b}}}while(0);aa=1;break}ca=qa<<16>>16;if(oa){V=ca-(da<<16>>16)|0;do{if((((V|0)<0?-V|0:V)|0)<=3){ia=(pa<<16>>16)-(_<<16>>16)|0;if((((ia|0)<0?-ia|0:ia)|0)>3){break}ia=(ra<<16>>16)-(sa<<16>>16)|0;if((((ia|0)<0?-ia|0:ia)|0)>3){break}ia=(ea<<16>>16)-(T<<16>>16)|0;if((((ia|0)<0?-ia|0:ia)|0)<=3){aa=0;break b}}}while(0);aa=1;break}else{V=ca-(sa<<16>>16)|0;do{if((((V|0)<0?-V|0:V)|0)<=3){oa=(pa<<16>>16)-(T<<16>>16)|0;if((((oa|0)<0?-oa|0:oa)|0)>3){break}oa=(ra<<16>>16)-(da<<16>>16)|0;if((((oa|0)<0?-oa|0:oa)|0)>3){break}oa=(ea<<16>>16)-(_<<16>>16)|0;if((((oa|0)<0?-oa|0:oa)|0)<=3){aa=0;break b}}}while(0);aa=1;break}}}while(0);Q=(ga(c[g>>2]|0,N)|0)+R|0;S=(c[i>>2]|0)+Q|0;a[S]=a[S]&-4|aa}P=P+l|0;}while((P|0)<(s|0))}P=f+m|0;if((P|0)<(k|0)){f=P}else{X=93;break}}if((X|0)==8){ec(8880,6264,118,17352)}else if((X|0)==11){ec(4520,6264,119,17352)}else if((X|0)==13){ec(8880,6264,118,17352)}else if((X|0)==15){ec(4520,6264,119,17352)}else if((X|0)==20){ec(8880,6264,118,17352)}else if((X|0)==23){ec(4520,6264,119,17352)}else if((X|0)==26){ec(8880,6264,118,17352)}else if((X|0)==28){ec(4520,6264,119,17352)}else if((X|0)==32){ec(8880,6264,118,17352)}else if((X|0)==35){ec(4520,6264,119,17352)}else if((X|0)==37){ec(8880,6264,118,17352)}else if((X|0)==39){ec(4520,6264,119,17352)}else if((X|0)==42){ec(8880,6264,118,17352)}else if((X|0)==45){ec(4520,6264,119,17352)}else if((X|0)==49){ec(8880,6264,118,17352)}else if((X|0)==51){ec(4520,6264,119,17352)}else if((X|0)==79){ec(3256,14616,343,18768)}else if((X|0)==93){return}}function xe(f,g,h,j,k,l){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0;m=i;i=i+64|0;n=m|0;o=m+32|0;p=g?2:1;q=g?1:2;r=f+40|0;s=c[r>>2]|0;t=c[f+5760>>2]|0;u=c[f+10472>>2]|0;v=(u|0)>(l|0)?l:u;l=c[f+10476>>2]|0;w=(l|0)>(j|0)?j:l;if((w|0)<=(h|0)){i=m;return}l=(v|0)>(k|0);j=f+10460|0;x=f+4|0;y=f+10368|0;z=f+10372|0;A=f+10376|0;B=f+10360|0;C=f+10348|0;D=f+10352|0;E=f+10356|0;F=f+10340|0;G=f+48|0;H=t-8|0;I=o+4|0;J=o+2|0;K=o|0;L=o+28|0;M=o+26|0;N=o+24|0;O=n+4|0;P=n+2|0;Q=n|0;R=n+28|0;S=n+26|0;T=n+24|0;U=o+6|0;V=n+6|0;W=o+30|0;X=n+30|0;Y=f+5480|0;f=(1<<t)-1|0;t=f&65535;Z=s<<1;_=h;a:while(1){if(l){h=_<<2;$=(h|0)/4|0;aa=h-1|0;ba=c[j>>2]|0;ca=k;do{da=ca<<2;ea=ba+((ga(u,$)|0)+((da|0)/4|0))|0;fa=a[ea]&3;ea=fa&255;b:do{if(!(fa<<24>>24==0)){ha=(c[x>>2]|0)+((ga(c[r>>2]|0,h)|0)+da<<1)|0;if(g){ia=0;do{ja=ga(ia,s)|0;b[n+(ia<<3)>>1]=b[ha+(ja<<1)>>1]|0;b[o+(ia<<3)>>1]=b[ha+(ja-1<<1)>>1]|0;b[n+(ia<<3)+2>>1]=b[ha+(ja+1<<1)>>1]|0;b[o+(ia<<3)+2>>1]=b[ha+(ja-2<<1)>>1]|0;b[n+(ia<<3)+4>>1]=b[ha+(ja+2<<1)>>1]|0;b[o+(ia<<3)+4>>1]=b[ha+(ja-3<<1)>>1]|0;b[n+(ia<<3)+6>>1]=b[ha+(ja+3<<1)>>1]|0;b[o+(ia<<3)+6>>1]=b[ha+(ja-4<<1)>>1]|0;ia=ia+1|0;}while((ia|0)<4)}else{ia=0;do{b[n+(ia<<3)>>1]=b[ha+(ia<<1)>>1]|0;b[o+(ia<<3)>>1]=b[ha+(ia-s<<1)>>1]|0;b[n+(ia<<3)+2>>1]=b[ha+(s+ia<<1)>>1]|0;b[o+(ia<<3)+2>>1]=b[ha+(ia-(s<<1)<<1)>>1]|0;b[n+(ia<<3)+4>>1]=b[ha+((s<<1)+ia<<1)>>1]|0;b[o+(ia<<3)+4>>1]=b[ha+(ia+(s*-3|0)<<1)>>1]|0;b[n+(ia<<3)+6>>1]=b[ha+((s*3|0)+ia<<1)>>1]|0;b[o+(ia<<3)+6>>1]=b[ha+(ia-(s<<2)<<1)>>1]|0;ia=ia+1|0;}while((ia|0)<4)}ia=c[y>>2]|0;ja=da>>ia;ka=h>>ia;if(!((ja|0)>-1)){la=11;break a}ma=c[z>>2]|0;if((ja|0)>=(ma|0)){la=11;break a}if(!((ka|0)>-1)){la=14;break a}na=c[A>>2]|0;if((ka|0)>=(na|0)){la=14;break a}oa=ga(ma,ka)|0;ka=oa+ja|0;pa=c[B>>2]|0;qa=a[pa+(ka*3|0)+2|0]|0;if(g){ra=da-1>>ia;if(!((ra|0)>-1&(ra|0)<(ma|0))){la=17;break a}sa=oa+ra|0}else{ra=aa>>ia;if(!((ra|0)>-1&(ra|0)<(na|0))){la=20;break a}sa=(ga(ma,ra)|0)+ja|0}ra=qa+1+(a[pa+(sa*3|0)+2|0]|0)>>1;qa=c[C>>2]|0;ta=da>>qa;ua=h>>qa;if(!((ta|0)>-1)){la=24;break a}qa=c[D>>2]|0;if((ta|0)>=(qa|0)){la=24;break a}if(!((ua|0)>-1)){la=27;break a}if((ua|0)>=(c[E>>2]|0)){la=27;break a}va=(ga(qa,ua)|0)+ta|0;ta=c[(c[G>>2]|0)+(e[(c[F>>2]|0)+(va*24|0)+2>>1]<<2)>>2]|0;va=(c[ta+756>>2]|0)+ra|0;if((va|0)<0){wa=0}else{wa=(va|0)>51?51:va}va=d[30360+wa|0]<<H;ua=(ea<<1)-2+ra+(c[ta+760>>2]|0)|0;if((ua|0)<0){xa=0}else{xa=(ua|0)>53?53:ua}ua=d[30664+xa|0]<<H;ta=b[I>>1]|0;ra=b[J>>1]|0;qa=b[K>>1]|0;ya=qa&65535;za=(ta&65535)-((ra&65535)<<1)+ya|0;Aa=(za|0)<0?-za|0:za;za=e[N>>1]|0;Ba=(e[L>>1]|0)-(e[M>>1]<<1)+za|0;Ca=(Ba|0)<0?-Ba|0:Ba;Ba=b[O>>1]|0;Da=b[P>>1]|0;Ea=b[Q>>1]|0;Fa=Ea&65535;Ga=(Ba&65535)-((Da&65535)<<1)+Fa|0;Ha=(Ga|0)<0?-Ga|0:Ga;Ga=e[T>>1]|0;Ia=(e[R>>1]|0)-(e[S>>1]<<1)+Ga|0;Ja=(Ia|0)<0?-Ia|0:Ia;Ia=Ha+Aa|0;Ka=Ja+Ca|0;La=Ca+Aa|0;Aa=Ja+Ha|0;if((Ka+Ia|0)>=(va|0)){break}Ha=va>>2;do{if((Ia<<1|0)<(Ha|0)){Ja=(e[U>>1]|0)-ya|0;Ca=Fa-(e[V>>1]|0)|0;if((((Ca|0)<0?-Ca|0:Ca)+((Ja|0)<0?-Ja|0:Ja)|0)>=(va>>3|0)){Ma=1;break}Ja=ya-Fa|0;Ma=(((Ja|0)<0?-Ja|0:Ja)|0)>=((ua*5|0)+1>>1|0)}else{Ma=1}}while(0);do{if((Ka<<1|0)<(Ha|0)){Fa=(e[W>>1]|0)-za|0;ya=Ga-(e[X>>1]|0)|0;if((((ya|0)<0?-ya|0:ya)+((Fa|0)<0?-Fa|0:Fa)|0)>=(va>>3|0)){Na=1;break}Fa=za-Ga|0;Na=(((Fa|0)<0?-Fa|0:Fa)|0)>=((ua*5|0)+1>>1|0)}else{Na=1}}while(0);Ga=Ma|Na;za=(va>>1)+va>>3;Ha=a[Y]|0;Ka=Ha<<24>>24!=0;if(g){Fa=da-1>>ia;if(Ka){if(!((Fa|0)>-1&(Fa|0)<(ma|0))){la=42;break a}ya=pa+((oa+Fa|0)*3|0)|0;Oa=(((d[ya]|d[ya+1|0]<<8)<<16>>16&65535)>>>10&1^1)&255}else{Oa=1}if(!((Fa|0)>-1&(Fa|0)<(ma|0))){la=45;break a}ya=pa+((oa+Fa|0)*3|0)|0;if(Ha<<24>>24==0){Pa=1}else{Fa=pa+(ka*3|0)|0;Pa=((d[Fa]|d[Fa+1|0]<<8)<<16>>16&1024)==0}Fa=pa+(ka*3|0)|0;Qa=((d[ya]|d[ya+1|0]<<8)<<16>>16&2048)==0&Oa<<24>>24!=0;Ra=((d[Fa]|d[Fa+1|0]<<8)<<16>>16&2048)==0&Pa}else{Fa=aa>>ia;if(Ka){if(!((Fa|0)>-1&(Fa|0)<(na|0))){la=51;break a}Ka=pa+(((ga(ma,Fa)|0)+ja|0)*3|0)|0;Sa=((d[Ka]|d[Ka+1|0]<<8)<<16>>16&1024)==0}else{Sa=1}if(!((Fa|0)>-1&(Fa|0)<(na|0))){la=54;break a}Ka=pa+(((ga(ma,Fa)|0)+ja|0)*3|0)|0;if(Ha<<24>>24==0){Ta=1}else{Ha=pa+(ka*3|0)|0;Ta=((d[Ha]|d[Ha+1|0]<<8)<<16>>16&1024)==0}Ha=pa+(ka*3|0)|0;Qa=((d[Ka]|d[Ka+1|0]<<8)<<16>>16&2048)==0&Sa;Ra=((d[Ha]|d[Ha+1|0]<<8)<<16>>16&2048)==0&Ta}Ha=ua*10|0;Ka=-ua|0;Fa=(La|0)>=(za|0)|Qa^1;ya=(Aa|0)>=(za|0)|Ra^1;za=ua>>1;Ia=-za|0;Ja=ua<<1;Ca=0;Ua=qa;Va=ra;Wa=ta;Xa=Ea;Ya=Da;Za=Ba;while(1){_a=b[o+(Ca<<3)+6>>1]|0;$a=b[n+(Ca<<3)+6>>1]|0;do{if(Ga){ab=Xa&65535;bb=Ua&65535;cb=Ya&65535;db=Va&65535;eb=((ab-bb|0)*9|0)+8+((cb-db|0)*-3|0)>>4;if((((eb|0)<0?-eb|0:eb)|0)>=(Ha|0)){break}if((eb|0)<(Ka|0)){fb=Ka}else{fb=(eb|0)>(ua|0)?ua:eb}do{if(g){if(Qa){eb=fb+bb|0;if((eb|0)<0){gb=0}else{gb=(eb|0)>(f|0)?t:eb&65535}eb=ha+((ga(Ca,s)|0)-1<<1)|0;b[eb>>1]=gb}if(!Ra){break}eb=ab-fb|0;if((eb|0)<0){hb=0}else{hb=(eb|0)>(f|0)?t:eb&65535}eb=ha+((ga(Ca,s)|0)<<1)|0;b[eb>>1]=hb}else{if(Qa){eb=fb+bb|0;if((eb|0)<0){ib=0}else{ib=(eb|0)>(f|0)?t:eb&65535}b[ha+(Ca-s<<1)>>1]=ib}if(!Ra){break}eb=ab-fb|0;if((eb|0)<0){jb=0}else{jb=(eb|0)>(f|0)?t:eb&65535}b[ha+(Ca<<1)>>1]=jb}}while(0);do{if(!Fa){eb=fb+(((bb+1+(Wa&65535)|0)>>>1)-db)|0;kb=eb>>1;if((kb|0)<(Ia|0)){lb=Ia}else{lb=((kb|0)>(za|0)?ua:eb)>>1}eb=lb+db|0;kb=(eb|0)<0;if(g){if(kb){mb=0}else{mb=(eb|0)>(f|0)?t:eb&65535}nb=ha+((ga(Ca,s)|0)-2<<1)|0;b[nb>>1]=mb;break}else{if(kb){ob=0}else{ob=(eb|0)>(f|0)?t:eb&65535}b[ha+(Ca-Z<<1)>>1]=ob;break}}}while(0);if(ya){break}db=((ab+1+(Za&65535)|0)>>>1)-cb-fb|0;bb=db>>1;if((bb|0)<(Ia|0)){pb=Ia}else{pb=((bb|0)>(za|0)?ua:db)>>1}db=pb+cb|0;bb=(db|0)<0;if(g){if(bb){qb=0}else{qb=(db|0)>(f|0)?t:db&65535}eb=ha+((ga(Ca,s)|0)+1<<1)|0;b[eb>>1]=qb;break}else{if(bb){rb=0}else{rb=(db|0)>(f|0)?t:db&65535}b[ha+(Ca+s<<1)>>1]=rb;break}}else{db=Wa&65535;bb=Va&65535;eb=Ua&65535;kb=Xa&65535;nb=kb<<1;sb=Ya&65535;tb=(eb<<1)+4|0;ub=tb+(bb<<1)+db+nb+sb>>3;vb=eb-Ja|0;do{if((ub|0)<(vb|0)){wb=vb&65535}else{xb=eb+Ja|0;if((ub|0)>(xb|0)){wb=xb&65535;break}else{wb=ub&65535;break}}}while(0);ub=(eb+2+bb+db+kb|0)>>>2;vb=bb-Ja|0;do{if((ub|0)<(vb|0)){yb=vb&65535}else{cb=bb+Ja|0;if((ub|0)>(cb|0)){yb=cb&65535;break}else{yb=ub&65535;break}}}while(0);ub=eb+4+bb+(db*3|0)+((_a&65535)<<1)+kb>>3;vb=db-Ja|0;do{if((ub|0)<(vb|0)){zb=vb&65535}else{cb=db+Ja|0;if((ub|0)>(cb|0)){zb=cb&65535;break}else{zb=ub&65535;break}}}while(0);ub=Za&65535;db=tb+bb+nb+(sb<<1)+ub>>3;vb=kb-Ja|0;do{if((db|0)<(vb|0)){Ab=vb&65535}else{cb=kb+Ja|0;if((db|0)>(cb|0)){Ab=cb&65535;break}else{Ab=db&65535;break}}}while(0);db=kb+eb+sb|0;vb=(ub+2+db|0)>>>2;nb=sb-Ja|0;do{if((vb|0)<(nb|0)){Bb=nb&65535}else{bb=sb+Ja|0;if((vb|0)>(bb|0)){Bb=bb&65535;break}else{Bb=vb&65535;break}}}while(0);vb=(db+4+(ub*3|0)+(($a&65535)<<1)|0)>>>3;sb=ub-Ja|0;do{if((vb|0)<(sb|0)){Cb=sb&65535}else{nb=ub+Ja|0;if((vb|0)>(nb|0)){Cb=nb&65535;break}else{Cb=vb&65535;break}}}while(0);if(g){vb=ga(Ca,s)|0;if(Qa){b[ha+(vb-1<<1)>>1]=wb}if(Ra){b[ha+(vb<<1)>>1]=Ab}if(Qa){b[ha+(vb-2<<1)>>1]=yb}if(Ra){b[ha+(vb+1<<1)>>1]=Bb}if(Qa){b[ha+(vb-3<<1)>>1]=zb}if(!Ra){break}b[ha+(vb+2<<1)>>1]=Cb;break}else{if(Qa){b[ha+(Ca-s<<1)>>1]=wb}if(Ra){b[ha+(Ca<<1)>>1]=Ab}if(Qa){b[ha+(Ca-(s<<1)<<1)>>1]=yb}if(Ra){b[ha+(s+Ca<<1)>>1]=Bb}if(Qa){b[ha+(Ca+(s*-3|0)<<1)>>1]=zb}if(!Ra){break}b[ha+((s<<1)+Ca<<1)>>1]=Cb;break}}}while(0);$a=Ca+1|0;if(($a|0)>=4){break b}Ca=$a;Ua=b[o+($a<<3)>>1]|0;Va=b[o+($a<<3)+2>>1]|0;Wa=b[o+($a<<3)+4>>1]|0;Xa=b[n+($a<<3)>>1]|0;Ya=b[n+($a<<3)+2>>1]|0;Za=b[n+($a<<3)+4>>1]|0}}}while(0);ca=ca+p|0;}while((ca|0)<(v|0))}ca=_+q|0;if((ca|0)<(w|0)){_=ca}else{la=145;break}}if((la|0)==11){ec(8880,6264,118,17352)}else if((la|0)==14){ec(4520,6264,119,17352)}else if((la|0)==17){ec(8880,6264,118,17352)}else if((la|0)==20){ec(4520,6264,119,17352)}else if((la|0)==24){ec(8880,6264,118,17352)}else if((la|0)==27){ec(4520,6264,119,17352)}else if((la|0)==42){ec(8880,6264,118,17352)}else if((la|0)==45){ec(8880,6264,118,17352)}else if((la|0)==51){ec(4520,6264,119,17352)}else if((la|0)==54){ec(4520,6264,119,17352)}else if((la|0)==145){i=m;return}}function ye(b,f,g,h,j,k){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0;l=i;i=i+32|0;m=l|0;n=l+16|0;o=f?2:1;p=f?1:2;q=b+40|0;r=c[q>>2]|0;s=c[b+5760>>2]|0;t=b+10472|0;u=c[t>>2]|0;v=(u|0)>(k|0)?k:u;u=c[b+10476>>2]|0;k=(u|0)>(h|0)?h:u;if((k|0)<=(g|0)){i=l;return}u=(v|0)>(j|0);h=b+10460|0;w=b+4|0;x=b+10368|0;y=b+10372|0;z=b+10376|0;A=b+10360|0;B=b+10348|0;C=b+10352|0;D=b+10356|0;E=b+10340|0;F=b+48|0;G=s-8|0;H=n+2|0;I=n+1|0;J=n|0;K=n+14|0;L=n+13|0;M=n+12|0;N=m+2|0;O=m+1|0;P=m|0;Q=m+14|0;R=m+13|0;S=m+12|0;T=n+3|0;U=m+3|0;V=n+15|0;W=m+15|0;X=b+5480|0;b=(1<<s)-1|0;s=b&255;Y=r<<1;Z=g;a:while(1){if(u){g=Z<<2;_=(g|0)/4|0;$=g-1|0;aa=j;do{ba=aa<<2;ca=(ga(c[t>>2]|0,_)|0)+((ba|0)/4|0)|0;da=a[(c[h>>2]|0)+ca|0]&3;ca=da&255;b:do{if(!(da<<24>>24==0)){ea=c[w>>2]|0;fa=(ga(c[q>>2]|0,g)|0)+ba|0;ha=0;do{ia=(ga(ha,r)|0)+fa|0;ja=ha+fa|0;if(f){a[m+(ha<<2)|0]=a[ea+ia|0]|0;a[n+(ha<<2)|0]=a[ea+(ia-1)|0]|0;a[m+(ha<<2)+1|0]=a[ea+(ia+1)|0]|0;a[n+(ha<<2)+1|0]=a[ea+(ia-2)|0]|0;a[m+(ha<<2)+2|0]=a[ea+(ia+2)|0]|0;a[n+(ha<<2)+2|0]=a[ea+(ia-3)|0]|0;a[m+(ha<<2)+3|0]=a[ea+(ia+3)|0]|0;a[n+(ha<<2)+3|0]=a[ea+(ia-4)|0]|0}else{a[m+(ha<<2)|0]=a[ea+ja|0]|0;a[n+(ha<<2)|0]=a[ea+(ja-r)|0]|0;a[m+(ha<<2)+1|0]=a[ea+(ja+r)|0]|0;a[n+(ha<<2)+1|0]=a[ea+(ja-(r<<1))|0]|0;a[m+(ha<<2)+2|0]=a[ea+(ja+(r<<1))|0]|0;a[n+(ha<<2)+2|0]=a[ea+(ja+(r*-3|0))|0]|0;a[m+(ha<<2)+3|0]=a[ea+(ja+(r*3|0))|0]|0;a[n+(ha<<2)+3|0]=a[ea+(ja-(r<<2))|0]|0}ha=ha+1|0;}while((ha|0)<4);ha=c[x>>2]|0;ja=ba>>ha;ia=g>>ha;if(!((ja|0)>-1)){ka=12;break a}la=c[y>>2]|0;if((ja|0)>=(la|0)){ka=12;break a}if(!((ia|0)>-1)){ka=15;break a}ma=c[z>>2]|0;if((ia|0)>=(ma|0)){ka=15;break a}na=ga(la,ia)|0;ia=na+ja|0;oa=c[A>>2]|0;pa=a[oa+(ia*3|0)+2|0]|0;if(f){qa=ba-1>>ha;if(!((qa|0)>-1&(qa|0)<(la|0))){ka=18;break a}ra=na+qa|0}else{qa=$>>ha;if(!((qa|0)>-1&(qa|0)<(ma|0))){ka=21;break a}ra=(ga(la,qa)|0)+ja|0}qa=pa+1+(a[oa+(ra*3|0)+2|0]|0)>>1;pa=c[B>>2]|0;sa=ba>>pa;ta=g>>pa;if(!((sa|0)>-1)){ka=25;break a}pa=c[C>>2]|0;if((sa|0)>=(pa|0)){ka=25;break a}if(!((ta|0)>-1)){ka=28;break a}if((ta|0)>=(c[D>>2]|0)){ka=28;break a}ua=(ga(pa,ta)|0)+sa|0;sa=c[(c[F>>2]|0)+(e[(c[E>>2]|0)+(ua*24|0)+2>>1]<<2)>>2]|0;ua=(c[sa+756>>2]|0)+qa|0;if((ua|0)<0){va=0}else{va=(ua|0)>51?51:ua}ua=d[30360+va|0]<<G;ta=(ca<<1)-2+qa+(c[sa+760>>2]|0)|0;if((ta|0)<0){wa=0}else{wa=(ta|0)>53?53:ta}ta=d[30664+wa|0]<<G;sa=a[H]|0;qa=a[I]|0;pa=a[J]|0;xa=pa&255;ya=(sa&255)-((qa&255)<<1)+xa|0;za=(ya|0)<0?-ya|0:ya;ya=d[M]|0;Aa=(d[K]|0)-(d[L]<<1)+ya|0;Ba=(Aa|0)<0?-Aa|0:Aa;Aa=a[N]|0;Ca=a[O]|0;Da=a[P]|0;Ea=Da&255;Fa=(Aa&255)-((Ca&255)<<1)+Ea|0;Ga=(Fa|0)<0?-Fa|0:Fa;Fa=d[S]|0;Ha=(d[Q]|0)-(d[R]<<1)+Fa|0;Ia=(Ha|0)<0?-Ha|0:Ha;Ha=Ga+za|0;Ja=Ia+Ba|0;Ka=Ba+za|0;za=Ia+Ga|0;if((Ja+Ha|0)>=(ua|0)){break}Ga=ua>>2;do{if((Ha<<1|0)<(Ga|0)){Ia=(d[T]|0)-xa|0;Ba=Ea-(d[U]|0)|0;if((((Ba|0)<0?-Ba|0:Ba)+((Ia|0)<0?-Ia|0:Ia)|0)>=(ua>>3|0)){La=1;break}Ia=xa-Ea|0;La=(((Ia|0)<0?-Ia|0:Ia)|0)>=((ta*5|0)+1>>1|0)}else{La=1}}while(0);do{if((Ja<<1|0)<(Ga|0)){Ea=(d[V]|0)-ya|0;xa=Fa-(d[W]|0)|0;if((((xa|0)<0?-xa|0:xa)+((Ea|0)<0?-Ea|0:Ea)|0)>=(ua>>3|0)){Ma=1;break}Ea=ya-Fa|0;Ma=(((Ea|0)<0?-Ea|0:Ea)|0)>=((ta*5|0)+1>>1|0)}else{Ma=1}}while(0);Fa=La|Ma;ya=(ua>>1)+ua>>3;Ga=a[X]|0;Ja=Ga<<24>>24!=0;if(f){Ea=ba-1>>ha;if(Ja){if(!((Ea|0)>-1&(Ea|0)<(la|0))){ka=43;break a}xa=oa+((na+Ea|0)*3|0)|0;Na=(((d[xa]|d[xa+1|0]<<8)<<16>>16&65535)>>>10&1^1)&255}else{Na=1}if(!((Ea|0)>-1&(Ea|0)<(la|0))){ka=46;break a}xa=oa+((na+Ea|0)*3|0)|0;if(Ga<<24>>24==0){Oa=1}else{Ea=oa+(ia*3|0)|0;Oa=((d[Ea]|d[Ea+1|0]<<8)<<16>>16&1024)==0}Ea=oa+(ia*3|0)|0;Pa=((d[xa]|d[xa+1|0]<<8)<<16>>16&2048)==0&Na<<24>>24!=0;Qa=((d[Ea]|d[Ea+1|0]<<8)<<16>>16&2048)==0&Oa}else{Ea=$>>ha;if(Ja){if(!((Ea|0)>-1&(Ea|0)<(ma|0))){ka=52;break a}Ja=oa+(((ga(la,Ea)|0)+ja|0)*3|0)|0;Ra=((d[Ja]|d[Ja+1|0]<<8)<<16>>16&1024)==0}else{Ra=1}if(!((Ea|0)>-1&(Ea|0)<(ma|0))){ka=55;break a}Ja=oa+(((ga(la,Ea)|0)+ja|0)*3|0)|0;if(Ga<<24>>24==0){Sa=1}else{Ga=oa+(ia*3|0)|0;Sa=((d[Ga]|d[Ga+1|0]<<8)<<16>>16&1024)==0}Ga=oa+(ia*3|0)|0;Pa=((d[Ja]|d[Ja+1|0]<<8)<<16>>16&2048)==0&Ra;Qa=((d[Ga]|d[Ga+1|0]<<8)<<16>>16&2048)==0&Sa}Ga=ta*10|0;Ja=-ta|0;Ea=fa-1|0;xa=(Ka|0)>=(ya|0)|Pa^1;Ha=(za|0)>=(ya|0)|Qa^1;ya=ta>>1;Ia=-ya|0;Ba=fa|1;Ta=fa+r|0;Ua=fa-2|0;Va=fa-Y|0;Wa=fa-r|0;Xa=ta<<1;Ya=0;Za=pa;_a=qa;$a=sa;ab=Da;bb=Ca;cb=Aa;while(1){db=a[n+(Ya<<2)+3|0]|0;eb=a[m+(Ya<<2)+3|0]|0;do{if(Fa){fb=ab&255;gb=Za&255;hb=bb&255;ib=_a&255;jb=((fb-gb|0)*9|0)+8+((hb-ib|0)*-3|0)>>4;if((((jb|0)<0?-jb|0:jb)|0)>=(Ga|0)){break}if((jb|0)<(Ja|0)){kb=Ja}else{kb=(jb|0)>(ta|0)?ta:jb}do{if(f){if(Pa){jb=kb+gb|0;if((jb|0)<0){lb=0}else{lb=(jb|0)>(b|0)?s:jb&255}jb=ea+(Ea+(ga(Ya,r)|0))|0;a[jb]=lb}if(!Qa){break}jb=fb-kb|0;if((jb|0)<0){mb=0}else{mb=(jb|0)>(b|0)?s:jb&255}jb=ea+((ga(Ya,r)|0)+fa)|0;a[jb]=mb}else{if(Pa){jb=kb+gb|0;if((jb|0)<0){nb=0}else{nb=(jb|0)>(b|0)?s:jb&255}a[ea+(Wa+Ya)|0]=nb}if(!Qa){break}jb=fb-kb|0;if((jb|0)<0){ob=0}else{ob=(jb|0)>(b|0)?s:jb&255}a[ea+(Ya+fa)|0]=ob}}while(0);do{if(!xa){jb=kb+(((gb+1+($a&255)|0)>>>1)-ib)|0;pb=jb>>1;if((pb|0)<(Ia|0)){qb=Ia}else{qb=((pb|0)>(ya|0)?ta:jb)>>1}jb=qb+ib|0;pb=(jb|0)<0;if(f){if(pb){rb=0}else{rb=(jb|0)>(b|0)?s:jb&255}sb=ea+(Ua+(ga(Ya,r)|0))|0;a[sb]=rb;break}else{if(pb){tb=0}else{tb=(jb|0)>(b|0)?s:jb&255}a[ea+(Va+Ya)|0]=tb;break}}}while(0);if(Ha){break}ib=((fb+1+(cb&255)|0)>>>1)-hb-kb|0;gb=ib>>1;if((gb|0)<(Ia|0)){ub=Ia}else{ub=((gb|0)>(ya|0)?ta:ib)>>1}ib=ub+hb|0;gb=(ib|0)<0;if(f){if(gb){vb=0}else{vb=(ib|0)>(b|0)?s:ib&255}jb=ea+(Ba+(ga(Ya,r)|0))|0;a[jb]=vb;break}else{if(gb){wb=0}else{wb=(ib|0)>(b|0)?s:ib&255}a[ea+(Ta+Ya)|0]=wb;break}}else{ib=$a&255;gb=_a&255;jb=Za&255;pb=ab&255;sb=pb<<1;xb=bb&255;yb=(jb<<1)+4|0;zb=yb+(gb<<1)+ib+sb+xb>>3;Ab=jb-Xa|0;do{if((zb|0)<(Ab|0)){Bb=Ab&255}else{Cb=jb+Xa|0;if((zb|0)>(Cb|0)){Bb=Cb&255;break}else{Bb=zb&255;break}}}while(0);zb=(jb+2+gb+ib+pb|0)>>>2;Ab=gb-Xa|0;do{if((zb|0)<(Ab|0)){Db=Ab&255}else{hb=gb+Xa|0;if((zb|0)>(hb|0)){Db=hb&255;break}else{Db=zb&255;break}}}while(0);zb=jb+4+gb+(ib*3|0)+((db&255)<<1)+pb>>3;Ab=ib-Xa|0;do{if((zb|0)<(Ab|0)){Eb=Ab&255}else{hb=ib+Xa|0;if((zb|0)>(hb|0)){Eb=hb&255;break}else{Eb=zb&255;break}}}while(0);zb=cb&255;ib=yb+gb+sb+(xb<<1)+zb>>3;Ab=pb-Xa|0;do{if((ib|0)<(Ab|0)){Fb=Ab&255}else{hb=pb+Xa|0;if((ib|0)>(hb|0)){Fb=hb&255;break}else{Fb=ib&255;break}}}while(0);ib=pb+jb+xb|0;Ab=(zb+2+ib|0)>>>2;sb=xb-Xa|0;do{if((Ab|0)<(sb|0)){Gb=sb&255}else{gb=xb+Xa|0;if((Ab|0)>(gb|0)){Gb=gb&255;break}else{Gb=Ab&255;break}}}while(0);Ab=(ib+4+(zb*3|0)+((eb&255)<<1)|0)>>>3;xb=zb-Xa|0;do{if((Ab|0)<(xb|0)){Hb=xb&255}else{sb=zb+Xa|0;if((Ab|0)>(sb|0)){Hb=sb&255;break}else{Hb=Ab&255;break}}}while(0);if(f){Ab=(ga(Ya,r)|0)+fa|0;if(Pa){a[ea+(Ab-1)|0]=Bb}if(Qa){a[ea+Ab|0]=Fb}if(Pa){a[ea+(Ab-2)|0]=Db}if(Qa){a[ea+(Ab+1)|0]=Gb}if(Pa){a[ea+(Ab-3)|0]=Eb}if(!Qa){break}a[ea+(Ab+2)|0]=Hb;break}else{Ab=Ya+fa|0;if(Pa){a[ea+(Ab-r)|0]=Bb}if(Qa){a[ea+Ab|0]=Fb}if(Pa){a[ea+(Ab-(r<<1))|0]=Db}if(Qa){a[ea+(Ab+r)|0]=Gb}if(Pa){a[ea+(Ab+(r*-3|0))|0]=Eb}if(!Qa){break}a[ea+(Ab+(r<<1))|0]=Hb;break}}}while(0);eb=Ya+1|0;if((eb|0)>=4){break b}Ya=eb;Za=a[n+(eb<<2)|0]|0;_a=a[n+(eb<<2)+1|0]|0;$a=a[n+(eb<<2)+2|0]|0;ab=a[m+(eb<<2)|0]|0;bb=a[m+(eb<<2)+1|0]|0;cb=a[m+(eb<<2)+2|0]|0}}}while(0);aa=aa+o|0;}while((aa|0)<(v|0))}aa=Z+p|0;if((aa|0)<(k|0)){Z=aa}else{ka=146;break}}if((ka|0)==12){ec(8880,6264,118,17352)}else if((ka|0)==15){ec(4520,6264,119,17352)}else if((ka|0)==18){ec(8880,6264,118,17352)}else if((ka|0)==21){ec(4520,6264,119,17352)}else if((ka|0)==25){ec(8880,6264,118,17352)}else if((ka|0)==28){ec(4520,6264,119,17352)}else if((ka|0)==43){ec(8880,6264,118,17352)}else if((ka|0)==46){ec(8880,6264,118,17352)}else if((ka|0)==52){ec(4520,6264,119,17352)}else if((ka|0)==55){ec(4520,6264,119,17352)}else if((ka|0)==146){i=l;return}}function ze(f,g,h,j,k,l){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0;m=i;i=i+32|0;n=m|0;o=m+16|0;p=c[f+5780>>2]|0;q=c[f+5784>>2]|0;r=ga(p,g?2:1)|0;s=ga(q,g?1:2)|0;t=f+44|0;u=c[t>>2]|0;v=c[f+10472>>2]|0;w=(v|0)>(l|0)?l:v;l=c[f+10476>>2]|0;x=(l|0)>(j|0)?j:l;l=c[f+5768>>2]|0;if((x|0)<=(h|0)){i=m;return}j=(w|0)>(k|0);y=3-p|0;z=3-q|0;A=f+10460|0;B=f+5952|0;C=f+5956|0;D=f+10368|0;E=f+10372|0;F=f+10376|0;G=f+10360|0;H=f+5776|0;I=f+10348|0;J=f+10352|0;K=f+10356|0;L=f+10340|0;M=f+48|0;N=f+5480|0;O=(1<<l)-1|0;P=O&65535;Q=h;a:while(1){if(j){h=Q<<z;R=ga(h,q)|0;S=(R|0)/4|0;T=R-1|0;U=c[A>>2]|0;V=k;do{W=V<<y;X=ga(W,p)|0;Y=U+((ga(v,S)|0)+((X|0)/4|0))|0;Z=a[Y]&3;if((Z&255)>>>0>1>>>0){Y=X-1|0;_=((Z&255)<<1)-2|0;Z=0;do{$=c[((Z|0)==0?B:C)>>2]|0;Z=Z+1|0;aa=(c[f+4+(Z<<2)>>2]|0)+((ga(c[t>>2]|0,h)|0)+W<<1)|0;ba=0;while(1){ca=~ba;da=ga(ba,u)|0;ea=ba+1|0;fa=ga(ea,u)|0;if(g){b[o+(ba<<3)>>1]=b[aa+(ba<<1)>>1]|0;b[n+(ba<<3)>>1]=b[aa+(ca<<1)>>1]|0;b[o+(ba<<3)+2>>1]=b[aa+(u+ba<<1)>>1]|0;b[n+(ba<<3)+2>>1]=b[aa+(u+ca<<1)>>1]|0;ha=u<<1;b[o+(ba<<3)+4>>1]=b[aa+(ha+ba<<1)>>1]|0;b[n+(ba<<3)+4>>1]=b[aa+(ha+ca<<1)>>1]|0;ha=u*3|0;b[o+(ba<<3)+6>>1]=b[aa+(ha+ba<<1)>>1]|0;b[n+(ba<<3)+6>>1]=b[aa+(ha+ca<<1)>>1]|0}else{b[o+(ba<<3)>>1]=b[aa+(da<<1)>>1]|0;b[n+(ba<<3)>>1]=b[aa+(-fa<<1)>>1]|0;b[o+(ba<<3)+2>>1]=b[aa+(da+1<<1)>>1]|0;b[n+(ba<<3)+2>>1]=b[aa+(1-fa<<1)>>1]|0;b[o+(ba<<3)+4>>1]=b[aa+(da+2<<1)>>1]|0;b[n+(ba<<3)+4>>1]=b[aa+(2-fa<<1)>>1]|0;b[o+(ba<<3)+6>>1]=b[aa+(da+3<<1)>>1]|0;b[n+(ba<<3)+6>>1]=b[aa+(3-fa<<1)>>1]|0}if((ea|0)<2){ba=ea}else{break}}ba=c[D>>2]|0;ea=X>>ba;fa=R>>ba;if(!((ea|0)>-1)){ia=14;break a}da=c[E>>2]|0;if((ea|0)>=(da|0)){ia=14;break a}if(!((fa|0)>-1)){ia=17;break a}ca=c[F>>2]|0;if((fa|0)>=(ca|0)){ia=17;break a}ha=ga(da,fa)|0;fa=ha+ea|0;ja=c[G>>2]|0;ka=a[ja+(fa*3|0)+2|0]|0;if(g){la=Y>>ba;if(!((la|0)>-1&(la|0)<(da|0))){ia=20;break a}ma=ha+la|0}else{la=T>>ba;if(!((la|0)>-1&(la|0)<(ca|0))){ia=23;break a}ma=(ga(da,la)|0)+ea|0}la=(ka+1+(a[ja+(ma*3|0)+2|0]|0)>>1)+$|0;do{if((c[H>>2]|0)==1){if((la|0)<30){na=la;break}if((la|0)>42){na=la-6|0;break}else{na=c[8+(la-30<<2)>>2]|0;break}}else{na=(la|0)<51?la:51}}while(0);la=c[I>>2]|0;$=X>>la;ka=R>>la;if(!(($|0)>-1)){ia=33;break a}la=c[J>>2]|0;if(($|0)>=(la|0)){ia=33;break a}if(!((ka|0)>-1)){ia=36;break a}if((ka|0)>=(c[K>>2]|0)){ia=36;break a}oa=(ga(la,ka)|0)+$|0;$=_+na+(c[(c[(c[M>>2]|0)+(e[(c[L>>2]|0)+(oa*24|0)+2>>1]<<2)>>2]|0)+760>>2]|0)|0;if(($|0)<0){pa=0}else{pa=($|0)>53?53:$}$=d[30664+pa|0]<<l-8;oa=(a[N]|0)==0;if(g){ka=Y>>ba;if(oa){qa=1}else{if(!((ka|0)>-1&(ka|0)<(da|0))){ia=42;break a}la=ja+((ha+ka|0)*3|0)|0;qa=((d[la]|d[la+1|0]<<8)<<16>>16&1024)==0}if(!((ka|0)>-1&(ka|0)<(da|0))){ia=45;break a}la=ja+((ha+ka|0)*3|0)|0;ka=((d[la]|d[la+1|0]<<8)<<16>>16&2048)==0&qa;if(oa){ra=1}else{la=ja+(fa*3|0)|0;ra=((d[la]|d[la+1|0]<<8)<<16>>16&1024)==0}la=ja+(fa*3|0)|0;sa=((d[la]|d[la+1|0]<<8)<<16>>16&2048)==0&ra;la=-$|0;ta=0;do{ua=e[o+(ta<<1)>>1]|0;va=e[n+(ta<<1)>>1]|0;wa=(e[n+8+(ta<<1)>>1]|0)+4+(ua-va<<2)-(e[o+8+(ta<<1)>>1]|0)>>3;if((wa|0)<(la|0)){xa=la}else{xa=(wa|0)>($|0)?$:wa}if(ka){wa=va+xa|0;if((wa|0)<0){ya=0}else{ya=(wa|0)>(O|0)?P:wa&65535}wa=aa+((ga(ta,u)|0)-1<<1)|0;b[wa>>1]=ya}if(sa){wa=ua-xa|0;if((wa|0)<0){za=0}else{za=(wa|0)>(O|0)?P:wa&65535}wa=aa+((ga(ta,u)|0)<<1)|0;b[wa>>1]=za}ta=ta+1|0;}while((ta|0)<4)}else{ta=T>>ba;if(oa){Aa=1}else{if(!((ta|0)>-1&(ta|0)<(ca|0))){ia=62;break a}sa=ja+(((ga(da,ta)|0)+ea|0)*3|0)|0;Aa=((d[sa]|d[sa+1|0]<<8)<<16>>16&1024)==0}if(!((ta|0)>-1&(ta|0)<(ca|0))){ia=65;break a}sa=ja+(((ga(da,ta)|0)+ea|0)*3|0)|0;ta=((d[sa]|d[sa+1|0]<<8)<<16>>16&2048)==0&Aa;if(oa){Ba=1}else{sa=ja+(fa*3|0)|0;Ba=((d[sa]|d[sa+1|0]<<8)<<16>>16&1024)==0}sa=ja+(fa*3|0)|0;ka=((d[sa]|d[sa+1|0]<<8)<<16>>16&2048)==0&Ba;sa=-$|0;la=0;do{ha=e[o+(la<<1)>>1]|0;wa=e[n+(la<<1)>>1]|0;ua=(e[n+8+(la<<1)>>1]|0)+4+(ha-wa<<2)-(e[o+8+(la<<1)>>1]|0)>>3;if((ua|0)<(sa|0)){Ca=sa}else{Ca=(ua|0)>($|0)?$:ua}if(ta){ua=wa+Ca|0;if((ua|0)<0){Da=0}else{Da=(ua|0)>(O|0)?P:ua&65535}b[aa+(la-u<<1)>>1]=Da}if(ka){ua=ha-Ca|0;if((ua|0)<0){Ea=0}else{Ea=(ua|0)>(O|0)?P:ua&65535}b[aa+(la<<1)>>1]=Ea}la=la+1|0;}while((la|0)<4)}}while((Z|0)<2)}V=V+r|0;}while((V|0)<(w|0))}V=Q+s|0;if((V|0)<(x|0)){Q=V}else{ia=82;break}}if((ia|0)==14){ec(8880,6264,118,17352)}else if((ia|0)==17){ec(4520,6264,119,17352)}else if((ia|0)==20){ec(8880,6264,118,17352)}else if((ia|0)==23){ec(4520,6264,119,17352)}else if((ia|0)==33){ec(8880,6264,118,17352)}else if((ia|0)==36){ec(4520,6264,119,17352)}else if((ia|0)==42){ec(8880,6264,118,17352)}else if((ia|0)==45){ec(8880,6264,118,17352)}else if((ia|0)==62){ec(4520,6264,119,17352)}else if((ia|0)==65){ec(4520,6264,119,17352)}else if((ia|0)==82){i=m;return}}function Ae(b,f,g,h,j,k){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0;l=i;i=i+16|0;m=l|0;n=l+8|0;o=c[b+5780>>2]|0;p=c[b+5784>>2]|0;q=ga(o,f?2:1)|0;r=ga(p,f?1:2)|0;s=b+44|0;t=c[s>>2]|0;u=b+10472|0;v=c[u>>2]|0;w=(v|0)>(k|0)?k:v;v=c[b+10476>>2]|0;k=(v|0)>(h|0)?h:v;v=b+5768|0;if((k|0)<=(g|0)){i=l;return}h=(w|0)>(j|0);x=3-o|0;y=3-p|0;z=b+10460|0;A=b+5952|0;B=b+5956|0;C=b+10368|0;D=b+10372|0;E=b+10376|0;F=b+10360|0;G=b+5776|0;H=b+10348|0;I=b+10352|0;J=b+10356|0;K=b+10340|0;L=b+48|0;M=b+5480|0;N=(1<<c[v>>2])-1|0;O=N&255;P=g;a:while(1){if(h){g=P<<y;Q=ga(g,p)|0;R=(Q|0)/4|0;S=Q-1|0;T=j;do{U=T<<x;V=ga(U,o)|0;W=(ga(c[u>>2]|0,R)|0)+((V|0)/4|0)|0;X=a[(c[z>>2]|0)+W|0]&3;if((X&255)>>>0>1>>>0){W=V-1|0;Y=((X&255)<<1)-2|0;X=0;do{Z=c[((X|0)==0?A:B)>>2]|0;X=X+1|0;_=c[b+4+(X<<2)>>2]|0;$=(ga(c[s>>2]|0,g)|0)+U|0;aa=0;while(1){ba=aa+$|0;ca=$+~aa|0;da=(ga(aa,t)|0)+$|0;ea=aa+1|0;fa=$-(ga(ea,t)|0)|0;if(f){a[n+(aa<<2)|0]=a[_+ba|0]|0;a[m+(aa<<2)|0]=a[_+ca|0]|0;a[n+(aa<<2)+1|0]=a[_+(ba+t)|0]|0;a[m+(aa<<2)+1|0]=a[_+(ca+t)|0]|0;ha=t<<1;a[n+(aa<<2)+2|0]=a[_+(ba+ha)|0]|0;a[m+(aa<<2)+2|0]=a[_+(ca+ha)|0]|0;ha=t*3|0;a[n+(aa<<2)+3|0]=a[_+(ba+ha)|0]|0;a[m+(aa<<2)+3|0]=a[_+(ca+ha)|0]|0}else{a[n+(aa<<2)|0]=a[_+da|0]|0;a[m+(aa<<2)|0]=a[_+fa|0]|0;a[n+(aa<<2)+1|0]=a[_+(da+1)|0]|0;a[m+(aa<<2)+1|0]=a[_+(fa+1)|0]|0;a[n+(aa<<2)+2|0]=a[_+(da+2)|0]|0;a[m+(aa<<2)+2|0]=a[_+(fa+2)|0]|0;a[n+(aa<<2)+3|0]=a[_+(da+3)|0]|0;a[m+(aa<<2)+3|0]=a[_+(fa+3)|0]|0}if((ea|0)<2){aa=ea}else{break}}aa=c[C>>2]|0;ea=V>>aa;fa=Q>>aa;if(!((ea|0)>-1)){ia=14;break a}da=c[D>>2]|0;if((ea|0)>=(da|0)){ia=14;break a}if(!((fa|0)>-1)){ia=17;break a}ha=c[E>>2]|0;if((fa|0)>=(ha|0)){ia=17;break a}ca=ga(da,fa)|0;fa=ca+ea|0;ba=c[F>>2]|0;ja=a[ba+(fa*3|0)+2|0]|0;if(f){ka=W>>aa;if(!((ka|0)>-1&(ka|0)<(da|0))){ia=20;break a}la=ca+ka|0}else{ka=S>>aa;if(!((ka|0)>-1&(ka|0)<(ha|0))){ia=23;break a}la=(ga(da,ka)|0)+ea|0}ka=(ja+1+(a[ba+(la*3|0)+2|0]|0)>>1)+Z|0;do{if((c[G>>2]|0)==1){if((ka|0)<30){ma=ka;break}if((ka|0)>42){ma=ka-6|0;break}else{ma=c[8+(ka-30<<2)>>2]|0;break}}else{ma=(ka|0)<51?ka:51}}while(0);ka=c[H>>2]|0;Z=V>>ka;ja=Q>>ka;if(!((Z|0)>-1)){ia=33;break a}ka=c[I>>2]|0;if((Z|0)>=(ka|0)){ia=33;break a}if(!((ja|0)>-1)){ia=36;break a}if((ja|0)>=(c[J>>2]|0)){ia=36;break a}na=(ga(ka,ja)|0)+Z|0;Z=Y+ma+(c[(c[(c[L>>2]|0)+(e[(c[K>>2]|0)+(na*24|0)+2>>1]<<2)>>2]|0)+760>>2]|0)|0;if((Z|0)<0){oa=0}else{oa=(Z|0)>53?53:Z}Z=d[30664+oa|0]<<(c[v>>2]|0)-8;na=(a[M]|0)==0;if(f){ja=W>>aa;if(na){pa=1}else{if(!((ja|0)>-1&(ja|0)<(da|0))){ia=42;break a}ka=ba+((ca+ja|0)*3|0)|0;pa=((d[ka]|d[ka+1|0]<<8)<<16>>16&1024)==0}if(!((ja|0)>-1&(ja|0)<(da|0))){ia=45;break a}ka=ba+((ca+ja|0)*3|0)|0;ja=((d[ka]|d[ka+1|0]<<8)<<16>>16&2048)==0&pa;if(na){qa=1}else{ka=ba+(fa*3|0)|0;qa=((d[ka]|d[ka+1|0]<<8)<<16>>16&1024)==0}ka=ba+(fa*3|0)|0;ra=((d[ka]|d[ka+1|0]<<8)<<16>>16&2048)==0&qa;ka=-Z|0;sa=$-1|0;ta=0;do{ua=d[n+ta|0]|0;va=d[m+ta|0]|0;wa=(d[m+4+ta|0]|0)+4+(ua-va<<2)-(d[n+4+ta|0]|0)>>3;if((wa|0)<(ka|0)){xa=ka}else{xa=(wa|0)>(Z|0)?Z:wa}if(ja){wa=va+xa|0;if((wa|0)<0){ya=0}else{ya=(wa|0)>(N|0)?O:wa&255}wa=_+(sa+(ga(ta,t)|0))|0;a[wa]=ya}if(ra){wa=ua-xa|0;if((wa|0)<0){za=0}else{za=(wa|0)>(N|0)?O:wa&255}wa=_+((ga(ta,t)|0)+$)|0;a[wa]=za}ta=ta+1|0;}while((ta|0)<4)}else{ta=S>>aa;if(na){Aa=1}else{if(!((ta|0)>-1&(ta|0)<(ha|0))){ia=62;break a}ra=ba+(((ga(da,ta)|0)+ea|0)*3|0)|0;Aa=((d[ra]|d[ra+1|0]<<8)<<16>>16&1024)==0}if(!((ta|0)>-1&(ta|0)<(ha|0))){ia=65;break a}ra=ba+(((ga(da,ta)|0)+ea|0)*3|0)|0;ta=((d[ra]|d[ra+1|0]<<8)<<16>>16&2048)==0&Aa;if(na){Ba=1}else{ra=ba+(fa*3|0)|0;Ba=((d[ra]|d[ra+1|0]<<8)<<16>>16&1024)==0}ra=ba+(fa*3|0)|0;sa=((d[ra]|d[ra+1|0]<<8)<<16>>16&2048)==0&Ba;ra=-Z|0;ja=$-t|0;ka=0;do{ca=d[n+ka|0]|0;wa=d[m+ka|0]|0;ua=(d[m+4+ka|0]|0)+4+(ca-wa<<2)-(d[n+4+ka|0]|0)>>3;if((ua|0)<(ra|0)){Ca=ra}else{Ca=(ua|0)>(Z|0)?Z:ua}if(ta){ua=wa+Ca|0;if((ua|0)<0){Da=0}else{Da=(ua|0)>(N|0)?O:ua&255}a[_+(ja+ka)|0]=Da}if(sa){ua=ca-Ca|0;if((ua|0)<0){Ea=0}else{Ea=(ua|0)>(N|0)?O:ua&255}a[_+(ka+$)|0]=Ea}ka=ka+1|0;}while((ka|0)<4)}}while((X|0)<2)}T=T+q|0;}while((T|0)<(w|0))}T=P+r|0;if((T|0)<(k|0)){P=T}else{ia=82;break}}if((ia|0)==14){ec(8880,6264,118,17352)}else if((ia|0)==17){ec(4520,6264,119,17352)}else if((ia|0)==20){ec(8880,6264,118,17352)}else if((ia|0)==23){ec(4520,6264,119,17352)}else if((ia|0)==33){ec(8880,6264,118,17352)}else if((ia|0)==36){ec(4520,6264,119,17352)}else if((ia|0)==42){ec(8880,6264,118,17352)}else if((ia|0)==45){ec(8880,6264,118,17352)}else if((ia|0)==62){ec(4520,6264,119,17352)}else if((ia|0)==65){ec(4520,6264,119,17352)}else if((ia|0)==82){i=l;return}}function Be(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;d=b|0;e=b+4|0;c[e>>2]=1;f=b+8|0;Wh(c[f>>2]|0,d);g=c[f>>2]|0;h=c[g+10472>>2]|0;i=(c[g+5812>>2]|0)/4|0;j=b+12|0;k=c[j>>2]|0;l=ga(k,i)|0;m=k+1|0;n=ga(m,i)|0;i=c[g+10476>>2]|0;o=(n|0)>(i|0)?i:n;n=b+16|0;b=(a[n]|0)!=0;i=b?2:3;p=c[g+5820>>2]|0;q=p-1|0;do{if(b){r=(c[g+5828>>2]|0)-1|0;Yh(g,d,q,(r|0)<(m|0)?r:m,1)}else{if((k|0)>0){Yh(g,d,q,k-1|0,2);s=c[f>>2]|0;t=c[j>>2]|0}else{s=g;t=k}Yh(s,d,q,t,2);r=(c[j>>2]|0)+1|0;u=c[f>>2]|0;if((r|0)>=(c[u+5828>>2]|0)){break}Yh(u,d,q,r,2)}}while(0);t=c[f>>2]|0;s=c[j>>2]|0;do{if((a[n]|0)==0){k=ga(c[t+10352>>2]|0,s)|0;if((a[(c[t+10340>>2]|0)+(k*24|0)+21|0]|0)!=0){v=t;w=0;x=11}}else{k=ve(t,s)|0;g=c[f>>2]|0;m=ga(c[g+10352>>2]|0,c[j>>2]|0)|0;a[(c[g+10340>>2]|0)+(m*24|0)+21|0]=k&1;if(!k){break}v=g;w=(a[n]|0)!=0;x=11}}while(0);do{if((x|0)==11){we(v,w,l,o,0,h);s=c[f>>2]|0;t=(a[n]|0)!=0;if((c[s+5760>>2]|0)>8){xe(s,t,l,o,0,h)}else{ye(s,t,l,o,0,h)}t=c[f>>2]|0;if((c[t+5776>>2]|0)==0){break}s=(a[n]|0)!=0;if((c[t+5768>>2]|0)>8){ze(t,s,l,o,0,h);break}else{Ae(t,s,l,o,0,h);break}}}while(0);if((p|0)<1){c[e>>2]=3;y=c[f>>2]|0;Xh(y,d);return}else{z=0}while(1){p=c[f>>2]|0;h=(ga(c[j>>2]|0,c[p+5820>>2]|0)|0)+z|0;Ek((c[p+10524>>2]|0)+(h*76|0)|0,i);if((z|0)>=(q|0)){break}z=z+1|0}c[e>>2]=3;y=c[f>>2]|0;Xh(y,d);return}function Ce(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+8|0;e=d|0;f=c[b>>2]|0;g=c[f+10332>>2]|0;h=f+5828|0;Vh(f,c[h>>2]<<1);j=b+10668|0;k=b+10672|0;l=g+375396|0;g=b+10664|0;if((c[h>>2]|0)>0){m=0}else{i=d;return}do{b=Nu(20)|0;c[b+4>>2]=0;c[b>>2]=22184;c[b+8>>2]=f;c[b+12>>2]=m;a[b+16|0]=1;n=b;c[e>>2]=n;b=c[j>>2]|0;if(b>>>0<(c[k>>2]|0)>>>0){if((b|0)==0){o=0}else{c[b>>2]=n;o=c[j>>2]|0}c[j>>2]=o+4}else{He(g,e)}Kk(l,n);m=m+1|0;p=c[h>>2]|0;}while((m|0)<(p|0));if((p|0)>0){q=0}else{i=d;return}do{p=Nu(20)|0;c[p+4>>2]=0;c[p>>2]=22184;c[p+8>>2]=f;c[p+12>>2]=q;a[p+16|0]=0;m=p;c[e>>2]=m;p=c[j>>2]|0;if(p>>>0<(c[k>>2]|0)>>>0){if((p|0)==0){r=0}else{c[p>>2]=m;r=c[j>>2]|0}c[j>>2]=r+4}else{He(g,e)}Kk(l,m);q=q+1|0;}while((q|0)<(c[h>>2]|0));i=d;return}function De(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a+5828|0;if((c[b>>2]|0)>0){d=0;e=0}else{return}do{d=d|(ve(a,e)|0);e=e+1|0;}while((e|0)<(c[b>>2]|0));if(!d){return}d=a+10476|0;b=a+10472|0;we(a,1,0,c[d>>2]|0,0,c[b>>2]|0);e=c[d>>2]|0;f=c[b>>2]|0;g=a+5760|0;if((c[g>>2]|0)>8){xe(a,1,0,e,0,f)}else{ye(a,1,0,e,0,f)}f=a+5776|0;do{if((c[f>>2]|0)!=0){e=c[d>>2]|0;h=c[b>>2]|0;if((c[a+5768>>2]|0)>8){ze(a,1,0,e,0,h);break}else{Ae(a,1,0,e,0,h);break}}}while(0);we(a,0,0,c[d>>2]|0,0,c[b>>2]|0);h=c[d>>2]|0;e=c[b>>2]|0;if((c[g>>2]|0)>8){xe(a,0,0,h,0,e)}else{ye(a,0,0,h,0,e)}if((c[f>>2]|0)==0){return}f=c[d>>2]|0;d=c[b>>2]|0;if((c[a+5768>>2]|0)>8){ze(a,0,0,f,0,d);return}else{Ae(a,0,0,f,0,d);return}}function Ee(a){a=a|0;return}function Fe(a){a=a|0;Pu(a);return}function Ge(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+104|0;f=e|0;mb(f|0,1888,(g=i,i=i+8|0,c[g>>2]=c[d+12>>2],g)|0)|0;i=g;g=ev(f|0)|0;if(g>>>0>4294967279>>>0){nm(0)}if(g>>>0<11>>>0){a[b]=g<<1;h=b+1|0;cv(h|0,f|0,g)|0;j=h+g|0;a[j]=0;k=100;l=0;i=e;return}else{d=g+16&-16;m=Nu(d)|0;c[b+8>>2]=m;c[b>>2]=d|1;c[b+4>>2]=g;h=m;cv(h|0,f|0,g)|0;j=h+g|0;a[j]=0;k=100;l=0;i=e;return}}function He(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function Ie(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+132|0;if((c[d>>2]|0)!=0){ec(1960,14344,169,17808)}e=Ra(b|0,18624)|0;f=K;g=sb(e|0,16)|0;e=Ou(f|K?-1:g)|0;c[e+12>>2]=b;g=e+16|0;if((b|0)==0){c[d>>2]=g;h=a+136|0;c[h>>2]=b;return}e=g+(b*18624|0)|0;f=g;do{Cd(f+18580|0);i=f+48|0;j=i&15;dv(f+18508|0,0,20)|0;dv(f+18592|0,0,20)|0;if((j|0)==0){c[f+2112>>2]=i;k=i}else{l=i+(16-j)|0;c[f+2112>>2]=l;k=l}dv(k|0,0,2048)|0;f=f+18624|0;}while((f|0)!=(e|0));c[d>>2]=g;h=a+136|0;c[h>>2]=b;return}function Je(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;b=a+10636|0;d=c[b>>2]|0;e=a+10632|0;f=c[e>>2]|0;if((d|0)!=(f|0)){g=0;h=f;f=d;while(1){d=c[h+(g<<2)>>2]|0;if((d|0)==0){i=f;j=h}else{Vi((c[d+140>>2]|0)+548|0,c[d>>2]|0);k=c[d+132>>2]|0;if((k|0)!=0){l=k-18624+18608|0;m=l;n=c[l+12>>2]|0;if((n|0)!=0){l=k+(n*18624|0)|0;while(1){n=l-18624|0;Ed(l-18624+18580|0);if((n|0)==(k|0)){break}else{l=n}}}Qu(m)}Ck(d+44|0);Pu(d);i=c[b>>2]|0;j=c[e>>2]|0}l=g+1|0;if(l>>>0<i-j>>2>>>0){g=l;h=j;f=i}else{break}}}i=a+10668|0;f=c[i>>2]|0;j=a+10664|0;h=c[j>>2]|0;if((f|0)==(h|0)){o=f}else{g=0;l=h;h=f;while(1){f=c[l+(g<<2)>>2]|0;if((f|0)==0){p=h;q=l}else{Dc[c[(c[f>>2]|0)+4>>2]&511](f);p=c[i>>2]|0;q=c[j>>2]|0}f=g+1|0;if(f>>>0<p-q>>2>>>0){g=f;l=q;h=p}else{o=q;break}}}q=a+10676|0;p=c[q>>2]|0;if((p|0)==0){r=o}else{o=a+10680|0;h=c[o>>2]|0;if((h|0)==(p|0)){s=p}else{l=h;do{h=l-8|0;c[o>>2]=h;Ed(h);l=c[o>>2]|0;}while((l|0)!=(p|0));s=c[q>>2]|0}Pu(s);r=c[j>>2]|0}if((r|0)!=0){j=c[i>>2]|0;if((j|0)!=(r|0)){c[i>>2]=j+(~((j-4+(-r|0)|0)>>>2)<<2)}Pu(r)}r=c[a+10644>>2]|0;if((r|0)!=0){j=a+10648|0;i=c[j>>2]|0;if((i|0)!=(r|0)){c[j>>2]=i+(~(((i-80+(-r|0)|0)>>>0)/80|0)*80|0)}Pu(r)}r=c[e>>2]|0;if((r|0)==0){t=a+8|0;Rh(t);return}e=c[b>>2]|0;if((e|0)!=(r|0)){c[b>>2]=e+(~((e-4+(-r|0)|0)>>>2)<<2)}Pu(r);t=a+8|0;Rh(t);return}function Ke(a,b){a=a|0;b=b|0;Lf(a+172|0);return}function Le(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c[b+84>>2]=0;c[b+168>>2]=0;d=b|0;c[d>>2]=22344;Lf(b+172|0);c[d>>2]=22312;Si(b+548|0);c[b+1192>>2]=0;c[b+1196>>2]=0;c[b+1200>>2]=0;dv(b+1228|0,0,24)|0;c[b+1848>>2]=0;c[b+1852>>2]=0;c[b+1856>>2]=0;dv(b+1884|0,0,24)|0;c[b+2504>>2]=0;c[b+2508>>2]=0;c[b+2512>>2]=0;dv(b+2540|0,0,24)|0;c[b+3160>>2]=0;c[b+3164>>2]=0;c[b+3168>>2]=0;dv(b+3196|0,0,24)|0;c[b+3816>>2]=0;c[b+3820>>2]=0;c[b+3824>>2]=0;dv(b+3852|0,0,24)|0;c[b+4472>>2]=0;c[b+4476>>2]=0;c[b+4480>>2]=0;dv(b+4508|0,0,24)|0;c[b+5128>>2]=0;c[b+5132>>2]=0;c[b+5136>>2]=0;dv(b+5164|0,0,24)|0;c[b+5784>>2]=0;c[b+5788>>2]=0;c[b+5792>>2]=0;dv(b+5820|0,0,24)|0;c[b+6440>>2]=0;c[b+6444>>2]=0;c[b+6448>>2]=0;dv(b+6476|0,0,24)|0;c[b+7096>>2]=0;c[b+7100>>2]=0;c[b+7104>>2]=0;dv(b+7132|0,0,24)|0;c[b+7752>>2]=0;c[b+7756>>2]=0;c[b+7760>>2]=0;dv(b+7788|0,0,24)|0;c[b+8408>>2]=0;c[b+8412>>2]=0;c[b+8416>>2]=0;dv(b+8444|0,0,24)|0;c[b+9064>>2]=0;c[b+9068>>2]=0;c[b+9072>>2]=0;dv(b+9100|0,0,24)|0;c[b+9720>>2]=0;c[b+9724>>2]=0;c[b+9728>>2]=0;dv(b+9756|0,0,24)|0;c[b+10376>>2]=0;c[b+10380>>2]=0;c[b+10384>>2]=0;dv(b+10412|0,0,24)|0;c[b+11032>>2]=0;c[b+11036>>2]=0;c[b+11040>>2]=0;dv(b+11068|0,0,24)|0;d=b+93784|0;e=b+11096|0;do{ik(e);e=e+5168|0;}while((e|0)!=(d|0));d=b+375384|0;e=b+93784|0;do{jj(e);e=e+4400|0;}while((e|0)!=(d|0));dv(b+375400|0,0,24)|0;sh(b+376144|0);c[b+377212>>2]=0;c[b+377216>>2]=0;c[b+377220>>2]=0;a[b+512|0]=0;a[b+513|0]=1;a[b+514|0]=0;a[b+532|0]=0;a[b+533|0]=0;d=b+536|0;dv(b+516|0,-1|0,16)|0;e=27248;f=c[e+4>>2]|0;c[d>>2]=c[e>>2];c[d+4>>2]=f;c[b+544>>2]=0;c[b+375384>>2]=0;c[b+375388>>2]=0;c[b+375392>>2]=0;c[b+375888>>2]=0;f=b+375892|0;c[f>>2]=6;c[b+375896>>2]=100;c[b+375900>>2]=6;c[b+375908>>2]=6;c[b+375904>>2]=100;d=6;while(1){e=d*100|0;g=(e|0)/7|0;h=(e+100|0)/7|0;a:do{if((g|0)>(h|0)){i=d}else{e=h-g|0;j=d;k=g;while(1){l=c[f>>2]|0;m=(j|0)>(l|0);n=m?l:j;a[b+375912+(k<<1)|0]=n;a[b+375912+(k<<1)+1|0]=m?100:(((k-g|0)*100|0|0)/(e|0)|0)&255;if((k|0)>=(h|0)){i=n;break a}j=n;k=k+1|0}}}while(0);c[b+376116+(i<<2)>>2]=h;if((i|0)>0){d=i-1|0}else{break}}i=b+376200|0;dv(i|0,0,24)|0;a[b+376204|0]=1;c[i>>2]=-1;return}function Me(a){a=a|0;Ne(a);Pu(a);return}function Ne(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c[a>>2]=22312;b=a+377212|0;d=c[b>>2]|0;e=a+377216|0;f=c[e>>2]|0;if((d|0)==(f|0)){g=d}else{h=f;f=d;while(1){d=c[h-4>>2]|0;if((d|0)==0){i=h;j=f}else{Je(d);Pu(d);i=c[e>>2]|0;j=c[b>>2]|0}d=i-4|0;k=i+(~((d+(-d|0)|0)>>>2)<<2)|0;c[e>>2]=k;if((j|0)==(k|0)){g=j;break}else{h=k;f=j}}}if((g|0)!=0){Pu(g)}th(a+376144|0);g=a+375400|0;Kf(g|0);j=a+375404|0;f=c[j>>2]|0;h=a+375408|0;e=c[h>>2]|0;do{if((f|0)!=(e|0)){i=f;do{Pu(c[i>>2]|0);i=i+4|0;}while((i|0)!=(e|0));i=c[j>>2]|0;b=c[h>>2]|0;if((b|0)==(i|0)){break}c[h>>2]=b+(~((b-4+(-i|0)|0)>>>2)<<2)}}while(0);h=c[g>>2]|0;if((h|0)!=0){Pu(h)}h=a+93784|0;g=a+375384|0;do{g=g-4400|0;kj(g);}while((g|0)!=(h|0));jk(a+88616|0);jk(a+83448|0);jk(a+78280|0);jk(a+73112|0);jk(a+67944|0);jk(a+62776|0);jk(a+57608|0);jk(a+52440|0);jk(a+47272|0);jk(a+42104|0);jk(a+36936|0);jk(a+31768|0);jk(a+26600|0);jk(a+21432|0);jk(a+16264|0);jk(a+11096|0);Jf(a+10440|0);Jf(a+9784|0);Jf(a+9128|0);Jf(a+8472|0);Jf(a+7816|0);Jf(a+7160|0);Jf(a+6504|0);Jf(a+5848|0);Jf(a+5192|0);Jf(a+4536|0);Jf(a+3880|0);Jf(a+3224|0);Jf(a+2568|0);Jf(a+1912|0);Jf(a+1256|0);Jf(a+600|0);Ti(a+548|0);return}function Oe(a){a=a|0;if((c[a+375888>>2]|0)<=0){return}Jk(a+375396|0);return}function Pe(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=b+375888|0;if((c[d>>2]|0)>0){Jk(b+375396|0)}c[b+376220>>2]=0;c[b+376200>>2]=-1;a[b+376204|0]=1;Bh(b+376144|0);_i(b+548|0);e=b+377212|0;f=c[e>>2]|0;g=b+377216|0;h=c[g>>2]|0;if((f|0)!=(h|0)){i=h;h=f;while(1){f=c[i-4>>2]|0;if((f|0)==0){j=i;k=h}else{Je(f);Pu(f);j=c[g>>2]|0;k=c[e>>2]|0}f=j-4|0;l=j+(~((f+(-f|0)|0)>>>2)<<2)|0;c[g>>2]=l;if((k|0)==(l|0)){break}else{i=l;h=k}}}k=c[d>>2]|0;if((k|0)<=0){return}Hk(b+375396|0,k)|0;c[d>>2]=k;return}function Qe(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;dv(d+48|0,0,2064)|0;c[d+18532>>2]=-1;c[d+18536>>2]=-1;b=c[d+18596>>2]|0;e=c[(c[d+18600>>2]|0)+16>>2]|0;if((e|0)<=0){return}f=c[(c[b+10284>>2]|0)+((c[(c[b+10272>>2]|0)+(e<<2)>>2]|0)-1<<2)>>2]|0;e=c[b+5820>>2]|0;g=c[b+5804>>2]|0;h=(((f|0)%(e|0)|0)+1<<g)-1|0;i=(((f|0)/(e|0)|0)+1<<g)-1|0;g=(c[b+1248>>2]|0)-1|0;e=(c[b+1252>>2]|0)-1|0;f=c[b+10368>>2]|0;j=((g|0)<(h|0)?g:h)>>f;h=((e|0)<(i|0)?e:i)>>f;if(!((j|0)>-1)){ec(14528,14272,118,17304)}f=c[b+10372>>2]|0;if((j|0)>=(f|0)){ec(14528,14272,118,17304)}if(!((h|0)>-1)){ec(13968,14272,119,17304)}if((h|0)>=(c[b+10376>>2]|0)){ec(13968,14272,119,17304)}i=(ga(f,h)|0)+j|0;c[d+18528>>2]=a[(c[b+10360>>2]|0)+(i*3|0)+2|0]|0;return}function Re(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+656|0;f=e|0;g=f;h=f+592|0;c[h>>2]=0;j=f+596|0;c[j>>2]=0;c[f+600>>2]=0;k=f+628|0;dv(k|0,0,24)|0;l=_k(f,b+4|0,d)|0;if((l|0)==0){d=c[b+520>>2]|0;if((d|0)>-1){cl(f,d)}d=c[f>>2]|0;m=b+600+(d*656|0)|0;cv(m|0,g|0,592)|0;if((m|0)==(f|0)){cv(b+600+(d*656|0)+604|0,f+604|0,24)|0}else{Cf(b+600+(d*656|0)+592|0,c[h>>2]|0,c[j>>2]|0);cv(b+600+(d*656|0)+604|0,f+604|0,24)|0;Bf(b+600+(d*656|0)+628|0,c[k>>2]|0,c[f+632>>2]|0);Af(b+600+(d*656|0)+640|0,c[f+640>>2]|0,c[f+644>>2]|0)}a[b+600+(d*656|0)+652|0]=a[f+652|0]|0;n=0}else{n=l}l=c[f+640>>2]|0;if((l|0)!=0){d=f+644|0;if((c[d>>2]|0)!=(l|0)){c[d>>2]=l}Pu(l)}l=c[k>>2]|0;if((l|0)!=0){k=f+632|0;f=c[k>>2]|0;if((f|0)!=(l|0)){c[k>>2]=f+(~((f-2+(-l|0)|0)>>>1)<<1)}Pu(l)}l=c[h>>2]|0;if((l|0)==0){o=656;p=0;i=e;return n|0}f=c[j>>2]|0;if((f|0)==(l|0)){q=l}else{k=f;while(1){f=k-12|0;c[j>>2]=f;d=c[f>>2]|0;if((d|0)==0){r=f}else{Pu(d);r=c[j>>2]|0}if((r|0)==(l|0)){break}else{k=r}}q=c[h>>2]|0}Pu(q);o=656;p=0;i=e;return n|0}function Se(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+4400|0;f=e|0;jj(f);g=mj(f,d,b)|0;d=c[b+524>>2]|0;if((d|0)>-1){oj(f,d)}if(!g){h=g?0:1006;kj(f);j=4400;k=0;i=e;return h|0}d=a[f+1|0]|0;l=b+93784+(d*4400|0)|0;cv(l|0,f|0,4340)|0;if((l|0)==(f|0)){h=g?0:1006;kj(f);j=4400;k=0;i=e;return h|0}tf(b+93784+(d*4400|0)+4340|0,c[f+4340>>2]|0,c[f+4344>>2]|0);tf(b+93784+(d*4400|0)+4352|0,c[f+4352>>2]|0,c[f+4356>>2]|0);tf(b+93784+(d*4400|0)+4364|0,c[f+4364>>2]|0,c[f+4368>>2]|0);tf(b+93784+(d*4400|0)+4376|0,c[f+4376>>2]|0,c[f+4380>>2]|0);tf(b+93784+(d*4400|0)+4388|0,c[f+4388>>2]|0,c[f+4392>>2]|0);h=g?0:1006;kj(f);j=4400;k=0;i=e;return h|0}function Te(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+80|0;f=e|0;g=f;h=a+375388|0;j=Fj(b,f,d,c[h>>2]|0)|0;do{if((j|0)==0){Gj(f,c[h>>2]|0);b=c[a+377216>>2]|0;if((c[a+377212>>2]|0)==(b|0)|d^1){break}k=c[b-4>>2]|0;b=k+10648|0;l=c[b>>2]|0;if((l|0)==(c[k+10652>>2]|0)){xf(k+10644|0,f);break}if((l|0)==0){m=0}else{cv(l|0,g|0,80)|0;m=c[b>>2]|0}c[b>>2]=m+80}else{b=a+84|0;l=c[b>>2]|0;if((l|0)==20){c[a+80>>2]=1001;break}else{c[b>>2]=l+1;c[a+4+(l<<2)>>2]=j;break}}}while(0);i=e;return j|0}function Ue(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;a:do{if(d){e=a+164|0;f=c[e>>2]|0;do{if((f|0)>0){g=0;while(1){h=g+1|0;if((c[a+84+(g<<2)>>2]|0)==(b|0)){i=10;break}if((h|0)<(f|0)){g=h}else{i=5;break}}if((i|0)==5){if((f|0)<20){break}else{break a}}else if((i|0)==10){return}}}while(0);c[e>>2]=f+1;c[a+84+(f<<2)>>2]=b}}while(0);i=a+80|0;d=c[i>>2]|0;if((d|0)==20){c[a+76>>2]=1001;return}else{c[i>>2]=d+1;c[a+(d<<2)>>2]=b;return}}function Ve(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=i;i=i+48|0;h=g|0;j=g+8|0;k=g+16|0;l=g+24|0;m=g+32|0;n=g+40|0;o=Nu(1356)|0;p=o;If(p);q=Kj(p,d,b,j)|0;c[k>>2]=q;if((a[j]|0)==0){j=c[b+376220>>2]|0;if((j|0)!=0){a[j+10516|0]=2}Vi(b+548|0,e);if((o|0)==0){r=q;i=g;return r|0}j=c[o+1344>>2]|0;if((j|0)!=0){s=o+1348|0;t=c[s>>2]|0;if((t|0)!=(j|0)){c[s>>2]=t+(~((t-4+(-j|0)|0)>>>2)<<2)}Pu(j)}Ed(o+1332|0);j=c[o+776>>2]|0;if((j|0)!=0){t=o+780|0;s=c[t>>2]|0;if((s|0)!=(j|0)){c[t>>2]=s+(~((s-4+(-j|0)|0)>>>2)<<2)}Pu(j)}Pu(o);r=q;i=g;return r|0}q=c[b+528>>2]|0;if((q|0)>-1){Lj(p,b,q)}q=e+8|0;j=We(b,b,p,k,c[q>>2]|0,c[q+4>>2]|0,f,c[e+16>>2]|0)|0;f=b+376220|0;q=c[f>>2]|0;if(!j){if((q|0)!=0){a[q+10516|0]=2}Vi(b+548|0,e);if((o|0)!=0){j=c[o+1344>>2]|0;if((j|0)!=0){s=o+1348|0;t=c[s>>2]|0;if((t|0)!=(j|0)){c[s>>2]=t+(~((t-4+(-j|0)|0)>>>2)<<2)}Pu(j)}Ed(o+1332|0);j=c[o+776>>2]|0;if((j|0)!=0){t=o+780|0;s=c[t>>2]|0;if((s|0)!=(j|0)){c[t>>2]=s+(~((s-4+(-j|0)|0)>>>2)<<2)}Pu(j)}Pu(o)}r=c[k>>2]|0;i=g;return r|0}c[h>>2]=p;j=q+48|0;s=q+52|0;t=c[s>>2]|0;c[o>>2]=t-(c[j>>2]|0)>>2;if((t|0)==(c[q+56>>2]|0)){Hf(j,h)}else{if((t|0)==0){u=0}else{c[t>>2]=p;u=c[s>>2]|0}c[s>>2]=u+4}od(d,1);pd(d);u=(c[d>>2]|0)-(c[e+20>>2]|0)|0;s=o+768|0;if((c[s>>2]|0)>0){t=o+776|0;h=0;j=c[t>>2]|0;do{q=Qi(e,c[j+(h<<2)>>2]|0,u)|0;j=c[t>>2]|0;v=j+(h<<2)|0;c[v>>2]=(c[v>>2]|0)-q;h=h+1|0;}while((h|0)<(c[s>>2]|0))}do{if((a[o+4|0]|0)==0){w=b+377216|0}else{s=Nu(10688)|0;Oh(s+8|0);h=s;dv(s+10632|0,0,56)|0;c[l>>2]=h;c[s>>2]=c[f>>2];s=b+377216|0;j=c[s>>2]|0;if((j|0)==(c[b+377220>>2]|0)){wf(b+377212|0,l);w=s;break}if((j|0)==0){x=0}else{c[j>>2]=h;x=c[s>>2]|0}c[s>>2]=x+4;w=s}}while(0);do{if((c[b+377212>>2]|0)!=(c[w>>2]|0)){x=Nu(144)|0;l=x;c[l>>2]=0;c[x+4>>2]=0;c[x+32>>2]=0;a[x+36|0]=0;Bk(x+44|0);f=x;c[x+120>>2]=0;c[x+124>>2]=-1;c[x+128>>2]=-1;c[x+132>>2]=0;c[x+140>>2]=b;c[x+40>>2]=0;c[x+136>>2]=0;c[m>>2]=f;c[l>>2]=e;c[x+4>>2]=p;l=x+8|0;o=d;c[l>>2]=c[o>>2];c[l+4>>2]=c[o+4>>2];c[l+8>>2]=c[o+8>>2];c[l+12>>2]=c[o+12>>2];c[l+16>>2]=c[o+16>>2];c[l+20>>2]=c[o+20>>2];a[x+36|0]=a[b+377224|0]|0;x=c[(c[w>>2]|0)-4>>2]|0;o=x+10636|0;l=c[o>>2]|0;if((l|0)==(c[x+10640>>2]|0)){vf(x+10632|0,m);break}if((l|0)==0){y=0}else{c[l>>2]=f;y=c[o>>2]|0}c[o>>2]=y+4}}while(0);y=Xe(b,n)|0;c[k>>2]=y;r=0;i=g;return r|0}function We(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;l=i;c[f>>2]=0;a[b+377224|0]=0;m=c[e+8>>2]|0;n=d+93784+(m*4400|0)|0;if((a[n|0]|0)==0){Yk(1,344,(o=i,i=i+8|0,c[o>>2]=m,o)|0);i=o;ec(11704,14344,1987,17600);return 0}o=d+375392|0;c[o>>2]=n;n=a[d+93784+(m*4400|0)+2|0]|0;m=d+375388|0;c[m>>2]=d+11096+(n*5168|0);p=d+375384|0;c[p>>2]=d+600+((a[d+11096+(n*5168|0)+1|0]|0)*656|0);hf(b);n=e+4|0;do{if((a[n]|0)==0){if((c[d+376220>>2]|0)==0){q=0}else{break}i=l;return q|0}else{c[d+376200>>2]=c[e+28>>2];r=c[m>>2]|0;if((a[r+4703|0]|0)==0){s=1}else{s=(a[d+533|0]|0)!=0}t=Ch(d+376144|0,r,b,g,h,k,s)|0;if((t|0)==-1){c[f>>2]=9;q=0;i=l;return q|0}r=c[d+376152>>2]|0;if((c[d+376156>>2]|0)-r>>2>>>0>t>>>0){u=c[r+(t<<2)>>2]|0}else{u=0}t=u+10518|0;r=j|0;a[t]=a[r]|0;a[t+1|0]=a[r+1|0]|0;a[t+2|0]=a[r+2|0]|0;r=d+376220|0;c[r>>2]=u;t=u+108|0;v=c[p>>2]|0;cv(t|0,v|0,592)|0;if((t|0)==(v|0)){cv(u+712|0,u+712|0,24)|0}else{Cf(u+700|0,c[v+592>>2]|0,c[v+596>>2]|0);cv(u+712|0,v+604|0,24)|0;Bf(u+736|0,c[v+628>>2]|0,c[v+632>>2]|0);Af(u+748|0,c[v+640>>2]|0,c[v+644>>2]|0)}a[u+760|0]=a[v+652|0]|0;v=u+5932|0;t=c[o>>2]|0;cv(v|0,t|0,4340)|0;if((v|0)!=(t|0)){tf(u+10272|0,c[t+4340>>2]|0,c[t+4344>>2]|0);tf(u+10284|0,c[t+4352>>2]|0,c[t+4356>>2]|0);tf(u+10296|0,c[t+4364>>2]|0,c[t+4368>>2]|0);tf(u+10308|0,c[t+4376>>2]|0,c[t+4380>>2]|0);tf(u+10320|0,c[t+4388>>2]|0,c[t+4392>>2]|0)}c[u+10332>>2]=d;$h(u);t=d+377208|0;a:do{if(Ni(a[t]|0)|0){do{if(!(Ki(a[t]|0)|0)){if(Li(a[t]|0)|0){break}if((a[d+376204|0]|0)!=0){break}if((a[d+376207|0]|0)!=0){break}a[d+376205|0]=0;a[d+376206|0]=0;break a}}while(0);a[d+376205|0]=1;a[d+376207|0]=0}}while(0);do{if(Mi(a[t]|0)|0){if((a[d+376205|0]|0)==0){w=25;break}a[(c[r>>2]|0)+100|0]=0}else{w=25}}while(0);if((w|0)==25){a[(c[r>>2]|0)+100|0]=(a[e+24|0]|0)!=0|0}df(b,d,e);t=u+96|0;if((a[n]|0)!=0){c[t>>2]=1;ff(b,d,e)}c[t>>2]=1;Wk(c[(c[r>>2]|0)+92>>2]|0);a[b+376204|0]=0}}while(0);do{if((c[e+20>>2]|0)>>>0<2>>>0){if(gf(0,d,e)|0){break}else{q=0}i=l;return q|0}}while(0);uh(d+376144|0);if((a[e+12|0]|0)==0){c[e+800>>2]=c[e+16>>2];x=d+376224|0}else{b=d+376224|0;c[e+800>>2]=c[(c[b>>2]|0)+800>>2];x=b}c[x>>2]=e;q=1;i=l;return q|0}function Xe(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;a[d]=0;e=b+377212|0;f=c[e>>2]|0;g=b+377216|0;h=c[g>>2]|0;if((f|0)==(h|0)){i=0;return i|0}j=c[f>>2]|0;k=c[j+10636>>2]|0;l=c[j+10632>>2]|0;a:do{if((k|0)==(l|0)){m=h;n=f}else{o=k-l>>2;p=0;while(1){q=c[l+(p<<2)>>2]|0;r=p+1|0;if((c[q+40>>2]|0)==0){break}if(r>>>0<o>>>0){p=r}else{m=h;n=f;break a}}if((q|0)==0){m=h;n=f;break}if((a[q+36|0]|0)!=0){Ah(b+376144|0)|0}a[d]=1;p=Ye(b,j,q)|0;if((p|0)==0){m=c[g>>2]|0;n=c[e>>2]|0;break}else{i=p;return i|0}}}while(0);do{if(m-n>>2>>>0>1>>>0){q=c[n>>2]|0;j=c[q+10636>>2]|0;if((j|0)==(c[q+10632>>2]|0)){s=q;break}if((c[(c[j-4>>2]|0)+40>>2]|0)==0){t=14}else{s=q}}else{t=14}}while(0);do{if((t|0)==14){if((m|0)==(n|0)){i=0;return i|0}q=c[n>>2]|0;j=c[q+10636>>2]|0;do{if((j|0)!=(c[q+10632>>2]|0)){if((c[(c[j-4>>2]|0)+40>>2]|0)==0){i=0}else{break}return i|0}}while(0);if(((c[b+556>>2]|0)!=0|0)!=(-(c[b+580>>2]|0)|0)){i=0;return i|0}if((a[b+548|0]|0)!=0){s=q;break}if((a[b+549|0]|0)==0){i=0}else{s=q;break}return i|0}}while(0);a[d]=1;d=s|0;n=c[d>>2]|0;m=n+10344|0;if((c[m>>2]|0)>0){j=n+10524|0;f=0;do{Ek((c[j>>2]|0)+(f*76|0)|0,1);f=f+1|0;}while((f|0)<(c[m>>2]|0));u=c[d>>2]|0}else{u=n}n=u+10332|0;m=c[n>>2]|0;f=(a[m+532|0]|0)==0;do{if((c[(c[(c[b+376220>>2]|0)+10332>>2]|0)+375888>>2]|0)==0){if(f){De(u);v=c[n>>2]|0}else{v=m}if((a[v+533|0]|0)!=0){break}uj(u)}else{if(f){Ce(s);w=3;x=c[n>>2]|0}else{w=1;x=m}if((a[x+533|0]|0)==0){wj(s,w)|0}_h(u)}}while(0);u=s+10648|0;w=s+10644|0;x=c[w>>2]|0;b:do{if((c[u>>2]|0)==(x|0)){t=38}else{m=0;n=x;while(1){y=Hj(n+(m*80|0)|0,c[d>>2]|0)|0;f=m+1|0;if((y|0)!=0){break}v=c[w>>2]|0;if(f>>>0<(((c[u>>2]|0)-v|0)/80|0)>>>0){m=f;n=v}else{t=38;break b}}Ze(b,s)|0;z=y;t=39}}while(0);if((t|0)==38){Ze(b,s)|0;if((s|0)==0){A=0}else{z=0;t=39}}if((t|0)==39){Je(s);Pu(s);A=z}z=c[g>>2]|0;s=c[e>>2]|0;if(z-s>>2>>>0>1>>>0){t=1;b=s;while(1){c[b+(t-1<<2)>>2]=c[b+(t<<2)>>2];s=t+1|0;y=c[g>>2]|0;u=c[e>>2]|0;if(s>>>0<y-u>>2>>>0){t=s;b=u}else{B=y;break}}}else{B=z}z=B-4|0;c[g>>2]=B+(~((z+(-z|0)|0)>>>2)<<2);i=A;return i|0}function Ye(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,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;f=e+4|0;g=c[f>>2]|0;h=g+1348|0;i=g+1344|0;g=c[i>>2]|0;if((c[h>>2]|0)!=(g|0)){j=b+376144|0;k=b+376152|0;l=0;m=g;do{g=yh(j,c[m+(l<<2)>>2]|0)|0;if((g|0)>-1){c[(c[(c[k>>2]|0)+(g<<2)>>2]|0)+96>>2]=0}l=l+1|0;m=c[i>>2]|0;}while(l>>>0<(c[h>>2]|0)-m>>2>>>0)}m=d|0;h=c[m>>2]|0;l=e+40|0;c[l>>2]=1;i=c[h+10332>>2]|0;a:do{if((c[i+375888>>2]|0)>0){k=a[h+5965|0]|0;j=k<<24>>24!=0;g=(a[h+5966|0]|0)!=0;if(!(k<<24>>24==0)){n=j;o=g;break}if((a[h+5966|0]|0)!=0){n=j;o=g;break}k=i+168|0;p=c[k>>2]|0;if((p|0)>0){q=0;while(1){r=q+1|0;if((c[i+88+(q<<2)>>2]|0)==1e3){n=j;o=g;break a}if((r|0)<(p|0)){q=r}else{break}}if((p|0)<20){s=13}}else{s=13}if((s|0)==13){c[k>>2]=p+1;c[i+88+(p<<2)>>2]=1e3}q=i+84|0;r=c[q>>2]|0;if((r|0)==20){c[i+80>>2]=1001;n=j;o=g;break}else{c[q>>2]=r+1;c[i+4+(r<<2)>>2]=1e3;n=j;o=g;break}}else{n=0;o=0}}while(0);i=d+10636|0;r=c[i>>2]|0;q=d+10632|0;t=c[q>>2]|0;do{if((r|0)==(t|0)){u=r;v=r}else{if((c[t>>2]|0)!=(e|0)){u=r;v=t;break}w=c[(c[f>>2]|0)+16>>2]|0;if((w|0)<=0){u=r;v=t;break}x=h+10524|0;y=0;do{Ek((c[x>>2]|0)+(y*76|0)|0,1);y=y+1|0;}while((y|0)<(w|0));u=c[i>>2]|0;v=c[q>>2]|0}}while(0);h=u-v>>2;b:do{if(h>>>0>1>>>0){u=1;while(1){t=u+1|0;if((c[v+(u<<2)>>2]|0)==(e|0)){break}if(t>>>0<h>>>0){u=t}else{break b}}t=c[v+(u-1<<2)>>2]|0;if((t|0)==0){break}if((c[t+40>>2]|0)!=2){break}r=h-1|0;w=0;while(1){if(!(w>>>0<r>>>0)){break b}z=w+1|0;if((c[v+(w<<2)>>2]|0)==(t|0)){break}else{w=z}}w=c[v+(z<<2)>>2]|0;if((w|0)==0){break}r=c[(c[t+4>>2]|0)+16>>2]|0;u=w+4|0;if((r|0)<(c[(c[u>>2]|0)+16>>2]|0)){A=r}else{break}do{r=c[m>>2]|0;if((A|0)>=(c[r+10344>>2]|0)){break b}Ek((c[r+10524>>2]|0)+(A*76|0)|0,1);A=A+1|0;}while((A|0)<(c[(c[u>>2]|0)+16>>2]|0))}}while(0);if(!(n|o)){A=_e(b,d,e)|0;c[l>>2]=2;z=c[q>>2]|0;v=((c[i>>2]|0)-z>>2)-1|0;h=0;while(1){if(!(h>>>0<v>>>0)){B=A;s=61;break}C=h+1|0;if((c[z+(h<<2)>>2]|0)==(e|0)){break}else{h=C}}if((s|0)==61){return B|0}h=c[z+(C<<2)>>2]|0;if((h|0)==0){B=A;return B|0}C=c[(c[f>>2]|0)+16>>2]|0;z=h+4|0;if((C|0)<(c[(c[z>>2]|0)+16>>2]|0)){D=C}else{B=A;return B|0}while(1){C=c[m>>2]|0;if((D|0)>=(c[C+10344>>2]|0)){B=A;s=61;break}Ek((c[C+10524>>2]|0)+(D*76|0)|0,1);C=D+1|0;if((C|0)<(c[(c[z>>2]|0)+16>>2]|0)){D=C}else{B=A;s=61;break}}if((s|0)==61){return B|0}}if(n&o){B=1006;return B|0}if(n){$e(b,d,e)|0;c[l>>2]=2;n=c[q>>2]|0;A=((c[i>>2]|0)-n>>2)-1|0;D=0;while(1){if(!(D>>>0<A>>>0)){B=0;s=61;break}E=D+1|0;if((c[n+(D<<2)>>2]|0)==(e|0)){break}else{D=E}}if((s|0)==61){return B|0}D=c[n+(E<<2)>>2]|0;if((D|0)==0){B=0;return B|0}E=c[(c[f>>2]|0)+16>>2]|0;n=D+4|0;if((E|0)<(c[(c[n>>2]|0)+16>>2]|0)){F=E}else{B=0;return B|0}while(1){E=c[m>>2]|0;if((F|0)>=(c[E+10344>>2]|0)){B=0;s=61;break}Ek((c[E+10524>>2]|0)+(F*76|0)|0,1);E=F+1|0;if((E|0)<(c[(c[n>>2]|0)+16>>2]|0)){F=E}else{B=0;s=61;break}}if((s|0)==61){return B|0}}if(!o){ec(11704,14344,971,17632);return 0}o=af(b,d,e)|0;c[l>>2]=2;l=c[q>>2]|0;q=((c[i>>2]|0)-l>>2)-1|0;i=0;while(1){if(!(i>>>0<q>>>0)){B=o;s=61;break}G=i+1|0;if((c[l+(i<<2)>>2]|0)==(e|0)){break}else{i=G}}if((s|0)==61){return B|0}i=c[l+(G<<2)>>2]|0;if((i|0)==0){B=o;return B|0}G=c[(c[f>>2]|0)+16>>2]|0;f=i+4|0;if((G|0)<(c[(c[f>>2]|0)+16>>2]|0)){H=G}else{B=o;return B|0}while(1){G=c[m>>2]|0;if((H|0)>=(c[G+10344>>2]|0)){B=o;s=61;break}Ek((c[G+10524>>2]|0)+(H*76|0)|0,1);G=H+1|0;if((G|0)<(c[(c[f>>2]|0)+16>>2]|0)){H=G}else{B=o;s=61;break}}if((s|0)==61){return B|0}return 0}function Ze(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=c[d>>2]|0;if((g|0)==0){i=e;return 0}do{if((a[g+100|0]|0)!=0){if((a[g+10516|0]|0)!=0){if((a[b+514|0]|0)!=0){break}}c[f>>2]=g;d=b+376168|0;h=c[d>>2]|0;if((h|0)==(c[b+376172>>2]|0)){yf(b+376164|0,f);break}if((h|0)==0){j=0}else{c[h>>2]=g;j=c[d>>2]|0}c[d>>2]=j+4}}while(0);j=b+376144|0;if(((c[b+376168>>2]|0)-(c[b+376164>>2]|0)>>2|0)>(c[g+596+(((c[g+116>>2]|0)-1|0)*12|0)+4>>2]|0)){zh(j)}Eh(j);i=e;return 0}function _e(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=i;i=i+18624|0;g=f|0;h=e+4|0;j=c[h>>2]|0;k=j+1348|0;l=j+1344|0;m=c[l>>2]|0;if((c[k>>2]|0)==(m|0)){n=j}else{j=b+376144|0;o=b+376152|0;p=0;q=m;do{m=yh(j,c[q+(p<<2)>>2]|0)|0;if((m|0)>-1){c[(c[(c[o>>2]|0)+(m<<2)>>2]|0)+96>>2]=0}p=p+1|0;q=c[l>>2]|0;}while(p>>>0<(c[k>>2]|0)-q>>2>>>0);n=c[h>>2]|0}q=d|0;k=c[q>>2]|0;if(!((c[n+16>>2]|0)>>>0<(c[k+10276>>2]|0)-(c[k+10272>>2]|0)>>2>>>0)){r=6;i=f;return r|0}k=g+18580|0;Cd(k);n=g+18592|0;p=g+48|0;dv(g+18508|0,0,20)|0;dv(n|0,0,16)|0;c[g+2112>>2]=p;dv(p|0,0,2048)|0;p=c[h>>2]|0;c[g+18600>>2]=p;l=c[q>>2]|0;c[g+18596>>2]=l;c[n>>2]=b;c[g+18604>>2]=d;c[g+18608>>2]=e;c[g+4>>2]=c[(c[l+10272>>2]|0)+(c[p+16>>2]<<2)>>2];c[g+18612>>2]=0;Qe(0,g);p=c[e+12>>2]|0;if((p|0)<1){s=17}else{sd(g+18556|0,c[e+8>>2]|0,p);do{if((a[b+93817|0]|0)!=0){if((a[(c[h>>2]|0)+4|0]|0)==0){break}p=d+10676|0;l=(c[(c[b+376220>>2]|0)+5828>>2]|0)-1|0;n=d+10680|0;q=c[n>>2]|0;o=c[p>>2]|0;j=q-o>>3;if(j>>>0<l>>>0){uf(p,l-j|0);break}if(!(j>>>0>l>>>0)){break}j=o+(l<<3)|0;if((q|0)==(j|0)){break}else{t=q}do{q=t-8|0;c[n>>2]=q;Ed(q);t=c[n>>2]|0;}while((t|0)!=(j|0))}}while(0);c[e+120>>2]=1;t=dk(g)|0;Ek(e+44|0,1);s=t}Ed(k);r=s;i=f;return r|0}function $e(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,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;f=i;i=i+8|0;g=f|0;h=c[d>>2]|0;j=c[e+4>>2]|0;k=c[j+768>>2]|0;l=k+1|0;m=c[h+5820>>2]|0;if((c[h+10536>>2]|0)!=(-(c[h+10532>>2]|0)|0)){ec(8488,14344,989,17688);return 0}do{if((a[j+4|0]|0)!=0){n=d+10676|0;o=(c[h+5828>>2]|0)-1|0;p=d+10680|0;q=c[p>>2]|0;r=c[n>>2]|0;s=q-r>>3;if(s>>>0<o>>>0){uf(n,o-s|0);break}if(!(s>>>0>o>>>0)){break}s=r+(o<<3)|0;if((q|0)==(s|0)){break}else{t=q}do{q=t-8|0;c[p>>2]=q;Ed(q);t=c[p>>2]|0;}while((t|0)!=(s|0))}}while(0);Ie(e,l);t=c[j+16>>2]|0;s=(t|0)/(m|0)|0;a:do{if((k|0)>-1){p=e+136|0;q=e+132|0;o=h+10332|0;r=h+10272|0;n=e+12|0;u=e+8|0;v=e+120|0;w=b+375396|0;x=j+776|0;if((k|0)>0){y=t;z=s;A=0}else{B=t;C=s;D=0;while(1){if((D|0)>0){E=C+1|0;F=E;G=ga(E,m)|0}else{F=C;G=B}if((c[p>>2]|0)<=(D|0)){break}E=c[q>>2]|0;H=E+(D*18624|0)|0;c[E+(D*18624|0)+18600>>2]=j;c[E+(D*18624|0)+18592>>2]=c[o>>2];c[E+(D*18624|0)+18596>>2]=h;I=E+(D*18624|0)+18604|0;c[I>>2]=d;c[E+(D*18624|0)+18608>>2]=e;c[E+(D*18624|0)+4>>2]=c[(c[r>>2]|0)+(G<<2)>>2];Qe(0,H);J=(D|0)==0;if(J){K=0}else{K=c[(c[x>>2]|0)+(D-1<<2)>>2]|0}if((D|0)==(k|0)){L=n}else{L=(c[x>>2]|0)+(D<<2)|0}M=c[L>>2]|0;if((K|0)<0){break a}if(!((M|0)<=(c[n>>2]|0)&(M|0)>(K|0))){break a}sd(E+(D*18624|0)+18556|0,(c[u>>2]|0)+K|0,M-K|0);Vh(h,1);c[v>>2]=(c[v>>2]|0)+1;M=Nu(20)|0;c[M+4>>2]=0;c[M>>2]=22248;a[M+8|0]=J&1;c[M+16>>2]=H;c[M+12>>2]=F;H=M;c[E+(D*18624|0)+18612>>2]=H;Kk(w,H);E=c[I>>2]|0;c[g>>2]=H;I=E+10668|0;M=c[I>>2]|0;if(M>>>0<(c[E+10672>>2]|0)>>>0){if((M|0)==0){N=0}else{c[M>>2]=H;N=c[I>>2]|0}c[I>>2]=N+4}else{He(E+10664|0,g)}E=D+1|0;if((E|0)<(l|0)){B=G;C=F;D=E}else{break a}}ec(15880,15472,170,17840);return 0}while(1){if((A|0)>0){D=z+1|0;O=D;P=ga(D,m)|0}else{if(((y|0)%(m|0)|0|0)==0){O=z;P=y}else{break a}}if((c[p>>2]|0)<=(A|0)){break}D=c[q>>2]|0;C=D+(A*18624|0)|0;c[D+(A*18624|0)+18600>>2]=j;c[D+(A*18624|0)+18592>>2]=c[o>>2];c[D+(A*18624|0)+18596>>2]=h;B=D+(A*18624|0)+18604|0;c[B>>2]=d;c[D+(A*18624|0)+18608>>2]=e;c[D+(A*18624|0)+4>>2]=c[(c[r>>2]|0)+(P<<2)>>2];Qe(0,C);E=(A|0)==0;if(E){Q=0}else{Q=c[(c[x>>2]|0)+(A-1<<2)>>2]|0}if((A|0)==(k|0)){R=n}else{R=(c[x>>2]|0)+(A<<2)|0}I=c[R>>2]|0;if((Q|0)<0){break a}if(!((I|0)<=(c[n>>2]|0)&(I|0)>(Q|0))){break a}sd(D+(A*18624|0)+18556|0,(c[u>>2]|0)+Q|0,I-Q|0);Vh(h,1);c[v>>2]=(c[v>>2]|0)+1;I=Nu(20)|0;c[I+4>>2]=0;c[I>>2]=22248;a[I+8|0]=E&1;c[I+16>>2]=C;c[I+12>>2]=O;C=I;c[D+(A*18624|0)+18612>>2]=C;Kk(w,C);D=c[B>>2]|0;c[g>>2]=C;B=D+10668|0;I=c[B>>2]|0;if(I>>>0<(c[D+10672>>2]|0)>>>0){if((I|0)==0){S=0}else{c[I>>2]=C;S=c[B>>2]|0}c[B>>2]=S+4}else{He(D+10664|0,g)}D=A+1|0;if((D|0)<(l|0)){y=P;z=O;A=D}else{break a}}ec(15880,15472,170,17840);return 0}}while(0);_h(h);h=d+10668|0;A=c[h>>2]|0;O=d+10664|0;d=c[O>>2]|0;if((A|0)==(d|0)){i=f;return 0}else{T=0;U=d;V=A}while(1){A=c[U+(T<<2)>>2]|0;if((A|0)==0){W=V;X=U}else{Dc[c[(c[A>>2]|0)+4>>2]&511](A);W=c[h>>2]|0;X=c[O>>2]|0}A=T+1|0;Y=X;if(A>>>0<W-Y>>2>>>0){T=A;U=X;V=W}else{break}}if((W|0)==(X|0)){i=f;return 0}c[h>>2]=W+(~((W-4+(-Y|0)|0)>>>2)<<2);i=f;return 0}function af(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,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;f=i;i=i+8|0;g=f|0;h=c[d>>2]|0;j=c[e+4>>2]|0;k=c[j+768>>2]|0;l=k+1|0;m=c[h+5820>>2]|0;if((c[h+10536>>2]|0)!=(-(c[h+10532>>2]|0)|0)){ec(8488,14344,1103,17664);return 0}Ie(e,l);n=c[j+16>>2]|0;a:do{if((k|0)>-1){o=h+5968|0;p=h+5972|0;q=e+136|0;r=e+132|0;s=h+10332|0;t=h+10272|0;u=e+12|0;v=e+8|0;w=e+120|0;x=b+375396|0;y=j+776|0;z=0;A=c[(c[h+10308>>2]|0)+(n<<2)>>2]|0;B=n;while(1){if((z|0)>0){C=A+1|0;D=c[o>>2]|0;if((C|0)>=(ga(c[p>>2]|0,D)|0)){E=1007;break a}F=(ga(c[h+10228+(((C|0)/(D|0)|0)<<2)>>2]|0,m)|0)+(c[h+10184+(((C|0)%(D|0)|0)<<2)>>2]|0)|0;G=C}else{F=B;G=A}if((c[q>>2]|0)<=(z|0)){break}C=c[r>>2]|0;D=C+(z*18624|0)|0;c[C+(z*18624|0)+18600>>2]=j;c[C+(z*18624|0)+18592>>2]=c[s>>2];c[C+(z*18624|0)+18596>>2]=h;H=C+(z*18624|0)+18604|0;c[H>>2]=d;c[C+(z*18624|0)+18608>>2]=e;c[C+(z*18624|0)+4>>2]=c[(c[t>>2]|0)+(F<<2)>>2];Qe(0,D);I=(z|0)==0;if(I){J=0}else{J=c[(c[y>>2]|0)+(z-1<<2)>>2]|0}if((z|0)==(k|0)){K=u}else{K=(c[y>>2]|0)+(z<<2)|0}L=c[K>>2]|0;if((J|0)<0){E=17;break a}if(!((L|0)<=(c[u>>2]|0)&(L|0)>(J|0))){E=17;break a}sd(C+(z*18624|0)+18556|0,(c[v>>2]|0)+J|0,L-J|0);Vh(h,1);c[w>>2]=(c[w>>2]|0)+1;L=Nu(24)|0;c[L+4>>2]=0;c[L>>2]=22216;a[L+8|0]=I&1;c[L+20>>2]=D;c[L+12>>2]=(F|0)%(m|0)|0;c[L+16>>2]=(F|0)/(m|0)|0;D=L;c[C+(z*18624|0)+18612>>2]=D;Kk(x,D);C=c[H>>2]|0;c[g>>2]=D;H=C+10668|0;L=c[H>>2]|0;if(L>>>0<(c[C+10672>>2]|0)>>>0){if((L|0)==0){M=0}else{c[L>>2]=D;M=c[H>>2]|0}c[H>>2]=M+4}else{He(C+10664|0,g)}C=z+1|0;if((C|0)<(l|0)){z=C;A=G;B=F}else{E=0;break a}}ec(15880,15472,170,17840);return 0}else{E=0}}while(0);_h(h);h=d+10668|0;F=c[h>>2]|0;G=d+10664|0;d=c[G>>2]|0;if((F|0)==(d|0)){i=f;return E|0}else{N=0;O=d;P=F}while(1){F=c[O+(N<<2)>>2]|0;if((F|0)==0){Q=P;R=O}else{Dc[c[(c[F>>2]|0)+4>>2]&511](F);Q=c[h>>2]|0;R=c[G>>2]|0}F=N+1|0;S=R;if(F>>>0<Q-S>>2>>>0){N=F;O=R;P=Q}else{break}}if((Q|0)==(R|0)){i=f;return E|0}c[h>>2]=Q+(~((Q-4+(-S|0)|0)>>>2)<<2);i=f;return E|0}function bf(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+5200|0;g=f|0;h=f+5168|0;j=f+5192|0;md(h,c[e+20>>2]|0,c[e+24>>2]|0);k=j|0;a[k]=0;l=j+1|0;a[l]=0;m=j+2|0;a[m]=0;Ji(j,h);n=a[k]|0;a[b+377208|0]=n;a[b+377209|0]=(n-19&255)>>>0<2>>>0|0;a[b+377210|0]=(n-16&255)>>>0<8>>>0|0;if((a[l]|0)!=0){Vi(b+548|0,e);o=0;i=f;return o|0}if((d[m]|0)>(c[b+375908>>2]|0)){Vi(b+548|0,e);o=0;i=f;return o|0}if((n&255)>>>0<32>>>0){o=Ve(b,h,e,j)|0;i=f;return o|0}switch(n&255|0){case 33:{j=g|0;ik(g);m=kk(g,b+4|0,h)|0;if((m|0)==0){l=c[b+516>>2]|0;if((l|0)>-1){pk(g,l)}l=c[g+472>>2]|0;k=b+11096+(l*5168|0)|0;cv(k|0,j|0,4717)|0;if((k|0)!=(g|0)){zf(b+11096+(l*5168|0)+4720|0,c[g+4720>>2]|0,c[g+4724>>2]|0)}cv(b+11096+(l*5168|0)+4732|0,g+4732|0,436)|0;p=0}else{p=m}jk(g);Vi(b+548|0,e);o=p;i=f;return o|0};case 32:{p=Re(b,h)|0;Vi(b+548|0,e);o=p;i=f;return o|0};case 34:{p=Se(b,h)|0;Vi(b+548|0,e);o=p;i=f;return o|0};case 39:case 40:{p=Te(b,h,n<<24>>24==40)|0;Vi(b+548|0,e);o=p;i=f;return o|0};case 36:{a[b+376207|0]=1;Vi(b+548|0,e);o=0;i=f;return o|0};default:{Vi(b+548|0,e);o=0;i=f;return o|0}}return 0}function cf(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+8|0;g=f|0;h=b+548|0;j=b+580|0;k=(c[j>>2]|0)==0;l=a[h|0]|0;do{if(k){if(l<<24>>24==0){if((a[b+549|0]|0)==0){m=8;break}}if((c[b+377212>>2]|0)!=(c[b+377216>>2]|0)){m=7;break}Ah(b+376144|0)|0;if((e|0)==0){n=0;i=f;return n|0}c[e>>2]=c[b+376196>>2];n=0;i=f;return n|0}else{m=7}}while(0);if((m|0)==7){if(l<<24>>24==0){m=8}}do{if((m|0)==8){if((a[b+549|0]|0)!=0|k^1){break}if((e|0)==0){n=13;i=f;return n|0}c[e>>2]=1;n=13;i=f;return n|0}}while(0);if(!(vh(b+376144|0,0)|0)){if((e|0)==0){n=9;i=f;return n|0}c[e>>2]=1;n=9;i=f;return n|0}a[g]=0;do{if((c[j>>2]|0)==0){do{if((a[b+549|0]|0)!=0){if((c[b+377212>>2]|0)!=(c[b+377216>>2]|0)){break}if((e|0)==0){n=13;i=f;return n|0}c[e>>2]=1;n=13;i=f;return n|0}}while(0);o=Xe(b,g)|0}else{k=Ui(h)|0;if((k|0)==0){ec(6136,14344,1314,17512);return 0}else{m=bf(b,k)|0;a[g]=1;o=m;break}}}while(0);if((e|0)==0){n=o;i=f;return n|0}if((o|0)==0){p=d[g]|0}else{p=0}c[e>>2]=p;n=o;i=f;return n|0}function df(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=d+377208|0;do{if(Ni(a[f]|0)|0){if((a[d+376205|0]|0)==0){g=4;break}c[d+376208>>2]=0;a[b+377224|0]=1;h=0;i=e+28|0}else{g=4}}while(0);a:do{if((g|0)==4){b=c[(c[d+375388>>2]|0)+5032>>2]|0;j=e+28|0;k=c[j>>2]|0;l=c[d+376212>>2]|0;do{if((k|0)<(l|0)){if((l-k|0)<((b|0)/2|0|0)){break}m=(c[d+376216>>2]|0)+b|0;c[d+376208>>2]=m;h=m;i=j;break a}}while(0);do{if((k|0)>(l|0)){if((k-l|0)<=((b|0)/2|0|0)){break}m=(c[d+376216>>2]|0)-b|0;c[d+376208>>2]=m;h=m;i=j;break a}}while(0);b=c[d+376216>>2]|0;c[d+376208>>2]=b;h=b;i=j}}while(0);e=c[d+376220>>2]|0;c[e+92>>2]=(c[i>>2]|0)+h;c[e+88>>2]=c[i>>2];if((a[e+10520|0]|0)!=0){return}if(Pi(a[f]|0)|0){return}if(Mi(a[f]|0)|0){return}if(Oi(a[f]|0)|0){return}c[d+376212>>2]=c[i>>2];c[d+376216>>2]=c[d+376208>>2];return}function ef(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;i=e+376144|0;if(!(vh(i,1)|0)){ec(4312,14344,1433,17520);return 0}j=Ch(i,c[e+375388>>2]|0,b,0,0,0,0)|0;if(!((j|0)>-1)){ec(3080,14344,1436,17520);return 0}b=c[e+376152>>2]|0;if((c[e+376156>>2]|0)-b>>2>>>0>j>>>0){k=c[b+(j<<2)>>2]|0}else{k=0}b=1<<(c[f+5004>>2]|0)-1;Sh(k,1<<(c[f+4996>>2]|0)-1,b,b);b=k+10364|0;if((c[b>>2]|0)<=0){l=k+92|0;c[l>>2]=g;m=f+5032|0;n=c[m>>2]|0;o=n-1|0;p=o&g;q=k+88|0;c[q>>2]=p;r=k+100|0;a[r]=0;s=h?2:1;t=k+96|0;c[t>>2]=s;u=k+10516|0;a[u]=1;return j|0}e=k+10360|0;i=0;do{v=(c[e>>2]|0)+(i*3|0)|0;C=(d[v]|d[v+1|0]<<8)<<16>>16&-769;a[v]=C;C=C>>8;a[v+1|0]=C;i=i+1|0;}while((i|0)<(c[b>>2]|0));l=k+92|0;c[l>>2]=g;m=f+5032|0;n=c[m>>2]|0;o=n-1|0;p=o&g;q=k+88|0;c[q>>2]=p;r=k+100|0;a[r]=0;s=h?2:1;t=k+96|0;c[t>>2]=s;u=k+10516|0;a[u]=1;return j|0}function ff(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;h=i;i=i+40|0;j=h|0;k=h+16|0;l=h+32|0;m=j|0;c[m>>2]=0;n=j+4|0;c[n>>2]=0;o=j+8|0;c[o>>2]=0;p=f+376220|0;q=c[c[p>>2]>>2]|0;r=f+377208|0;a:do{if(Ni(a[r]|0)|0){if((a[f+376205|0]|0)==0){break}s=c[p>>2]|0;t=c[s+92>>2]|0;u=e+376156|0;v=c[u>>2]|0;w=e+376152|0;x=c[w>>2]|0;if((v-x|0)<=0){break}y=f+376156|0;z=f+376152|0;A=0;B=v;v=x;x=s;b:while(1){s=c[z>>2]|0;if((c[y>>2]|0)-s>>2>>>0>A>>>0){C=c[s+(A<<2)>>2]|0}else{C=0}do{if((c[C+96>>2]|0)==0){D=B;E=v;F=x}else{if((c[C+92>>2]|0)>=(t|0)){D=B;E=v;F=x;break}s=C+104|0;if(!((c[s>>2]|0)>>>0>(c[x>>2]|0)>>>0)){D=B;E=v;F=x;break}G=c[C>>2]|0;H=c[n>>2]|0;I=c[o>>2]|0;do{if(H>>>0<I>>>0){if((H|0)!=0){c[H>>2]=G}c[n>>2]=H+4;J=x;K=B;L=v}else{M=c[m>>2]|0;N=M;O=H-N|0;P=O>>2;Q=P+1|0;if(Q>>>0>1073741823>>>0){break b}R=I-N|0;if(R>>2>>>0<536870911>>>0){N=R>>1;R=N>>>0<Q>>>0?Q:N;if((R|0)==0){S=0;T=0}else{U=R;V=20}}else{U=1073741823;V=20}if((V|0)==20){V=0;S=Nu(U<<2)|0;T=U}R=S+(P<<2)|0;if((R|0)!=0){c[R>>2]=G}R=M;cv(S|0,R|0,O)|0;c[m>>2]=S;c[n>>2]=S+(Q<<2);c[o>>2]=S+(T<<2);if((M|0)==0){J=x;K=B;L=v;break}Pu(R);J=c[p>>2]|0;K=c[u>>2]|0;L=c[w>>2]|0}}while(0);c[s>>2]=c[J>>2];D=K;E=L;F=J}}while(0);G=A+1|0;if((G|0)<(D-E>>2|0)){A=G;B=D;v=E;x=F}else{break a}}Nr(0)}}while(0);if(Ki(a[r]|0)|0){dv(f+376548|0,0,20)|0}else{r=g+908|0;if((a[r]|0)==0){W=0;X=0}else{F=0;E=0;D=0;while(1){J=(b[g+812+(D<<1)>>1]|0)+(c[(c[p>>2]|0)+92>>2]|0)|0;if((a[g+876+D|0]|0)==0){c[f+376696+(F<<2)>>2]=J;Y=E;Z=F+1|0}else{c[f+376568+(E<<2)>>2]=J;Y=E+1|0;Z=F}J=D+1|0;if((J|0)<(d[r]|0)){F=Z;E=Y;D=J}else{W=Z;X=Y;break}}}c[f+376548>>2]=X;X=g+909|0;if((a[X]|0)==0){_=W;$=0}else{Y=W;W=0;Z=0;while(1){D=(b[g+844+(Z<<1)>>1]|0)+(c[(c[p>>2]|0)+92>>2]|0)|0;if((a[g+892+Z|0]|0)==0){c[f+376696+(Y<<2)>>2]=D;aa=W;ba=Y+1|0}else{c[f+376632+(W<<2)>>2]=D;aa=W+1|0;ba=Y}D=Z+1|0;if((D|0)<(d[X]|0)){Y=ba;W=aa;Z=D}else{_=ba;$=aa;break}}}c[f+376552>>2]=$;c[f+376556>>2]=_;_=g+140|0;$=g+144|0;if(((c[$>>2]|0)+(c[_>>2]|0)|0)>0){aa=g+28|0;ba=f+375388|0;Z=0;W=0;Y=0;while(1){X=c[f+376228+(Y<<2)>>2]|0;D=g+244+Y|0;if((a[D]|0)==0){ca=X}else{ca=(c[(c[p>>2]|0)+92>>2]|0)+X-(c[aa>>2]|0)-(ga(c[(c[ba>>2]|0)+5032>>2]|0,c[f+376356+(Y<<2)>>2]|0)|0)|0}if((c[f+376292+(Y<<2)>>2]|0)==0){c[f+376824+(Z<<2)>>2]=ca;c[f+376484+(Z<<2)>>2]=a[D]|0;da=W;ea=Z+1|0}else{c[f+376760+(W<<2)>>2]=ca;c[f+376420+(W<<2)>>2]=a[D]|0;da=W+1|0;ea=Z}D=Y+1|0;if((D|0)<((c[$>>2]|0)+(c[_>>2]|0)|0)){Z=ea;W=da;Y=D}else{fa=ea;ha=da;break}}}else{fa=0;ha=0}c[f+376560>>2]=ha;c[f+376564>>2]=fa}fa=e+376156|0;ha=e+376152|0;da=(c[fa>>2]|0)-(c[ha>>2]|0)>>2;a[l]=0;sf(k,da,l);uh(e+376144|0);l=f+376560|0;da=c[l>>2]|0;if((da|0)>0){ea=f+376144|0;Y=c[k>>2]|0;W=f+376152|0;Z=f+375388|0;_=0;while(1){$=f+376760+(_<<2)|0;ca=c[$>>2]|0;if((c[f+376420+(_<<2)>>2]|0)==0){ia=xh(ea,ca,q,1)|0}else{ia=wh(ea,ca,q,1)|0}ca=f+377080+(_<<2)|0;c[ca>>2]=ia;if((ia|0)>-1){ba=Y+(ia>>>5<<2)|0;c[ba>>2]=c[ba>>2]|1<<(ia&31);ja=ia}else{ba=ef(e,f,c[Z>>2]|0,c[$>>2]|0,1)|0;c[ca>>2]=ba;ca=Y+(ba>>>5<<2)|0;c[ca>>2]=c[ca>>2]|1<<(ba&31);ja=ba}if((a[(c[(c[W>>2]|0)+(ja<<2)>>2]|0)+10516|0]|0)!=0){a[(c[p>>2]|0)+10516|0]=4}ba=_+1|0;ca=c[l>>2]|0;if((ba|0)<(ca|0)){_=ba}else{ka=ca;break}}}else{ka=da}da=f+376564|0;_=c[da>>2]|0;if((_|0)>0){ja=f+376144|0;W=c[k>>2]|0;Y=f+375388|0;Z=0;do{ia=f+376824+(Z<<2)|0;ea=c[ia>>2]|0;if((c[f+376484+(Z<<2)>>2]|0)==0){la=xh(ja,ea,q,1)|0}else{la=wh(ja,ea,q,1)|0}ea=f+377144+(Z<<2)|0;c[ea>>2]=la;if((la|0)>-1){ca=W+(la>>>5<<2)|0;c[ca>>2]=c[ca>>2]|1<<(la&31)}else{ca=ef(e,f,c[Y>>2]|0,c[ia>>2]|0,1)|0;c[ea>>2]=ca;ea=W+(ca>>>5<<2)|0;c[ea>>2]=c[ea>>2]|1<<(ca&31)}Z=Z+1|0;ma=c[da>>2]|0;}while((Z|0)<(ma|0));na=c[l>>2]|0;oa=ma}else{na=ka;oa=_}if((na|0)>0){_=c[f+376152>>2]|0;ka=0;do{c[(c[_+(c[f+377080+(ka<<2)>>2]<<2)>>2]|0)+96>>2]=2;ka=ka+1|0;}while((ka|0)<(na|0))}if((oa|0)>0){na=c[f+376152>>2]|0;ka=0;do{c[(c[na+(c[f+377144+(ka<<2)>>2]<<2)>>2]|0)+96>>2]=2;ka=ka+1|0;}while((ka|0)<(oa|0))}oa=f+376548|0;if((c[oa>>2]|0)>0){ka=f+376144|0;na=c[k>>2]|0;_=f+376152|0;ma=f+375388|0;l=0;do{Z=f+376568+(l<<2)|0;da=wh(ka,c[Z>>2]|0,q,0)|0;W=f+376888+(l<<2)|0;c[W>>2]=da;if((da|0)>-1){Y=na+(da>>>5<<2)|0;c[Y>>2]=c[Y>>2]|1<<(da&31);pa=da}else{da=ef(e,f,c[ma>>2]|0,c[Z>>2]|0,0)|0;c[W>>2]=da;W=na+(da>>>5<<2)|0;c[W>>2]=c[W>>2]|1<<(da&31);pa=da}if((a[(c[(c[_>>2]|0)+(pa<<2)>>2]|0)+10516|0]|0)!=0){a[(c[p>>2]|0)+10516|0]=4}l=l+1|0;}while((l|0)<(c[oa>>2]|0))}oa=f+376552|0;if((c[oa>>2]|0)>0){l=f+376144|0;pa=c[k>>2]|0;_=f+376152|0;na=f+375388|0;ma=0;do{ka=f+376632+(ma<<2)|0;da=wh(l,c[ka>>2]|0,q,0)|0;W=f+376952+(ma<<2)|0;c[W>>2]=da;if((da|0)>-1){Z=pa+(da>>>5<<2)|0;c[Z>>2]=c[Z>>2]|1<<(da&31);qa=da}else{da=ef(e,f,c[na>>2]|0,c[ka>>2]|0,0)|0;c[W>>2]=da;W=pa+(da>>>5<<2)|0;c[W>>2]=c[W>>2]|1<<(da&31);qa=da}if((a[(c[(c[_>>2]|0)+(qa<<2)>>2]|0)+10516|0]|0)!=0){a[(c[p>>2]|0)+10516|0]=4}ma=ma+1|0;}while((ma|0)<(c[oa>>2]|0))}oa=f+376556|0;if((c[oa>>2]|0)>0){ma=f+376144|0;qa=c[k>>2]|0;_=0;do{pa=wh(ma,c[f+376696+(_<<2)>>2]|0,q,0)|0;c[f+377016+(_<<2)>>2]=pa;if((pa|0)>-1){na=qa+(pa>>>5<<2)|0;c[na>>2]=c[na>>2]|1<<(pa&31)}_=_+1|0;}while((_|0)<(c[oa>>2]|0))}oa=c[fa>>2]|0;_=c[ha>>2]|0;c:do{if((oa-_|0)>0){qa=c[k>>2]|0;q=f+376156|0;ma=f+376152|0;pa=0;na=oa;e=_;d:while(1){do{if((c[qa+(pa>>>5<<2)>>2]&1<<(pa&31)|0)==0){l=c[ma>>2]|0;if((c[q>>2]|0)-l>>2>>>0>pa>>>0){ra=c[l+(pa<<2)>>2]|0}else{ra=0}l=c[p>>2]|0;if((ra|0)==(l|0)){sa=na;ta=e;break}da=ra+104|0;if(!((c[da>>2]|0)>>>0>(c[l>>2]|0)>>>0)){sa=na;ta=e;break}if((c[ra+96>>2]|0)==0){sa=na;ta=e;break}W=c[ra>>2]|0;ka=c[n>>2]|0;Z=c[o>>2]|0;do{if(ka>>>0<Z>>>0){if((ka|0)!=0){c[ka>>2]=W}c[n>>2]=ka+4;ua=l;va=na;wa=e}else{Y=c[m>>2]|0;la=Y;ja=ka-la|0;ca=ja>>2;ea=ca+1|0;if(ea>>>0>1073741823>>>0){break d}ia=Z-la|0;if(ia>>2>>>0<536870911>>>0){la=ia>>1;ia=la>>>0<ea>>>0?ea:la;if((ia|0)==0){xa=0;ya=0}else{za=ia;V=136}}else{za=1073741823;V=136}if((V|0)==136){V=0;xa=Nu(za<<2)|0;ya=za}ia=xa+(ca<<2)|0;if((ia|0)!=0){c[ia>>2]=W}ia=Y;cv(xa|0,ia|0,ja)|0;c[m>>2]=xa;c[n>>2]=xa+(ea<<2);c[o>>2]=xa+(ya<<2);if((Y|0)==0){ua=l;va=na;wa=e;break}Pu(ia);ua=c[p>>2]|0;va=c[fa>>2]|0;wa=c[ha>>2]|0}}while(0);c[da>>2]=c[ua>>2];sa=va;ta=wa}else{sa=na;ta=e}}while(0);l=pa+1|0;if((l|0)<(sa-ta>>2|0)){pa=l;na=sa;e=ta}else{break c}}Nr(0)}}while(0);ta=g+1344|0;if((ta|0)!=(j|0)){tf(ta,c[m>>2]|0,c[n>>2]|0)}ta=c[k>>2]|0;if((ta|0)!=0){Pu(ta)}ta=c[m>>2]|0;if((ta|0)==0){i=h;return}m=c[n>>2]|0;if((m|0)!=(ta|0)){c[n>>2]=m+(~((m-4+(-ta|0)|0)>>>2)<<2)}Pu(ta);i=h;return}function gf(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,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;b=i;i=i+480|0;g=b|0;h=b+192|0;j=b+384|0;k=c[f+912>>2]|0;l=f+328|0;m=c[l>>2]|0;n=(m|0)>(k|0)?m:k;dv(j|0,0,96)|0;o=e+376548|0;p=e+376552|0;q=e+376560|0;r=(k|0)>(m|0)?k:m;s=e+376888|0;t=e+376952|0;u=e+377080|0;v=0;while(1){if((v|0)>=(n|0)){w=13;break}x=c[o>>2]|0;if((x|0)>0){y=(x|0)>1?-x|0:-1;x=v-r|0;z=y>>>0>x>>>0?y:x;cv(g+(v<<2)|0,s|0,z*-4|0)|0;A=v-z|0}else{A=v}z=c[p>>2]|0;if((z|0)>0&(A|0)<(n|0)){x=(z|0)>1?-z|0:-1;z=A-r|0;y=x>>>0>z>>>0?x:z;cv(g+(A<<2)|0,t|0,y*-4|0)|0;B=A-y|0}else{B=A}y=c[q>>2]|0;if((y|0)>0&(B|0)<(n|0)){z=(y|0)>1?-y|0:-1;y=B-r|0;x=z>>>0>y>>>0?z:y;cv(g+(B<<2)|0,u|0,x*-4|0)|0;dv(j+B|0,1,-x|0)|0;C=B-x|0}else{C=B}if((C|0)==0){w=10;break}else{v=C}}a:do{if((w|0)==10){C=e+84|0;v=c[C>>2]|0;if((v|0)==20){c[e+80>>2]=1001;D=0;break}else{c[C>>2]=v+1;c[e+4+(v<<2)>>2]=1016;D=0;break}}else if((w|0)==13){if((m|0)>=17){ec(1672,14344,1781,17560);return 0}if((m|0)>0){v=f+336|0;C=e+376156|0;B=e+376152|0;r=0;while(1){if((a[v]|0)==0){E=r}else{E=d[f+338+r|0]|0}n=f+916+(r<<2)|0;c[n>>2]=c[g+(E<<2)>>2];a[f+1300+r|0]=a[j+E|0]|0;A=c[n>>2]|0;n=c[B>>2]|0;if(!((c[C>>2]|0)-n>>2>>>0>A>>>0)){D=0;break a}x=c[n+(A<<2)>>2]|0;if((x|0)==0){D=0;break a}c[f+1044+(r<<2)>>2]=c[x+92>>2];c[f+1172+(r<<2)>>2]=c[x+96>>2];x=r+1|0;A=c[l>>2]|0;if((x|0)<(A|0)){r=x}else{F=A;break}}}else{F=m}if((c[f+20>>2]|0)!=0){D=1;break}r=f+332|0;C=c[r>>2]|0;B=(C|0)>(k|0)?C:k;v=(k|0)>(C|0)?k:C;A=0;while(1){if((A|0)>=(B|0)){break}x=c[p>>2]|0;if((x|0)>0){n=(x|0)>1?-x|0:-1;x=A-v|0;y=n>>>0>x>>>0?n:x;cv(h+(A<<2)|0,t|0,y*-4|0)|0;G=A-y|0}else{G=A}y=c[o>>2]|0;if((y|0)>0&(G|0)<(B|0)){x=(y|0)>1?-y|0:-1;y=G-v|0;n=x>>>0>y>>>0?x:y;cv(h+(G<<2)|0,s|0,n*-4|0)|0;H=G-n|0}else{H=G}n=c[q>>2]|0;if((n|0)>0&(H|0)<(B|0)){y=(n|0)>1?-n|0:-1;n=H-v|0;x=y>>>0>n>>>0?y:n;cv(h+(H<<2)|0,u|0,x*-4|0)|0;dv(j+48+H|0,1,-x|0)|0;I=H-x|0}else{I=H}if((I|0)==0){w=32;break}else{A=I}}if((w|0)==32){A=e+84|0;v=c[A>>2]|0;if((v|0)==20){c[e+80>>2]=1001;D=0;break}else{c[A>>2]=v+1;c[e+4+(v<<2)>>2]=1016;D=0;break}}if((F|0)>16){v=e+84|0;A=c[v>>2]|0;if((A|0)==20){c[e+80>>2]=1001;D=0;break}else{c[v>>2]=A+1;c[e+4+(A<<2)>>2]=1012;D=0;break}}if((C|0)>=17){ec(976,14344,1834,17560);return 0}if((C|0)<=0){D=1;break}A=f+337|0;v=e+376156|0;B=e+376152|0;x=0;while(1){if((a[A]|0)==0){J=x}else{J=d[f+354+x|0]|0}n=f+980+(x<<2)|0;c[n>>2]=c[h+(J<<2)>>2];a[f+1316+x|0]=a[j+48+J|0]|0;y=c[n>>2]|0;n=c[B>>2]|0;if(!((c[v>>2]|0)-n>>2>>>0>y>>>0)){D=0;break a}z=c[n+(y<<2)>>2]|0;if((z|0)==0){D=0;break a}c[f+1108+(x<<2)>>2]=c[z+92>>2];c[f+1236+(x<<2)>>2]=c[z+96>>2];z=x+1|0;if((z|0)<(c[r>>2]|0)){x=z}else{D=1;break}}}}while(0);i=b;return D|0}function hf(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=c[b+375388>>2]|0;e=(d|0)==0;do{if(e){f=c[b+375384>>2]|0;if((f|0)==0){g=6;break}g=(c[f+8>>2]|0)-1|0}else{g=(a[d+2|0]|0)-1|0}}while(0);do{if((a[b+376112|0]|0)!=(g|0)){do{if(e){f=c[b+375384>>2]|0;if((f|0)==0){h=6;break}i=c[f+8>>2]|0;j=10}else{i=a[d+2|0]|0;j=10}}while(0);if((j|0)==10){if((i|0)>0){h=i-1|0}else{break}}f=h+1|0;k=b+375892|0;l=h;while(1){m=l*100|0;n=(m|0)/(f|0)|0;o=(m+100|0)/(f|0)|0;if((n|0)>(o|0)){p=l}else{m=o-n|0;q=l;r=n;while(1){s=c[k>>2]|0;t=(q|0)>(s|0);u=t?s:q;a[b+375912+(r<<1)|0]=u;a[b+375912+(r<<1)+1|0]=t?100:(((r-n|0)*100|0|0)/(m|0)|0)&255;if((r|0)<(o|0)){q=u;r=r+1|0}else{p=u;break}}}c[b+376116+(p<<2)>>2]=o;if((p|0)>0){l=p-1|0}else{break}}}}while(0);p=c[b+375896>>2]|0;h=a[b+375912+(p<<1)|0]|0;c[b+375900>>2]=h;c[b+375904>>2]=a[b+375912+(p<<1)+1|0]|0;c[b+375908>>2]=h;return}function jf(b){b=b|0;var d=0,e=0;d=c[b+375388>>2]|0;if((d|0)!=0){e=(a[d+2|0]|0)-1|0;return e|0}d=c[b+375384>>2]|0;if((d|0)==0){e=6;return e|0}e=(c[d+8>>2]|0)-1|0;return e|0}function kf(a,b){a=a|0;b=b|0;c[a+375892>>2]=b;hf(a);return}function lf(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=c[b+375388>>2]|0;if((e|0)==0){f=b+375896|0;g=c[f>>2]|0;return g|0}h=(a[e+2|0]|0)-1|0;if(!((d+1|0)>>>0<3>>>0)){ec(16816,14344,2161,17712);return 0}e=b+375900|0;i=(c[e>>2]|0)+d|0;d=(i|0)<0?0:i;i=(h|0)<(d|0)?h:d;c[e>>2]=i;e=b+375896|0;c[e>>2]=c[b+376116+(i<<2)>>2];hf(b);f=e;g=c[f>>2]|0;return g|0}function mf(a,b){a=a|0;b=b|0;c[a+375896>>2]=b;hf(a);return}function nf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+80|0;d=c[b>>2]|0;if((d|0)==0){e=0;return e|0}f=c[a>>2]|0;g=d-1|0;c[b>>2]=g;fv(a|0,a+4|0,g<<2|0)|0;e=f;return e|0}function of(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+376152>>2]|0;if(!((c[a+376156>>2]|0)-d>>2>>>0>b>>>0)){e=0;return e|0}e=c[d+(b<<2)>>2]|0;return e|0}function pf(a,b){a=a|0;b=b|0;var d=0;if(!((b|0)>-1)){d=0;return d|0}d=((c[a+376156>>2]|0)-(c[a+376152>>2]|0)>>2|0)>(b|0);return d|0}function qf(a){a=a|0;return}function rf(a){a=a|0;Pu(a);return}function sf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=b|0;c[f>>2]=0;g=b+4|0;c[g>>2]=0;h=b+8|0;c[h>>2]=0;if((d|0)==0){return}if((d|0)<0){Nr(0)}b=((d-1|0)>>>5)+1|0;i=Nu(b<<2)|0;j=i;c[f>>2]=j;c[h>>2]=b;b=(a[e]|0)==0;c[g>>2]=d;g=d>>>5;e=g<<2;if(b){dv(i|0,0,e|0)|0;b=g<<5;if((b|0)==(d|0)){return}h=j+(g<<2)|0;c[h>>2]=c[h>>2]&~(-1>>>((32-d+b|0)>>>0));return}else{dv(i|0,-1|0,e|0)|0;e=g<<5;if((e|0)==(d|0)){return}i=j+(g<<2)|0;c[i>>2]=c[i>>2]|-1>>>((32-d+e|0)>>>0);return}}function tf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=b;f=d-e>>2;g=a+8|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;k=j;if(!(f>>>0>h-k>>2>>>0)){l=a+4|0;m=(c[l>>2]|0)-k|0;n=m>>2;if(!(f>>>0>n>>>0)){o=d-e|0;fv(j|0,b|0,o|0)|0;p=j+(o>>2<<2)|0;o=c[l>>2]|0;if((o|0)==(p|0)){return}c[l>>2]=o+(~((o-4+(-p|0)|0)>>>2)<<2);return}p=b+(n<<2)|0;fv(j|0,b|0,m|0)|0;if((p|0)==(d|0)){return}m=c[l>>2]|0;n=(d-4+(-p|0)|0)>>>2;o=p;p=m;while(1){if((p|0)!=0){c[p>>2]=c[o>>2]}q=o+4|0;if((q|0)==(d|0)){break}else{o=q;p=p+4|0}}c[l>>2]=m+(n+1<<2);return}if((j|0)==0){r=h}else{h=a+4|0;n=c[h>>2]|0;if((n|0)!=(j|0)){c[h>>2]=n+(~((n-4+(-k|0)|0)>>>2)<<2)}Pu(j);c[g>>2]=0;c[h>>2]=0;c[i>>2]=0;r=0}if(f>>>0>1073741823>>>0){Nr(0)}h=r;do{if(h>>2>>>0<536870911>>>0){r=h>>1;j=r>>>0<f>>>0?f:r;if(!(j>>>0>1073741823>>>0)){s=j;break}Nr(0)}else{s=1073741823}}while(0);f=Nu(s<<2)|0;h=a+4|0;c[h>>2]=f;c[i>>2]=f;c[g>>2]=f+(s<<2);if((b|0)==(d|0)){return}s=(d-4+(-e|0)|0)>>>2;e=b;b=f;while(1){if((b|0)!=0){c[b>>2]=c[e>>2]}g=e+4|0;if((g|0)==(d|0)){break}else{e=g;b=b+4|0}}c[h>>2]=f+(s+1<<2);return}function uf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+8|0;e=a+4|0;f=c[e>>2]|0;g=c[d>>2]|0;h=f;if(!(g-h>>3>>>0<b>>>0)){i=b;j=f;do{if((j|0)==0){k=0}else{Cd(j);k=c[e>>2]|0}j=k+8|0;c[e>>2]=j;i=i-1|0;}while((i|0)!=0);return}i=a|0;a=c[i>>2]|0;j=h-a>>3;h=j+b|0;if(h>>>0>536870911>>>0){Nr(0)}k=g-a|0;if(k>>3>>>0<268435455>>>0){a=k>>2;k=a>>>0<h>>>0?h:a;if((k|0)==0){l=0;m=0}else{n=k;o=9}}else{n=536870911;o=9}if((o|0)==9){l=Nu(n<<3)|0;m=n}n=l+(j<<3)|0;j=l+(m<<3)|0;m=b;b=n;do{if((b|0)==0){p=0}else{Cd(b);p=b}b=p+8|0;m=m-1|0;}while((m|0)!=0);m=c[i>>2]|0;p=c[e>>2]|0;do{if((p|0)==(m|0)){c[i>>2]=n;c[e>>2]=b;c[d>>2]=j;q=m}else{l=p;o=n;do{o=o-8|0;l=l-8|0;Dd(o,l);}while((l|0)!=(m|0));l=c[i>>2]|0;k=c[e>>2]|0;c[i>>2]=o;c[e>>2]=b;c[d>>2]=j;if((k|0)==(l|0)){q=l;break}else{r=k}while(1){k=r-8|0;Ed(k);if((k|0)==(l|0)){q=l;break}else{r=k}}}}while(0);if((q|0)==0){return}Pu(q);return}function vf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function wf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function xf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=(h|0)/80|0;j=i+1|0;if(j>>>0>53687091>>>0){Nr(0)}k=a+8|0;a=((c[k>>2]|0)-g|0)/80|0;if(a>>>0<26843545>>>0){g=a<<1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=53687091;o=5}if((o|0)==5){l=Nu(n*80|0)|0;m=n}n=l+(i*80|0)|0;if((n|0)!=0){cv(n|0,b|0,80)|0}b=l+((((h|0)/-80|0)+i|0)*80|0)|0;i=f;cv(b|0,i|0,h)|0;c[e>>2]=b;c[d>>2]=l+(j*80|0);c[k>>2]=l+(m*80|0);if((f|0)==0){return}Pu(i);return}function yf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function zf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=b;f=(d-e|0)/100|0;g=a+8|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;k=j;if(!(f>>>0>((h-k|0)/100|0)>>>0)){l=a+4|0;m=(c[l>>2]|0)-k|0;n=(m|0)/100|0;if(!(f>>>0>n>>>0)){o=d-e|0;fv(j|0,b|0,o|0)|0;e=j+(((o|0)/100|0)*100|0)|0;o=c[l>>2]|0;if((o|0)==(e|0)){return}c[l>>2]=o+(~(((o-100+(-e|0)|0)>>>0)/100|0)*100|0);return}e=b+(n*100|0)|0;fv(j|0,b|0,m|0)|0;if((e|0)==(d|0)){return}m=e;e=c[l>>2]|0;do{if((e|0)==0){p=0}else{cv(e|0,m|0,100)|0;p=c[l>>2]|0}e=p+100|0;c[l>>2]=e;m=m+100|0;}while((m|0)!=(d|0));return}if((j|0)==0){q=h}else{h=a+4|0;m=c[h>>2]|0;if((m|0)!=(j|0)){c[h>>2]=m+(~(((m-100+(-k|0)|0)>>>0)/100|0)*100|0)}Pu(j);c[g>>2]=0;c[h>>2]=0;c[i>>2]=0;q=0}if(f>>>0>42949672>>>0){Nr(0)}h=(q|0)/100|0;do{if(h>>>0<21474836>>>0){q=h<<1;j=q>>>0<f>>>0?f:q;if(!(j>>>0>42949672>>>0)){r=j;break}Nr(0)}else{r=42949672}}while(0);f=Nu(r*100|0)|0;h=a+4|0;c[h>>2]=f;c[i>>2]=f;c[g>>2]=f+(r*100|0);if((b|0)==(d|0)){return}else{s=b;t=f}do{if((t|0)==0){u=0}else{cv(t|0,s|0,100)|0;u=c[h>>2]|0}t=u+100|0;c[h>>2]=t;s=s+100|0;}while((s|0)!=(d|0));return}function Af(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=e-d|0;g=b+8|0;h=c[g>>2]|0;i=b|0;j=c[i>>2]|0;k=j;if(!(f>>>0>(h-k|0)>>>0)){l=b+4|0;m=(c[l>>2]|0)-k|0;if(!(f>>>0>m>>>0)){fv(j|0,d|0,f|0)|0;k=j+f|0;if((c[l>>2]|0)==(k|0)){return}c[l>>2]=k;return}k=d+m|0;fv(j|0,d|0,m|0)|0;if((k|0)==(e|0)){return}m=k;k=c[l>>2]|0;do{if((k|0)==0){n=0}else{a[k]=a[m]|0;n=c[l>>2]|0}k=n+1|0;c[l>>2]=k;m=m+1|0;}while((m|0)!=(e|0));return}if((j|0)==0){o=h}else{h=b+4|0;if((c[h>>2]|0)!=(j|0)){c[h>>2]=j}Pu(j);c[g>>2]=0;c[h>>2]=0;c[i>>2]=0;o=0}if((f|0)<0){Nr(0)}do{if(o>>>0<1073741823>>>0){h=o<<1;j=h>>>0<f>>>0?f:h;if((j|0)>=0){p=j;break}Nr(0)}else{p=2147483647}}while(0);f=Nu(p)|0;o=b+4|0;c[o>>2]=f;c[i>>2]=f;c[g>>2]=f+p;if((d|0)==(e|0)){return}else{q=d;r=f}do{if((r|0)==0){s=0}else{a[r]=a[q]|0;s=c[o>>2]|0}r=s+1|0;c[o>>2]=r;q=q+1|0;}while((q|0)!=(e|0));return}function Bf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=d;g=e-f|0;h=g>>1;i=a+8|0;j=c[i>>2]|0;k=a|0;l=c[k>>2]|0;m=l;if(!(h>>>0>j-m>>1>>>0)){n=a+4|0;o=(c[n>>2]|0)-m|0;p=o>>1;if(!(h>>>0>p>>>0)){q=e-f|0;fv(l|0,d|0,q|0)|0;r=l+(q>>1<<1)|0;q=c[n>>2]|0;if((q|0)==(r|0)){return}c[n>>2]=q+(~((q-2+(-r|0)|0)>>>1)<<1);return}r=d+(p<<1)|0;fv(l|0,d|0,o|0)|0;if((r|0)==(e|0)){return}o=c[n>>2]|0;p=(e-2+(-r|0)|0)>>>1;q=r;r=o;while(1){if((r|0)!=0){b[r>>1]=b[q>>1]|0}s=q+2|0;if((s|0)==(e|0)){break}else{q=s;r=r+2|0}}c[n>>2]=o+(p+1<<1);return}if((l|0)==0){t=j}else{j=a+4|0;p=c[j>>2]|0;if((p|0)!=(l|0)){c[j>>2]=p+(~((p-2+(-m|0)|0)>>>1)<<1)}Pu(l);c[i>>2]=0;c[j>>2]=0;c[k>>2]=0;t=0}if((g|0)<0){Nr(0)}g=t;do{if(g>>1>>>0<1073741823>>>0){t=g>>>0<h>>>0?h:g;if((t|0)>=0){u=t;break}Nr(0)}else{u=2147483647}}while(0);g=Nu(u<<1)|0;h=a+4|0;c[h>>2]=g;c[k>>2]=g;c[i>>2]=g+(u<<1);if((d|0)==(e|0)){return}u=(e-2+(-f|0)|0)>>>1;f=d;d=g;while(1){if((d|0)!=0){b[d>>1]=b[f>>1]|0}i=f+2|0;if((i|0)==(e|0)){break}else{f=i;d=d+2|0}}c[h>>2]=g+(u+1<<1);return}function Cf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=b;f=(d-e|0)/12|0;g=a+8|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;k=j;if(f>>>0>((h-k|0)/12|0)>>>0){if((j|0)==0){l=h}else{h=a+4|0;m=c[h>>2]|0;if((m|0)==(j|0)){n=j}else{o=m;while(1){m=o-12|0;c[h>>2]=m;p=c[m>>2]|0;if((p|0)==0){q=m}else{Pu(p);q=c[h>>2]|0}if((q|0)==(j|0)){break}else{o=q}}n=c[i>>2]|0}Pu(n);c[g>>2]=0;c[h>>2]=0;c[i>>2]=0;l=0}if(f>>>0>357913941>>>0){Nr(0)}h=(l|0)/12|0;do{if(h>>>0<178956970>>>0){l=h<<1;n=l>>>0<f>>>0?f:l;if(!(n>>>0>357913941>>>0)){r=n;break}Nr(0)}else{r=357913941}}while(0);h=Nu(r*12|0)|0;c[a+4>>2]=h;c[i>>2]=h;c[g>>2]=h+(r*12|0);Df(a,b,d);return}r=a+4|0;h=((c[r>>2]|0)-k|0)/12|0;if(f>>>0>h>>>0){s=1;t=b+(h*12|0)|0}else{s=0;t=d}if((t|0)==(b|0)){u=j}else{h=t-12+(-e|0)|0;e=b;b=j;while(1){Gf(b,e)|0;f=e+12|0;if((f|0)==(t|0)){break}else{e=f;b=b+12|0}}u=j+((((h>>>0)/12|0)+1|0)*12|0)|0}if(s){Df(a,t,d);return}d=c[r>>2]|0;if((d|0)==(u|0)){return}else{v=d}while(1){d=v-12|0;c[r>>2]=d;t=c[d>>2]|0;if((t|0)==0){w=d}else{Pu(t);w=c[r>>2]|0}if((w|0)==(u|0)){break}else{v=w}}return}function Df(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;i=i+16|0;f=e|0;g=e+8|0;if((b|0)==(d|0)){i=e;return}h=a+4|0;a=f|0;j=f+4|0;k=g|0;l=g+4|0;m=b;b=c[h>>2]|0;a:while(1){do{if((b|0)!=0){n=b|0;c[n>>2]=0;o=b+4|0;c[o>>2]=0;p=b+8|0;c[p>>2]=0;q=m+4|0;r=c[q>>2]|0;if((r|0)==0){break}if((r|0)<0){s=6;break a}t=((r-1|0)>>>5)+1|0;r=Nu(t<<2)|0;c[n>>2]=r;c[o>>2]=0;c[p>>2]=t;t=c[m>>2]|0;c[a>>2]=t;c[j>>2]=0;p=c[q>>2]|0;c[k>>2]=t+(p>>>5<<2);c[l>>2]=p&31;Ef(b,f,g)}}while(0);p=(c[h>>2]|0)+12|0;c[h>>2]=p;t=m+12|0;if((t|0)==(d|0)){s=9;break}else{m=t;b=p}}if((s|0)==6){Nr(0)}else if((s|0)==9){i=e;return}}function Ef(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,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;e=i;i=i+32|0;f=b;b=i;i=i+8|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];f=d;d=i;i=i+8|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=a+4|0;l=c[k>>2]|0;m=b;b=c[m>>2]|0;n=c[m+4>>2]|0;m=d;d=c[m>>2]|0;o=c[m+4>>2]|0;m=b;p=n;q=o;r=d-m<<3;c[k>>2]=l-p+q+r;k=c[a>>2]|0;a=l>>>5;s=k+(a<<2)|0;t=l&31;if((p|0)!=(t|0)){c[f>>2]=b;c[f+4>>2]=n;c[g>>2]=d;c[g+4>>2]=o;c[h>>2]=s;c[h+4>>2]=t;Ff(j,f,g,h);u=8;v=0;w=8;x=0;y=8;z=0;i=e;return}h=m;m=q-p+r|0;do{if((m|0)>0){if((p|0)==0){A=m;B=h;C=s;D=0}else{r=32-p|0;q=(m|0)<(r|0)?m:r;g=-1>>>((r-q|0)>>>0)&-1<<p;c[s>>2]=c[s>>2]&~g|c[h>>2]&g;g=q+p|0;A=m-q|0;B=h+4|0;C=k+((g>>>5)+a<<2)|0;D=g&31}g=A>>>5;fv(C|0,B|0,g<<2|0)|0;q=A-(g<<5)|0;r=C+(g<<2)|0;if((q|0)<=0){E=r;F=D;break}f=-1>>>((32-q|0)>>>0);c[r>>2]=c[r>>2]&~f|c[B+(g<<2)>>2]&f;E=r;F=q}else{E=s;F=p}}while(0);c[j>>2]=E;c[j+4>>2]=F;u=8;v=0;w=8;x=0;y=8;z=0;i=e;return}function Ff(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=i;g=b;b=i;i=i+8|0;c[b>>2]=c[g>>2];c[b+4>>2]=c[g+4>>2];g=d;d=i;i=i+8|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];g=b|0;h=c[g>>2]|0;j=c[b+4>>2]|0;b=(c[d+4>>2]|0)-j+((c[d>>2]|0)-h<<3)|0;if((b|0)<=0){k=e+4|0;l=a|0;m=e|0;n=c[m>>2]|0;c[l>>2]=n;o=a+4|0;p=c[k>>2]|0;c[o>>2]=p;i=f;return}if((j|0)==0){q=b;r=h;s=c[e+4>>2]|0}else{d=32-j|0;t=(b|0)<(d|0)?b:d;u=-1>>>((d-t|0)>>>0)&-1<<j&c[h>>2];d=e+4|0;v=c[d>>2]|0;w=32-v|0;x=w>>>0<t>>>0?w:t;y=e|0;z=c[y>>2]|0;A=c[z>>2]&~(-1>>>((w-x|0)>>>0)&-1<<v);c[z>>2]=A;v=c[d>>2]|0;if(v>>>0>j>>>0){B=u<<v-j}else{B=u>>>((j-v|0)>>>0)}c[z>>2]=A|B;B=(c[d>>2]|0)+x|0;A=z+(B>>>5<<2)|0;c[y>>2]=A;y=B&31;c[d>>2]=y;B=t-x|0;if((B|0)>0){c[A>>2]=c[A>>2]&~(-1>>>((32-B|0)>>>0))|u>>>((j+x|0)>>>0);c[d>>2]=B;C=B}else{C=y}y=h+4|0;c[g>>2]=y;q=b-t|0;r=y;s=C}C=e+4|0;y=32-s|0;t=-1<<s;if(q>>>0>31>>>0){s=~t;b=e|0;h=c[b>>2]|0;B=q;d=r;x=h;j=c[h>>2]|0;do{h=c[d>>2]|0;u=j&s;c[x>>2]=u;c[x>>2]=u|h<<c[C>>2];x=x+4|0;j=c[x>>2]&t|h>>>(y>>>0);c[x>>2]=j;B=B-32|0;d=d+4|0;}while(B>>>0>31>>>0);c[g>>2]=d;c[b>>2]=x;D=B;E=d}else{D=q;E=r}if((D|0)<=0){k=C;l=a|0;m=e|0;n=c[m>>2]|0;c[l>>2]=n;o=a+4|0;p=c[k>>2]|0;c[o>>2]=p;i=f;return}r=c[E>>2]&-1>>>((32-D|0)>>>0);E=(y|0)<(D|0)?y:D;q=e|0;d=c[q>>2]|0;B=c[d>>2]&~(-1<<c[C>>2]&-1>>>((y-E|0)>>>0));c[d>>2]=B;c[d>>2]=B|r<<c[C>>2];B=(c[C>>2]|0)+E|0;y=d+(B>>>5<<2)|0;c[q>>2]=y;c[C>>2]=B&31;B=D-E|0;if((B|0)<=0){k=C;l=a|0;m=e|0;n=c[m>>2]|0;c[l>>2]=n;o=a+4|0;p=c[k>>2]|0;c[o>>2]=p;i=f;return}c[y>>2]=c[y>>2]&~(-1>>>((32-B|0)>>>0))|r>>>(E>>>0);c[C>>2]=B;k=C;l=a|0;m=e|0;n=c[m>>2]|0;c[l>>2]=n;o=a+4|0;p=c[k>>2]|0;c[o>>2]=p;i=f;return}function Gf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((a|0)==(b|0)){return a|0}d=b+4|0;e=c[d>>2]|0;if((e|0)==0){f=0}else{g=a+8|0;h=a|0;i=c[h>>2]|0;do{if(e>>>0>c[g>>2]<<5>>>0){if((i|0)==0){j=e}else{Pu(i);c[h>>2]=0;c[g>>2]=0;c[a+4>>2]=0;j=c[d>>2]|0}if((j|0)<0){Nr(0);return 0}else{k=((j-1|0)>>>5)+1|0;l=Nu(k<<2)|0;c[h>>2]=l;c[a+4>>2]=0;c[g>>2]=k;m=c[d>>2]|0;n=l;break}}else{m=e;n=i}}while(0);fv(n|0,c[b>>2]|0,((m-1|0)>>>5<<2)+4|0)|0;f=c[d>>2]|0}c[a+4>>2]=f;return a|0}function Hf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function If(a){a=a|0;c[a+776>>2]=0;c[a+780>>2]=0;c[a+784>>2]=0;Cd(a+1332|0);c[a+1344>>2]=0;c[a+1348>>2]=0;c[a+1352>>2]=0;Jj(a);return}function Jf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;b=c[a+640>>2]|0;if((b|0)!=0){d=a+644|0;if((c[d>>2]|0)!=(b|0)){c[d>>2]=b}Pu(b)}b=c[a+628>>2]|0;if((b|0)!=0){d=a+632|0;e=c[d>>2]|0;if((e|0)!=(b|0)){c[d>>2]=e+(~((e-2+(-b|0)|0)>>>1)<<1)}Pu(b)}b=a+592|0;e=c[b>>2]|0;if((e|0)==0){return}d=a+596|0;a=c[d>>2]|0;if((a|0)==(e|0)){f=e}else{g=a;while(1){a=g-12|0;c[d>>2]=a;h=c[a>>2]|0;if((h|0)==0){i=a}else{Pu(h);i=c[d>>2]|0}if((i|0)==(e|0)){break}else{g=i}}f=c[b>>2]|0}Pu(f);return}function Kf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=a+4|0;d=c[b>>2]|0;e=a+16|0;f=c[e>>2]|0;g=d+(f>>>10<<2)|0;h=a+8|0;i=c[h>>2]|0;if((i|0)==(d|0)){j=0;k=0;l=a+20|0}else{m=a+20|0;a=f+(c[m>>2]|0)|0;j=(c[d+(a>>>10<<2)>>2]|0)+((a&1023)<<2)|0;k=(c[g>>2]|0)+((f&1023)<<2)|0;l=m}m=g;g=k;a:while(1){k=g;do{if((k|0)==(j|0)){break a}k=k+4|0;}while((k-(c[m>>2]|0)|0)!=4096);k=m+4|0;m=k;g=c[k>>2]|0}c[l>>2]=0;l=i-d>>2;if(l>>>0>2>>>0){i=d;while(1){Pu(c[i>>2]|0);d=(c[b>>2]|0)+4|0;c[b>>2]=d;g=(c[h>>2]|0)-d>>2;if(g>>>0>2>>>0){i=d}else{n=g;break}}}else{n=l}if((n|0)==2){c[e>>2]=1024;return}else if((n|0)==1){c[e>>2]=512;return}else{return}}function Lf(a){a=a|0;c[a>>2]=30;c[a+4>>2]=20;c[a+8>>2]=2;c[a+12>>2]=2;c[a+16>>2]=8;c[a+20>>2]=40;c[a+24>>2]=6;c[a+28>>2]=2;c[a+32>>2]=6;c[a+36>>2]=8;c[a+40>>2]=8;c[a+44>>2]=8;c[a+48>>2]=26;c[a+52>>2]=28;c[a+56>>2]=52;c[a+60>>2]=44;c[a+64>>2]=86;c[a+68>>2]=6;c[a+72>>2]=36;c[a+76>>2]=56;c[a+80>>2]=14;c[a+84>>2]=64;c[a+88>>2]=48;c[a+92>>2]=112;c[a+96>>2]=8;c[a+100>>2]=22;c[a+104>>2]=32;c[a+108>>2]=84;c[a+112>>2]=2;c[a+116>>2]=4;c[a+120>>2]=4;c[a+124>>2]=4;c[a+128>>2]=42;c[a+132>>2]=6;c[a+136>>2]=18;c[a+140>>2]=12;c[a+144>>2]=2;c[a+148>>2]=26;c[a+152>>2]=24;c[a+156>>2]=32;c[a+160>>2]=40;c[a+164>>2]=34;c[a+168>>2]=20;c[a+172>>2]=36;c[a+176>>2]=22;c[a+180>>2]=14;c[a+184>>2]=4;c[a+188>>2]=44;c[a+204>>2]=22;c[a+212>>2]=20;c[a+208>>2]=36;c[a+192>>2]=4;c[a+200>>2]=10;c[a+196>>2]=40;c[a+216>>2]=28;c[a+220>>2]=12;c[a+224>>2]=38;c[a+228>>2]=16;c[a+232>>2]=30;c[a+236>>2]=16;c[a+240>>2]=40;c[a+244>>2]=12;c[a+248>>2]=18;c[a+252>>2]=24;c[a+256>>2]=26;c[a+260>>2]=52;c[a+284>>2]=14;c[a+288>>2]=4;c[a+296>>2]=16;c[a+292>>2]=2;c[a+300>>2]=10;c[a+264>>2]=10;c[a+268>>2]=4;c[a+272>>2]=14;c[a+276>>2]=2;c[a+280>>2]=28;c[a+304>>2]=24;c[a+308>>2]=8;c[a+312>>2]=32;c[a+316>>2]=14;c[a+320>>2]=20;c[a+324>>2]=18;c[a+328>>2]=6;c[a+332>>2]=2;c[a+336>>2]=26;return}function Mf(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((g|0)<=0){return}i=(1<<h)-1|0;h=0;do{j=ga(h,e)|0;k=ga(h,g)|0;l=0;do{m=b+(l+j)|0;n=(d[m]|0)+(c[f+(l+k<<2)>>2]|0)|0;if((n|0)<0){o=0}else{o=((n|0)>(i|0)?i:n)&255}a[m]=o;l=l+1|0;}while((l|0)<(g|0));h=h+1|0;}while((h|0)<(g|0));return}function Nf(a,d,f,g,h){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((g|0)<=0){return}i=(1<<h)-1|0;h=0;do{j=ga(h,d)|0;k=ga(h,g)|0;l=0;do{m=a+(l+j<<1)|0;n=(e[m>>1]|0)+(c[f+(l+k<<2)>>2]|0)|0;if((n|0)<0){o=0}else{o=((n|0)>(i|0)?i:n)&65535}b[m>>1]=o;l=l+1|0;}while((l|0)<(g|0));h=h+1|0;}while((h|0)<(g|0));return}function Of(a,b,c){a=a|0;b=b|0;c=c|0;ec(15968,16560,51,18680)}function Pf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ec(15968,16560,68,18648)}function Qf(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;h=1<<g-1;if((e|0)>0){i=0}else{return}do{j=ga(i,e)|0;k=0;do{l=k+j|0;c[a+(l<<2)>>2]=(b[d+(l<<1)>>1]<<f)+h>>g;k=k+1|0;}while((k|0)<(e|0));i=i+1|0;}while((i|0)<(e|0));return}function Rf(c,e,f,g){c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;h=f+5|0;i=1<<f;if((i|0)>0){j=0}else{return}do{k=0;l=0;do{k=((b[e+((l<<f)+j<<1)>>1]<<h)+2048>>12)+k|0;m=c+((ga(l,g)|0)+j)|0;n=k+(d[m]|0)|0;if((n|0)<0){o=0}else{o=(n|0)>255?-1:n&255}a[m]=o;l=l+1|0;}while((l|0)<(i|0));j=j+1|0;}while((j|0)<(i|0));return}function Sf(c,e,f,g){c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=f+5|0;i=1<<f;if((i|0)>0){j=0}else{return}do{k=j<<f;l=ga(j,g)|0;m=0;n=0;do{m=((b[e+(n+k<<1)>>1]<<h)+2048>>12)+m|0;o=c+(n+l)|0;p=m+(d[o]|0)|0;if((p|0)<0){q=0}else{q=(p|0)>255?-1:p&255}a[o]=q;n=n+1|0;}while((n|0)<(i|0));j=j+1|0;}while((j|0)<(i|0));return}function Tf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;if((e|0)>0){f=0}else{return}do{g=0;h=0;do{i=(ga(h,e)|0)+f|0;g=(b[d+(i<<1)>>1]|0)+g|0;c[a+(i<<2)>>2]=g;h=h+1|0;}while((h|0)<(e|0));f=f+1|0;}while((f|0)<(e|0));return}function Uf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((e|0)>0){f=0}else{return}do{g=ga(f,e)|0;h=0;i=0;do{j=i+g|0;h=(b[d+(j<<1)>>1]|0)+h|0;c[a+(j<<2)>>2]=h;i=i+1|0;}while((i|0)<(e|0));f=f+1|0;}while((f|0)<(e|0));return}function Vf(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;h=1<<g-1;if((e|0)>0){i=0}else{return}do{j=0;k=0;do{l=(ga(k,e)|0)+i|0;j=((b[d+(l<<1)>>1]<<f)+h>>g)+j|0;c[a+(l<<2)>>2]=j;k=k+1|0;}while((k|0)<(e|0));i=i+1|0;}while((i|0)<(e|0));return}function Wf(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;h=1<<g-1;if((e|0)>0){i=0}else{return}do{j=ga(i,e)|0;k=0;l=0;do{m=l+j|0;k=((b[d+(m<<1)>>1]<<f)+h>>g)+k|0;c[a+(m<<2)>>2]=k;l=l+1|0;}while((l|0)<(e|0));i=i+1|0;}while((i|0)<(e|0));return}function Xf(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;if((e|0)>0){f=0}else{return}do{g=ga(f,e)|0;h=0;do{i=h+g|0;c[a+(i<<2)>>2]=b[d+(i<<1)>>1]|0;h=h+1|0;}while((h|0)<(e|0));f=f+1|0;}while((f|0)<(e|0));return}function Yf(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=(c|0)/2|0;if((c|0)<=1){return}e=c-1|0;f=0;do{g=ga(f,c)|0;h=e+(ga(e-f|0,c)|0)|0;i=0;do{j=a+(i+g<<1)|0;k=a+(h-i<<1)|0;l=b[j>>1]|0;b[j>>1]=b[k>>1]|0;b[k>>1]=l;i=i+1|0;}while((i|0)<(c|0));f=f+1|0;}while((f|0)<(d|0));return}function Zf(c,e,f){c=c|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=i;i=i+32|0;h=g|0;j=0;while(1){k=b[e+(j<<1)>>1]|0;l=0;do{m=ga(k<<16>>16,a[27256+l|0]|0)|0;n=(ga(b[e+(j+4<<1)>>1]|0,a[27260+l|0]|0)|0)+m|0;m=(ga(b[e+(j+8<<1)>>1]|0,a[27264+l|0]|0)|0)+n|0;n=(ga(b[e+(j+12<<1)>>1]|0,a[27268+l|0]|0)|0)+m+64>>7;if((n|0)<-32768){o=-32768}else{o=(n|0)>32767?32767:n&65535}b[h+(l<<3)+(j<<1)>>1]=o;l=l+1|0;}while((l|0)<4);l=j+1|0;if((l|0)<4){j=l}else{p=0;break}}do{j=ga(p,f)|0;o=b[h+(p<<3)>>1]|0;e=b[h+(p<<3)+2>>1]|0;l=b[h+(p<<3)+4>>1]|0;k=b[h+(p<<3)+6>>1]|0;n=0;do{m=ga(o<<16>>16,a[27256+n|0]|0)|0;q=(ga(e<<16>>16,a[27260+n|0]|0)|0)+m|0;m=(ga(l<<16>>16,a[27264+n|0]|0)|0)+q|0;q=(ga(k<<16>>16,a[27268+n|0]|0)|0)+m+2048>>12;if((q|0)<-32768){r=-32768}else{r=(q|0)>32767?32767:q}q=c+(n+j)|0;m=(d[q]|0)+r|0;if((m|0)<0){s=0}else{s=(m|0)>255?-1:m&255}a[q]=s;n=n+1|0;}while((n|0)<4);p=p+1|0;}while((p|0)<4);i=g;return}function _f(c,d,f,g){c=c|0;d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;h=i;i=i+32|0;j=h|0;k=20-g|0;l=k-1|0;m=0;do{n=b[d+(m<<1)>>1]|0;o=0;do{p=ga(n<<16>>16,a[27256+o|0]|0)|0;q=(ga(b[d+(m+4<<1)>>1]|0,a[27260+o|0]|0)|0)+p|0;p=(ga(b[d+(m+8<<1)>>1]|0,a[27264+o|0]|0)|0)+q|0;q=(ga(b[d+(m+12<<1)>>1]|0,a[27268+o|0]|0)|0)+p+64>>7;if((q|0)<-32768){r=-32768}else{r=(q|0)>32767?32767:q&65535}b[j+(o<<3)+(m<<1)>>1]=r;o=o+1|0;}while((o|0)<4);m=m+1|0;}while((m|0)<4);m=1<<l;l=(1<<g)-1|0;g=0;do{r=ga(g,f)|0;d=b[j+(g<<3)>>1]|0;o=b[j+(g<<3)+2>>1]|0;n=b[j+(g<<3)+4>>1]|0;q=b[j+(g<<3)+6>>1]|0;p=0;do{s=ga(d<<16>>16,a[27256+p|0]|0)|0;t=(ga(o<<16>>16,a[27260+p|0]|0)|0)+s|0;s=(ga(n<<16>>16,a[27264+p|0]|0)|0)+t|0;t=(ga(q<<16>>16,a[27268+p|0]|0)|0)+s+m>>k;if((t|0)<-32768){u=-32768}else{u=(t|0)>32767?32767:t}t=c+(p+r<<1)|0;s=(e[t>>1]|0)+u|0;if((s|0)<0){v=0}else{v=((s|0)>(l|0)?l:s)&65535}b[t>>1]=v;p=p+1|0;}while((p|0)<4);g=g+1|0;}while((g|0)<4);i=h;return}function $f(c,d,e){c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f|0;h=0;while(1){j=b[d+(h<<1)>>1]|0;k=0;do{l=ga(j<<16>>16,a[27256+(k<<2)|0]|0)|0;m=(ga(b[d+(h+e<<1)>>1]|0,a[27257+(k<<2)|0]|0)|0)+l|0;l=(ga(b[d+((e<<1)+h<<1)>>1]|0,a[27258+(k<<2)|0]|0)|0)+m|0;m=(ga(b[d+((e*3|0)+h<<1)>>1]|0,a[27259+(k<<2)|0]|0)|0)+l+1>>1;if((m|0)<-32768){n=-32768}else{n=(m|0)>32767?32767:m&65535}b[g+((k<<2)+h<<1)>>1]=n;k=k+1|0;}while((k|0)<4);k=h+1|0;if((k|0)<4){h=k}else{o=0;break}}do{h=o<<2;n=b[g+(h<<1)>>1]|0;e=0;do{d=ga(n<<16>>16,a[27256+(e<<2)|0]|0)|0;k=(ga(b[g+((h|1)<<1)>>1]|0,a[27257+(e<<2)|0]|0)|0)+d|0;d=(ga(b[g+((h|2)<<1)>>1]|0,a[27258+(e<<2)|0]|0)|0)+k|0;k=((ga(b[g+((h|3)<<1)>>1]|0,a[27259+(e<<2)|0]|0)|0)+d+128|0)>>>8&65535;b[c+(e+h<<1)>>1]=k;e=e+1|0;}while((e|0)<4);o=o+1|0;}while((o|0)<4);i=f;return}function ag(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+32|0;j=h|0;k=f-1|0;l=1<<g;g=l-1|0;m=-l|0;l=m&65535;n=0;do{o=b[e+(n<<1)>>1]|0;p=0;do{q=ga(o<<16>>16,a[27256+p|0]|0)|0;r=(ga(b[e+(n+4<<1)>>1]|0,a[27260+p|0]|0)|0)+q|0;q=(ga(b[e+(n+8<<1)>>1]|0,a[27264+p|0]|0)|0)+r|0;r=(ga(b[e+(n+12<<1)>>1]|0,a[27268+p|0]|0)|0)+q+64>>7;if((r|0)<(m|0)){s=l}else{s=((r|0)>(g|0)?g:r)&65535}b[j+(p<<3)+(n<<1)>>1]=s;p=p+1|0;}while((p|0)<4);n=n+1|0;}while((n|0)<4);n=1<<k;k=0;do{s=k<<2;g=b[j+(k<<3)>>1]|0;l=b[j+(k<<3)+2>>1]|0;m=b[j+(k<<3)+4>>1]|0;e=b[j+(k<<3)+6>>1]|0;p=0;do{o=ga(g<<16>>16,a[27256+p|0]|0)|0;r=(ga(l<<16>>16,a[27260+p|0]|0)|0)+o|0;o=(ga(m<<16>>16,a[27264+p|0]|0)|0)+r|0;r=(ga(e<<16>>16,a[27268+p|0]|0)|0)+o+n>>f;c[d+(p+s<<2)>>2]=r;p=p+1|0;}while((p|0)<4);k=k+1|0;}while((k|0)<4);i=h;return}function bg(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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;j=i;i=i+2048|0;k=j|0;if((e|0)>1){l=e;m=0;while(1){n=m+1|0;o=l>>1;if((o|0)>1){l=o;m=n}else{p=n;break}}}else{p=0}m=5-p|0;p=1<<g-1;l=1<<h;h=l-1|0;n=-l|0;l=(e|0)>0;if(!l){q=2048;r=0;i=j;return}o=n&65535;s=0;do{t=e;while(1){u=t-1|0;if((t|0)<=0){break}v=f+((ga(u,e)|0)+s<<1)|0;if((b[v>>1]|0)==0){t=u}else{break}}v=(t|0)<1;w=0;do{if(v){x=0}else{y=0;z=0;while(1){A=f+((ga(z,e)|0)+s<<1)|0;B=(ga(b[A>>1]|0,a[27616+(z<<m<<5)+w|0]|0)|0)+y|0;if((z|0)<(u|0)){y=B;z=z+1|0}else{break}}x=B+64>>7}if((x|0)<(n|0)){C=o}else{C=((x|0)>(h|0)?h:x)&65535}z=k+((ga(w,e)|0)+s<<1)|0;b[z>>1]=C;w=w+1|0;}while((w|0)<(e|0));s=s+1|0;}while((s|0)<(e|0));if(l){D=0}else{q=2048;r=0;i=j;return}do{l=ga(D,e)|0;s=e;while(1){E=s-1|0;if((s|0)<=0){break}if((b[k+(E+l<<1)>>1]|0)==0){s=E}else{break}}C=(s|0)<1;x=0;do{if(C){F=0}else{h=0;o=0;while(1){n=(ga(b[k+(o+l<<1)>>1]|0,a[27616+(o<<m<<5)+x|0]|0)|0)+h|0;if((o|0)<(E|0)){h=n;o=o+1|0}else{F=n;break}}}c[d+(x+l<<2)>>2]=F+p>>g;x=x+1|0;}while((x|0)<(e|0));D=D+1|0;}while((D|0)<(e|0));q=2048;r=0;i=j;return}function cg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;bg(a,4,b,c,d);return}function dg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;bg(a,8,b,c,d);return}function eg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;bg(a,16,b,c,d);return}function fg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;bg(a,32,b,c,d);return}function gg(a,b,c){a=a|0;b=b|0;c=c|0;hg(a,c,4,b,8);return}function hg(c,e,f,g,h){c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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;j=i;i=i+2048|0;k=j|0;l=20-h|0;m=1<<l-1;if((f|0)>1){n=f;o=0;while(1){p=o+1|0;q=n>>1;if((q|0)>1){n=q;o=p}else{r=p;break}}}else{r=0}o=5-r|0;r=(f|0)>0;if(r){s=0}else{t=2048;u=0;i=j;return}do{n=f;while(1){v=n-1|0;if((n|0)<=0){break}p=g+((ga(v,f)|0)+s<<1)|0;if((b[p>>1]|0)==0){n=v}else{break}}p=(n|0)<1;q=0;do{if(p){w=0;x=13}else{y=0;z=0;while(1){A=g+((ga(z,f)|0)+s<<1)|0;B=(ga(b[A>>1]|0,a[27616+(z<<o<<5)+q|0]|0)|0)+y|0;if((z|0)<(v|0)){y=B;z=z+1|0}else{break}}z=B+64>>7;if((z|0)<-32768){C=-32768}else{w=z;x=13}}if((x|0)==13){x=0;C=(w|0)>32767?32767:w&65535}z=k+((ga(q,f)|0)+s<<1)|0;b[z>>1]=C;q=q+1|0;}while((q|0)<(f|0));s=s+1|0;}while((s|0)<(f|0));if(!r){t=2048;u=0;i=j;return}r=(1<<h)-1|0;h=0;do{s=ga(h,f)|0;C=f;while(1){D=C-1|0;if((C|0)<=0){break}if((b[k+(D+s<<1)>>1]|0)==0){C=D}else{break}}w=(C|0)<1;x=ga(h,e)|0;B=0;do{if(w){E=0}else{v=0;g=0;while(1){q=(ga(b[k+(g+s<<1)>>1]|0,a[27616+(g<<o<<5)+B|0]|0)|0)+v|0;if((g|0)<(D|0)){v=q;g=g+1|0}else{E=q;break}}}g=c+(B+x)|0;v=(d[g]|0)+(E+m>>l)|0;if((v|0)<0){F=0}else{F=((v|0)>(r|0)?r:v)&255}a[g]=F;B=B+1|0;}while((B|0)<(f|0));h=h+1|0;}while((h|0)<(f|0));t=2048;u=0;i=j;return}function ig(a,b,c){a=a|0;b=b|0;c=c|0;hg(a,c,8,b,8);return}function jg(a,b,c){a=a|0;b=b|0;c=c|0;hg(a,c,16,b,8);return}function kg(a,b,c){a=a|0;b=b|0;c=c|0;hg(a,c,32,b,8);return}function lg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;mg(a,c,4,b,d);return}
|
|
|
|
|
|
|
|
function kk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=(nd(e,4)|0)&255;a[b+1|0]=f;f=(nd(e,3)|0)+1&255;g=b+2|0;a[g]=f;if(f<<24>>24>7){h=8;return h|0}f=(nd(e,1)|0)&255;a[b+3|0]=f;$k(b+4|0,e,a[g]|0);f=qd(e)|0;if((f|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+472>>2]=f;if((f|0)>15){h=8;return h|0}f=qd(e)|0;if((f|0)==-99999){Ue(d,8,0);h=8;return h|0}i=b+476|0;c[i>>2]=f;do{if((f|0)==3){j=(nd(e,1)|0)&255;a[b+480|0]=j;if(j<<24>>24==0){k=11;break}c[b+5012>>2]=0;l=c[i>>2]|0}else{a[b+480|0]=0;k=11}}while(0);if((k|0)==11){f=c[i>>2]|0;c[b+5012>>2]=f;l=f}if(l>>>0>3>>>0){Ue(d,1019,0);h=8;return h|0}l=qd(e)|0;if((l|0)==-99999){Ue(d,8,0);h=8;return h|0}f=b+484|0;c[f>>2]=l;l=qd(e)|0;if((l|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+488>>2]=l;i=c[f>>2]|0;if((i|0)==0|(l|0)==0){h=8;return h|0}if((i|0)>7e4|(l|0)>7e4){h=8;return h|0}l=(nd(e,1)|0)&255;a[b+492|0]=l;do{if(l<<24>>24==0){dv(b+496|0,0,16)|0}else{i=qd(e)|0;if((i|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+496>>2]=i;i=qd(e)|0;if((i|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+500>>2]=i;i=qd(e)|0;if((i|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+504>>2]=i;i=qd(e)|0;if(!((i|0)==-99999)){c[b+508>>2]=i;break}Ue(d,8,0);h=8;return h|0}}while(0);l=qd(e)|0;if((l|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+512>>2]=l+8;l=qd(e)|0;if((l|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+516>>2]=l+8;l=qd(e)|0;if((l|0)==-99999){Ue(d,8,0);h=8;return h|0}i=l+4|0;l=b+520|0;c[l>>2]=i;c[b+5032>>2]=1<<i;i=(nd(e,1)|0)&255;f=b+524|0;a[f]=i;if(i<<24>>24==0){i=a[g]|0;m=(i<<24>>24)-1|0;n=i}else{o=0;k=39}while(1){if((k|0)==39){k=0;m=o;n=a[g]|0}p=(n<<24>>24)-1|0;if((m|0)>(p|0)){k=48;break}i=qd(e)|0;if((i|0)==-99999|(i|0)>15){k=42;break}c[b+528+(m<<2)>>2]=i+1;i=qd(e)|0;if((i|0)==-99999){k=44;break}j=b+556+(m<<2)|0;c[j>>2]=i;i=qd(e)|0;if((i|0)==-99999){k=46;break}c[b+584+(m<<2)>>2]=i;c[b+5128+(m<<2)>>2]=i-1+(c[j>>2]|0);o=m+1|0;k=39}if((k|0)==42){Ue(d,8,0);h=8;return h|0}else if((k|0)==44){Ue(d,8,0);h=8;return h|0}else if((k|0)==46){Ue(d,8,0);h=8;return h|0}else if((k|0)==48){do{if((a[f]|0)!=0){if(!(n<<24>>24<8)){ec(2792,14480,317,17480);return 0}if((p|0)<=0){break}k=b+528+(p<<2)|0;m=b+556+(p<<2)|0;o=b+584+(p<<2)|0;j=0;do{c[b+528+(j<<2)>>2]=c[k>>2];c[b+556+(j<<2)>>2]=c[m>>2];c[b+584+(j<<2)>>2]=c[o>>2];j=j+1|0;}while((j|0)<((a[g]|0)-1|0))}}while(0);g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}p=b+612|0;c[p>>2]=g+3;g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}n=b+616|0;c[n>>2]=g;g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}f=b+620|0;c[f>>2]=g+2;g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}j=b+624|0;c[j>>2]=g;g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+628>>2]=g;g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+632>>2]=g;g=c[p>>2]|0;if((g|0)>6){h=8;return h|0}if(((c[n>>2]|0)+g|0)>6){h=8;return h|0}g=c[f>>2]|0;if((g|0)>5){h=8;return h|0}if(((c[j>>2]|0)+g|0)>5){h=8;return h|0}g=(nd(e,1)|0)&255;a[b+636|0]=g;do{if(!(g<<24>>24==0)){j=(nd(e,1)|0)&255;a[b+637|0]=j;f=b+638|0;if(j<<24>>24==0){mk(f);break}j=lk(e,0,f,0)|0;if((j|0)==0){break}else{h=j}return h|0}}while(0);g=(nd(e,1)|0)&255;a[b+4702|0]=g;g=(nd(e,1)|0)&255;a[b+4703|0]=g;g=(nd(e,1)|0)&255;a[b+4704|0]=g;do{if(g<<24>>24==0){a[b+4705|0]=0;a[b+4706|0]=0;c[b+4708>>2]=0;c[b+4712>>2]=0;a[b+4716|0]=0}else{j=(nd(e,4)|0)+1&255;a[b+4705|0]=j;j=(nd(e,4)|0)+1&255;a[b+4706|0]=j;j=qd(e)|0;if((j|0)==-99999){Ue(d,8,0);h=8;return h|0}c[b+4708>>2]=j+3;j=qd(e)|0;if(!((j|0)==-99999)){c[b+4712>>2]=j;j=(nd(e,1)|0)&255;a[b+4716|0]=j;break}Ue(d,8,0);h=8;return h|0}}while(0);g=qd(e)|0;if((g|0)==-99999){Ue(d,8,0);h=8;return h|0}if(g>>>0>64>>>0){Ue(d,1014,0);h=8;return h|0}j=b+4720|0;f=b+4724|0;n=c[f>>2]|0;p=j|0;o=c[p>>2]|0;m=(n-o|0)/100|0;do{if(m>>>0<g>>>0){sk(j,g-m|0)}else{if(!(m>>>0>g>>>0)){break}k=o+(g*100|0)|0;if((n|0)==(k|0)){break}c[f>>2]=n+(~(((n-100+(-k|0)|0)>>>0)/100|0)*100|0)}}while(0);a:do{if((g|0)>0){n=0;while(1){f=n+1|0;if(!(sj(d,b,e,(c[p>>2]|0)+(n*100|0)|0,n,j,0)|0)){h=1005;break}if((f|0)<(g|0)){n=f}else{break a}}return h|0}}while(0);g=(nd(e,1)|0)&255;a[b+4732|0]=g;do{if(g<<24>>24==0){c[b+4736>>2]=0}else{j=qd(e)|0;if((j|0)==-99999){Ue(d,8,0);h=8;return h|0}p=b+4736|0;c[p>>2]=j;if((j|0)>32){h=8;return h|0}if((j|0)>0){q=0}else{break}do{j=nd(e,c[l>>2]|0)|0;c[b+4740+(q<<2)>>2]=j;j=(nd(e,1)|0)&255;a[b+4868+q|0]=j;q=q+1|0;}while((q|0)<(c[p>>2]|0))}}while(0);q=(nd(e,1)|0)&255;a[b+4900|0]=q;q=(nd(e,1)|0)&255;a[b+4901|0]=q;q=(nd(e,1)|0)&255;a[b+4902|0]=q;if(!(q<<24>>24==0)){ll(b+4904|0,d,e,b)|0}d=(nd(e,1)|0)&255;a[b+4980|0]=d;do{if(d<<24>>24==0){a[b+4981|0]=0}else{q=(nd(e,1)|0)&255;l=b+4981|0;a[l]=q;q=(nd(e,1)|0)&255;a[b+4982|0]=q;q=(nd(e,6)|0)&255;a[b+4983|0]=q;if((a[l]|0)==0){break}nk(b+4984|0,0,e)|0}}while(0);e=ok(b)|0;if((e|0)!=0){h=e;return h|0}a[b|0]=1;h=0;return h|0}return 0}function lk(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;g=i;i=i+6240|0;e=g|0;h=g+96|0;j=0;a:while(1){k=(j|0)==3;l=k?2:6;m=(j|0)==0;n=k^1;o=m?16:64;p=(j|0)>1;q=0;do{r=h+(q<<10)|0;s=k&(q|0)==1;do{if(((nd(b,1)|0)&255)<<24>>24==0){t=qd(b)|0;if((t|0)==-99999|(t|0)>(q|0)){u=8;v=29;break a}w=e+(j*24|0)+(q<<2)|0;c[w>>2]=16;if((t|0)!=0){if(!((t|0)==1|n)){v=12;break a}x=q-t|0;cv(r|0,h+(x<<10)|0,o)|0;t=c[e+(j*24|0)+(x<<2)>>2]|0;c[w>>2]=t;y=t&255;v=20;break}if(m){cv(r|0,30200,16)|0;v=21;break}if((q|0)<3&(s^1)){cv(r|0,30024,64)|0;y=16;v=20;break}else{cv(r|0,30088,64)|0;y=16;v=20;break}}else{if(p){t=rd(b)|0;if((t+7|0)>>>0>254>>>0){u=8;v=29;break a}w=t+8|0;c[e+(j*24|0)+(q<<2)>>2]=w;z=w;A=w&255}else{z=8;A=16}w=z;t=0;while(1){x=rd(b)|0;if((x+128|0)>>>0>255>>>0){u=8;v=29;break a}B=(w+256+x|0)%256|0;a[h+(q<<10)+t|0]=B;x=t+1|0;if((x|0)<(o|0)){w=B;t=x}else{y=A;v=20;break}}}}while(0);do{if((v|0)==20){v=0;if((j|0)==2){s=f+480+(q<<8)|0;rk(s,r,2);a[s]=y;break}else if((j|0)==3){s=f+2016+(q<<10)|0;rk(s,r,3);a[s]=y;break}else if((j|0)==1){s=Cj(3,0)|0;t=0;do{a[((d[s+(t<<1)+1|0]|0)<<3)+(d[s+(t<<1)|0]|0)+(f+96+(q<<6))|0]=a[h+(q<<10)+t|0]|0;t=t+1|0;}while((t|0)<64)}else if((j|0)==0){v=21;break}else{break}}}while(0);if((v|0)==21){v=0;r=Cj(2,0)|0;t=0;do{a[((d[r+(t<<1)+1|0]|0)<<2)+(d[r+(t<<1)|0]|0)+(f+(q<<4))|0]=a[h+(q<<10)+t|0]|0;t=t+1|0;}while((t|0)<16)}q=q+1|0;}while((q|0)<(l|0));l=j+1|0;if((l|0)<4){j=l}else{u=0;v=29;break}}if((v|0)==12){ec(2912,14480,873,18888);return 0}else if((v|0)==29){i=g;return u|0}return 0}function mk(b){b=b|0;var c=0,e=0;c=Cj(2,0)|0;e=0;do{a[b+(((d[c+(e<<1)+1|0]|0)<<2)+(d[c+(e<<1)|0]|0))|0]=a[30200+e|0]|0;e=e+1|0;}while((e|0)<16);e=Cj(2,0)|0;c=0;do{a[((d[e+(c<<1)+1|0]|0)<<2)+(d[e+(c<<1)|0]|0)+(b+16)|0]=a[30200+c|0]|0;c=c+1|0;}while((c|0)<16);c=Cj(2,0)|0;e=0;do{a[((d[c+(e<<1)+1|0]|0)<<2)+(d[c+(e<<1)|0]|0)+(b+32)|0]=a[30200+e|0]|0;e=e+1|0;}while((e|0)<16);e=Cj(2,0)|0;c=0;do{a[((d[e+(c<<1)+1|0]|0)<<2)+(d[e+(c<<1)|0]|0)+(b+48)|0]=a[30200+c|0]|0;c=c+1|0;}while((c|0)<16);c=Cj(2,0)|0;e=0;do{a[((d[c+(e<<1)+1|0]|0)<<2)+(d[c+(e<<1)|0]|0)+(b+64)|0]=a[30200+e|0]|0;e=e+1|0;}while((e|0)<16);e=Cj(2,0)|0;c=0;do{a[((d[e+(c<<1)+1|0]|0)<<2)+(d[e+(c<<1)|0]|0)+(b+80)|0]=a[30200+c|0]|0;c=c+1|0;}while((c|0)<16);c=Cj(3,0)|0;e=0;do{a[((d[c+(e<<1)+1|0]|0)<<3)+(d[c+(e<<1)|0]|0)+(b+96)|0]=a[30024+e|0]|0;e=e+1|0;}while((e|0)<64);e=Cj(3,0)|0;c=0;do{a[((d[e+(c<<1)+1|0]|0)<<3)+(d[e+(c<<1)|0]|0)+(b+288)|0]=a[30088+c|0]|0;c=c+1|0;}while((c|0)<64);c=Cj(3,0)|0;e=0;do{a[((d[c+(e<<1)+1|0]|0)<<3)+(d[c+(e<<1)|0]|0)+(b+160)|0]=a[30024+e|0]|0;e=e+1|0;}while((e|0)<64);e=Cj(3,0)|0;c=0;do{a[((d[e+(c<<1)+1|0]|0)<<3)+(d[e+(c<<1)|0]|0)+(b+352)|0]=a[30088+c|0]|0;c=c+1|0;}while((c|0)<64);c=Cj(3,0)|0;e=0;do{a[((d[c+(e<<1)+1|0]|0)<<3)+(d[c+(e<<1)|0]|0)+(b+224)|0]=a[30024+e|0]|0;e=e+1|0;}while((e|0)<64);e=Cj(3,0)|0;c=0;do{a[((d[e+(c<<1)+1|0]|0)<<3)+(d[e+(c<<1)|0]|0)+(b+416)|0]=a[30088+c|0]|0;c=c+1|0;}while((c|0)<64);rk(b+480|0,30024,2);rk(b+1248|0,30088,2);rk(b+736|0,30024,2);rk(b+1504|0,30088,2);rk(b+992|0,30024,2);rk(b+1760|0,30088,2);rk(b+2016|0,30024,3);rk(b+3040|0,30088,3);return}function nk(b,c,d){b=b|0;c=c|0;d=d|0;c=(nd(d,1)|0)&255;a[b|0]=c;c=(nd(d,1)|0)&255;a[b+1|0]=c;c=(nd(d,1)|0)&255;a[b+2|0]=c;c=(nd(d,1)|0)&255;a[b+3|0]=c;c=(nd(d,1)|0)&255;a[b+4|0]=c;c=(nd(d,1)|0)&255;a[b+5|0]=c;c=(nd(d,1)|0)&255;a[b+6|0]=c;c=(nd(d,1)|0)&255;a[b+7|0]=c;c=(nd(d,1)|0)&255;a[b+8|0]=c;return 0}function ok(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=c[b+476>>2]|0;e=c[30720+(d<<2)>>2]|0;c[b+5016>>2]=e;f=c[30648+(d<<2)>>2]|0;c[b+5020>>2]=f;g=b+5024|0;if((c[b+5012>>2]|0)==0){c[g>>2]=1;c[b+5028>>2]=1}else{c[g>>2]=e;c[b+5028>>2]=f}g=c[b+512>>2]|0;c[b+4996>>2]=g;c[b+5e3>>2]=(g*6|0)-48;h=c[b+516>>2]|0;c[b+5004>>2]=h;c[b+5008>>2]=(h*6|0)-48;i=c[b+612>>2]|0;c[b+5036>>2]=i;j=(c[b+616>>2]|0)+i|0;c[b+5040>>2]=j;k=1<<i;c[b+5044>>2]=k;l=1<<j;c[b+5048>>2]=l;m=c[b+484>>2]|0;n=m-1|0;o=(n+k|0)/(k|0)|0;c[b+5052>>2]=o;p=(n+l|0)/(l|0)|0;c[b+5056>>2]=p;n=c[b+488>>2]|0;q=n-1|0;r=(q+k|0)/(k|0)|0;c[b+5060>>2]=r;s=(q+l|0)/(l|0)|0;c[b+5064>>2]=s;q=ga(r,o)|0;c[b+5068>>2]=q;q=ga(s,p)|0;c[b+5072>>2]=q;q=ga(n,m)|0;c[b+5076>>2]=q;do{if((d|0)==0){t=6}else{if((a[b+480|0]|0)!=0){t=6;break}c[b+5080>>2]=(l|0)/(e|0)|0;c[b+5084>>2]=(l|0)/(f|0)|0}}while(0);if((t|0)==6){c[b+5080>>2]=0;c[b+5084>>2]=0}t=c[b+620>>2]|0;c[b+5100>>2]=t;f=(c[b+624>>2]|0)+t|0;c[b+5104>>2]=f;l=j-t|0;if((c[b+628>>2]|0)>(l|0)){u=8;return u|0}if((c[b+632>>2]|0)>(l|0)){u=8;return u|0}e=i-1|0;c[b+5108>>2]=e;d=j-e|0;c[b+5112>>2]=p<<d;c[b+5116>>2]=s<<d;d=c[b+4708>>2]|0;c[b+5120>>2]=d;c[b+5124>>2]=(c[b+4712>>2]|0)+d;d=p<<l;c[b+5088>>2]=d;p=s<<l;c[b+5092>>2]=p;l=ga(p,d)|0;c[b+5096>>2]=l;if((a[b+4990|0]|0)==0){a[b+5156|0]=g+248;a[b+5157|0]=h+248;c[b+5160>>2]=128;c[b+5164>>2]=128}else{a[b+5156|0]=0;a[b+5157|0]=0;c[b+5160>>2]=1<<g-1;c[b+5164>>2]=1<<h-1}if(((m|0)%(k|0)|0|0)!=0){u=8;return u|0}if(((n|0)%(k|0)|0|0)!=0|(t|0)>(i|0)){u=8;return u|0}if((f|0)>(((j|0)<5?j:5)|0)){u=8;return u|0}if((g-8|0)>>>0>8>>>0){u=8;return u|0}if((h-8|0)>>>0>8>>>0){u=8;return u|0}a[b|0]=1;u=0;return u|0}function pk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0;e=i;if((d|0)==2){f=q}else if((d|0)==1){f=t}else{i=e;return}g=c[f>>2]|0;Zk(g,11960,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;Zk(g,8928,(f=i,i=i+8|0,c[f>>2]=a[b+1|0]|0,f)|0);i=f;h=b+2|0;Zk(g,6288,(f=i,i=i+8|0,c[f>>2]=a[h]|0,f)|0);i=f;Zk(g,4592,(f=i,i=i+8|0,c[f>>2]=a[b+3|0]|0,f)|0);i=f;dl(b+4|0,a[h]|0,g);Zk(g,3224,(f=i,i=i+8|0,c[f>>2]=c[b+472>>2],f)|0);i=f;j=b+476|0;k=c[j>>2]|0;do{if((k|0)==0){l=1072}else{if((k|0)==1){l=384;break}if((k|0)==2){l=16872;break}l=(k|0)==3?16336:15976}}while(0);Zk(g,1920,(f=i,i=i+16|0,c[f>>2]=k,c[f+8>>2]=l,f)|0);i=f;if((c[j>>2]|0)==3){Zk(g,15568,(f=i,i=i+8|0,c[f>>2]=a[b+480|0]|0,f)|0);i=f}Zk(g,15216,(f=i,i=i+8|0,c[f>>2]=c[b+484>>2],f)|0);i=f;Zk(g,14880,(f=i,i=i+8|0,c[f>>2]=c[b+488>>2],f)|0);i=f;j=b+492|0;Zk(g,14632,(f=i,i=i+8|0,c[f>>2]=a[j]|0,f)|0);i=f;if((a[j]|0)!=0){Zk(g,14360,(f=i,i=i+8|0,c[f>>2]=c[b+496>>2],f)|0);i=f;Zk(g,14088,(f=i,i=i+8|0,c[f>>2]=c[b+500>>2],f)|0);i=f;Zk(g,13800,(f=i,i=i+8|0,c[f>>2]=c[b+504>>2],f)|0);i=f;Zk(g,13600,(f=i,i=i+8|0,c[f>>2]=c[b+508>>2],f)|0);i=f}Zk(g,13408,(f=i,i=i+8|0,c[f>>2]=c[b+512>>2],f)|0);i=f;Zk(g,13200,(f=i,i=i+8|0,c[f>>2]=c[b+516>>2],f)|0);i=f;Zk(g,12976,(f=i,i=i+8|0,c[f>>2]=c[b+520>>2],f)|0);i=f;j=b+524|0;Zk(g,12704,(f=i,i=i+8|0,c[f>>2]=a[j]|0,f)|0);i=f;l=a[h]|0;if((a[j]|0)==0){m=(l<<24>>24)-1|0}else{m=0}if((m|0)<=((l<<24>>24)-1|0)){l=m;while(1){Zk(g,12408,(f=i,i=i+8|0,c[f>>2]=l,f)|0);i=f;Zk(g,12128,(f=i,i=i+8|0,c[f>>2]=c[b+528+(l<<2)>>2],f)|0);i=f;Zk(g,11752,(f=i,i=i+8|0,c[f>>2]=c[b+556+(l<<2)>>2],f)|0);i=f;Zk(g,11432,(f=i,i=i+8|0,c[f>>2]=c[b+584+(l<<2)>>2],f)|0);i=f;if((l|0)<((a[h]|0)-1|0)){l=l+1|0}else{break}}}l=b+612|0;Zk(g,11192,(f=i,i=i+8|0,c[f>>2]=c[l>>2],f)|0);i=f;h=b+616|0;Zk(g,10936,(f=i,i=i+8|0,c[f>>2]=c[h>>2],f)|0);i=f;m=b+620|0;Zk(g,10680,(f=i,i=i+8|0,c[f>>2]=c[m>>2],f)|0);i=f;j=b+624|0;Zk(g,10408,(f=i,i=i+8|0,c[f>>2]=c[j>>2],f)|0);i=f;Zk(g,10096,(f=i,i=i+8|0,c[f>>2]=c[b+628>>2],f)|0);i=f;Zk(g,9760,(f=i,i=i+8|0,c[f>>2]=c[b+632>>2],f)|0);i=f;k=b+636|0;Zk(g,9328,(f=i,i=i+8|0,c[f>>2]=a[k]|0,f)|0);i=f;do{if((a[k]|0)!=0){n=b+637|0;Zk(g,9016,(f=i,i=i+8|0,c[f>>2]=a[n]|0,f)|0);i=f;if((a[n]|0)==0){break}Zk(g,8656,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f}}while(0);Zk(g,8384,(f=i,i=i+8|0,c[f>>2]=a[b+4702|0]|0,f)|0);i=f;Zk(g,8152,(f=i,i=i+8|0,c[f>>2]=a[b+4703|0]|0,f)|0);i=f;k=b+4704|0;Zk(g,7912,(f=i,i=i+8|0,c[f>>2]=a[k]|0,f)|0);i=f;if((a[k]|0)!=0){Zk(g,7640,(f=i,i=i+8|0,c[f>>2]=a[b+4705|0]|0,f)|0);i=f;Zk(g,7352,(f=i,i=i+8|0,c[f>>2]=a[b+4706|0]|0,f)|0);i=f;Zk(g,7040,(f=i,i=i+8|0,c[f>>2]=c[b+4708>>2],f)|0);i=f;Zk(g,6752,(f=i,i=i+8|0,c[f>>2]=c[b+4712>>2],f)|0);i=f;Zk(g,6456,(f=i,i=i+8|0,c[f>>2]=a[b+4716|0]|0,f)|0);i=f}k=b+4724|0;n=b+4720|0;Zk(g,6336,(f=i,i=i+8|0,c[f>>2]=((c[k>>2]|0)-(c[n>>2]|0)|0)/100|0,f)|0);i=f;if((c[k>>2]|0)!=(c[n>>2]|0)){o=0;do{Zk(g,6216,(f=i,i=i+8|0,c[f>>2]=o,f)|0);i=f;tj((c[n>>2]|0)+(o*100|0)|0,16,g);o=o+1|0;}while(o>>>0<(((c[k>>2]|0)-(c[n>>2]|0)|0)/100|0)>>>0)}n=b+4732|0;Zk(g,6e3,(f=i,i=i+8|0,c[f>>2]=a[n]|0,f)|0);i=f;do{if((a[n]|0)!=0){k=b+4736|0;Zk(g,5816,(f=i,i=i+8|0,c[f>>2]=c[k>>2],f)|0);i=f;if((c[k>>2]|0)>0){p=0}else{break}do{o=c[b+4740+(p<<2)>>2]|0;r=a[b+4868+p|0]|0;Zk(g,5640,(f=i,i=i+24|0,c[f>>2]=p,c[f+8>>2]=o,c[f+16>>2]=r,f)|0);i=f;p=p+1|0;}while((p|0)<(c[k>>2]|0))}}while(0);Zk(g,5504,(f=i,i=i+8|0,c[f>>2]=a[b+4900|0]|0,f)|0);i=f;Zk(g,5344,(f=i,i=i+8|0,c[f>>2]=a[b+4901|0]|0,f)|0);i=f;p=b+4902|0;Zk(g,5176,(f=i,i=i+8|0,c[f>>2]=a[p]|0,f)|0);i=f;Zk(g,4968,(f=i,i=i+8|0,c[f>>2]=a[b+4980|0]|0,f)|0);i=f;n=b+4981|0;Zk(g,4792,(f=i,i=i+8|0,c[f>>2]=a[n]|0,f)|0);i=f;Zk(g,4672,(f=i,i=i+8|0,c[f>>2]=a[b+4982|0]|0,f)|0);i=f;Zk(g,4440,(f=i,i=i+8|0,c[f>>2]=a[b+4983|0]|0,f)|0);i=f;Zk(g,4224,(f=i,i=i+8|0,c[f>>2]=c[b+5048>>2],f)|0);i=f;Zk(g,4072,(f=i,i=i+8|0,c[f>>2]=c[b+5044>>2],f)|0);i=f;Zk(g,3984,(f=i,i=i+8|0,c[f>>2]=1<<(c[h>>2]|0)+(c[l>>2]|0),f)|0);i=f;Zk(g,3920,(f=i,i=i+8|0,c[f>>2]=1<<c[m>>2],f)|0);i=f;Zk(g,3832,(f=i,i=i+8|0,c[f>>2]=1<<(c[j>>2]|0)+(c[m>>2]|0),f)|0);i=f;Zk(g,3712,(f=i,i=i+8|0,c[f>>2]=c[b+5056>>2],f)|0);i=f;Zk(g,3544,(f=i,i=i+8|0,c[f>>2]=c[b+5064>>2],f)|0);i=f;Zk(g,3392,(f=i,i=i+8|0,c[f>>2]=c[b+5016>>2],f)|0);i=f;Zk(g,3280,(f=i,i=i+8|0,c[f>>2]=c[b+5020>>2],f)|0);i=f;if((a[n]|0)!=0){qk(b+4984|0,d)}if((a[p]|0)==0){i=e;return}ml(b+4904|0,d);i=e;return}function qk(a,b){a=a|0;b=b|0;var e=0,f=0;e=i;if((b|0)==1){f=t}else if((b|0)==2){f=q}else{i=e;return}b=c[f>>2]|0;Zk(b,2728,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;Zk(b,2632,(f=i,i=i+8|0,c[f>>2]=d[a|0]|0,f)|0);i=f;Zk(b,2536,(f=i,i=i+8|0,c[f>>2]=d[a+1|0]|0,f)|0);i=f;Zk(b,2376,(f=i,i=i+8|0,c[f>>2]=d[a+2|0]|0,f)|0);i=f;Zk(b,2224,(f=i,i=i+8|0,c[f>>2]=d[a+3|0]|0,f)|0);i=f;Zk(b,2072,(f=i,i=i+8|0,c[f>>2]=d[a+4|0]|0,f)|0);i=f;Zk(b,1984,(f=i,i=i+8|0,c[f>>2]=d[a+5|0]|0,f)|0);i=f;Zk(b,1808,(f=i,i=i+8|0,c[f>>2]=d[a+6|0]|0,f)|0);i=f;Zk(b,1576,(f=i,i=i+8|0,c[f>>2]=d[a+7|0]|0,f)|0);i=f;Zk(b,1456,(f=i,i=i+8|0,c[f>>2]=d[a+8|0]|0,f)|0);i=f;i=e;return}function rk(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;if((e|0)==3){f=Cj(3,0)|0;g=0;do{h=f+(g<<1)|0;i=f+(g<<1)+1|0;j=c+g|0;k=0;do{a[b+(((d[h]|0)<<2)+(((d[i]|0)<<2)+k<<5))|0]=a[j]|0;a[b+(((d[h]|0)<<2|1)+(((d[i]|0)<<2)+k<<5))|0]=a[j]|0;a[b+(((d[h]|0)<<2|2)+(((d[i]|0)<<2)+k<<5))|0]=a[j]|0;a[b+(((d[h]|0)<<2|3)+(((d[i]|0)<<2)+k<<5))|0]=a[j]|0;k=k+1|0;}while((k|0)<4);g=g+1|0;}while((g|0)<64);return}else if((e|0)==1){g=Cj(3,0)|0;f=0;do{a[b+(((d[g+(f<<1)+1|0]|0)<<3)+(d[g+(f<<1)|0]|0))|0]=a[c+f|0]|0;f=f+1|0;}while((f|0)<64);return}else if((e|0)==0){f=Cj(2,0)|0;g=0;do{a[b+(((d[f+(g<<1)+1|0]|0)<<2)+(d[f+(g<<1)|0]|0))|0]=a[c+g|0]|0;g=g+1|0;}while((g|0)<16);return}else if((e|0)==2){e=Cj(3,0)|0;g=0;do{f=e+(g<<1)|0;k=e+(g<<1)+1|0;j=c+g|0;a[b+(((d[f]|0)<<1)+((d[k]|0)<<5))|0]=a[j]|0;a[b+(((d[f]|0)<<1|1)+((d[k]|0)<<5))|0]=a[j]|0;a[b+(((d[f]|0)<<1)+((d[k]|0)<<5|16))|0]=a[j]|0;a[b+(((d[f]|0)<<1|1)+((d[k]|0)<<5|16))|0]=a[j]|0;g=g+1|0;}while((g|0)<64);return}else{ec(3136,14480,810,18840)}}function sk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=a+8|0;e=a+4|0;f=c[e>>2]|0;g=c[d>>2]|0;h=f;if(!(((g-h|0)/100|0)>>>0<b>>>0)){i=b;j=f;do{if((j|0)==0){k=0}else{dv(j|0,0,100)|0;k=c[e>>2]|0}j=k+100|0;c[e>>2]=j;i=i-1|0;}while((i|0)!=0);return}i=a|0;a=c[i>>2]|0;j=(h-a|0)/100|0;h=j+b|0;if(h>>>0>42949672>>>0){Nr(0)}k=(g-a|0)/100|0;if(k>>>0<21474836>>>0){a=k<<1;k=a>>>0<h>>>0?h:a;if((k|0)==0){l=0;m=0}else{n=k;o=9}}else{n=42949672;o=9}if((o|0)==9){l=Nu(n*100|0)|0;m=n}n=b;b=l+(j*100|0)|0;do{if((b|0)==0){p=0}else{dv(b|0,0,100)|0;p=b}b=p+100|0;n=n-1|0;}while((n|0)!=0);n=c[i>>2]|0;p=(c[e>>2]|0)-n|0;o=l+((((p|0)/-100|0)+j|0)*100|0)|0;j=n;cv(o|0,j|0,p)|0;c[i>>2]=o;c[e>>2]=b;c[d>>2]=l+(m*100|0);if((n|0)==0){return}Pu(j);return}function tk(a){a=a|0;var b=0;b;return}function uk(a){a=a|0;var b=0;b;return}function vk(a){a=a|0;var b=0;b;return}function wk(a){a=a|0;var b=0;b;return}function xk(a){a=a|0;var b=0;b;return}function yk(a){a=a|0;var b=0;b;return}function zk(a,b){a=a|0;b=b|0;Ob(a|0)|0;return}function Ak(a,b){a=a|0;b=b|0;Za(a|0,b|0)|0;return}function Bk(a){a=a|0;var b=0,d=0;c[a>>2]=0;b;d;return}function Ck(a){a=a|0;var b=0,c=0;b;c;return}function Dk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=a|0;if((c[d>>2]|0)>=(b|0)){return}e=a+4|0;f;if((c[d>>2]|0)<(b|0)){f=a+28|0;do{Za(f|0,e|0)|0;}while((c[d>>2]|0)<(b|0))}g;return}function Ek(a,b){a=a|0;b=b|0;var d=0,e=0;d;d=a|0;if((c[d>>2]|0)>=(b|0)){e;return}c[d>>2]=b;Ob(a+28|0)|0;e;return}function Fk(a,b){a=a|0;b=b|0;var d=0,e=0;d;d=a|0;c[d>>2]=(c[d>>2]|0)+b;Ob(a+28|0)|0;e;return}function Gk(a){a=a|0;return c[a>>2]|0}function Hk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=(d|0)>32;f=e?32:d;d=e?1022:0;e=b+156|0;c[e>>2]=0;g;h;i;c[b+160>>2]=0;i=b|0;a[i]=0;j;if((f|0)>0){k=0}else{l=d;return l|0}while(1){if((zc(b+28+(k<<2)|0,0,106,i|0)|0)!=0){l=10;m=4;break}c[e>>2]=(c[e>>2]|0)+1;j=k+1|0;if((j|0)<(f|0)){k=j}else{l=d;m=4;break}}if((m|0)==4){return l|0}return 0}function Ik(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=b+420|0;e;if((a[b]|0)!=0){f;return 0}e=b+24|0;g=b+444|0;h=b+8|0;i=b+20|0;j=b+160|0;do{k=c[e>>2]|0;if((k|0)==0){Za(g|0,d|0)|0}else{l=c[h>>2]|0;m=c[i>>2]|0;n=c[(c[l+(m>>>10<<2)>>2]|0)+((m&1023)<<2)>>2]|0;c[e>>2]=k-1;k=m+1|0;c[i>>2]=k;if(k>>>0>2047>>>0){Pu(c[l>>2]|0);c[h>>2]=(c[h>>2]|0)+4;c[i>>2]=(c[i>>2]|0)-1024}c[j>>2]=(c[j>>2]|0)+1;o;Dc[c[(c[n>>2]|0)+8>>2]&511](n);p;c[j>>2]=(c[j>>2]|0)-1}}while((a[b]|0)==0);f;return 0}function Jk(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d;a[b|0]=1;e;Ob(b+444|0)|0;e=b+156|0;if((c[e>>2]|0)>0){f=0}else{g;h;return}do{vc(c[b+28+(f<<2)>>2]|0,0)|0;f=f+1|0;}while((f|0)<(c[e>>2]|0));g;h;return}function Kk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e;if((a[b|0]|0)!=0){f;return}e=b+12|0;g=c[e>>2]|0;h=b+8|0;i=c[h>>2]|0;if((g|0)==(i|0)){j=0}else{j=(g-i<<8)-1|0}k=b+20|0;l=c[k>>2]|0;m=b+24|0;n=c[m>>2]|0;if((j-l|0)==(n|0)){Lk(b+4|0);o=c[m>>2]|0;p=c[k>>2]|0;q=c[h>>2]|0;r=c[e>>2]|0}else{o=n;p=l;q=i;r=g}g=o+p|0;do{if((r|0)!=(q|0)){p=(c[q+(g>>>10<<2)>>2]|0)+((g&1023)<<2)|0;if((p|0)==0){break}c[p>>2]=d}}while(0);c[m>>2]=o+1;gb(b+444|0)|0;f;return}function Lk(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;i=i+48|0;d=b|0;e=b+8|0;f=b+16|0;g=b+40|0;h=a+16|0;j=c[h>>2]|0;if(j>>>0>1023>>>0){c[h>>2]=j-1024;j=a+4|0;h=c[j>>2]|0;k=c[h>>2]|0;l=h+4|0;c[j>>2]=l;m=a+8|0;n=c[m>>2]|0;o=a+12|0;do{if((n|0)==(c[o>>2]|0)){p=a|0;q=c[p>>2]|0;if(l>>>0>q>>>0){r=l;s=((r-q>>2)+1|0)/-2|0;t=n-r|0;fv(h+(s+1<<2)|0,l|0,t|0)|0;r=h+((t>>2)+1+s<<2)|0;c[m>>2]=r;c[j>>2]=(c[j>>2]|0)+(s<<2);u=r;v=13;break}r=n-q>>1;s=(r|0)==0?1:r;r=Nu(s<<2)|0;t=r+(s>>>2<<2)|0;w=r+(s<<2)|0;if((l|0)==(n|0)){x=t;y=q}else{q=l;s=t;do{if((s|0)==0){z=0}else{c[s>>2]=c[q>>2];z=s}s=z+4|0;q=q+4|0;}while((q|0)!=(n|0));x=s;y=c[p>>2]|0}c[p>>2]=r;c[j>>2]=t;c[m>>2]=x;c[o>>2]=w;if((y|0)==0){A=x;v=12;break}Pu(y);A=c[m>>2]|0;v=12}else{A=n;v=12}}while(0);if((v|0)==12){if((A|0)==0){B=0}else{u=A;v=13}}if((v|0)==13){c[u>>2]=k;B=c[m>>2]|0}c[m>>2]=B+4;i=b;return}B=a|0;m=a+8|0;k=c[m>>2]|0;u=a+4|0;A=k-(c[u>>2]|0)>>2;n=a+12|0;y=c[n>>2]|0;x=a|0;o=y-(c[x>>2]|0)|0;if(!(A>>>0<o>>2>>>0)){j=o>>1;o=(j|0)==0?1:j;j=f+12|0;c[f+16>>2]=a+12;a=Nu(o<<2)|0;z=f|0;c[z>>2]=a;l=a+(A<<2)|0;A=f+8|0;c[A>>2]=l;h=f+4|0;c[h>>2]=l;c[j>>2]=a+(o<<2);o=Nu(4096)|0;c[g>>2]=o;Ok(f,g);g=c[m>>2]|0;while(1){if((g|0)==(c[u>>2]|0)){break}o=g-4|0;Pk(f,o);g=o}f=c[x>>2]|0;c[x>>2]=c[z>>2];c[z>>2]=f;c[u>>2]=c[h>>2];c[h>>2]=g;h=c[m>>2]|0;c[m>>2]=c[A>>2];c[A>>2]=h;z=c[n>>2]|0;c[n>>2]=c[j>>2];c[j>>2]=z;if((h|0)!=(g|0)){c[A>>2]=h+(~((h-4+(-g|0)|0)>>>2)<<2)}if((f|0)==0){i=b;return}Pu(f);i=b;return}f=Nu(4096)|0;if((y|0)!=(k|0)){c[d>>2]=f;Mk(B,d);i=b;return}c[e>>2]=f;Nk(B,e);e=c[u>>2]|0;B=c[e>>2]|0;f=e+4|0;c[u>>2]=f;d=c[m>>2]|0;do{if((d|0)==(c[n>>2]|0)){k=c[x>>2]|0;if(f>>>0>k>>>0){y=f;g=((y-k>>2)+1|0)/-2|0;h=d-y|0;fv(e+(g+1<<2)|0,f|0,h|0)|0;y=e+((h>>2)+1+g<<2)|0;c[m>>2]=y;c[u>>2]=(c[u>>2]|0)+(g<<2);C=y;v=29;break}y=d-k>>1;g=(y|0)==0?1:y;y=Nu(g<<2)|0;h=y+(g>>>2<<2)|0;A=y+(g<<2)|0;if((f|0)==(d|0)){D=h;E=k}else{k=f;g=h;do{if((g|0)==0){F=0}else{c[g>>2]=c[k>>2];F=g}g=F+4|0;k=k+4|0;}while((k|0)!=(d|0));D=g;E=c[x>>2]|0}c[x>>2]=y;c[u>>2]=h;c[m>>2]=D;c[n>>2]=A;if((E|0)==0){G=D;v=28;break}Pu(E);G=c[m>>2]|0;v=28}else{G=d;v=28}}while(0);if((v|0)==28){if((G|0)==0){H=0}else{C=G;v=29}}if((v|0)==29){c[C>>2]=B;H=c[m>>2]|0}c[m>>2]=H+4;i=b;return}function Mk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=c[d>>2]|0;f=a+12|0;do{if((e|0)==(c[f>>2]|0)){g=a+4|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;if(h>>>0>j>>>0){k=h;l=((k-j>>2)+1|0)/-2|0;m=e-k|0;fv(h+(l<<2)|0,h|0,m|0)|0;k=h+(l+(m>>2)<<2)|0;c[d>>2]=k;c[g>>2]=(c[g>>2]|0)+(l<<2);n=k;break}k=e-j>>1;l=(k|0)==0?1:k;k=Nu(l<<2)|0;m=k+(l>>>2<<2)|0;o=k+(l<<2)|0;if((h|0)==(e|0)){p=m;q=j}else{j=h;h=m;do{if((h|0)==0){r=0}else{c[h>>2]=c[j>>2];r=h}h=r+4|0;j=j+4|0;}while((j|0)!=(e|0));p=h;q=c[i>>2]|0}c[i>>2]=k;c[g>>2]=m;c[d>>2]=p;c[f>>2]=o;if((q|0)==0){n=p;break}Pu(q);n=c[d>>2]|0}else{n=e}}while(0);if((n|0)==0){s=0;t=s+4|0;c[d>>2]=t;return}c[n>>2]=c[b>>2];s=c[d>>2]|0;t=s+4|0;c[d>>2]=t;return}function Nk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=c[d>>2]|0;f=a|0;do{if((e|0)==(c[f>>2]|0)){g=a+8|0;h=c[g>>2]|0;i=a+12|0;j=c[i>>2]|0;k=j;if(h>>>0<j>>>0){j=h;l=((k-j>>2)+1|0)/2|0;m=j-e|0;j=h+(l-(m>>2)<<2)|0;fv(j|0,e|0,m|0)|0;c[d>>2]=j;c[g>>2]=(c[g>>2]|0)+(l<<2);n=j;break}j=k-e>>1;k=(j|0)==0?1:j;j=Nu(k<<2)|0;l=j+((k+3|0)>>>2<<2)|0;m=j+(k<<2)|0;if((e|0)==(h|0)){o=l;p=e}else{k=e;q=l;do{if((q|0)==0){r=0}else{c[q>>2]=c[k>>2];r=q}q=r+4|0;k=k+4|0;}while((k|0)!=(h|0));o=q;p=c[f>>2]|0}c[f>>2]=j;c[d>>2]=l;c[g>>2]=o;c[i>>2]=m;if((p|0)==0){n=l;break}Pu(p);n=c[d>>2]|0}else{n=e}}while(0);c[n-4>>2]=c[b>>2];c[d>>2]=(c[d>>2]|0)-4;return}function Ok(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=c[d>>2]|0;f=a+12|0;do{if((e|0)==(c[f>>2]|0)){g=a+4|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;if(h>>>0>j>>>0){k=h;l=((k-j>>2)+1|0)/-2|0;m=e-k|0;fv(h+(l<<2)|0,h|0,m|0)|0;k=h+(l+(m>>2)<<2)|0;c[d>>2]=k;c[g>>2]=(c[g>>2]|0)+(l<<2);n=k;break}k=e-j>>1;l=(k|0)==0?1:k;k=Nu(l<<2)|0;m=k+(l>>>2<<2)|0;o=k+(l<<2)|0;if((h|0)==(e|0)){p=m;q=j}else{j=h;h=m;do{if((h|0)==0){r=0}else{c[h>>2]=c[j>>2];r=h}h=r+4|0;j=j+4|0;}while((j|0)!=(e|0));p=h;q=c[i>>2]|0}c[i>>2]=k;c[g>>2]=m;c[d>>2]=p;c[f>>2]=o;if((q|0)==0){n=p;break}Pu(q);n=c[d>>2]|0}else{n=e}}while(0);if((n|0)==0){s=0;t=s+4|0;c[d>>2]=t;return}c[n>>2]=c[b>>2];s=c[d>>2]|0;t=s+4|0;c[d>>2]=t;return}function Pk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=c[d>>2]|0;f=a|0;do{if((e|0)==(c[f>>2]|0)){g=a+8|0;h=c[g>>2]|0;i=a+12|0;j=c[i>>2]|0;k=j;if(h>>>0<j>>>0){j=h;l=((k-j>>2)+1|0)/2|0;m=j-e|0;j=h+(l-(m>>2)<<2)|0;fv(j|0,e|0,m|0)|0;c[d>>2]=j;c[g>>2]=(c[g>>2]|0)+(l<<2);n=j;break}j=k-e>>1;k=(j|0)==0?1:j;j=Nu(k<<2)|0;l=j+((k+3|0)>>>2<<2)|0;m=j+(k<<2)|0;if((e|0)==(h|0)){o=l;p=e}else{k=e;q=l;do{if((q|0)==0){r=0}else{c[q>>2]=c[k>>2];r=q}q=r+4|0;k=k+4|0;}while((k|0)!=(h|0));o=q;p=c[f>>2]|0}c[f>>2]=j;c[d>>2]=l;c[g>>2]=o;c[i>>2]=m;if((p|0)==0){n=l;break}Pu(p);n=c[d>>2]|0}else{n=e}}while(0);c[n-4>>2]=c[b>>2];c[d>>2]=(c[d>>2]|0)-4;return}function Qk(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=b+18596|0;e=c[f>>2]|0;i=e+5932|0;j=b+18600|0;k=c[j>>2]|0;l=-1<<c[e+10092>>2];m=l&g;n=l&h;l=b+18532|0;o=b+18536|0;if((m|0)==(c[l>>2]|0)){if((n|0)!=(c[o>>2]|0)){p=3}}else{p=3}if((p|0)==3){c[b+18540>>2]=c[b+18528>>2];c[l>>2]=m;c[o>>2]=n}o=e+5804|0;if((m|0)==0){q=((1<<c[o>>2])-1&n|0)==0}else{q=0}l=c[k+800>>2]|0;r=c[e+5820>>2]|0;s=c[e+5812>>2]|0;if((ga(s,(l|0)%(r|0)|0)|0)==(m|0)){t=(ga((l|0)/(r|0)|0,s)|0)==(n|0)}else{t=0}do{if((a[e+5966|0]|0)==0){u=0}else{s=c[o>>2]|0;r=(1<<s)-1|0;if((r&m|0)!=0){u=0;break}if((r&n|0)!=0){u=0;break}u=pj(i,m>>s,n>>s)|0}}while(0);do{if(t|u){p=15}else{if(q){if((a[e+5965|0]|0)!=0){p=15;break}}v=b+18540|0}}while(0);if((p|0)==15){v=(c[j>>2]|0)+792|0}j=c[v>>2]|0;v=m-1|0;do{if(bi(c[f>>2]|0,m,n,v,n)|0){p=c[e+5864>>2]|0;q=(ga(n>>p,c[e+5852>>2]|0)|0)+(v>>p)|0;if((c[(c[e+10320>>2]|0)+(q<<2)>>2]>>((c[o>>2]|0)-p<<1)|0)!=(c[b+4>>2]|0)){w=j;break}p=c[f>>2]|0;q=c[p+10368>>2]|0;u=v>>q;t=n>>q;if(!((u|0)>-1)){ec(6096,4288,118,17312)}q=c[p+10372>>2]|0;if((u|0)>=(q|0)){ec(6096,4288,118,17312)}if(!((t|0)>-1)){ec(3e3,4288,119,17312)}if((t|0)<(c[p+10376>>2]|0)){i=(ga(q,t)|0)+u|0;w=a[(c[p+10360>>2]|0)+(i*3|0)+2|0]|0;break}else{ec(3e3,4288,119,17312)}}else{w=j}}while(0);v=n-1|0;do{if(bi(c[f>>2]|0,m,n,m,v)|0){i=c[e+5864>>2]|0;p=(ga(v>>i,c[e+5852>>2]|0)|0)+(m>>i)|0;if((c[(c[e+10320>>2]|0)+(p<<2)>>2]>>((c[o>>2]|0)-i<<1)|0)!=(c[b+4>>2]|0)){x=j;break}i=c[f>>2]|0;p=c[i+10368>>2]|0;u=m>>p;t=v>>p;if(!((u|0)>-1)){ec(6096,4288,118,17312)}p=c[i+10372>>2]|0;if((u|0)>=(p|0)){ec(6096,4288,118,17312)}if(!((t|0)>-1)){ec(3e3,4288,119,17312)}if((t|0)<(c[i+10376>>2]|0)){q=(ga(p,t)|0)+u|0;x=a[(c[i+10360>>2]|0)+(q*3|0)+2|0]|0;break}else{ec(3e3,4288,119,17312)}}else{x=j}}while(0);j=c[e+5764>>2]|0;v=((c[b+18512>>2]|0)+52+(w+1+x>>1)+(j<<1)|0)%(j+52|0)|0;x=v-j|0;c[b+18544>>2]=v;v=x+(c[e+5952>>2]|0)+(c[k+744>>2]|0)+(c[b+18520>>2]|0)|0;j=e+5772|0;w=c[j>>2]|0;m=-w|0;if((v|0)<(m|0)){y=m}else{y=(v|0)>57?57:v}v=(c[e+5956>>2]|0)+x+(c[k+748>>2]|0)+(c[b+18524>>2]|0)|0;if((v|0)<(m|0)){z=m}else{z=(v|0)>57?57:v}do{if((c[e+5776>>2]|0)==1){do{if((y|0)<30){A=y}else{if((y|0)>42){A=y-6|0;break}else{A=c[8+(y-30<<2)>>2]|0;break}}}while(0);if((z|0)<30){B=z;C=A;break}if((z|0)>42){B=z-6|0;C=A;break}else{B=c[8+(z-30<<2)>>2]|0;C=A;break}}else{B=z;C=y}}while(0);c[b+18548>>2]=w+C;c[b+18552>>2]=(c[j>>2]|0)+B;B=c[f>>2]|0;f=c[B+10368>>2]|0;j=g>>f;g=h>>f;if(!((j|0)>-1)){ec(6096,4288,118,17312)}h=B+10372|0;C=c[h>>2]|0;if((j|0)>=(C|0)){ec(6096,4288,118,17312)}if(!((g|0)>-1)){ec(3e3,4288,119,17312)}if((g|0)>=(c[B+10376>>2]|0)){ec(3e3,4288,119,17312)}w=(ga(C,g)|0)+j|0;C=B+10360|0;B=(c[C>>2]|0)+(w*3|0)|0;w=(d[B]|d[B+1|0]<<8)<<16>>16&255&7;B=1<<(w>>>0<3>>>0?3:w)-f;f=B+g|0;if((B|0)<=0){D=b+18528|0;c[D>>2]=x;return}w=B+j|0;B=x&255;y=g;do{g=j;do{z=(ga(c[h>>2]|0,y)|0)+g|0;a[(c[C>>2]|0)+(z*3|0)+2|0]=B;g=g+1|0;}while((g|0)<(w|0));y=y+1|0;}while((y|0)<(f|0));D=b+18528|0;c[D>>2]=x;return}function Rk(a,b,d,e,f,g,h,i,j,k){a=a|0;b=b|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;f=c[a+18596>>2]|0;if((c[((h|0)==0?f+5760|0:f+5768|0)>>2]|0)>8){Sk(a,b,d,0,0,g,h,i,j,k);return}else{Tk(a,b,d,0,0,g,h,i,j,k);return}}function Sk(e,f,g,h,j,k,l,m,n,o){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var 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,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;j=i;i=i+8192|0;h=j|0;p=j+4096|0;q=e+18596|0;r=c[q>>2]|0;if((l|0)==2){s=e+18552|0}else if((l|0)==0){s=e+18544|0}else if((l|0)==1){s=e+18548|0}else{ec(11600,14216,367,18584)}t=c[s>>2]|0;s=e+2112|0;u=c[s>>2]|0;v=(l|0)==0;w=c[(v?r+40|0:r+44|0)>>2]|0;x=(c[r+4+(l<<2)>>2]|0)+((ga(w,g)|0)+f<<1)|0;y=c[(v?r+5760|0:r+5768|0)>>2]|0;z=c[r+10368>>2]|0;A=f>>z;f=g>>z;if(!((A|0)>-1)){ec(6096,4288,118,17312)}z=c[r+10372>>2]|0;if((A|0)>=(z|0)){ec(6096,4288,118,17312)}if(!((f|0)>-1)){ec(3e3,4288,119,17312)}if((f|0)>=(c[r+10376>>2]|0)){ec(3e3,4288,119,17312)}g=(ga(z,f)|0)+A|0;A=(c[r+10360>>2]|0)+(g*3|0)|0;g=((d[A]|d[A+1|0]<<8)<<16>>16&768)==0;A=(k|0)==4;f=(a[r+5748|0]|0)!=0&A&g;do{if((a[e+32|0]|0)==0){z=(k|0)>1;if(z){B=k;C=0;while(1){D=C+1|0;E=B>>1;if((E|0)>1){B=E;C=D}else{F=D;break}}}else{F=0}C=F+y|0;B=C-5|0;do{if((a[r+1400|0]|0)==0){D=C-9|0;E=1<<C-10;G=c[31e3+(((t|0)%6|0)<<2)>>2]<<((t|0)/6|0);H=e+14404+(l<<1)|0;if((b[H>>1]|0)>0){I=0}else{break}do{J=(ga(b[e+2116+(l<<11)+(I<<1)>>1]|0,G)|0)+E>>D;if((J|0)<-32768){L=-32768}else{L=(J|0)>32767?32767:J&65535}b[u+(b[e+8260+(l<<11)+(I<<1)>>1]<<1)>>1]=L;I=I+1|0;}while((I|0)<(b[H>>1]|0))}else{H=1<<C-6;do{if(n){M=l}else{if((k|0)<32){M=l+3|0;break}else{M=l+1|0;break}}}while(0);if((k|0)==16){N=r+6473+(M<<8)|0}else if((k|0)==8){N=r+6089+(M<<6)|0}else if((k|0)==4){N=r+5993+(M<<4)|0}else if((k|0)==32){N=r+8009+(M<<10)|0}else{ec(11600,14216,492,18584)}D=e+14404+(l<<1)|0;if((b[D>>1]|0)<=0){break}E=c[31e3+(((t|0)%6|0)<<2)>>2]|0;G=(t|0)/6|0;J=H;O=(H|0)<0|0?-1:0;P=B;Q=0;do{R=b[e+8260+(l<<11)+(Q<<1)>>1]|0;S=(ga(E,d[N+R|0]|0)|0)<<G;T=b[e+2116+(l<<11)+(Q<<1)>>1]|0;U=rv(T<<16>>16,T<<16>>16<0|0?-1:0,S,(S|0)<0|0?-1:0)|0;S=hv(U,K,J,O)|0;U=lv(S|0,K|0,P|0)|0;S=K;T=-1;if((S|0)<(T|0)|(S|0)==(T|0)&U>>>0<-32768>>>0){V=-32768}else{T=0;V=(S|0)>(T|0)|(S|0)==(T|0)&U>>>0>32767>>>0?32767:U&65535}b[u+(R<<1)>>1]=V;Q=Q+1|0;}while((Q|0)<(b[D>>1]|0))}}while(0);B=(k|0)>0;if(!m){C=A&v&g;if((o|0)!=0){ec(8472,14216,591,18584)}if((a[r+10071|0]|0)!=0){Vk(e,u,0,k,C&1,x,w,y,l);break}D=c[e+18592>>2]|0;if(C){Wc[c[D+412>>2]&63](x,u,w,y);break}if((k|0)==8){Wc[c[D+420>>2]&63](x,u,w,y);break}else if((k|0)==4){Wc[c[D+416>>2]&63](x,u,w,y);break}else if((k|0)==16){Wc[c[D+424>>2]&63](x,u,w,y);break}else{Wc[c[D+428>>2]&63](x,u,w,y);break}}if(z){D=k;C=0;while(1){Q=D>>1;if((Q|0)>1){D=Q;C=C+1|0}else{break}}W=C+6|0}else{W=5}D=20-y|0;z=(D|0)>0?D:0;if(f){Ec[c[(c[e+18592>>2]|0)+432>>2]&127](u,4)}D=v?e+14412|0:p|0;do{if((o|0)==0){Cc[c[(c[e+18592>>2]|0)+472>>2]&31](D,u,k,W,z)}else{Q=c[e+18592>>2]|0;if((o|0)==2){Cc[c[Q+464>>2]&31](D,u,k,W,z);break}else{Cc[c[Q+468>>2]&31](D,u,k,W,z);break}}}while(0);do{if(!v){z=e+28|0;if((c[z>>2]|0)==0){break}C=c[q>>2]|0;Q=c[C+5768>>2]|0;P=c[C+5760>>2]|0;if(B){X=0}else{break}do{C=ga(X,k)|0;O=0;do{J=O+C|0;G=(ga(c[e+14412+(J<<2)>>2]<<Q>>P,c[z>>2]|0)|0)>>3;E=D+(J<<2)|0;c[E>>2]=G+(c[E>>2]|0);O=O+1|0;}while((O|0)<(k|0));X=X+1|0;}while((X|0)<(k|0))}}while(0);Cc[c[(c[e+18592>>2]|0)+460>>2]&31](x,w,D,k,y);if(!f){break}dv(u|0,0,32)|0}else{B=v?e+14412|0:h|0;z=e+14404+(l<<1)|0;if((b[z>>1]|0)>0){P=0;do{b[u+(b[e+8260+(l<<11)+(P<<1)>>1]<<1)>>1]=b[e+2116+(l<<11)+(P<<1)>>1]|0;P=P+1|0;}while((P|0)<(b[z>>1]|0))}if(f){Ec[c[(c[e+18592>>2]|0)+432>>2]&127](u,4)}do{if((o|0)==0){Tc[c[(c[e+18592>>2]|0)+364>>2]&63](B,u,k)}else{z=c[e+18592>>2]|0;if((o|0)==2){Tc[c[z+368>>2]&63](B,u,k);break}else{Tc[c[z+372>>2]&63](B,u,k);break}}}while(0);do{if(!v){z=e+28|0;if((c[z>>2]|0)==0){break}P=c[q>>2]|0;D=c[P+5768>>2]|0;Q=c[P+5760>>2]|0;if((k|0)>0){Y=0}else{break}do{P=ga(Y,k)|0;O=0;do{C=O+P|0;E=(ga(c[e+14412+(C<<2)>>2]<<D>>Q,c[z>>2]|0)|0)>>3;G=B+(C<<2)|0;c[G>>2]=E+(c[G>>2]|0);O=O+1|0;}while((O|0)<(k|0));Y=Y+1|0;}while((Y|0)<(k|0))}}while(0);Cc[c[(c[e+18592>>2]|0)+460>>2]&31](x,w,B,k,y);if(!f){break}dv(u|0,0,32)|0}}while(0);u=e+14404+(l<<1)|0;if((b[u>>1]|0)<=0){i=j;return}f=c[s>>2]|0;s=0;do{b[f+(b[e+8260+(l<<11)+(s<<1)>>1]<<1)>>1]=0;s=s+1|0;}while((s|0)<(b[u>>1]|0));i=j;return}function Tk(e,f,g,h,j,k,l,m,n,o){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var 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,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;j=i;i=i+8192|0;h=j|0;p=j+4096|0;q=e+18596|0;r=c[q>>2]|0;if((l|0)==1){s=e+18548|0}else if((l|0)==2){s=e+18552|0}else if((l|0)==0){s=e+18544|0}else{ec(11600,14216,367,18584)}t=c[s>>2]|0;s=e+2112|0;u=c[s>>2]|0;v=(l|0)==0;w=c[(v?r+40|0:r+44|0)>>2]|0;x=(c[r+4+(l<<2)>>2]|0)+((ga(w,g)|0)+f)|0;y=c[r+10368>>2]|0;z=f>>y;f=g>>y;if(!((z|0)>-1)){ec(6096,4288,118,17312)}y=c[r+10372>>2]|0;if((z|0)>=(y|0)){ec(6096,4288,118,17312)}if(!((f|0)>-1)){ec(3e3,4288,119,17312)}if((f|0)>=(c[r+10376>>2]|0)){ec(3e3,4288,119,17312)}g=(ga(y,f)|0)+z|0;z=(c[r+10360>>2]|0)+(g*3|0)|0;g=((d[z]|d[z+1|0]<<8)<<16>>16&768)==0;z=(k|0)==4;f=(a[r+5748|0]|0)!=0&z&g;do{if((a[e+32|0]|0)==0){y=c[(v?r+5760|0:r+5768|0)>>2]|0;A=(k|0)>1;if(A){B=k;C=0;while(1){D=C+1|0;E=B>>1;if((E|0)>1){B=E;C=D}else{F=D;break}}}else{F=0}C=F+y|0;B=C-5|0;do{if((a[r+1400|0]|0)==0){D=C-9|0;E=1<<C-10;G=c[31e3+(((t|0)%6|0)<<2)>>2]<<((t|0)/6|0);H=e+14404+(l<<1)|0;if((b[H>>1]|0)>0){I=0}else{break}do{J=(ga(b[e+2116+(l<<11)+(I<<1)>>1]|0,G)|0)+E>>D;if((J|0)<-32768){L=-32768}else{L=(J|0)>32767?32767:J&65535}b[u+(b[e+8260+(l<<11)+(I<<1)>>1]<<1)>>1]=L;I=I+1|0;}while((I|0)<(b[H>>1]|0))}else{H=1<<C-6;do{if(n){M=l}else{if((k|0)<32){M=l+3|0;break}else{M=l+1|0;break}}}while(0);if((k|0)==8){N=r+6089+(M<<6)|0}else if((k|0)==4){N=r+5993+(M<<4)|0}else if((k|0)==16){N=r+6473+(M<<8)|0}else if((k|0)==32){N=r+8009+(M<<10)|0}else{ec(11600,14216,492,18584)}D=e+14404+(l<<1)|0;if((b[D>>1]|0)<=0){break}E=c[31e3+(((t|0)%6|0)<<2)>>2]|0;G=(t|0)/6|0;J=H;O=(H|0)<0|0?-1:0;P=B;Q=0;do{R=b[e+8260+(l<<11)+(Q<<1)>>1]|0;S=(ga(E,d[N+R|0]|0)|0)<<G;T=b[e+2116+(l<<11)+(Q<<1)>>1]|0;U=rv(T<<16>>16,T<<16>>16<0|0?-1:0,S,(S|0)<0|0?-1:0)|0;S=hv(U,K,J,O)|0;U=lv(S|0,K|0,P|0)|0;S=K;T=-1;if((S|0)<(T|0)|(S|0)==(T|0)&U>>>0<-32768>>>0){V=-32768}else{T=0;V=(S|0)>(T|0)|(S|0)==(T|0)&U>>>0>32767>>>0?32767:U&65535}b[u+(R<<1)>>1]=V;Q=Q+1|0;}while((Q|0)<(b[D>>1]|0))}}while(0);B=(k|0)>0;if(!m){C=z&v&g;if((o|0)!=0){ec(8472,14216,591,18584)}if((a[r+10071|0]|0)!=0){Uk(e,u,0,k,C&1,x,w,8,l);break}y=c[e+18592>>2]|0;if(C){Tc[c[y+388>>2]&63](x,u,w);break}if((k|0)==4){Tc[c[y+392>>2]&63](x,u,w);break}else if((k|0)==8){Tc[c[y+396>>2]&63](x,u,w);break}else if((k|0)==16){Tc[c[y+400>>2]&63](x,u,w);break}else{Tc[c[y+404>>2]&63](x,u,w);break}}if(A){y=k;C=0;while(1){D=y>>1;if((D|0)>1){y=D;C=C+1|0}else{break}}W=C+6|0}else{W=5}if(f){Ec[c[(c[e+18592>>2]|0)+432>>2]&127](u,4)}y=v?e+14412|0:p|0;do{if((o|0)==0){Cc[c[(c[e+18592>>2]|0)+472>>2]&31](y,u,k,W,12)}else{A=c[e+18592>>2]|0;if((o|0)==2){Cc[c[A+464>>2]&31](y,u,k,W,12);break}else{Cc[c[A+468>>2]&31](y,u,k,W,12);break}}}while(0);do{if(!v){C=e+28|0;if((c[C>>2]|0)==0){break}A=c[q>>2]|0;D=c[A+5768>>2]|0;Q=c[A+5760>>2]|0;if(B){X=0}else{break}do{A=ga(X,k)|0;P=0;do{O=P+A|0;J=(ga(c[e+14412+(O<<2)>>2]<<D>>Q,c[C>>2]|0)|0)>>3;G=y+(O<<2)|0;c[G>>2]=J+(c[G>>2]|0);P=P+1|0;}while((P|0)<(k|0));X=X+1|0;}while((X|0)<(k|0))}}while(0);Cc[c[(c[e+18592>>2]|0)+456>>2]&31](x,w,y,k,8);if(!f){break}dv(u|0,0,32)|0}else{B=v?e+14412|0:h|0;C=e+14404+(l<<1)|0;if((b[C>>1]|0)>0){Q=0;do{b[u+(b[e+8260+(l<<11)+(Q<<1)>>1]<<1)>>1]=b[e+2116+(l<<11)+(Q<<1)>>1]|0;Q=Q+1|0;}while((Q|0)<(b[C>>1]|0))}if(f){Ec[c[(c[e+18592>>2]|0)+432>>2]&127](u,4)}do{if((o|0)==0){Tc[c[(c[e+18592>>2]|0)+364>>2]&63](B,u,k)}else{C=c[e+18592>>2]|0;if((o|0)==2){Tc[c[C+368>>2]&63](B,u,k);break}else{Tc[c[C+372>>2]&63](B,u,k);break}}}while(0);do{if(!v){C=e+28|0;if((c[C>>2]|0)==0){break}Q=c[q>>2]|0;y=c[Q+5768>>2]|0;D=c[Q+5760>>2]|0;if((k|0)>0){Y=0}else{break}do{Q=ga(Y,k)|0;P=0;do{A=P+Q|0;G=(ga(c[e+14412+(A<<2)>>2]<<y>>D,c[C>>2]|0)|0)>>3;J=B+(A<<2)|0;c[J>>2]=G+(c[J>>2]|0);P=P+1|0;}while((P|0)<(k|0));Y=Y+1|0;}while((Y|0)<(k|0))}}while(0);Cc[c[(c[e+18592>>2]|0)+456>>2]&31](x,w,B,k,8);if(!f){break}dv(u|0,0,32)|0}}while(0);u=e+14404+(l<<1)|0;if((b[u>>1]|0)<=0){i=j;return}f=c[s>>2]|0;s=0;do{b[f+(b[e+8260+(l<<11)+(s<<1)>>1]<<1)>>1]=0;s=s+1|0;}while((s|0)<(b[u>>1]|0));i=j;return}function Uk(a,b,d,e,f,g,h,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+4096|0;l=c[a+18592>>2]|0;m=(k|0)==0;k=m?a+14412|0:d|0;n=20-j|0;do{if((f|0)==1){Wc[c[l+436>>2]&63](k,b,n,15)}else{if((e|0)==16){Wc[c[l+448>>2]&63](k,b,n,15);break}else if((e|0)==4){Wc[c[l+440>>2]&63](k,b,n,15);break}else if((e|0)==8){Wc[c[l+444>>2]&63](k,b,n,15);break}else{Wc[c[l+452>>2]&63](k,b,n,15);break}}}while(0);do{if(!m){n=a+28|0;if((c[n>>2]|0)==0){break}b=c[a+18596>>2]|0;f=c[b+5768>>2]|0;o=c[b+5760>>2]|0;if((e|0)>0){p=0}else{break}do{b=ga(p,e)|0;q=0;do{r=q+b|0;s=(ga(c[a+14412+(r<<2)>>2]<<f>>o,c[n>>2]|0)|0)>>3;t=k+(r<<2)|0;c[t>>2]=s+(c[t>>2]|0);q=q+1|0;}while((q|0)<(e|0));p=p+1|0;}while((p|0)<(e|0))}}while(0);Cc[c[l+456>>2]&31](g,h,k,e,j);i=d;return}function Vk(a,b,d,e,f,g,h,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+4096|0;l=c[a+18592>>2]|0;m=(k|0)==0;k=m?a+14412|0:d|0;n=20-j|0;do{if((f|0)==1){Wc[c[l+436>>2]&63](k,b,n,15)}else{if((e|0)==8){Wc[c[l+444>>2]&63](k,b,n,15);break}else if((e|0)==16){Wc[c[l+448>>2]&63](k,b,n,15);break}else if((e|0)==4){Wc[c[l+440>>2]&63](k,b,n,15);break}else{Wc[c[l+452>>2]&63](k,b,n,15);break}}}while(0);do{if(!m){n=a+28|0;if((c[n>>2]|0)==0){break}b=c[a+18596>>2]|0;f=c[b+5768>>2]|0;o=c[b+5760>>2]|0;if((e|0)>0){p=0}else{break}do{b=ga(p,e)|0;q=0;do{r=q+b|0;s=(ga(c[a+14412+(r<<2)>>2]<<f>>o,c[n>>2]|0)|0)>>3;t=k+(r<<2)|0;c[t>>2]=s+(c[t>>2]|0);q=q+1|0;}while((q|0)<(e|0));p=p+1|0;}while((p|0)<(e|0))}}while(0);Cc[c[l+460>>2]&31](g,h,k,e,j);i=d;return}function Wk(a){a=a|0;c[12934]=a;return}function Xk(a){a=a|0;return}function Yk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+16|0;g=f|0;if((c[12934]|0)<-9999){i=f;return}if((a[51720+b|0]|0)!=0){i=f;return}b=(a[d]|0)==42;h=c[t>>2]|0;if(!b){Oa(1200,5,1,h|0)|0}j=g;c[j>>2]=e;c[j+4>>2]=0;Qb(h|0,d+(b&1)|0,g|0)|0;Ma(h|0)|0;i=f;return}function Zk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f|0;h=(a[d]|0)==42;j=c[t>>2]|0;if(!h){Oa(14208,6,1,j|0)|0}k=g;c[k>>2]=e;c[k+4>>2]=0;Qb(b|0,d+(h&1)|0,g|0)|0;Ma(j|0)|0;i=f;return}function _k(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;g=nd(f,4)|0;c[d>>2]=g;if((g|0)>15){h=8;return h|0}od(f,2);g=nd(f,6)|0;c[d+4>>2]=g+1;if((g|0)>62){h=8;return h|0}g=nd(f,3)|0;i=d+8|0;c[i>>2]=g+1;if((g|0)>6){h=8;return h|0}g=nd(f,1)|0;c[d+12>>2]=g;od(f,16);$k(d+16|0,f,c[i>>2]|0);g=nd(f,1)|0;j=d+484|0;c[j>>2]=g;k=c[i>>2]|0;if((g|0)==0){l=k-1|0;m=7}else{if((k|0)>0){l=0;m=7}}do{if((m|0)==7){k=l;while(1){g=qd(f)|0;n=d+488+(k*12|0)|0;c[n>>2]=g;g=qd(f)|0;o=d+488+(k*12|0)+4|0;c[o>>2]=g;g=qd(f)|0;c[d+488+(k*12|0)+8>>2]=g;if((c[n>>2]|0)==-99999){h=8;m=52;break}n=k+1|0;if((c[o>>2]|0)==-99999|(g|0)==-99999){h=8;m=52;break}if((n|0)<(c[i>>2]|0)){k=n}else{m=11;break}}if((m|0)==11){if((c[j>>2]|0)!=0){break}if((l|0)>=8){ec(11472,14120,144,17416);return 0}if((l|0)<=0){break}k=d+488+(l*12|0)|0;n=d+488+(l*12|0)+4|0;g=d+488+(l*12|0)+8|0;o=0;do{c[d+488+(o*12|0)>>2]=c[k>>2];c[d+488+(o*12|0)+4>>2]=c[n>>2];c[d+488+(o*12|0)+8>>2]=c[g>>2];o=o+1|0;}while((o|0)<(l|0))}else if((m|0)==52){return h|0}}}while(0);m=(nd(f,6)|0)&255;l=d+584|0;a[l]=m;m=qd(f)|0;j=d+588|0;c[j>>2]=m;i=m+1|0;if((i|0)<0|(m|0)>1022|(m|0)==-99999){Ue(e,8,0);h=8;return h|0}c[j>>2]=i;e=d+592|0;m=d+596|0;o=c[m>>2]|0;g=e|0;n=c[g>>2]|0;k=(o-n|0)/12|0;do{if(k>>>0<i>>>0){jl(e,i-k|0)}else{if(!(k>>>0>i>>>0)){break}p=n+(i*12|0)|0;if((o|0)==(p|0)){break}else{q=o}while(1){r=q-12|0;c[m>>2]=r;s=c[r>>2]|0;if((s|0)==0){t=r}else{Pu(s);t=c[m>>2]|0}if((t|0)==(p|0)){break}else{q=t}}}}while(0);a:do{if((c[j>>2]|0)>=2){t=1;q=a[l]|0;while(1){al((c[g>>2]|0)+(t*12|0)|0,(q&255)+1|0,0);m=0;while(1){o=(c[(c[g>>2]|0)+(t*12|0)>>2]|0)+(m>>>5<<2)|0;i=1<<(m&31);if((nd(f,1)|0)==0){u=c[o>>2]&~i}else{u=c[o>>2]|i}c[o>>2]=u;v=a[l]|0;if((m|0)<(v&255|0)){m=m+1|0}else{break}}if((t|0)>=((c[j>>2]|0)-1|0)){break a}t=t+1|0;q=v}}}while(0);v=(nd(f,1)|0)&255;a[d+604|0]=v;do{if(!(v<<24>>24==0)){j=nd(f,32)|0;c[d+608>>2]=j;j=nd(f,32)|0;c[d+612>>2]=j;j=(nd(f,1)|0)&255;a[d+616|0]=j;if(j<<24>>24==0){break}j=(qd(f)|0)+1|0;c[d+620>>2]=j;j=qd(f)|0;l=d+624|0;c[l>>2]=j;if((j|0)>1023){ec(8432,14120,189,17416);return 0}u=d+628|0;g=d+632|0;q=c[g>>2]|0;t=u|0;m=c[t>>2]|0;o=q-m>>1;do{if(o>>>0<j>>>0){gl(u,j-o|0);w=c[l>>2]|0}else{if(!(o>>>0>j>>>0)){w=j;break}i=m+(j<<1)|0;if((q|0)==(i|0)){w=j;break}c[g>>2]=q+(~((q-2+(-i|0)|0)>>>1)<<1);w=j}}while(0);j=d+640|0;q=d+644|0;g=c[q>>2]|0;m=c[j>>2]|0;o=g-m|0;do{if(o>>>0<w>>>0){fl(j,w-o|0);x=c[l>>2]|0}else{if(!(o>>>0>w>>>0)){x=w;break}u=m+w|0;if((g|0)==(u|0)){x=w;break}c[q>>2]=u;x=w}}while(0);if((x|0)<=0){break}q=(qd(f)|0)&65535;b[c[t>>2]>>1]=q;h=0;return h|0}}while(0);x=(nd(f,1)|0)&255;a[d+652|0]=x;h=0;return h|0}function $k(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;a[b|0]=1;a[b+44|0]=1;bl(b|0,c);e=d-1|0;f=(e|0)>0;if(f){g=0;do{h=(nd(c,1)|0)&255;a[b+52+(g*52|0)|0]=h;h=(nd(c,1)|0)&255;a[b+52+(g*52|0)+44|0]=h;g=g+1|0;}while((g|0)<(e|0))}if((d-2|0)>>>0<7>>>0){d=e;do{od(c,2);d=d+1|0;}while((d|0)<8)}if(f){i=0}else{return}do{bl(b+52+(i*52|0)|0,c);i=i+1|0;}while((i|0)<(e|0));return}function al(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,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;e=i;i=i+24|0;f=e|0;g=e+16|0;h=g;j=a+4|0;k=c[j>>2]|0;if(!(k>>>0<b>>>0)){c[j>>2]=b;i=e;return}l=a+8|0;m=c[l>>2]|0;n=m<<5;o=b-k|0;do{if(o>>>0>n>>>0|k>>>0>(n-o|0)>>>0){p=f|0;c[p>>2]=0;q=f+4|0;c[q>>2]=0;r=f+8|0;c[r>>2]=0;if((b|0)<0){Nr(0)}if(n>>>0>1073741822>>>0){s=2147483647}else{t=m<<6;u=b+31&-32;s=t>>>0<u>>>0?u:t}hl(f,s);t=c[j>>2]|0;u=t+o|0;c[q>>2]=u;v=a|0;w=c[p>>2]|0;do{if((t|0)>0){x=c[v>>2]|0;y=t>>>5;fv(w|0,x|0,y<<2|0)|0;z=t-(y<<5)|0;A=w+(y<<2)|0;if((z|0)<=0){B=A;C=0;break}D=-1>>>((32-z|0)>>>0);c[A>>2]=c[A>>2]&~D|c[x+(y<<2)>>2]&D;B=A;C=z}else{B=w;C=0}}while(0);c[g>>2]=B;c[h+4>>2]=C;t=c[g>>2]|0;z=c[g+4>>2]|0;A=c[v>>2]|0;c[v>>2]=w;c[p>>2]=A;D=c[j>>2]|0;c[j>>2]=u;c[q>>2]=D;D=c[l>>2]|0;c[l>>2]=c[r>>2];c[r>>2]=D;if((A|0)==0){E=t;F=z;break}Pu(A);E=t;F=z}else{z=(c[a>>2]|0)+(k>>>5<<2)|0;c[j>>2]=b;E=z;F=k&31}}while(0);if((k|0)==(b|0)){i=e;return}b=(F|0)==0;if(d){if(b){G=o;H=E}else{d=32-F|0;k=d>>>0>o>>>0?o:d;c[E>>2]=c[E>>2]|-1>>>((d-k|0)>>>0)&-1<<F;G=o-k|0;H=E+4|0}k=G>>>5;dv(H|0,-1|0,k<<2|0)|0;d=k<<5;if((G|0)==(d|0)){i=e;return}j=H+(k<<2)|0;c[j>>2]=c[j>>2]|-1>>>((32-G+d|0)>>>0);i=e;return}else{if(b){I=o;J=E}else{b=32-F|0;d=b>>>0>o>>>0?o:b;c[E>>2]=c[E>>2]&~(-1>>>((b-d|0)>>>0)&-1<<F);I=o-d|0;J=E+4|0}E=I>>>5;dv(J|0,0,E<<2|0)|0;d=E<<5;if((I|0)==(d|0)){i=e;return}o=J+(E<<2)|0;c[o>>2]=c[o>>2]&~(-1>>>((32-I+d|0)>>>0));i=e;return}}function bl(b,d){b=b|0;d=d|0;var e=0,f=0;if((a[b|0]|0)!=0){e=(nd(d,2)|0)&255;a[b+1|0]=e;e=(nd(d,1)|0)&255;a[b+2|0]=e;e=nd(d,5)|0;c[b+4>>2]=e;e=0;f=(nd(d,1)|0)&255;do{a[b+8+e|0]=f;e=e+1|0;f=(nd(d,1)|0)&255}while((e|0)<32);a[b+40|0]=f;f=(nd(d,1)|0)&255;a[b+41|0]=f;f=(nd(d,1)|0)&255;a[b+42|0]=f;f=(nd(d,1)|0)&255;a[b+43|0]=f;od(d,44)}if((a[b+44|0]|0)==0){return}f=nd(d,8)|0;c[b+48>>2]=f;return}function cl(b,f){b=b|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0;g=i;i=i+8|0;h=g|0;if((f|0)==2){j=q}else if((f|0)==1){j=t}else{i=g;return}f=c[j>>2]|0;Zk(f,2952,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0);i=j;Zk(f,1624,(j=i,i=i+8|0,c[j>>2]=c[b>>2],j)|0);i=j;Zk(f,928,(j=i,i=i+8|0,c[j>>2]=c[b+4>>2],j)|0);i=j;k=b+8|0;Zk(f,296,(j=i,i=i+8|0,c[j>>2]=c[k>>2],j)|0);i=j;Zk(f,16768,(j=i,i=i+8|0,c[j>>2]=c[b+12>>2],j)|0);i=j;l=c[k>>2]|0;el(b+16|0,1,f);m=l-1|0;if((m|0)>0){l=0;do{Zk(f,6664,(j=i,i=i+8|0,c[j>>2]=l,j)|0);i=j;el(b+68+(l*52|0)|0,0,f);l=l+1|0;}while((l|0)<(m|0))}m=b+484|0;Zk(f,16272,(j=i,i=i+8|0,c[j>>2]=c[m>>2],j)|0);i=j;do{if((c[m>>2]|0)==0){Zk(f,14832,(j=i,i=i+8|0,c[j>>2]=c[b+488>>2],j)|0);i=j;Zk(f,14568,(j=i,i=i+8|0,c[j>>2]=c[b+492>>2],j)|0);i=j;Zk(f,14296,(j=i,i=i+8|0,c[j>>2]=c[b+496>>2],j)|0);i=j}else{if((c[k>>2]|0)>0){n=0}else{break}do{l=c[b+488+(n*12|0)>>2]|0;Zk(f,15912,(j=i,i=i+16|0,c[j>>2]=n,c[j+8>>2]=l,j)|0);i=j;Zk(f,15488,(j=i,i=i+8|0,c[j>>2]=c[b+488+(n*12|0)+4>>2],j)|0);i=j;Zk(f,15120,(j=i,i=i+8|0,c[j>>2]=c[b+488+(n*12|0)+8>>2],j)|0);i=j;n=n+1|0;}while((n|0)<(c[k>>2]|0))}}while(0);k=b+584|0;Zk(f,14056,(j=i,i=i+8|0,c[j>>2]=d[k]|0,j)|0);i=j;n=b+588|0;Zk(f,13768,(j=i,i=i+8|0,c[j>>2]=c[n>>2],j)|0);i=j;if((c[n>>2]|0)>=2){m=b+592|0;l=h|0;o=h+4|0;p=1;while(1){r=0;while(1){c[l>>2]=(c[(c[m>>2]|0)+(p*12|0)>>2]|0)+(r>>>5<<2);c[o>>2]=1<<(r&31);Zk(f,13560,(j=i,i=i+24|0,c[j>>2]=p,c[j+8>>2]=r,c[j+16>>2]=c[h>>2],c[j+20>>2]=c[h+4>>2],j)|0);i=j;if((r|0)<(d[k]|0)){r=r+1|0}else{break}}if((p|0)<((c[n>>2]|0)-1|0)){p=p+1|0}else{break}}}p=b+604|0;Zk(f,13368,(j=i,i=i+8|0,c[j>>2]=a[p]|0,j)|0);i=j;do{if((a[p]|0)!=0){Zk(f,13168,(j=i,i=i+8|0,c[j>>2]=c[b+608>>2],j)|0);i=j;Zk(f,12896,(j=i,i=i+8|0,c[j>>2]=c[b+612>>2],j)|0);i=j;n=b+616|0;Zk(f,12608,(j=i,i=i+8|0,c[j>>2]=a[n]|0,j)|0);i=j;if((a[n]|0)==0){break}Zk(f,12368,(j=i,i=i+8|0,c[j>>2]=c[b+620>>2],j)|0);i=j;n=b+624|0;Zk(f,12088,(j=i,i=i+8|0,c[j>>2]=c[n>>2],j)|0);i=j;if((c[n>>2]|0)<=0){break}n=e[c[b+628>>2]>>1]|0;Zk(f,11712,(j=i,i=i+16|0,c[j>>2]=0,c[j+8>>2]=n,j)|0);i=j;i=g;return}}while(0);Zk(f,11160,(j=i,i=i+8|0,c[j>>2]=a[b+652|0]|0,j)|0);i=j;i=g;return}function dl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;el(a|0,1,d);f=b-1|0;if((f|0)>0){g=0}else{i=e;return}do{Zk(d,6664,(b=i,i=i+8|0,c[b>>2]=g,b)|0);i=b;el(a+52+(g*52|0)|0,0,d);g=g+1|0;}while((g|0)<(f|0));i=e;return}function el(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0;f=i;g=d?10928:10664;if((a[b|0]|0)!=0){d=a[b+1|0]|0;Zk(e,10376,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=d,j)|0);i=j;d=a[b+2|0]|0;Zk(e,10032,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=d,j)|0);i=j;d=c[b+4>>2]|0;if((d|0)==3){k=5976}else if((d|0)==4){k=5792}else if((d|0)==2){k=6208}else if((d|0)==1){k=6328}else{k=5624}Zk(e,9680,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=k,j)|0);i=j;Zk(e,9288,(j=i,i=i+8|0,c[j>>2]=g,j)|0);i=j;k=0;do{if((k|0)!=0){Zk(e,9008,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0);i=j}Zk(e,8608,(j=i,i=i+8|0,c[j>>2]=a[b+8+k|0]|0,j)|0);i=j;k=k+1|0;}while((k|0)<32);Zk(e,8376,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0);i=j;k=a[b+40|0]|0;Zk(e,8112,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=k,j)|0);i=j;k=a[b+41|0]|0;Zk(e,7872,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=k,j)|0);i=j;k=a[b+42|0]|0;Zk(e,7600,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=k,j)|0);i=j;k=a[b+43|0]|0;Zk(e,7296,(j=i,i=i+16|0,c[j>>2]=g,c[j+8>>2]=k,j)|0);i=j}if((a[b+44|0]|0)==0){i=f;return}k=c[b+48>>2]|0;Zk(e,6960,(j=i,i=i+24|0,c[j>>2]=g,c[j+8>>2]=k,h[j+16>>3]=+(k|0)/30.0,j)|0);i=j;i=f;return}function fl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=b+8|0;f=b+4|0;g=c[f>>2]|0;h=c[e>>2]|0;i=g;if(!((h-i|0)>>>0<d>>>0)){j=d;k=g;do{if((k|0)==0){l=0}else{a[k]=0;l=c[f>>2]|0}k=l+1|0;c[f>>2]=k;j=j-1|0;}while((j|0)!=0);return}j=b|0;b=c[j>>2]|0;k=i-b|0;i=k+d|0;if((i|0)<0){Nr(0)}l=h-b|0;if(l>>>0<1073741823>>>0){b=l<<1;l=b>>>0<i>>>0?i:b;if((l|0)==0){m=0;n=0}else{o=l;p=9}}else{o=2147483647;p=9}if((p|0)==9){m=Nu(o)|0;n=o}o=d;d=m+k|0;do{if((d|0)==0){q=0}else{a[d]=0;q=d}d=q+1|0;o=o-1|0;}while((o|0)!=0);o=c[j>>2]|0;q=(c[f>>2]|0)-o|0;p=m+(k-q)|0;cv(p|0,o|0,q)|0;c[j>>2]=p;c[f>>2]=d;c[e>>2]=m+n;if((o|0)==0){return}Pu(o);return}function gl(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=a+8|0;f=a+4|0;g=c[f>>2]|0;h=c[e>>2]|0;i=g;if(!(h-i>>1>>>0<d>>>0)){j=d;k=g;while(1){if((k|0)!=0){b[k>>1]=0}l=j-1|0;if((l|0)==0){break}else{j=l;k=k+2|0}}c[f>>2]=g+(d<<1);return}g=a|0;a=c[g>>2]|0;k=a;j=i-k|0;i=j>>1;l=i+d|0;if((l|0)<0){Nr(0)}m=h-k|0;if(m>>1>>>0<1073741823>>>0){k=m>>>0<l>>>0?l:m;if((k|0)==0){n=0;o=0}else{p=k;q=10}}else{p=2147483647;q=10}if((q|0)==10){n=Nu(p<<1)|0;o=p}p=d;d=n+(i<<1)|0;while(1){if((d|0)!=0){b[d>>1]=0}i=p-1|0;if((i|0)==0){break}else{p=i;d=d+2|0}}d=a;cv(n|0,d|0,j)|0;c[g>>2]=n;c[f>>2]=n+(l<<1);c[e>>2]=n+(o<<1);if((a|0)==0){return}Pu(d);return}function hl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+32|0;e=d|0;f=d+8|0;g=d+16|0;h=a+8|0;if(!(c[h>>2]<<5>>>0<b>>>0)){i=d;return}if((b|0)<0){Nr(0)}j=((b-1|0)>>>5)+1|0;b=Nu(j<<2)|0;k=a|0;l=c[k>>2]|0;m=a+4|0;a=c[m>>2]|0;n=a>>>5;o=a&31;c[e>>2]=l;c[e+4>>2]=0;c[f>>2]=l+(n<<2);c[f+4>>2]=o;c[g>>2]=b;c[g+4>>2]=0;il(d+24|0,e,f,g);g=c[k>>2]|0;c[k>>2]=b;c[m>>2]=n<<5|o;c[h>>2]=j;if((g|0)==0){i=d;return}Pu(g);i=d;return}function il(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=b|0;g=c[f>>2]|0;h=c[b+4>>2]|0;b=(c[d+4>>2]|0)-h+((c[d>>2]|0)-g<<3)|0;if((b|0)<=0){i=c[e>>2]|0;j=a|0;c[j>>2]=i;k=a+4|0;l=e+4|0;m=c[l>>2]|0;c[k>>2]=m;return}if((h|0)==0){n=b;o=g;p=e|0}else{d=32-h|0;q=(b|0)<(d|0)?b:d;r=-1>>>((d-q|0)>>>0)&-1<<h;h=e|0;d=c[h>>2]|0;c[d>>2]=c[d>>2]&~r|c[g>>2]&r;r=e+4|0;g=(c[r>>2]|0)+q|0;c[h>>2]=d+(g>>>5<<2);c[r>>2]=g&31;g=(c[f>>2]|0)+4|0;c[f>>2]=g;n=b-q|0;o=g;p=h}h=n>>>5;fv(c[p>>2]|0,o|0,h<<2|0)|0;o=n-(h<<5)|0;n=(c[p>>2]|0)+(h<<2)|0;c[p>>2]=n;if((o|0)<=0){i=n;j=a|0;c[j>>2]=i;k=a+4|0;l=e+4|0;m=c[l>>2]|0;c[k>>2]=m;return}n=(c[f>>2]|0)+(h<<2)|0;c[f>>2]=n;f=-1>>>((32-o|0)>>>0);h=c[p>>2]|0;c[h>>2]=c[h>>2]&~f|c[n>>2]&f;c[e+4>>2]=o;i=h;j=a|0;c[j>>2]=i;k=a+4|0;l=e+4|0;m=c[l>>2]|0;c[k>>2]=m;return}function jl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=a+4|0;f=c[e>>2]|0;g=c[d>>2]|0;h=f;if(!(((g-h|0)/12|0)>>>0<b>>>0)){i=b;j=f;do{if((j|0)==0){k=0}else{c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;k=c[e>>2]|0}j=k+12|0;c[e>>2]=j;i=i-1|0;}while((i|0)!=0);return}i=a|0;a=c[i>>2]|0;j=(h-a|0)/12|0;h=j+b|0;if(h>>>0>357913941>>>0){Nr(0)}k=(g-a|0)/12|0;if(k>>>0<178956970>>>0){a=k<<1;k=a>>>0<h>>>0?h:a;if((k|0)==0){l=0;m=0}else{n=k;o=9}}else{n=357913941;o=9}if((o|0)==9){l=Nu(n*12|0)|0;m=n}n=l+(j*12|0)|0;o=b;b=n;do{if((b|0)==0){p=0}else{c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;p=b}b=p+12|0;o=o-1|0;}while((o|0)!=0);o=l+(m*12|0)|0;m=c[i>>2]|0;p=c[e>>2]|0;do{if((p|0)==(m|0)){c[i>>2]=n;c[e>>2]=b;c[d>>2]=o;q=m}else{k=j-1-(((p-12+(-m|0)|0)>>>0)/12|0)|0;a=p;h=n;while(1){g=a-12|0;f=g|0;c[h-12>>2]=c[f>>2];r=a-12+4|0;c[h-12+4>>2]=c[r>>2];s=a-12+8|0;c[h-12+8>>2]=c[s>>2];c[f>>2]=0;c[r>>2]=0;c[s>>2]=0;if((g|0)==(m|0)){break}else{a=g;h=h-12|0}}h=c[i>>2]|0;a=c[e>>2]|0;c[i>>2]=l+(k*12|0);c[e>>2]=b;c[d>>2]=o;if((a|0)==(h|0)){q=h;break}else{t=a}while(1){a=t-12|0;g=c[a>>2]|0;if((g|0)!=0){Pu(g)}if((a|0)==(h|0)){q=h;break}else{t=a}}}}while(0);if((q|0)==0){return}Pu(q);return}function kl(d){d=d|0;a[d|0]=0;dv(d+2|0,0,7)|0;c[d+12>>2]=5;a[d+16|0]=0;a[d+17|0]=0;a[d+18|0]=2;a[d+19|0]=2;a[d+20|0]=2;c[d+48>>2]=0;c[d+52>>2]=0;a[d+56|0]=0;dv(d+21|0,0,24)|0;c[d+60>>2]=1;a[d+64|0]=0;a[d+65|0]=0;a[d+66|0]=0;a[d+67|0]=1;a[d+68|0]=0;b[d+70>>1]=0;a[d+72|0]=2;a[d+73|0]=1;a[d+74|0]=15;a[d+75|0]=15;return}function ll(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=(nd(f,1)|0)!=0;a[d|0]=g&1;do{if(g){h=nd(f,8)|0;if((h|0)<18){b[d+2>>1]=b[30800+(h<<2)>>1]|0;b[d+4>>1]=b[30802+(h<<2)>>1]|0;break}if((h|0)==255){h=(nd(f,16)|0)&65535;b[d+2>>1]=h;h=(nd(f,16)|0)&65535;b[d+4>>1]=h;break}else{b[d+2>>1]=0;b[d+4>>1]=0;break}}else{b[d+2>>1]=0;b[d+4>>1]=0}}while(0);g=(nd(f,1)|0)!=0;a[d+6|0]=g&1;if(g){g=(nd(f,1)|0)!=0|0;a[d+7|0]=g}g=d+12|0;c[g>>2]=5;h=d+16|0;a[h]=0;i=d+18|0;a[i]=2;j=d+19|0;a[j]=2;k=d+20|0;a[k]=2;l=(nd(f,1)|0)!=0;a[d+8|0]=l&1;do{if(l){m=nd(f,3)|0;c[g>>2]=(m|0)>5?5:m;m=(nd(f,1)|0)!=0|0;a[h]=m;m=(nd(f,1)|0)!=0;a[d+17|0]=m&1;if(!m){break}m=nd(f,8)|0;a[i]=m;n=m&255;if((n|0)==0|(n|0)==3){o=14}else{if(n>>>0>10>>>0){o=14}}if((o|0)==14){a[i]=2}n=nd(f,8)|0;a[j]=n;m=n&255;if((m|0)==0|(m|0)==3){o=17}else{if(m>>>0>17>>>0){o=17}}if((o|0)==17){a[j]=2}m=nd(f,8)|0;n=m&255;a[k]=(n|0)==0|n>>>0>10>>>0?2:m&255}}while(0);k=(nd(f,1)|0)!=0;a[d+21|0]=k&1;do{if(k){j=qd(f)|0;if((j|0)==-99999){Ue(e,8,0);p=8;return p|0}a[d+22|0]=j;j=qd(f)|0;if(!((j|0)==-99999)){a[d+23|0]=j;break}Ue(e,8,0);p=8;return p|0}else{a[d+22|0]=0;a[d+23|0]=0}}while(0);k=(nd(f,1)|0)!=0|0;a[d+24|0]=k;k=(nd(f,1)|0)!=0|0;a[d+25|0]=k;k=(nd(f,1)|0)!=0|0;a[d+26|0]=k;k=(nd(f,1)|0)!=0;a[d+27|0]=k&1;do{if(k){j=qd(f)|0;if((j|0)==-99999){Ue(e,8,0);p=8;return p|0}c[d+28>>2]=j;j=qd(f)|0;if((j|0)==-99999){Ue(e,8,0);p=8;return p|0}c[d+32>>2]=j;j=qd(f)|0;if((j|0)==-99999){Ue(e,8,0);p=8;return p|0}c[d+36>>2]=j;j=qd(f)|0;if(!((j|0)==-99999)){c[d+40>>2]=j;break}Ue(e,8,0);p=8;return p|0}else{dv(d+28|0,0,16)|0}}while(0);k=(nd(f,1)|0)!=0;a[d+44|0]=k&1;if(k){k=nd(f,32)|0;c[d+48>>2]=k;k=nd(f,32)|0;c[d+52>>2]=k}k=(nd(f,1)|0)!=0|0;a[d+56|0]=k;k=qd(f)|0;if((k|0)==-99999){Ue(e,8,0);p=8;return p|0}c[d+60>>2]=k+1;k=(nd(f,1)|0)!=0;a[d+64|0]=k&1;if(k){p=502;return p|0}k=(nd(f,1)|0)!=0;a[d+65|0]=k&1;if(!k){a[d+66|0]=0;a[d+67|0]=1;a[d+68|0]=0;b[d+70>>1]=0;a[d+72|0]=2;a[d+73|0]=1;a[d+74|0]=15;a[d+75|0]=15;p=0;return p|0}k=(nd(f,1)|0)!=0|0;a[d+66|0]=k;k=(nd(f,1)|0)!=0|0;a[d+67|0]=k;k=(nd(f,1)|0)!=0|0;a[d+68|0]=k;k=qd(f)|0;if((k|0)==-99999){Ue(e,8,0);p=8;return p|0}j=d+70|0;b[j>>1]=k;if((k&61440)>>>0>4095>>>0){Ue(e,8,0);b[j>>1]=0}j=qd(f)|0;if((j|0)==-99999){Ue(e,8,0);p=8;return p|0}k=d+72|0;a[k]=j;if((j&255)>>>0>16>>>0){Ue(e,8,0);a[k]=2}k=qd(f)|0;if((k|0)==-99999){Ue(e,8,0);p=8;return p|0}j=d+73|0;a[j]=k;if((k&255)>>>0>16>>>0){Ue(e,8,0);a[j]=1}j=qd(f)|0;if((j|0)==-99999){Ue(e,8,0);p=8;return p|0}k=d+74|0;a[k]=j;if((j&240)>>>0>15>>>0){Ue(e,8,0);a[k]=15}k=qd(f)|0;if((k|0)==-99999){Ue(e,8,0);p=8;return p|0}f=d+75|0;a[f]=k;if(!((k&240)>>>0>15>>>0)){p=0;return p|0}Ue(e,8,0);a[f]=15;p=0;return p|0}function ml(b,f){b=b|0;f=f|0;var g=0,h=0,j=0,k=0;g=i;if((f|0)==2){h=q}else if((f|0)==1){h=t}else{i=g;return}f=c[h>>2]|0;Zk(f,2832,(h=i,i=i+1|0,i=i+7&-8,c[h>>2]=0,h)|0);i=h;j=e[b+4>>1]|0;Zk(f,1504,(h=i,i=i+16|0,c[h>>2]=e[b+2>>1]|0,c[h+8>>2]=j,h)|0);i=h;Zk(f,856,(h=i,i=i+8|0,c[h>>2]=d[b+6|0]|0,h)|0);i=h;Zk(f,248,(h=i,i=i+8|0,c[h>>2]=d[b+7|0]|0,h)|0);i=h;j=b+8|0;Zk(f,16688,(h=i,i=i+8|0,c[h>>2]=d[j]|0,h)|0);i=h;if((a[j]|0)!=0){switch(c[b+12>>2]|0){case 2:{k=11320;break};case 3:{k=8288;break};case 1:{k=13944;break};case 4:{k=5936;break};case 0:{k=672;break};default:{k=4136}}Zk(f,16216,(h=i,i=i+8|0,c[h>>2]=k,h)|0);i=h;Zk(f,15832,(h=i,i=i+8|0,c[h>>2]=d[b+16|0]|0,h)|0);i=h;Zk(f,15432,(h=i,i=i+8|0,c[h>>2]=d[b+17|0]|0,h)|0);i=h;Zk(f,15080,(h=i,i=i+8|0,c[h>>2]=d[b+18|0]|0,h)|0);i=h;Zk(f,14792,(h=i,i=i+8|0,c[h>>2]=d[b+19|0]|0,h)|0);i=h;Zk(f,14488,(h=i,i=i+8|0,c[h>>2]=d[b+20|0]|0,h)|0);i=h}k=b+21|0;Zk(f,14232,(h=i,i=i+8|0,c[h>>2]=d[k]|0,h)|0);i=h;if((a[k]|0)!=0){Zk(f,14008,(h=i,i=i+8|0,c[h>>2]=d[b+22|0]|0,h)|0);i=h;Zk(f,13720,(h=i,i=i+8|0,c[h>>2]=d[b+23|0]|0,h)|0);i=h}Zk(f,13520,(h=i,i=i+8|0,c[h>>2]=d[b+24|0]|0,h)|0);i=h;Zk(f,13328,(h=i,i=i+8|0,c[h>>2]=d[b+25|0]|0,h)|0);i=h;Zk(f,13120,(h=i,i=i+8|0,c[h>>2]=d[b+26|0]|0,h)|0);i=h;Zk(f,12856,(h=i,i=i+8|0,c[h>>2]=d[b+27|0]|0,h)|0);i=h;Zk(f,12568,(h=i,i=i+8|0,c[h>>2]=c[b+28>>2],h)|0);i=h;Zk(f,12328,(h=i,i=i+8|0,c[h>>2]=c[b+32>>2],h)|0);i=h;Zk(f,12048,(h=i,i=i+8|0,c[h>>2]=c[b+36>>2],h)|0);i=h;Zk(f,11664,(h=i,i=i+8|0,c[h>>2]=c[b+40>>2],h)|0);i=h;k=b+44|0;Zk(f,11392,(h=i,i=i+8|0,c[h>>2]=d[k]|0,h)|0);i=h;if((a[k]|0)!=0){Zk(f,11120,(h=i,i=i+8|0,c[h>>2]=c[b+48>>2],h)|0);i=h;Zk(f,10888,(h=i,i=i+8|0,c[h>>2]=c[b+52>>2],h)|0);i=h}Zk(f,10616,(h=i,i=i+8|0,c[h>>2]=d[b+56|0]|0,h)|0);i=h;Zk(f,10328,(h=i,i=i+8|0,c[h>>2]=c[b+60>>2],h)|0);i=h;Zk(f,9992,(h=i,i=i+8|0,c[h>>2]=d[b+64|0]|0,h)|0);i=h;k=b+65|0;Zk(f,9632,(h=i,i=i+8|0,c[h>>2]=d[k]|0,h)|0);i=h;if((a[k]|0)==0){i=g;return}Zk(f,9240,(h=i,i=i+8|0,c[h>>2]=d[b+66|0]|0,h)|0);i=h;Zk(f,8960,(h=i,i=i+8|0,c[h>>2]=d[b+67|0]|0,h)|0);i=h;Zk(f,8560,(h=i,i=i+8|0,c[h>>2]=d[b+68|0]|0,h)|0);i=h;Zk(f,8328,(h=i,i=i+8|0,c[h>>2]=e[b+70>>1]|0,h)|0);i=h;Zk(f,8064,(h=i,i=i+8|0,c[h>>2]=d[b+72|0]|0,h)|0);i=h;Zk(f,7824,(h=i,i=i+8|0,c[h>>2]=d[b+73|0]|0,h)|0);i=h;Zk(f,7552,(h=i,i=i+8|0,c[h>>2]=d[b+74|0]|0,h)|0);i=h;Zk(f,7248,(h=i,i=i+8|0,c[h>>2]=d[b+75|0]|0,h)|0);i=h;i=g;return}function nl(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+32|0;d=b|0;e=b+8|0;f=b+16|0;g=b+24|0;h=c[o>>2]|0;Jl(34232,h,34360);c[8806]=21516;c[8808]=21536;c[8807]=0;Mm(35232,34232);c[8826]=0;c[8827]=-1;j=c[t>>2]|0;c[8534]=21296;Tr(34140);dv(34144,0,24)|0;c[8534]=21664;c[8542]=j;Ur(g,34140);k=Wr(g,34560)|0;l=k;Vr(g);c[8543]=l;c[8544]=34368;g=(Fc[c[(c[k>>2]|0)+28>>2]&255](l)|0)&1;a[34180]=g;c[8740]=21420;c[8741]=21440;Mm(34964,34136);c[8759]=0;c[8760]=-1;g=c[q>>2]|0;c[8546]=21296;Tr(34188);dv(34192,0,24)|0;c[8546]=21664;c[8554]=g;Ur(f,34188);l=Wr(f,34560)|0;k=l;Vr(f);c[8555]=k;c[8556]=34376;f=(Fc[c[(c[l>>2]|0)+28>>2]&255](k)|0)&1;a[34228]=f;c[8784]=21420;c[8785]=21440;Mm(35140,34184);c[8803]=0;c[8804]=-1;f=c[(c[(c[8784]|0)-12>>2]|0)+35160>>2]|0;c[8762]=21420;c[8763]=21440;Mm(35052,f);c[8781]=0;c[8782]=-1;c[(c[(c[8806]|0)-12>>2]|0)+35296>>2]=34960;f=(c[(c[8784]|0)-12>>2]|0)+35140|0;c[f>>2]=c[f>>2]|8192;c[(c[(c[8784]|0)-12>>2]|0)+35208>>2]=34960;vl(34080,h,34384);c[8718]=21468;c[8720]=21488;c[8719]=0;Mm(34880,34080);c[8738]=0;c[8739]=-1;c[8496]=21224;Tr(33988);dv(33992,0,24)|0;c[8496]=21592;c[8504]=j;Ur(e,33988);j=Wr(e,34552)|0;h=j;Vr(e);c[8505]=h;c[8506]=34392;e=(Fc[c[(c[j>>2]|0)+28>>2]&255](h)|0)&1;a[34028]=e;c[8648]=21372;c[8649]=21392;Mm(34596,33984);c[8667]=0;c[8668]=-1;c[8508]=21224;Tr(34036);dv(34040,0,24)|0;c[8508]=21592;c[8516]=g;Ur(d,34036);g=Wr(d,34552)|0;e=g;Vr(d);c[8517]=e;c[8518]=34400;d=(Fc[c[(c[g>>2]|0)+28>>2]&255](e)|0)&1;a[34076]=d;c[8692]=21372;c[8693]=21392;Mm(34772,34032);c[8711]=0;c[8712]=-1;d=c[(c[(c[8692]|0)-12>>2]|0)+34792>>2]|0;c[8670]=21372;c[8671]=21392;Mm(34684,d);c[8689]=0;c[8690]=-1;c[(c[(c[8718]|0)-12>>2]|0)+34944>>2]=34592;d=(c[(c[8692]|0)-12>>2]|0)+34772|0;c[d>>2]=c[d>>2]|8192;c[(c[(c[8692]|0)-12>>2]|0)+34840>>2]=34592;i=b;return}function ol(a){a=a|0;sn(34960)|0;sn(35048)|0;xn(34592)|0;xn(34680)|0;return}function pl(a){a=a|0;c[a>>2]=21224;Vr(a+4|0);return}function ql(a){a=a|0;c[a>>2]=21224;Vr(a+4|0);Pu(a);return}function rl(b,d){b=b|0;d=d|0;var e=0,f=0;Fc[c[(c[b>>2]|0)+24>>2]&255](b)|0;e=Wr(d,34552)|0;d=e;c[b+36>>2]=d;f=(Fc[c[(c[e>>2]|0)+28>>2]&255](d)|0)&1;a[b+44|0]=f;return}function sl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;i=i+16|0;d=b|0;e=b+8|0;f=a+36|0;g=a+40|0;h=d|0;j=d+8|0;k=d;d=a+32|0;while(1){a=c[f>>2]|0;l=Gc[c[(c[a>>2]|0)+20>>2]&31](a,c[g>>2]|0,h,j,e)|0;a=(c[e>>2]|0)-k|0;if((Oa(h|0,1,a|0,c[d>>2]|0)|0)!=(a|0)){m=-1;n=5;break}if((l|0)==2){m=-1;n=5;break}else if((l|0)!=1){n=4;break}}if((n|0)==4){m=((Ma(c[d>>2]|0)|0)!=0)<<31>>31;i=b;return m|0}else if((n|0)==5){i=b;return m|0}return 0}function tl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((a[b+44|0]|0)!=0){f=Oa(d|0,4,e|0,c[b+32>>2]|0)|0;return f|0}g=b;if((e|0)>0){h=d;i=0}else{f=0;return f|0}while(1){if((Qc[c[(c[g>>2]|0)+52>>2]&63](b,c[h>>2]|0)|0)==-1){f=i;j=6;break}d=i+1|0;if((d|0)<(e|0)){h=h+4|0;i=d}else{f=d;j=6;break}}if((j|0)==6){return f|0}return 0}function ul(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=i;i=i+32|0;f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=(d|0)==-1;a:do{if(!k){c[g>>2]=d;if((a[b+44|0]|0)!=0){if((Oa(g|0,4,1,c[b+32>>2]|0)|0)==1){break}else{l=-1}i=e;return l|0}m=f|0;c[h>>2]=m;n=g+4|0;o=b+36|0;p=b+40|0;q=f+8|0;r=f;s=b+32|0;t=g;while(1){u=c[o>>2]|0;v=Vc[c[(c[u>>2]|0)+12>>2]&31](u,c[p>>2]|0,t,n,j,m,q,h)|0;if((c[j>>2]|0)==(t|0)){l=-1;w=12;break}if((v|0)==3){w=7;break}u=(v|0)==1;if(!(v>>>0<2>>>0)){l=-1;w=12;break}v=(c[h>>2]|0)-r|0;if((Oa(m|0,1,v|0,c[s>>2]|0)|0)!=(v|0)){l=-1;w=12;break}if(u){t=u?c[j>>2]|0:t}else{break a}}if((w|0)==7){if((Oa(t|0,1,1,c[s>>2]|0)|0)==1){break}else{l=-1}i=e;return l|0}else if((w|0)==12){i=e;return l|0}}}while(0);l=k?0:d;i=e;return l|0}function vl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+8|0;g=f|0;h=b|0;c[h>>2]=21224;j=b+4|0;Tr(j);dv(b+8|0,0,24)|0;c[h>>2]=21992;c[b+32>>2]=d;c[b+40>>2]=e;c[b+48>>2]=-1;a[b+52|0]=0;Ur(g,j);j=Wr(g,34552)|0;e=j;d=b+36|0;c[d>>2]=e;h=Fc[c[(c[j>>2]|0)+24>>2]&255](e)|0;e=b+44|0;c[e>>2]=h;h=c[d>>2]|0;d=(Fc[c[(c[h>>2]|0)+28>>2]&255](h)|0)&1;a[b+53|0]=d;if((c[e>>2]|0)<=8){Vr(g);i=f;return}dr(736);Vr(g);i=f;return}function wl(a){a=a|0;c[a>>2]=21224;Vr(a+4|0);return}function xl(a){a=a|0;c[a>>2]=21224;Vr(a+4|0);Pu(a);return}function yl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=Wr(d,34552)|0;d=e;f=b+36|0;c[f>>2]=d;g=Fc[c[(c[e>>2]|0)+24>>2]&255](d)|0;d=b+44|0;c[d>>2]=g;g=c[f>>2]|0;f=(Fc[c[(c[g>>2]|0)+28>>2]&255](g)|0)&1;a[b+53|0]=f;if((c[d>>2]|0)<=8){return}dr(736);return}function zl(a){a=a|0;return Cl(a,0)|0}function Al(a){a=a|0;return Cl(a,1)|0}function Bl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+32|0;f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=b+52|0;l=(a[k]|0)!=0;if((d|0)==-1){if(l){m=-1;i=e;return m|0}n=c[b+48>>2]|0;a[k]=(n|0)!=-1|0;m=n;i=e;return m|0}n=b+48|0;a:do{if(l){c[h>>2]=c[n>>2];o=c[b+36>>2]|0;p=f|0;q=Vc[c[(c[o>>2]|0)+12>>2]&31](o,c[b+40>>2]|0,h,h+4|0,j,p,f+8|0,g)|0;if((q|0)==3){a[p]=c[n>>2];c[g>>2]=f+1}else if((q|0)==2|(q|0)==1){m=-1;i=e;return m|0}q=b+32|0;while(1){o=c[g>>2]|0;if(!(o>>>0>p>>>0)){break a}r=o-1|0;c[g>>2]=r;if(($b(a[r]|0,c[q>>2]|0)|0)==-1){m=-1;break}}i=e;return m|0}}while(0);c[n>>2]=d;a[k]=1;m=d;i=e;return m|0}function Cl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;i=i+32|0;f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=b+52|0;if((a[k]|0)!=0){l=b+48|0;m=c[l>>2]|0;if(!d){n=m;i=e;return n|0}c[l>>2]=-1;a[k]=0;n=m;i=e;return n|0}m=c[b+44>>2]|0;k=(m|0)>1?m:1;a:do{if((k|0)>0){m=b+32|0;l=0;while(1){o=eb(c[m>>2]|0)|0;if((o|0)==-1){n=-1;break}a[f+l|0]=o;l=l+1|0;if((l|0)>=(k|0)){break a}}i=e;return n|0}}while(0);b:do{if((a[b+53|0]|0)==0){l=b+40|0;m=b+36|0;o=f|0;p=g+4|0;q=b+32|0;r=k;while(1){s=c[l>>2]|0;t=s;u=c[t>>2]|0;v=c[t+4>>2]|0;t=c[m>>2]|0;w=f+r|0;x=Vc[c[(c[t>>2]|0)+16>>2]&31](t,s,o,w,h,g,p,j)|0;if((x|0)==3){y=14;break}else if((x|0)==2){n=-1;y=22;break}else if((x|0)!=1){z=r;break b}x=c[l>>2]|0;c[x>>2]=u;c[x+4>>2]=v;if((r|0)==8){n=-1;y=22;break}v=eb(c[q>>2]|0)|0;if((v|0)==-1){n=-1;y=22;break}a[w]=v;r=r+1|0}if((y|0)==14){c[g>>2]=a[o]|0;z=r;break}else if((y|0)==22){i=e;return n|0}}else{c[g>>2]=a[f|0]|0;z=k}}while(0);if(d){d=c[g>>2]|0;c[b+48>>2]=d;n=d;i=e;return n|0}d=b+32|0;b=z;while(1){if((b|0)<=0){break}z=b-1|0;if(($b(a[f+z|0]|0,c[d>>2]|0)|0)==-1){n=-1;y=22;break}else{b=z}}if((y|0)==22){i=e;return n|0}n=c[g>>2]|0;i=e;return n|0}function Dl(a){a=a|0;c[a>>2]=21296;Vr(a+4|0);return}function El(a){a=a|0;c[a>>2]=21296;Vr(a+4|0);Pu(a);return}function Fl(b,d){b=b|0;d=d|0;var e=0,f=0;Fc[c[(c[b>>2]|0)+24>>2]&255](b)|0;e=Wr(d,34560)|0;d=e;c[b+36>>2]=d;f=(Fc[c[(c[e>>2]|0)+28>>2]&255](d)|0)&1;a[b+44|0]=f;return}function Gl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;i=i+16|0;d=b|0;e=b+8|0;f=a+36|0;g=a+40|0;h=d|0;j=d+8|0;k=d;d=a+32|0;while(1){a=c[f>>2]|0;l=Gc[c[(c[a>>2]|0)+20>>2]&31](a,c[g>>2]|0,h,j,e)|0;a=(c[e>>2]|0)-k|0;if((Oa(h|0,1,a|0,c[d>>2]|0)|0)!=(a|0)){m=-1;n=5;break}if((l|0)==2){m=-1;n=5;break}else if((l|0)!=1){n=4;break}}if((n|0)==4){m=((Ma(c[d>>2]|0)|0)!=0)<<31>>31;i=b;return m|0}else if((n|0)==5){i=b;return m|0}return 0}function Hl(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;if((a[b+44|0]|0)!=0){g=Oa(e|0,1,f|0,c[b+32>>2]|0)|0;return g|0}h=b;if((f|0)>0){i=e;j=0}else{g=0;return g|0}while(1){if((Qc[c[(c[h>>2]|0)+52>>2]&63](b,d[i]|0)|0)==-1){g=j;k=6;break}e=j+1|0;if((e|0)<(f|0)){i=i+1|0;j=e}else{g=e;k=6;break}}if((k|0)==6){return g|0}return 0}function Il(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=i;i=i+32|0;f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=(d|0)==-1;a:do{if(!k){a[g]=d;if((a[b+44|0]|0)!=0){if((Oa(g|0,1,1,c[b+32>>2]|0)|0)==1){break}else{l=-1}i=e;return l|0}m=f|0;c[h>>2]=m;n=g+1|0;o=b+36|0;p=b+40|0;q=f+8|0;r=f;s=b+32|0;t=g;while(1){u=c[o>>2]|0;v=Vc[c[(c[u>>2]|0)+12>>2]&31](u,c[p>>2]|0,t,n,j,m,q,h)|0;if((c[j>>2]|0)==(t|0)){l=-1;w=12;break}if((v|0)==3){w=7;break}u=(v|0)==1;if(!(v>>>0<2>>>0)){l=-1;w=12;break}v=(c[h>>2]|0)-r|0;if((Oa(m|0,1,v|0,c[s>>2]|0)|0)!=(v|0)){l=-1;w=12;break}if(u){t=u?c[j>>2]|0:t}else{break a}}if((w|0)==7){if((Oa(t|0,1,1,c[s>>2]|0)|0)==1){break}else{l=-1}i=e;return l|0}else if((w|0)==12){i=e;return l|0}}}while(0);l=k?0:d;i=e;return l|0}function Jl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+8|0;g=f|0;h=b|0;c[h>>2]=21296;j=b+4|0;Tr(j);dv(b+8|0,0,24)|0;c[h>>2]=22064;c[b+32>>2]=d;c[b+40>>2]=e;c[b+48>>2]=-1;a[b+52|0]=0;Ur(g,j);j=Wr(g,34560)|0;e=j;d=b+36|0;c[d>>2]=e;h=Fc[c[(c[j>>2]|0)+24>>2]&255](e)|0;e=b+44|0;c[e>>2]=h;h=c[d>>2]|0;d=(Fc[c[(c[h>>2]|0)+28>>2]&255](h)|0)&1;a[b+53|0]=d;if((c[e>>2]|0)<=8){Vr(g);i=f;return}dr(736);Vr(g);i=f;return}function Kl(a){a=a|0;c[a>>2]=21296;Vr(a+4|0);return}function Ll(a){a=a|0;c[a>>2]=21296;Vr(a+4|0);Pu(a);return}function Ml(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=Wr(d,34560)|0;d=e;f=b+36|0;c[f>>2]=d;g=Fc[c[(c[e>>2]|0)+24>>2]&255](d)|0;d=b+44|0;c[d>>2]=g;g=c[f>>2]|0;f=(Fc[c[(c[g>>2]|0)+28>>2]&255](g)|0)&1;a[b+53|0]=f;if((c[d>>2]|0)<=8){return}dr(736);return}function Nl(a){a=a|0;return Ql(a,0)|0}function Ol(a){a=a|0;return Ql(a,1)|0}function Pl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+32|0;f=e|0;g=e+8|0;h=e+16|0;j=e+24|0;k=b+52|0;l=(a[k]|0)!=0;if((d|0)==-1){if(l){m=-1;i=e;return m|0}n=c[b+48>>2]|0;a[k]=(n|0)!=-1|0;m=n;i=e;return m|0}n=b+48|0;a:do{if(l){a[h]=c[n>>2];o=c[b+36>>2]|0;p=f|0;q=Vc[c[(c[o>>2]|0)+12>>2]&31](o,c[b+40>>2]|0,h,h+1|0,j,p,f+8|0,g)|0;if((q|0)==2|(q|0)==1){m=-1;i=e;return m|0}else if((q|0)==3){a[p]=c[n>>2];c[g>>2]=f+1}q=b+32|0;while(1){o=c[g>>2]|0;if(!(o>>>0>p>>>0)){break a}r=o-1|0;c[g>>2]=r;if(($b(a[r]|0,c[q>>2]|0)|0)==-1){m=-1;break}}i=e;return m|0}}while(0);c[n>>2]=d;a[k]=1;m=d;i=e;return m|0}function Ql(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;f=i;i=i+32|0;g=f|0;h=f+8|0;j=f+16|0;k=f+24|0;l=b+52|0;if((a[l]|0)!=0){m=b+48|0;n=c[m>>2]|0;if(!e){o=n;i=f;return o|0}c[m>>2]=-1;a[l]=0;o=n;i=f;return o|0}n=c[b+44>>2]|0;l=(n|0)>1?n:1;a:do{if((l|0)>0){n=b+32|0;m=0;while(1){p=eb(c[n>>2]|0)|0;if((p|0)==-1){o=-1;break}a[g+m|0]=p;m=m+1|0;if((m|0)>=(l|0)){break a}}i=f;return o|0}}while(0);b:do{if((a[b+53|0]|0)==0){m=b+40|0;n=b+36|0;p=g|0;q=h+1|0;r=b+32|0;s=l;while(1){t=c[m>>2]|0;u=t;v=c[u>>2]|0;w=c[u+4>>2]|0;u=c[n>>2]|0;x=g+s|0;y=Vc[c[(c[u>>2]|0)+16>>2]&31](u,t,p,x,j,h,q,k)|0;if((y|0)==3){z=14;break}else if((y|0)==2){o=-1;z=23;break}else if((y|0)!=1){A=s;break b}y=c[m>>2]|0;c[y>>2]=v;c[y+4>>2]=w;if((s|0)==8){o=-1;z=23;break}w=eb(c[r>>2]|0)|0;if((w|0)==-1){o=-1;z=23;break}a[x]=w;s=s+1|0}if((z|0)==14){a[h]=a[p]|0;A=s;break}else if((z|0)==23){i=f;return o|0}}else{a[h]=a[g|0]|0;A=l}}while(0);do{if(e){l=a[h]|0;c[b+48>>2]=l&255;B=l}else{l=b+32|0;k=A;while(1){if((k|0)<=0){z=21;break}j=k-1|0;if(($b(d[g+j|0]|0,c[l>>2]|0)|0)==-1){o=-1;z=23;break}else{k=j}}if((z|0)==21){B=a[h]|0;break}else if((z|0)==23){i=f;return o|0}}}while(0);o=B&255;i=f;return o|0}function Rl(){nl(0);Ub(164,35312,u|0)|0;return}function Sl(a){a=a|0;return}function Tl(a){a=a|0;var b=0;b=a+4|0;I=c[b>>2]|0,c[b>>2]=I+1,I;return}function Ul(a){a=a|0;var b=0,d=0;b=a+4|0;if(((I=c[b>>2]|0,c[b>>2]=I+ -1,I)|0)!=0){d=0;return d|0}Dc[c[(c[a>>2]|0)+8>>2]&511](a);d=1;return d|0}function Vl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=19600;d=ev(b|0)|0;e=Ou(d+13|0)|0;c[e+4>>2]=d;c[e>>2]=d;f=e+12|0;c[a+4>>2]=f;c[e+8>>2]=0;cv(f|0,b|0,d+1|0)|0;return}function Wl(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=19600;b=a+4|0;d=(c[b>>2]|0)-4|0;if(((I=c[d>>2]|0,c[d>>2]=I+ -1,I)-1|0)>=0){e=a|0;f=a;Pu(f);return}Qu((c[b>>2]|0)-12|0);e=a|0;f=a;Pu(f);return}function Xl(a){a=a|0;var b=0,d=0,e=0;c[a>>2]=19600;b=a+4|0;d=(c[b>>2]|0)-4|0;if(((I=c[d>>2]|0,c[d>>2]=I+ -1,I)-1|0)>=0){e=a|0;return}Qu((c[b>>2]|0)-12|0);e=a|0;return}function Yl(a){a=a|0;return c[a+4>>2]|0}function Zl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;c[b>>2]=19536;if((a[d]&1)==0){e=d+1|0}else{e=c[d+8>>2]|0}d=ev(e|0)|0;f=Ou(d+13|0)|0;c[f+4>>2]=d;c[f>>2]=d;g=f+12|0;c[b+4>>2]=g;c[f+8>>2]=0;cv(g|0,e|0,d+1|0)|0;return}function _l(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a>>2]=19536;d=ev(b|0)|0;e=Ou(d+13|0)|0;c[e+4>>2]=d;c[e>>2]=d;f=e+12|0;c[a+4>>2]=f;c[e+8>>2]=0;cv(f|0,b|0,d+1|0)|0;return}function $l(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=19536;b=a+4|0;d=(c[b>>2]|0)-4|0;if(((I=c[d>>2]|0,c[d>>2]=I+ -1,I)-1|0)>=0){e=a|0;f=a;Pu(f);return}Qu((c[b>>2]|0)-12|0);e=a|0;f=a;Pu(f);return}function am(a){a=a|0;var b=0,d=0,e=0;c[a>>2]=19536;b=a+4|0;d=(c[b>>2]|0)-4|0;if(((I=c[d>>2]|0,c[d>>2]=I+ -1,I)-1|0)>=0){e=a|0;return}Qu((c[b>>2]|0)-12|0);e=a|0;return}function bm(a){a=a|0;return c[a+4>>2]|0}function cm(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=19600;b=a+4|0;d=(c[b>>2]|0)-4|0;if(((I=c[d>>2]|0,c[d>>2]=I+ -1,I)-1|0)>=0){e=a|0;f=a;Pu(f);return}Qu((c[b>>2]|0)-12|0);e=a|0;f=a;Pu(f);return}function dm(a){a=a|0;return}function em(a,b,d){a=a|0;b=b|0;d=d|0;c[a>>2]=d;c[a+4>>2]=b;return}function fm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+8|0;f=e|0;Tc[c[(c[a>>2]|0)+12>>2]&63](f,a,b);if((c[f+4>>2]|0)!=(c[d+4>>2]|0)){g=0;i=e;return g|0}g=(c[f>>2]|0)==(c[d>>2]|0);i=e;return g|0}function gm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if((c[b+4>>2]|0)!=(a|0)){e=0;return e|0}e=(c[b>>2]|0)==(d|0);return e|0}function hm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;d=Wb(e|0)|0;e=ev(d|0)|0;if(e>>>0>4294967279>>>0){nm(0)}if(e>>>0<11>>>0){a[b]=e<<1;f=b+1|0;cv(f|0,d|0,e)|0;g=f+e|0;a[g]=0;return}else{h=e+16&-16;i=Nu(h)|0;c[b+8>>2]=i;c[b>>2]=h|1;c[b+4>>2]=e;f=i;cv(f|0,d|0,e)|0;g=f+e|0;a[g]=0;return}}function im(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=i;i=i+16|0;g=f|0;h=d|0;j=c[h>>2]|0;k=e;do{if((j|0)!=0){l=a[k]|0;if((l&1)==0){m=(l&255)>>>1}else{m=c[e+4>>2]|0}if((m|0)==0){n=j}else{xm(e,12816,2)|0;n=c[h>>2]|0}l=c[d+4>>2]|0;Tc[c[(c[l>>2]|0)+24>>2]&63](g,l,n);l=g;o=a[l]|0;if((o&1)==0){p=(o&255)>>>1;q=g+1|0}else{p=c[g+4>>2]|0;q=c[g+8>>2]|0}xm(e,q,p)|0;if((a[l]&1)==0){break}Pu(c[g+8>>2]|0)}}while(0);g=b;c[g>>2]=c[k>>2];c[g+4>>2]=c[k+4>>2];c[g+8>>2]=c[k+8>>2];dv(k|0,0,12)|0;i=f;return}function jm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;g=d;d=i;i=i+8|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];g=f|0;h=f+16|0;j=ev(e|0)|0;if(j>>>0>4294967279>>>0){nm(0)}if(j>>>0<11>>>0){a[h]=j<<1;k=h+1|0}else{l=j+16&-16;m=Nu(l)|0;c[h+8>>2]=m;c[h>>2]=l|1;c[h+4>>2]=j;k=m}cv(k|0,e|0,j)|0;a[k+j|0]=0;im(g,d,h);Zl(b|0,g);if(!((a[g]&1)==0)){Pu(c[g+8>>2]|0)}if(!((a[h]&1)==0)){Pu(c[h+8>>2]|0)}c[b>>2]=21560;h=d;d=b+8|0;b=c[h+4>>2]|0;c[d>>2]=c[h>>2];c[d+4>>2]=b;i=f;return}function km(a){a=a|0;am(a|0);Pu(a);return}function lm(a){a=a|0;am(a|0);return}function mm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e;if((c[a>>2]|0)==1){do{Za(34312,34288)|0;}while((c[a>>2]|0)==1)}if((c[a>>2]|0)!=0){f;return}c[a>>2]=1;g;Dc[d&511](b);h;c[a>>2]=-1;i;Ob(34312)|0;return}function nm(a){a=a|0;a=pc(8)|0;Vl(a,1304);c[a>>2]=19568;Fb(a|0,25576,40)}function om(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=d;if((a[e]&1)==0){f=b;c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];return}e=c[d+8>>2]|0;f=c[d+4>>2]|0;if(f>>>0>4294967279>>>0){nm(0)}if(f>>>0<11>>>0){a[b]=f<<1;g=b+1|0}else{d=f+16&-16;h=Nu(d)|0;c[b+8>>2]=h;c[b>>2]=d|1;c[b+4>>2]=f;g=h}cv(g|0,e|0,f)|0;a[g+f|0]=0;return}function pm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;if(e>>>0>4294967279>>>0){nm(0)}if(e>>>0<11>>>0){a[b]=e<<1;f=b+1|0;cv(f|0,d|0,e)|0;g=f+e|0;a[g]=0;return}else{h=e+16&-16;i=Nu(h)|0;c[b+8>>2]=i;c[b>>2]=h|1;c[b+4>>2]=e;f=i;cv(f|0,d|0,e)|0;g=f+e|0;a[g]=0;return}}function qm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if(d>>>0>4294967279>>>0){nm(0)}if(d>>>0<11>>>0){a[b]=d<<1;f=b+1|0}else{g=d+16&-16;h=Nu(g)|0;c[b+8>>2]=h;c[b>>2]=g|1;c[b+4>>2]=d;f=h}dv(f|0,e|0,d|0)|0;a[f+d|0]=0;return}function rm(b){b=b|0;if((a[b]&1)==0){return}Pu(c[b+8>>2]|0);return}function sm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=ev(d|0)|0;f=b;g=a[f]|0;if((g&1)==0){h=10;i=g}else{g=c[b>>2]|0;h=(g&-2)-1|0;i=g&255}g=(i&1)==0;if(h>>>0<e>>>0){if(g){j=(i&255)>>>1}else{j=c[b+4>>2]|0}ym(b,h,e-h|0,j,0,j,e,d);return b|0}if(g){k=b+1|0}else{k=c[b+8>>2]|0}fv(k|0,d|0,e|0)|0;a[k+e|0]=0;if((a[f]&1)==0){a[f]=e<<1;return b|0}else{c[b+4>>2]=e;return b|0}return 0}function tm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b;g=a[f]|0;h=(g&1)==0;if(h){i=(g&255)>>>1}else{i=c[b+4>>2]|0}if(i>>>0<d>>>0){um(b,d-i|0,e)|0;return}if(h){a[b+1+d|0]=0;a[f]=d<<1;return}else{a[(c[b+8>>2]|0)+d|0]=0;c[b+4>>2]=d;return}}function um(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((d|0)==0){return b|0}f=b;g=a[f]|0;if((g&1)==0){h=10;i=g}else{g=c[b>>2]|0;h=(g&-2)-1|0;i=g&255}if((i&1)==0){j=(i&255)>>>1}else{j=c[b+4>>2]|0}if((h-j|0)>>>0<d>>>0){zm(b,h,d-h+j|0,j,j,0,0);k=a[f]|0}else{k=i}if((k&1)==0){l=b+1|0}else{l=c[b+8>>2]|0}dv(l+j|0,e|0,d|0)|0;e=j+d|0;if((a[f]&1)==0){a[f]=e<<1}else{c[b+4>>2]=e}a[l+e|0]=0;return b|0}function vm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if(d>>>0>4294967279>>>0){nm(0)}e=b;f=a[e]|0;if((f&1)==0){g=10;h=f}else{f=c[b>>2]|0;g=(f&-2)-1|0;h=f&255}if((h&1)==0){i=(h&255)>>>1}else{i=c[b+4>>2]|0}f=i>>>0>d>>>0?i:d;if(f>>>0<11>>>0){j=10}else{j=(f+16&-16)-1|0}if((j|0)==(g|0)){return}do{if((j|0)==10){k=b+1|0;l=c[b+8>>2]|0;m=1;n=0}else{f=j+1|0;if(j>>>0>g>>>0){o=Nu(f)|0}else{o=Nu(f)|0}if((h&1)==0){k=o;l=b+1|0;m=0;n=1;break}else{k=o;l=c[b+8>>2]|0;m=1;n=1;break}}}while(0);if((h&1)==0){p=(h&255)>>>1}else{p=c[b+4>>2]|0}cv(k|0,l|0,p+1|0)|0;if(m){Pu(l)}if(n){c[b>>2]=j+1|1;c[b+4>>2]=i;c[b+8>>2]=k;return}else{a[e]=i<<1;return}}function wm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=b;f=a[e]|0;g=(f&1)!=0;if(g){h=c[b+4>>2]|0;i=(c[b>>2]&-2)-1|0}else{h=(f&255)>>>1;i=10}if((h|0)==(i|0)){zm(b,i,1,i,i,0,0);if((a[e]&1)==0){j=7}else{j=8}}else{if(g){j=8}else{j=7}}if((j|0)==7){a[e]=(h<<1)+2;k=b+1|0;l=h+1|0;m=k+h|0;a[m]=d;n=k+l|0;a[n]=0;return}else if((j|0)==8){j=c[b+8>>2]|0;e=h+1|0;c[b+4>>2]=e;k=j;l=e;m=k+h|0;a[m]=d;n=k+l|0;a[n]=0;return}}function xm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=b;g=a[f]|0;if((g&1)==0){h=10;i=g}else{g=c[b>>2]|0;h=(g&-2)-1|0;i=g&255}if((i&1)==0){j=(i&255)>>>1}else{j=c[b+4>>2]|0}if((h-j|0)>>>0<e>>>0){ym(b,h,e-h+j|0,j,j,0,e,d);return b|0}if((e|0)==0){return b|0}if((i&1)==0){k=b+1|0}else{k=c[b+8>>2]|0}cv(k+j|0,d|0,e)|0;d=j+e|0;if((a[f]&1)==0){a[f]=d<<1}else{c[b+4>>2]=d}a[k+d|0]=0;return b|0}function ym(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((-18-d|0)>>>0<e>>>0){nm(0)}if((a[b]&1)==0){k=b+1|0}else{k=c[b+8>>2]|0}do{if(d>>>0<2147483623>>>0){l=e+d|0;m=d<<1;n=l>>>0<m>>>0?m:l;if(n>>>0<11>>>0){o=11;break}o=n+16&-16}else{o=-17}}while(0);e=Nu(o)|0;if((g|0)!=0){cv(e|0,k|0,g)|0}if((i|0)!=0){cv(e+g|0,j|0,i)|0}j=f-h|0;if((j|0)!=(g|0)){cv(e+(i+g)|0,k+(h+g)|0,j-g|0)|0}if((d|0)==10){p=b+8|0;c[p>>2]=e;q=o|1;r=b|0;c[r>>2]=q;s=j+i|0;t=b+4|0;c[t>>2]=s;u=e+s|0;a[u]=0;return}Pu(k);p=b+8|0;c[p>>2]=e;q=o|1;r=b|0;c[r>>2]=q;s=j+i|0;t=b+4|0;c[t>>2]=s;u=e+s|0;a[u]=0;return}function zm(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((-17-d|0)>>>0<e>>>0){nm(0)}if((a[b]&1)==0){j=b+1|0}else{j=c[b+8>>2]|0}do{if(d>>>0<2147483623>>>0){k=e+d|0;l=d<<1;m=k>>>0<l>>>0?l:k;if(m>>>0<11>>>0){n=11;break}n=m+16&-16}else{n=-17}}while(0);e=Nu(n)|0;if((g|0)!=0){cv(e|0,j|0,g)|0}m=f-h|0;if((m|0)!=(g|0)){cv(e+(i+g)|0,j+(h+g)|0,m-g|0)|0}if((d|0)==10){o=b+8|0;c[o>>2]=e;p=n|1;q=b|0;c[q>>2]=p;return}Pu(j);o=b+8|0;c[o>>2]=e;p=n|1;q=b|0;c[q>>2]=p;return}function Am(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(e>>>0>1073741807>>>0){nm(0)}if(e>>>0<2>>>0){a[b]=e<<1;f=b+4|0;g=hu(f,d,e)|0;h=f+(e<<2)|0;c[h>>2]=0;return}else{i=e+4&-4;j=Nu(i<<2)|0;c[b+8>>2]=j;c[b>>2]=i|1;c[b+4>>2]=e;f=j;g=hu(f,d,e)|0;h=f+(e<<2)|0;c[h>>2]=0;return}}function Bm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(d>>>0>1073741807>>>0){nm(0)}if(d>>>0<2>>>0){a[b]=d<<1;f=b+4|0;g=ju(f,e,d)|0;h=f+(d<<2)|0;c[h>>2]=0;return}else{i=d+4&-4;j=Nu(i<<2)|0;c[b+8>>2]=j;c[b>>2]=i|1;c[b+4>>2]=d;f=j;g=ju(f,e,d)|0;h=f+(d<<2)|0;c[h>>2]=0;return}}function Cm(b){b=b|0;if((a[b]&1)==0){return}Pu(c[b+8>>2]|0);return}function Dm(a,b){a=a|0;b=b|0;return Em(a,b,gu(b)|0)|0}function Em(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=b;g=a[f]|0;if((g&1)==0){h=1;i=g}else{g=c[b>>2]|0;h=(g&-2)-1|0;i=g&255}g=(i&1)==0;if(h>>>0<e>>>0){if(g){j=(i&255)>>>1}else{j=c[b+4>>2]|0}Hm(b,h,e-h|0,j,0,j,e,d);return b|0}if(g){k=b+4|0}else{k=c[b+8>>2]|0}iu(k,d,e)|0;c[k+(e<<2)>>2]=0;if((a[f]&1)==0){a[f]=e<<1;return b|0}else{c[b+4>>2]=e;return b|0}return 0}function Fm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if(d>>>0>1073741807>>>0){nm(0)}e=b;f=a[e]|0;if((f&1)==0){g=1;h=f}else{f=c[b>>2]|0;g=(f&-2)-1|0;h=f&255}if((h&1)==0){i=(h&255)>>>1}else{i=c[b+4>>2]|0}f=i>>>0>d>>>0?i:d;if(f>>>0<2>>>0){j=1}else{j=(f+4&-4)-1|0}if((j|0)==(g|0)){return}do{if((j|0)==1){k=b+4|0;l=c[b+8>>2]|0;m=1;n=0}else{f=(j<<2)+4|0;if(j>>>0>g>>>0){o=Nu(f)|0}else{o=Nu(f)|0}f=o;if((h&1)==0){k=f;l=b+4|0;m=0;n=1;break}else{k=f;l=c[b+8>>2]|0;m=1;n=1;break}}}while(0);if((h&1)==0){p=(h&255)>>>1}else{p=c[b+4>>2]|0}hu(k,l,p+1|0)|0;if(m){Pu(l)}if(n){c[b>>2]=j+1|1;c[b+4>>2]=i;c[b+8>>2]=k;return}else{a[e]=i<<1;return}}function Gm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=b;f=a[e]|0;g=(f&1)!=0;if(g){h=c[b+4>>2]|0;i=(c[b>>2]&-2)-1|0}else{h=(f&255)>>>1;i=1}if((h|0)==(i|0)){Im(b,i,1,i,i,0,0);if((a[e]&1)==0){j=7}else{j=8}}else{if(g){j=8}else{j=7}}if((j|0)==7){a[e]=(h<<1)+2;k=b+4|0;l=h+1|0;m=k+(h<<2)|0;c[m>>2]=d;n=k+(l<<2)|0;c[n>>2]=0;return}else if((j|0)==8){j=c[b+8>>2]|0;e=h+1|0;c[b+4>>2]=e;k=j;l=e;m=k+(h<<2)|0;c[m>>2]=d;n=k+(l<<2)|0;c[n>>2]=0;return}}function Hm(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((1073741806-d|0)>>>0<e>>>0){nm(0)}if((a[b]&1)==0){k=b+4|0}else{k=c[b+8>>2]|0}do{if(d>>>0<536870887>>>0){l=e+d|0;m=d<<1;n=l>>>0<m>>>0?m:l;if(n>>>0<2>>>0){o=2;break}o=n+4&-4}else{o=1073741807}}while(0);e=Nu(o<<2)|0;if((g|0)!=0){hu(e,k,g)|0}if((i|0)!=0){hu(e+(g<<2)|0,j,i)|0}j=f-h|0;if((j|0)!=(g|0)){hu(e+(i+g<<2)|0,k+(h+g<<2)|0,j-g|0)|0}if((d|0)==1){p=b+8|0;c[p>>2]=e;q=o|1;r=b|0;c[r>>2]=q;s=j+i|0;t=b+4|0;c[t>>2]=s;u=e+(s<<2)|0;c[u>>2]=0;return}Pu(k);p=b+8|0;c[p>>2]=e;q=o|1;r=b|0;c[r>>2]=q;s=j+i|0;t=b+4|0;c[t>>2]=s;u=e+(s<<2)|0;c[u>>2]=0;return}function Im(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((1073741807-d|0)>>>0<e>>>0){nm(0)}if((a[b]&1)==0){j=b+4|0}else{j=c[b+8>>2]|0}do{if(d>>>0<536870887>>>0){k=e+d|0;l=d<<1;m=k>>>0<l>>>0?l:k;if(m>>>0<2>>>0){n=2;break}n=m+4&-4}else{n=1073741807}}while(0);e=Nu(n<<2)|0;if((g|0)!=0){hu(e,j,g)|0}m=f-h|0;if((m|0)!=(g|0)){hu(e+(i+g<<2)|0,j+(h+g<<2)|0,m-g|0)|0}if((d|0)==1){o=b+8|0;c[o>>2]=e;p=n|1;q=b|0;c[q>>2]=p;return}Pu(j);o=b+8|0;c[o>>2]=e;p=n|1;q=b|0;c[q>>2]=p;return}function Jm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+8|0;f=e|0;g=(c[b+24>>2]|0)==0;if(g){c[b+16>>2]=d|1}else{c[b+16>>2]=d}if(((g&1|d)&c[b+20>>2]|0)==0){i=e;return}e=pc(16)|0;do{if((a[51816]|0)==0){if((ub(51816)|0)==0){break}c[8332]=21064;Ub(74,33328,u|0)|0}}while(0);b=jv(33328,0,32)|0;c[f>>2]=b|1;c[f+4>>2]=K;jm(e,f,13504);c[e>>2]=20248;Fb(e|0,26120,38)}function Km(a){a=a|0;var b=0,d=0,e=0,f=0;c[a>>2]=20224;b=c[a+40>>2]|0;d=a+32|0;e=a+36|0;if((b|0)!=0){f=b;do{f=f-1|0;Tc[c[(c[d>>2]|0)+(f<<2)>>2]&63](0,a,c[(c[e>>2]|0)+(f<<2)>>2]|0);}while((f|0)!=0)}Vr(a+28|0);Hu(c[d>>2]|0);Hu(c[e>>2]|0);Hu(c[a+48>>2]|0);Hu(c[a+60>>2]|0);return}function Lm(a,b){a=a|0;b=b|0;Ur(a,b+28|0);return}function Mm(a,b){a=a|0;b=b|0;c[a+24>>2]=b;c[a+16>>2]=(b|0)==0;c[a+20>>2]=0;c[a+4>>2]=4098;c[a+12>>2]=0;c[a+8>>2]=6;dv(a+32|0,0,40)|0;Tr(a+28|0);return}function Nm(a){a=a|0;c[a>>2]=21296;Vr(a+4|0);Pu(a);return}function Om(a){a=a|0;c[a>>2]=21296;Vr(a+4|0);return}function Pm(a,b){a=a|0;b=b|0;return}function Qm(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function Rm(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=a;c[g>>2]=0;c[g+4>>2]=0;g=a+8|0;c[g>>2]=-1;c[g+4>>2]=-1;return}function Sm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=i;b=d;d=i;i=i+16|0;c[d>>2]=c[b>>2];c[d+4>>2]=c[b+4>>2];c[d+8>>2]=c[b+8>>2];c[d+12>>2]=c[b+12>>2];b=a;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1;i=e;return}function Tm(a){a=a|0;return 0}function Um(a){a=a|0;return 0}function Vm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=b;if((e|0)<=0){g=0;return g|0}h=b+12|0;i=b+16|0;j=d;d=0;while(1){k=c[h>>2]|0;if(k>>>0<(c[i>>2]|0)>>>0){c[h>>2]=k+1;l=a[k]|0}else{k=Fc[c[(c[f>>2]|0)+40>>2]&255](b)|0;if((k|0)==-1){g=d;m=8;break}l=k&255}a[j]=l;k=d+1|0;if((k|0)<(e|0)){j=j+1|0;d=k}else{g=k;m=8;break}}if((m|0)==8){return g|0}return 0}function Wm(a){a=a|0;return-1|0}function Xm(a){a=a|0;var b=0,e=0;if((Fc[c[(c[a>>2]|0)+36>>2]&255](a)|0)==-1){b=-1;return b|0}e=a+12|0;a=c[e>>2]|0;c[e>>2]=a+1;b=d[a]|0;return b|0}function Ym(a,b){a=a|0;b=b|0;return-1|0}function Zm(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=b;if((f|0)<=0){h=0;return h|0}i=b+24|0;j=b+28|0;k=0;l=e;while(1){e=c[i>>2]|0;if(e>>>0<(c[j>>2]|0)>>>0){m=a[l]|0;c[i>>2]=e+1;a[e]=m}else{if((Qc[c[(c[g>>2]|0)+52>>2]&63](b,d[l]|0)|0)==-1){h=k;n=7;break}}m=k+1|0;if((m|0)<(f|0)){k=m;l=l+1|0}else{h=m;n=7;break}}if((n|0)==7){return h|0}return 0}function _m(a,b){a=a|0;b=b|0;return-1|0}function $m(a){a=a|0;c[a>>2]=21224;Vr(a+4|0);Pu(a);return}function an(a){a=a|0;c[a>>2]=21224;Vr(a+4|0);return}function bn(a,b){a=a|0;b=b|0;return}function cn(a,b,c){a=a|0;b=b|0;c=c|0;return a|0}function dn(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;g=a;c[g>>2]=0;c[g+4>>2]=0;g=a+8|0;c[g>>2]=-1;c[g+4>>2]=-1;return}function en(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;e=i;b=d;d=i;i=i+16|0;c[d>>2]=c[b>>2];c[d+4>>2]=c[b+4>>2];c[d+8>>2]=c[b+8>>2];c[d+12>>2]=c[b+12>>2];b=a;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1;i=e;return}function fn(a){a=a|0;return 0}function gn(a){a=a|0;return 0}function hn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=a;if((d|0)<=0){f=0;return f|0}g=a+12|0;h=a+16|0;i=b;b=0;while(1){j=c[g>>2]|0;if(j>>>0<(c[h>>2]|0)>>>0){c[g>>2]=j+4;k=c[j>>2]|0}else{j=Fc[c[(c[e>>2]|0)+40>>2]&255](a)|0;if((j|0)==-1){f=b;l=8;break}else{k=j}}c[i>>2]=k;j=b+1|0;if((j|0)>=(d|0)){f=j;l=8;break}i=i+4|0;b=j}if((l|0)==8){return f|0}return 0}function jn(a){a=a|0;return-1|0}function kn(a){a=a|0;var b=0,d=0;if((Fc[c[(c[a>>2]|0)+36>>2]&255](a)|0)==-1){b=-1;return b|0}d=a+12|0;a=c[d>>2]|0;c[d>>2]=a+4;b=c[a>>2]|0;return b|0}function ln(a,b){a=a|0;b=b|0;return-1|0}function mn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=a;if((d|0)<=0){f=0;return f|0}g=a+24|0;h=a+28|0;i=0;j=b;while(1){b=c[g>>2]|0;if(b>>>0<(c[h>>2]|0)>>>0){k=c[j>>2]|0;c[g>>2]=b+4;c[b>>2]=k}else{if((Qc[c[(c[e>>2]|0)+52>>2]&63](a,c[j>>2]|0)|0)==-1){f=i;l=8;break}}k=i+1|0;if((k|0)>=(d|0)){f=k;l=8;break}i=k;j=j+4|0}if((l|0)==8){return f|0}return 0}function nn(a,b){a=a|0;b=b|0;return-1|0}function on(a){a=a|0;Km(a+8|0);Pu(a);return}function pn(a){a=a|0;Km(a+8|0);return}function qn(a){a=a|0;var b=0,d=0;b=a;d=c[(c[a>>2]|0)-12>>2]|0;Km(b+(d+8)|0);Pu(b+d|0);return}function rn(a){a=a|0;Km(a+((c[(c[a>>2]|0)-12>>2]|0)+8)|0);return}function sn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+8|0;e=d|0;f=b;g=c[(c[f>>2]|0)-12>>2]|0;h=b;if((c[h+(g+24)>>2]|0)==0){i=d;return b|0}j=e|0;a[j]=0;c[e+4>>2]=b;do{if((c[h+(g+16)>>2]|0)==0){k=c[h+(g+72)>>2]|0;if((k|0)==0){l=g}else{sn(k)|0;l=c[(c[f>>2]|0)-12>>2]|0}a[j]=1;k=c[h+(l+24)>>2]|0;if(!((Fc[c[(c[k>>2]|0)+24>>2]&255](k)|0)==-1)){break}k=c[(c[f>>2]|0)-12>>2]|0;Jm(h+k|0,c[h+(k+16)>>2]|1)}}while(0);Cn(e);i=d;return b|0}function tn(a){a=a|0;Km(a+8|0);Pu(a);return}function un(a){a=a|0;Km(a+8|0);return}function vn(a){a=a|0;var b=0,d=0;b=a;d=c[(c[a>>2]|0)-12>>2]|0;Km(b+(d+8)|0);Pu(b+d|0);return}function wn(a){a=a|0;Km(a+((c[(c[a>>2]|0)-12>>2]|0)+8)|0);return}function xn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+8|0;e=d|0;f=b;g=c[(c[f>>2]|0)-12>>2]|0;h=b;if((c[h+(g+24)>>2]|0)==0){i=d;return b|0}j=e|0;a[j]=0;c[e+4>>2]=b;do{if((c[h+(g+16)>>2]|0)==0){k=c[h+(g+72)>>2]|0;if((k|0)==0){l=g}else{xn(k)|0;l=c[(c[f>>2]|0)-12>>2]|0}a[j]=1;k=c[h+(l+24)>>2]|0;if(!((Fc[c[(c[k>>2]|0)+24>>2]&255](k)|0)==-1)){break}k=c[(c[f>>2]|0)-12>>2]|0;Jm(h+k|0,c[h+(k+16)>>2]|1)}}while(0);Hn(e);i=d;return b|0}function yn(a){a=a|0;Km(a+4|0);Pu(a);return}function zn(a){a=a|0;Km(a+4|0);return}function An(a){a=a|0;var b=0,d=0;b=a;d=c[(c[a>>2]|0)-12>>2]|0;Km(b+(d+4)|0);Pu(b+d|0);return}function Bn(a){a=a|0;Km(a+((c[(c[a>>2]|0)-12>>2]|0)+4)|0);return}function Cn(a){a=a|0;var b=0,d=0,e=0;b=a+4|0;a=c[b>>2]|0;d=c[(c[a>>2]|0)-12>>2]|0;e=a;if((c[e+(d+24)>>2]|0)==0){return}if((c[e+(d+16)>>2]|0)!=0){return}if((c[e+(d+4)>>2]&8192|0)==0){return}if(zb()|0){return}d=c[b>>2]|0;e=c[d+((c[(c[d>>2]|0)-12>>2]|0)+24)>>2]|0;if(!((Fc[c[(c[e>>2]|0)+24>>2]&255](e)|0)==-1)){return}e=c[b>>2]|0;b=c[(c[e>>2]|0)-12>>2]|0;d=e;Jm(d+b|0,c[d+(b+16)>>2]|1);return}function Dn(a){a=a|0;Km(a+4|0);Pu(a);return}function En(a){a=a|0;Km(a+4|0);return}function Fn(a){a=a|0;var b=0,d=0;b=a;d=c[(c[a>>2]|0)-12>>2]|0;Km(b+(d+4)|0);Pu(b+d|0);return}function Gn(a){a=a|0;Km(a+((c[(c[a>>2]|0)-12>>2]|0)+4)|0);return}function Hn(a){a=a|0;var b=0,d=0,e=0;b=a+4|0;a=c[b>>2]|0;d=c[(c[a>>2]|0)-12>>2]|0;e=a;if((c[e+(d+24)>>2]|0)==0){return}if((c[e+(d+16)>>2]|0)!=0){return}if((c[e+(d+4)>>2]&8192|0)==0){return}if(zb()|0){return}d=c[b>>2]|0;e=c[d+((c[(c[d>>2]|0)-12>>2]|0)+24)>>2]|0;if(!((Fc[c[(c[e>>2]|0)+24>>2]&255](e)|0)==-1)){return}e=c[b>>2]|0;b=c[(c[e>>2]|0)-12>>2]|0;d=e;Jm(d+b|0,c[d+(b+16)>>2]|1);return}function In(a){a=a|0;return 15656}function Jn(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)==1){pm(a,16464,35);return}else{hm(a,b|0,c);return}}function Kn(a){a=a|0;dm(a|0);return}function Ln(a){a=a|0;lm(a|0);Pu(a);return}function Mn(a){a=a|0;lm(a|0);return}function Nn(a){a=a|0;Km(a);Pu(a);return}function On(a){a=a|0;dm(a|0);Pu(a);return}function Pn(a){a=a|0;Sl(a|0);Pu(a);return}function Qn(a){a=a|0;Sl(a|0);return}function Rn(a){a=a|0;Sl(a|0);return}function Sn(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;a:do{if((e|0)==(f|0)){g=c}else{b=c;h=e;while(1){if((b|0)==(d|0)){i=-1;j=7;break}k=a[b]|0;l=a[h]|0;if(k<<24>>24<l<<24>>24){i=-1;j=7;break}if(l<<24>>24<k<<24>>24){i=1;j=7;break}k=b+1|0;l=h+1|0;if((l|0)==(f|0)){g=k;break a}else{b=k;h=l}}if((j|0)==7){return i|0}}}while(0);i=(g|0)!=(d|0)|0;return i|0}function Tn(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=e;g=f-d|0;if(g>>>0>4294967279>>>0){nm(b)}if(g>>>0<11>>>0){a[b]=g<<1;h=b+1|0}else{i=g+16&-16;j=Nu(i)|0;c[b+8>>2]=j;c[b>>2]=i|1;c[b+4>>2]=g;h=j}if((e|0)==(f|0)){k=h;a[k]=0;return}else{l=h;m=e}while(1){a[l]=a[m]|0;e=m+1|0;if((e|0)==(f|0)){break}else{l=l+1|0;m=e}}k=h+(f+(-d|0))|0;a[k]=0;return}function Un(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;if((c|0)==(d|0)){e=0;return e|0}else{f=c;g=0}while(1){c=(a[f]|0)+(g<<4)|0;b=c&-268435456;h=(b>>>24|b)^c;c=f+1|0;if((c|0)==(d|0)){e=h;break}else{f=c;g=h}}return e|0}function Vn(a){a=a|0;Sl(a|0);Pu(a);return}function Wn(a){a=a|0;Sl(a|0);return}function Xn(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;a:do{if((e|0)==(f|0)){g=b;h=6}else{a=b;i=e;while(1){if((a|0)==(d|0)){j=-1;break a}k=c[a>>2]|0;l=c[i>>2]|0;if((k|0)<(l|0)){j=-1;break a}if((l|0)<(k|0)){j=1;break a}k=a+4|0;l=i+4|0;if((l|0)==(f|0)){g=k;h=6;break}else{a=k;i=l}}}}while(0);if((h|0)==6){j=(g|0)!=(d|0)|0}return j|0}function Yn(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;d=e;g=f-d|0;h=g>>2;if(h>>>0>1073741807>>>0){nm(b)}if(h>>>0<2>>>0){a[b]=g>>>1;i=b+4|0}else{g=h+4&-4;j=Nu(g<<2)|0;c[b+8>>2]=j;c[b>>2]=g|1;c[b+4>>2]=h;i=j}if((e|0)==(f|0)){k=i;c[k>>2]=0;return}j=f-4+(-d|0)|0;d=i;h=e;while(1){c[d>>2]=c[h>>2];e=h+4|0;if((e|0)==(f|0)){break}else{d=d+4|0;h=e}}k=i+((j>>>2)+1<<2)|0;c[k>>2]=0;return}function Zn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;if((b|0)==(d|0)){e=0;return e|0}else{f=b;g=0}while(1){b=(c[f>>2]|0)+(g<<4)|0;a=b&-268435456;h=(a>>>24|a)^b;b=f+4|0;if((b|0)==(d|0)){e=h;break}else{f=b;g=h}}return e|0}function _n(a){a=a|0;Sl(a|0);Pu(a);return}function $n(a){a=a|0;Sl(a|0);return}function ao(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;k=i;i=i+112|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=k|0;m=k+16|0;n=k+32|0;o=k+40|0;p=k+48|0;q=k+56|0;r=k+64|0;s=k+72|0;t=k+80|0;u=k+104|0;if((c[g+4>>2]&1|0)==0){c[n>>2]=-1;v=c[(c[d>>2]|0)+16>>2]|0;w=e|0;c[p>>2]=c[w>>2];c[q>>2]=c[f>>2];Mc[v&127](o,d,p,q,g,h,n);q=c[o>>2]|0;c[w>>2]=q;w=c[n>>2]|0;if((w|0)==0){a[j]=0}else if((w|0)==1){a[j]=1}else{a[j]=1;c[h>>2]=4}c[b>>2]=q;i=k;return}Lm(r,g);q=r|0;r=c[q>>2]|0;if(!((c[8716]|0)==-1)){c[m>>2]=34864;c[m+4>>2]=16;c[m+8>>2]=0;mm(34864,m,114)}m=(c[8717]|0)-1|0;w=c[r+8>>2]|0;do{if((c[r+12>>2]|0)-w>>2>>>0>m>>>0){n=c[w+(m<<2)>>2]|0;if((n|0)==0){break}o=n;Ul(c[q>>2]|0)|0;Lm(s,g);n=s|0;p=c[n>>2]|0;if(!((c[8620]|0)==-1)){c[l>>2]=34480;c[l+4>>2]=16;c[l+8>>2]=0;mm(34480,l,114)}d=(c[8621]|0)-1|0;v=c[p+8>>2]|0;do{if((c[p+12>>2]|0)-v>>2>>>0>d>>>0){x=c[v+(d<<2)>>2]|0;if((x|0)==0){break}y=x;Ul(c[n>>2]|0)|0;z=t|0;A=x;Ec[c[(c[A>>2]|0)+24>>2]&127](z,y);Ec[c[(c[A>>2]|0)+28>>2]&127](t+12|0,y);c[u>>2]=c[f>>2];y=(bo(e,u,z,t+24|0,o,h,1)|0)==(z|0)|0;a[j]=y;c[b>>2]=c[e>>2];rm(t+12|0);rm(t|0);i=k;return}}while(0);o=pc(4)|0;lu(o);Fb(o|0,25544,156)}}while(0);k=pc(4)|0;lu(k);Fb(k|0,25544,156)}function bo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;k=i;i=i+104|0;l=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[l>>2];l=(f-e|0)/12|0;m=k|0;do{if(l>>>0>100>>>0){n=Gu(l)|0;if((n|0)!=0){o=n;p=n;break}Uu();o=0;p=0}else{o=m;p=0}}while(0);m=(e|0)==(f|0);if(m){q=l;r=0}else{n=l;l=0;s=o;t=e;while(1){u=a[t]|0;if((u&1)==0){v=(u&255)>>>1}else{v=c[t+4>>2]|0}if((v|0)==0){a[s]=2;w=l+1|0;x=n-1|0}else{a[s]=1;w=l;x=n}u=t+12|0;if((u|0)==(f|0)){q=x;r=w;break}else{n=x;l=w;s=s+1|0;t=u}}}t=b|0;b=d|0;d=g;s=0;w=r;r=q;a:while(1){q=c[t>>2]|0;do{if((q|0)==0){y=0}else{if((c[q+12>>2]|0)!=(c[q+16>>2]|0)){y=q;break}if((Fc[c[(c[q>>2]|0)+36>>2]&255](q)|0)==-1){c[t>>2]=0;y=0;break}else{y=c[t>>2]|0;break}}}while(0);q=(y|0)==0;l=c[b>>2]|0;do{if((l|0)==0){z=0}else{if((c[l+12>>2]|0)!=(c[l+16>>2]|0)){z=l;break}if(!((Fc[c[(c[l>>2]|0)+36>>2]&255](l)|0)==-1)){z=l;break}c[b>>2]=0;z=0}}while(0);A=(z|0)==0;B=c[t>>2]|0;if(!((q^A)&(r|0)!=0)){break}l=c[B+12>>2]|0;if((l|0)==(c[B+16>>2]|0)){C=(Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0)&255}else{C=a[l]|0}if(j){D=C}else{D=Qc[c[(c[d>>2]|0)+12>>2]&63](g,C)|0}l=s+1|0;if(m){s=l;w=w;r=r;continue}b:do{if(j){x=r;n=w;v=o;u=0;E=e;while(1){do{if((a[v]|0)==1){F=a[E]|0;G=(F&1)==0;if(G){H=E+1|0}else{H=c[E+8>>2]|0}if(!(D<<24>>24==(a[H+s|0]|0))){a[v]=0;I=u;J=n;K=x-1|0;break}if(G){L=(F&255)>>>1}else{L=c[E+4>>2]|0}if((L|0)!=(l|0)){I=1;J=n;K=x;break}a[v]=2;I=1;J=n+1|0;K=x-1|0}else{I=u;J=n;K=x}}while(0);F=E+12|0;if((F|0)==(f|0)){M=K;N=J;O=I;break b}x=K;n=J;v=v+1|0;u=I;E=F}}else{E=r;u=w;v=o;n=0;x=e;while(1){do{if((a[v]|0)==1){F=x;if((a[F]&1)==0){P=x+1|0}else{P=c[x+8>>2]|0}if(!(D<<24>>24==(Qc[c[(c[d>>2]|0)+12>>2]&63](g,a[P+s|0]|0)|0)<<24>>24)){a[v]=0;Q=n;R=u;S=E-1|0;break}G=a[F]|0;if((G&1)==0){T=(G&255)>>>1}else{T=c[x+4>>2]|0}if((T|0)!=(l|0)){Q=1;R=u;S=E;break}a[v]=2;Q=1;R=u+1|0;S=E-1|0}else{Q=n;R=u;S=E}}while(0);G=x+12|0;if((G|0)==(f|0)){M=S;N=R;O=Q;break b}E=S;u=R;v=v+1|0;n=Q;x=G}}}while(0);if(!O){s=l;w=N;r=M;continue}q=c[t>>2]|0;x=q+12|0;n=c[x>>2]|0;if((n|0)==(c[q+16>>2]|0)){Fc[c[(c[q>>2]|0)+40>>2]&255](q)|0}else{c[x>>2]=n+1}if((M+N|0)>>>0<2>>>0){s=l;w=N;r=M;continue}else{U=N;V=o;W=e}while(1){do{if((a[V]|0)==2){n=a[W]|0;if((n&1)==0){X=(n&255)>>>1}else{X=c[W+4>>2]|0}if((X|0)==(l|0)){Y=U;break}a[V]=0;Y=U-1|0}else{Y=U}}while(0);n=W+12|0;if((n|0)==(f|0)){s=l;w=Y;r=M;continue a}else{U=Y;V=V+1|0;W=n}}}do{if((B|0)==0){Z=0}else{if((c[B+12>>2]|0)!=(c[B+16>>2]|0)){Z=B;break}if((Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0)==-1){c[t>>2]=0;Z=0;break}else{Z=c[t>>2]|0;break}}}while(0);t=(Z|0)==0;do{if(A){_=92}else{if((c[z+12>>2]|0)!=(c[z+16>>2]|0)){if(t){break}else{_=94;break}}if((Fc[c[(c[z>>2]|0)+36>>2]&255](z)|0)==-1){c[b>>2]=0;_=92;break}else{if(t){break}else{_=94;break}}}}while(0);if((_|0)==92){if(t){_=94}}if((_|0)==94){c[h>>2]=c[h>>2]|2}c:do{if(m){_=99}else{if((a[o]|0)==2){$=e;break}else{aa=e;ba=o}while(1){t=aa+12|0;b=ba+1|0;if((t|0)==(f|0)){_=99;break c}if((a[b]|0)==2){$=t;break}else{aa=t;ba=b}}}}while(0);if((_|0)==99){c[h>>2]=c[h>>2]|4;$=f}if((p|0)==0){ca=100;da=0;i=k;return $|0}Hu(p);ca=100;da=0;i=k;return $|0}function co(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];eo(a,0,j,k,f,g,h);i=b;return}function eo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;d=i;i=i+256|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+32|0;m=d+40|0;n=d+56|0;o=d+72|0;p=d+80|0;q=d+240|0;r=d+248|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==0){t=0}else if((s|0)==8){t=16}else{t=10}s=k|0;Wo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=a[l]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=0}else{if((c[u+12>>2]|0)!=(c[u+16>>2]|0)){A=u;break}if(!((Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0)==-1)){A=u;break}c[x>>2]=0;A=0}}while(0);B=(A|0)==0;C=c[e>>2]|0;do{if((C|0)==0){D=21}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){if(B){E=C;break}else{F=l;G=C;break a}}if((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1){c[e>>2]=0;D=21;break}else{if(B){E=C;break}else{F=l;G=C;break a}}}}while(0);if((D|0)==21){D=0;if(B){F=l;G=0;break}else{E=0}}C=a[g]|0;H=(C&1)==0;if(H){I=(C&255)>>>1}else{I=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(I|0)){if(H){J=(C&255)>>>1;K=(C&255)>>>1}else{C=c[y>>2]|0;J=C;K=C}tm(n,J<<1,0);if((a[g]&1)==0){L=10}else{L=(c[f>>2]&-2)-1|0}tm(n,L,0);if((a[g]&1)==0){M=v}else{M=c[w>>2]|0}c[o>>2]=M+K;N=M}else{N=l}C=A+12|0;H=c[C>>2]|0;O=A+16|0;if((H|0)==(c[O>>2]|0)){P=(Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)&255}else{P=a[H]|0}if((wo(P,t,N,o,r,z,m,k,q,s)|0)!=0){F=N;G=E;break}H=c[C>>2]|0;if((H|0)==(c[O>>2]|0)){Fc[c[(c[A>>2]|0)+40>>2]&255](A)|0;l=N;u=A;continue}else{c[C>>2]=H+1;l=N;u=A;continue}}u=a[m]|0;if((u&1)==0){Q=(u&255)>>>1}else{Q=c[m+4>>2]|0}do{if((Q|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}N=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=N}}while(0);r=Rt(F,c[o>>2]|0,h,t)|0;c[j>>2]=r;hr(m,k,c[q>>2]|0,h);do{if((A|0)==0){R=0}else{if((c[A+12>>2]|0)!=(c[A+16>>2]|0)){R=A;break}if(!((Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)==-1)){R=A;break}c[x>>2]=0;R=0}}while(0);x=(R|0)==0;do{if((G|0)==0){D=66}else{if((c[G+12>>2]|0)!=(c[G+16>>2]|0)){if(!x){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}if((Fc[c[(c[G>>2]|0)+36>>2]&255](G)|0)==-1){c[e>>2]=0;D=66;break}if(!(x^(G|0)==0)){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}}while(0);do{if((D|0)==66){if(x){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}}while(0);c[h>>2]=c[h>>2]|2;S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}function fo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];go(a,0,j,k,f,g,h);i=b;return}function go(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;d=i;i=i+256|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+32|0;m=d+40|0;n=d+56|0;o=d+72|0;p=d+80|0;q=d+240|0;r=d+248|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==8){t=16}else if((s|0)==0){t=0}else{t=10}s=k|0;Wo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=a[l]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=0}else{if((c[u+12>>2]|0)!=(c[u+16>>2]|0)){A=u;break}if(!((Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0)==-1)){A=u;break}c[x>>2]=0;A=0}}while(0);B=(A|0)==0;C=c[e>>2]|0;do{if((C|0)==0){D=21}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){if(B){E=C;break}else{F=l;G=C;break a}}if((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1){c[e>>2]=0;D=21;break}else{if(B){E=C;break}else{F=l;G=C;break a}}}}while(0);if((D|0)==21){D=0;if(B){F=l;G=0;break}else{E=0}}C=a[g]|0;H=(C&1)==0;if(H){I=(C&255)>>>1}else{I=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(I|0)){if(H){J=(C&255)>>>1;L=(C&255)>>>1}else{C=c[y>>2]|0;J=C;L=C}tm(n,J<<1,0);if((a[g]&1)==0){M=10}else{M=(c[f>>2]&-2)-1|0}tm(n,M,0);if((a[g]&1)==0){N=v}else{N=c[w>>2]|0}c[o>>2]=N+L;O=N}else{O=l}C=A+12|0;H=c[C>>2]|0;P=A+16|0;if((H|0)==(c[P>>2]|0)){Q=(Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)&255}else{Q=a[H]|0}if((wo(Q,t,O,o,r,z,m,k,q,s)|0)!=0){F=O;G=E;break}H=c[C>>2]|0;if((H|0)==(c[P>>2]|0)){Fc[c[(c[A>>2]|0)+40>>2]&255](A)|0;l=O;u=A;continue}else{c[C>>2]=H+1;l=O;u=A;continue}}u=a[m]|0;if((u&1)==0){R=(u&255)>>>1}else{R=c[m+4>>2]|0}do{if((R|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}O=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=O}}while(0);r=Qt(F,c[o>>2]|0,h,t)|0;c[j>>2]=r;c[j+4>>2]=K;hr(m,k,c[q>>2]|0,h);do{if((A|0)==0){S=0}else{if((c[A+12>>2]|0)!=(c[A+16>>2]|0)){S=A;break}if(!((Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)==-1)){S=A;break}c[x>>2]=0;S=0}}while(0);x=(S|0)==0;do{if((G|0)==0){D=66}else{if((c[G+12>>2]|0)!=(c[G+16>>2]|0)){if(!x){break}T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}if((Fc[c[(c[G>>2]|0)+36>>2]&255](G)|0)==-1){c[e>>2]=0;D=66;break}if(!(x^(G|0)==0)){break}T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}}while(0);do{if((D|0)==66){if(x){break}T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}}while(0);c[h>>2]=c[h>>2]|2;T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}function ho(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];io(a,0,j,k,f,g,h);i=b;return}function io(d,e,f,g,h,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;e=i;i=i+256|0;l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=g;g=i;i=i+4|0;i=i+7&-8;c[g>>2]=c[l>>2];l=e|0;m=e+32|0;n=e+40|0;o=e+56|0;p=e+72|0;q=e+80|0;r=e+240|0;s=e+248|0;t=c[h+4>>2]&74;if((t|0)==64){u=8}else if((t|0)==0){u=0}else if((t|0)==8){u=16}else{u=10}t=l|0;Wo(n,h,t,m);h=o;dv(h|0,0,12)|0;tm(o,10,0);if((a[h]&1)==0){l=o+1|0;v=l;w=l;x=o+8|0}else{l=o+8|0;v=c[l>>2]|0;w=o+1|0;x=l}c[p>>2]=v;l=q|0;c[r>>2]=l;c[s>>2]=0;y=f|0;f=g|0;g=o|0;z=o+4|0;A=a[m]|0;m=v;v=c[y>>2]|0;a:while(1){do{if((v|0)==0){B=0}else{if((c[v+12>>2]|0)!=(c[v+16>>2]|0)){B=v;break}if(!((Fc[c[(c[v>>2]|0)+36>>2]&255](v)|0)==-1)){B=v;break}c[y>>2]=0;B=0}}while(0);C=(B|0)==0;D=c[f>>2]|0;do{if((D|0)==0){E=21}else{if((c[D+12>>2]|0)!=(c[D+16>>2]|0)){if(C){F=D;break}else{G=m;H=D;break a}}if((Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)==-1){c[f>>2]=0;E=21;break}else{if(C){F=D;break}else{G=m;H=D;break a}}}}while(0);if((E|0)==21){E=0;if(C){G=m;H=0;break}else{F=0}}D=a[h]|0;I=(D&1)==0;if(I){J=(D&255)>>>1}else{J=c[z>>2]|0}if(((c[p>>2]|0)-m|0)==(J|0)){if(I){K=(D&255)>>>1;L=(D&255)>>>1}else{D=c[z>>2]|0;K=D;L=D}tm(o,K<<1,0);if((a[h]&1)==0){M=10}else{M=(c[g>>2]&-2)-1|0}tm(o,M,0);if((a[h]&1)==0){N=w}else{N=c[x>>2]|0}c[p>>2]=N+L;O=N}else{O=m}D=B+12|0;I=c[D>>2]|0;P=B+16|0;if((I|0)==(c[P>>2]|0)){Q=(Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0)&255}else{Q=a[I]|0}if((wo(Q,u,O,p,s,A,n,l,r,t)|0)!=0){G=O;H=F;break}I=c[D>>2]|0;if((I|0)==(c[P>>2]|0)){Fc[c[(c[B>>2]|0)+40>>2]&255](B)|0;m=O;v=B;continue}else{c[D>>2]=I+1;m=O;v=B;continue}}v=a[n]|0;if((v&1)==0){R=(v&255)>>>1}else{R=c[n+4>>2]|0}do{if((R|0)!=0){v=c[r>>2]|0;if((v-q|0)>=160){break}O=c[s>>2]|0;c[r>>2]=v+4;c[v>>2]=O}}while(0);s=Pt(G,c[p>>2]|0,j,u)|0;b[k>>1]=s;hr(n,l,c[r>>2]|0,j);do{if((B|0)==0){S=0}else{if((c[B+12>>2]|0)!=(c[B+16>>2]|0)){S=B;break}if(!((Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0)==-1)){S=B;break}c[y>>2]=0;S=0}}while(0);y=(S|0)==0;do{if((H|0)==0){E=66}else{if((c[H+12>>2]|0)!=(c[H+16>>2]|0)){if(!y){break}T=d|0;c[T>>2]=S;U=160;V=0;rm(o);rm(n);i=e;return}if((Fc[c[(c[H>>2]|0)+36>>2]&255](H)|0)==-1){c[f>>2]=0;E=66;break}if(!(y^(H|0)==0)){break}T=d|0;c[T>>2]=S;U=160;V=0;rm(o);rm(n);i=e;return}}while(0);do{if((E|0)==66){if(y){break}T=d|0;c[T>>2]=S;U=160;V=0;rm(o);rm(n);i=e;return}}while(0);c[j>>2]=c[j>>2]|2;T=d|0;c[T>>2]=S;U=160;V=0;rm(o);rm(n);i=e;return}function jo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];ko(a,0,j,k,f,g,h);i=b;return}function ko(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;d=i;i=i+256|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+32|0;m=d+40|0;n=d+56|0;o=d+72|0;p=d+80|0;q=d+240|0;r=d+248|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==8){t=16}else if((s|0)==0){t=0}else{t=10}s=k|0;Wo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=a[l]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=0}else{if((c[u+12>>2]|0)!=(c[u+16>>2]|0)){A=u;break}if(!((Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0)==-1)){A=u;break}c[x>>2]=0;A=0}}while(0);B=(A|0)==0;C=c[e>>2]|0;do{if((C|0)==0){D=21}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){if(B){E=C;break}else{F=l;G=C;break a}}if((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1){c[e>>2]=0;D=21;break}else{if(B){E=C;break}else{F=l;G=C;break a}}}}while(0);if((D|0)==21){D=0;if(B){F=l;G=0;break}else{E=0}}C=a[g]|0;H=(C&1)==0;if(H){I=(C&255)>>>1}else{I=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(I|0)){if(H){J=(C&255)>>>1;K=(C&255)>>>1}else{C=c[y>>2]|0;J=C;K=C}tm(n,J<<1,0);if((a[g]&1)==0){L=10}else{L=(c[f>>2]&-2)-1|0}tm(n,L,0);if((a[g]&1)==0){M=v}else{M=c[w>>2]|0}c[o>>2]=M+K;N=M}else{N=l}C=A+12|0;H=c[C>>2]|0;O=A+16|0;if((H|0)==(c[O>>2]|0)){P=(Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)&255}else{P=a[H]|0}if((wo(P,t,N,o,r,z,m,k,q,s)|0)!=0){F=N;G=E;break}H=c[C>>2]|0;if((H|0)==(c[O>>2]|0)){Fc[c[(c[A>>2]|0)+40>>2]&255](A)|0;l=N;u=A;continue}else{c[C>>2]=H+1;l=N;u=A;continue}}u=a[m]|0;if((u&1)==0){Q=(u&255)>>>1}else{Q=c[m+4>>2]|0}do{if((Q|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}N=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=N}}while(0);r=Ot(F,c[o>>2]|0,h,t)|0;c[j>>2]=r;hr(m,k,c[q>>2]|0,h);do{if((A|0)==0){R=0}else{if((c[A+12>>2]|0)!=(c[A+16>>2]|0)){R=A;break}if(!((Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)==-1)){R=A;break}c[x>>2]=0;R=0}}while(0);x=(R|0)==0;do{if((G|0)==0){D=66}else{if((c[G+12>>2]|0)!=(c[G+16>>2]|0)){if(!x){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}if((Fc[c[(c[G>>2]|0)+36>>2]&255](G)|0)==-1){c[e>>2]=0;D=66;break}if(!(x^(G|0)==0)){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}}while(0);do{if((D|0)==66){if(x){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}}while(0);c[h>>2]=c[h>>2]|2;S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}function lo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];mo(a,0,j,k,f,g,h);i=b;return}function mo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;d=i;i=i+256|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+32|0;m=d+40|0;n=d+56|0;o=d+72|0;p=d+80|0;q=d+240|0;r=d+248|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==0){t=0}else if((s|0)==8){t=16}else{t=10}s=k|0;Wo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=a[l]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=0}else{if((c[u+12>>2]|0)!=(c[u+16>>2]|0)){A=u;break}if(!((Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0)==-1)){A=u;break}c[x>>2]=0;A=0}}while(0);B=(A|0)==0;C=c[e>>2]|0;do{if((C|0)==0){D=21}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){if(B){E=C;break}else{F=l;G=C;break a}}if((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1){c[e>>2]=0;D=21;break}else{if(B){E=C;break}else{F=l;G=C;break a}}}}while(0);if((D|0)==21){D=0;if(B){F=l;G=0;break}else{E=0}}C=a[g]|0;H=(C&1)==0;if(H){I=(C&255)>>>1}else{I=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(I|0)){if(H){J=(C&255)>>>1;K=(C&255)>>>1}else{C=c[y>>2]|0;J=C;K=C}tm(n,J<<1,0);if((a[g]&1)==0){L=10}else{L=(c[f>>2]&-2)-1|0}tm(n,L,0);if((a[g]&1)==0){M=v}else{M=c[w>>2]|0}c[o>>2]=M+K;N=M}else{N=l}C=A+12|0;H=c[C>>2]|0;O=A+16|0;if((H|0)==(c[O>>2]|0)){P=(Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)&255}else{P=a[H]|0}if((wo(P,t,N,o,r,z,m,k,q,s)|0)!=0){F=N;G=E;break}H=c[C>>2]|0;if((H|0)==(c[O>>2]|0)){Fc[c[(c[A>>2]|0)+40>>2]&255](A)|0;l=N;u=A;continue}else{c[C>>2]=H+1;l=N;u=A;continue}}u=a[m]|0;if((u&1)==0){Q=(u&255)>>>1}else{Q=c[m+4>>2]|0}do{if((Q|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}N=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=N}}while(0);r=Nt(F,c[o>>2]|0,h,t)|0;c[j>>2]=r;hr(m,k,c[q>>2]|0,h);do{if((A|0)==0){R=0}else{if((c[A+12>>2]|0)!=(c[A+16>>2]|0)){R=A;break}if(!((Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)==-1)){R=A;break}c[x>>2]=0;R=0}}while(0);x=(R|0)==0;do{if((G|0)==0){D=66}else{if((c[G+12>>2]|0)!=(c[G+16>>2]|0)){if(!x){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}if((Fc[c[(c[G>>2]|0)+36>>2]&255](G)|0)==-1){c[e>>2]=0;D=66;break}if(!(x^(G|0)==0)){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}}while(0);do{if((D|0)==66){if(x){break}S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}}while(0);c[h>>2]=c[h>>2]|2;S=b|0;c[S>>2]=R;T=160;U=0;rm(n);rm(m);i=d;return}function no(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];oo(a,0,j,k,f,g,h);i=b;return}function oo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;d=i;i=i+256|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+32|0;m=d+40|0;n=d+56|0;o=d+72|0;p=d+80|0;q=d+240|0;r=d+248|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==8){t=16}else if((s|0)==0){t=0}else{t=10}s=k|0;Wo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=a[l]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=0}else{if((c[u+12>>2]|0)!=(c[u+16>>2]|0)){A=u;break}if(!((Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0)==-1)){A=u;break}c[x>>2]=0;A=0}}while(0);B=(A|0)==0;C=c[e>>2]|0;do{if((C|0)==0){D=21}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){if(B){E=C;break}else{F=l;G=C;break a}}if((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1){c[e>>2]=0;D=21;break}else{if(B){E=C;break}else{F=l;G=C;break a}}}}while(0);if((D|0)==21){D=0;if(B){F=l;G=0;break}else{E=0}}C=a[g]|0;H=(C&1)==0;if(H){I=(C&255)>>>1}else{I=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(I|0)){if(H){J=(C&255)>>>1;L=(C&255)>>>1}else{C=c[y>>2]|0;J=C;L=C}tm(n,J<<1,0);if((a[g]&1)==0){M=10}else{M=(c[f>>2]&-2)-1|0}tm(n,M,0);if((a[g]&1)==0){N=v}else{N=c[w>>2]|0}c[o>>2]=N+L;O=N}else{O=l}C=A+12|0;H=c[C>>2]|0;P=A+16|0;if((H|0)==(c[P>>2]|0)){Q=(Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)&255}else{Q=a[H]|0}if((wo(Q,t,O,o,r,z,m,k,q,s)|0)!=0){F=O;G=E;break}H=c[C>>2]|0;if((H|0)==(c[P>>2]|0)){Fc[c[(c[A>>2]|0)+40>>2]&255](A)|0;l=O;u=A;continue}else{c[C>>2]=H+1;l=O;u=A;continue}}u=a[m]|0;if((u&1)==0){R=(u&255)>>>1}else{R=c[m+4>>2]|0}do{if((R|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}O=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=O}}while(0);r=Mt(F,c[o>>2]|0,h,t)|0;c[j>>2]=r;c[j+4>>2]=K;hr(m,k,c[q>>2]|0,h);do{if((A|0)==0){S=0}else{if((c[A+12>>2]|0)!=(c[A+16>>2]|0)){S=A;break}if(!((Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)==-1)){S=A;break}c[x>>2]=0;S=0}}while(0);x=(S|0)==0;do{if((G|0)==0){D=66}else{if((c[G+12>>2]|0)!=(c[G+16>>2]|0)){if(!x){break}T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}if((Fc[c[(c[G>>2]|0)+36>>2]&255](G)|0)==-1){c[e>>2]=0;D=66;break}if(!(x^(G|0)==0)){break}T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}}while(0);do{if((D|0)==66){if(x){break}T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}}while(0);c[h>>2]=c[h>>2]|2;T=b|0;c[T>>2]=S;U=160;V=0;rm(n);rm(m);i=d;return}function po(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];qo(a,0,j,k,f,g,h);i=b;return}function qo(b,d,e,f,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0;d=i;i=i+280|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d+32|0;m=d+40|0;n=d+48|0;o=d+64|0;p=d+80|0;q=d+88|0;r=d+248|0;s=d+256|0;t=d+264|0;u=d+272|0;v=d|0;Xo(n,h,v,l,m);h=o;dv(h|0,0,12)|0;tm(o,10,0);if((a[h]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;a[t]=1;a[u]=69;A=e|0;e=f|0;f=o|0;B=o+4|0;C=a[l]|0;l=a[m]|0;m=x;x=c[A>>2]|0;a:while(1){do{if((x|0)==0){D=0}else{if((c[x+12>>2]|0)!=(c[x+16>>2]|0)){D=x;break}if(!((Fc[c[(c[x>>2]|0)+36>>2]&255](x)|0)==-1)){D=x;break}c[A>>2]=0;D=0}}while(0);E=(D|0)==0;F=c[e>>2]|0;do{if((F|0)==0){G=17}else{if((c[F+12>>2]|0)!=(c[F+16>>2]|0)){if(E){H=F;break}else{I=m;J=F;break a}}if((Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0)==-1){c[e>>2]=0;G=17;break}else{if(E){H=F;break}else{I=m;J=F;break a}}}}while(0);if((G|0)==17){G=0;if(E){I=m;J=0;break}else{H=0}}F=a[h]|0;K=(F&1)==0;if(K){L=(F&255)>>>1}else{L=c[B>>2]|0}if(((c[p>>2]|0)-m|0)==(L|0)){if(K){M=(F&255)>>>1;N=(F&255)>>>1}else{F=c[B>>2]|0;M=F;N=F}tm(o,M<<1,0);if((a[h]&1)==0){O=10}else{O=(c[f>>2]&-2)-1|0}tm(o,O,0);if((a[h]&1)==0){P=y}else{P=c[z>>2]|0}c[p>>2]=P+N;Q=P}else{Q=m}F=D+12|0;K=c[F>>2]|0;R=D+16|0;if((K|0)==(c[R>>2]|0)){S=(Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)&255}else{S=a[K]|0}if((Yo(S,t,u,Q,p,C,l,n,w,r,s,v)|0)!=0){I=Q;J=H;break}K=c[F>>2]|0;if((K|0)==(c[R>>2]|0)){Fc[c[(c[D>>2]|0)+40>>2]&255](D)|0;m=Q;x=D;continue}else{c[F>>2]=K+1;m=Q;x=D;continue}}x=a[n]|0;if((x&1)==0){T=(x&255)>>>1}else{T=c[n+4>>2]|0}do{if((T|0)!=0){if((a[t]|0)==0){break}x=c[r>>2]|0;if((x-q|0)>=160){break}Q=c[s>>2]|0;c[r>>2]=x+4;c[x>>2]=Q}}while(0);U=+Lt(I,c[p>>2]|0,j);g[k>>2]=U;hr(n,w,c[r>>2]|0,j);do{if((D|0)==0){V=0}else{if((c[D+12>>2]|0)!=(c[D+16>>2]|0)){V=D;break}if(!((Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)==-1)){V=D;break}c[A>>2]=0;V=0}}while(0);A=(V|0)==0;do{if((J|0)==0){G=63}else{if((c[J+12>>2]|0)!=(c[J+16>>2]|0)){if(!A){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}if((Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0)==-1){c[e>>2]=0;G=63;break}if(!(A^(J|0)==0)){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}}while(0);do{if((G|0)==63){if(A){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}}while(0);c[j>>2]=c[j>>2]|2;W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}function ro(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];so(a,0,j,k,f,g,h);i=b;return}function so(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0;d=i;i=i+280|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d+32|0;m=d+40|0;n=d+48|0;o=d+64|0;p=d+80|0;q=d+88|0;r=d+248|0;s=d+256|0;t=d+264|0;u=d+272|0;v=d|0;Xo(n,g,v,l,m);g=o;dv(g|0,0,12)|0;tm(o,10,0);if((a[g]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;a[t]=1;a[u]=69;A=e|0;e=f|0;f=o|0;B=o+4|0;C=a[l]|0;l=a[m]|0;m=x;x=c[A>>2]|0;a:while(1){do{if((x|0)==0){D=0}else{if((c[x+12>>2]|0)!=(c[x+16>>2]|0)){D=x;break}if(!((Fc[c[(c[x>>2]|0)+36>>2]&255](x)|0)==-1)){D=x;break}c[A>>2]=0;D=0}}while(0);E=(D|0)==0;F=c[e>>2]|0;do{if((F|0)==0){G=17}else{if((c[F+12>>2]|0)!=(c[F+16>>2]|0)){if(E){H=F;break}else{I=m;J=F;break a}}if((Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0)==-1){c[e>>2]=0;G=17;break}else{if(E){H=F;break}else{I=m;J=F;break a}}}}while(0);if((G|0)==17){G=0;if(E){I=m;J=0;break}else{H=0}}F=a[g]|0;K=(F&1)==0;if(K){L=(F&255)>>>1}else{L=c[B>>2]|0}if(((c[p>>2]|0)-m|0)==(L|0)){if(K){M=(F&255)>>>1;N=(F&255)>>>1}else{F=c[B>>2]|0;M=F;N=F}tm(o,M<<1,0);if((a[g]&1)==0){O=10}else{O=(c[f>>2]&-2)-1|0}tm(o,O,0);if((a[g]&1)==0){P=y}else{P=c[z>>2]|0}c[p>>2]=P+N;Q=P}else{Q=m}F=D+12|0;K=c[F>>2]|0;R=D+16|0;if((K|0)==(c[R>>2]|0)){S=(Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)&255}else{S=a[K]|0}if((Yo(S,t,u,Q,p,C,l,n,w,r,s,v)|0)!=0){I=Q;J=H;break}K=c[F>>2]|0;if((K|0)==(c[R>>2]|0)){Fc[c[(c[D>>2]|0)+40>>2]&255](D)|0;m=Q;x=D;continue}else{c[F>>2]=K+1;m=Q;x=D;continue}}x=a[n]|0;if((x&1)==0){T=(x&255)>>>1}else{T=c[n+4>>2]|0}do{if((T|0)!=0){if((a[t]|0)==0){break}x=c[r>>2]|0;if((x-q|0)>=160){break}Q=c[s>>2]|0;c[r>>2]=x+4;c[x>>2]=Q}}while(0);U=+Kt(I,c[p>>2]|0,j);h[k>>3]=U;hr(n,w,c[r>>2]|0,j);do{if((D|0)==0){V=0}else{if((c[D+12>>2]|0)!=(c[D+16>>2]|0)){V=D;break}if(!((Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)==-1)){V=D;break}c[A>>2]=0;V=0}}while(0);A=(V|0)==0;do{if((J|0)==0){G=63}else{if((c[J+12>>2]|0)!=(c[J+16>>2]|0)){if(!A){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}if((Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0)==-1){c[e>>2]=0;G=63;break}if(!(A^(J|0)==0)){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}}while(0);do{if((G|0)==63){if(A){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}}while(0);c[j>>2]=c[j>>2]|2;W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}function to(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];uo(a,0,j,k,f,g,h);i=b;return}function uo(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0;d=i;i=i+280|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d+32|0;m=d+40|0;n=d+48|0;o=d+64|0;p=d+80|0;q=d+88|0;r=d+248|0;s=d+256|0;t=d+264|0;u=d+272|0;v=d|0;Xo(n,g,v,l,m);g=o;dv(g|0,0,12)|0;tm(o,10,0);if((a[g]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;a[t]=1;a[u]=69;A=e|0;e=f|0;f=o|0;B=o+4|0;C=a[l]|0;l=a[m]|0;m=x;x=c[A>>2]|0;a:while(1){do{if((x|0)==0){D=0}else{if((c[x+12>>2]|0)!=(c[x+16>>2]|0)){D=x;break}if(!((Fc[c[(c[x>>2]|0)+36>>2]&255](x)|0)==-1)){D=x;break}c[A>>2]=0;D=0}}while(0);E=(D|0)==0;F=c[e>>2]|0;do{if((F|0)==0){G=17}else{if((c[F+12>>2]|0)!=(c[F+16>>2]|0)){if(E){H=F;break}else{I=m;J=F;break a}}if((Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0)==-1){c[e>>2]=0;G=17;break}else{if(E){H=F;break}else{I=m;J=F;break a}}}}while(0);if((G|0)==17){G=0;if(E){I=m;J=0;break}else{H=0}}F=a[g]|0;K=(F&1)==0;if(K){L=(F&255)>>>1}else{L=c[B>>2]|0}if(((c[p>>2]|0)-m|0)==(L|0)){if(K){M=(F&255)>>>1;N=(F&255)>>>1}else{F=c[B>>2]|0;M=F;N=F}tm(o,M<<1,0);if((a[g]&1)==0){O=10}else{O=(c[f>>2]&-2)-1|0}tm(o,O,0);if((a[g]&1)==0){P=y}else{P=c[z>>2]|0}c[p>>2]=P+N;Q=P}else{Q=m}F=D+12|0;K=c[F>>2]|0;R=D+16|0;if((K|0)==(c[R>>2]|0)){S=(Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)&255}else{S=a[K]|0}if((Yo(S,t,u,Q,p,C,l,n,w,r,s,v)|0)!=0){I=Q;J=H;break}K=c[F>>2]|0;if((K|0)==(c[R>>2]|0)){Fc[c[(c[D>>2]|0)+40>>2]&255](D)|0;m=Q;x=D;continue}else{c[F>>2]=K+1;m=Q;x=D;continue}}x=a[n]|0;if((x&1)==0){T=(x&255)>>>1}else{T=c[n+4>>2]|0}do{if((T|0)!=0){if((a[t]|0)==0){break}x=c[r>>2]|0;if((x-q|0)>=160){break}Q=c[s>>2]|0;c[r>>2]=x+4;c[x>>2]=Q}}while(0);U=+Jt(I,c[p>>2]|0,j);h[k>>3]=U;hr(n,w,c[r>>2]|0,j);do{if((D|0)==0){V=0}else{if((c[D+12>>2]|0)!=(c[D+16>>2]|0)){V=D;break}if(!((Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0)==-1)){V=D;break}c[A>>2]=0;V=0}}while(0);A=(V|0)==0;do{if((J|0)==0){G=63}else{if((c[J+12>>2]|0)!=(c[J+16>>2]|0)){if(!A){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}if((Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0)==-1){c[e>>2]=0;G=63;break}if(!(A^(J|0)==0)){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}}while(0);do{if((G|0)==63){if(A){break}W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}}while(0);c[j>>2]=c[j>>2]|2;W=b|0;c[W>>2]=V;X=160;Y=0;rm(o);rm(n);i=d;return}function vo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;d=i;i=i+272|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+16|0;m=d+48|0;n=d+64|0;o=d+72|0;p=d+88|0;q=d+96|0;r=d+256|0;s=d+264|0;dv(m|0,0,12)|0;Lm(n,g);g=n|0;n=c[g>>2]|0;if(!((c[8716]|0)==-1)){c[k>>2]=34864;c[k+4>>2]=16;c[k+8>>2]=0;mm(34864,k,114)}k=(c[8717]|0)-1|0;t=c[n+8>>2]|0;do{if((c[n+12>>2]|0)-t>>2>>>0>k>>>0){u=c[t+(k<<2)>>2]|0;if((u|0)==0){break}v=l|0;Sc[c[(c[u>>2]|0)+32>>2]&15](u,27208,27234,v)|0;Ul(c[g>>2]|0)|0;u=o;dv(u|0,0,12)|0;tm(o,10,0);if((a[u]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;A=e|0;B=f|0;C=o|0;D=o+4|0;E=x;F=c[A>>2]|0;a:while(1){do{if((F|0)==0){G=0}else{if((c[F+12>>2]|0)!=(c[F+16>>2]|0)){G=F;break}if(!((Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0)==-1)){G=F;break}c[A>>2]=0;G=0}}while(0);H=(G|0)==0;I=c[B>>2]|0;do{if((I|0)==0){J=25}else{if((c[I+12>>2]|0)!=(c[I+16>>2]|0)){if(H){break}else{K=E;break a}}if((Fc[c[(c[I>>2]|0)+36>>2]&255](I)|0)==-1){c[B>>2]=0;J=25;break}else{if(H){break}else{K=E;break a}}}}while(0);if((J|0)==25){J=0;if(H){K=E;break}}I=a[u]|0;L=(I&1)==0;if(L){M=(I&255)>>>1}else{M=c[D>>2]|0}if(((c[p>>2]|0)-E|0)==(M|0)){if(L){N=(I&255)>>>1;O=(I&255)>>>1}else{I=c[D>>2]|0;N=I;O=I}tm(o,N<<1,0);if((a[u]&1)==0){P=10}else{P=(c[C>>2]&-2)-1|0}tm(o,P,0);if((a[u]&1)==0){Q=y}else{Q=c[z>>2]|0}c[p>>2]=Q+O;R=Q}else{R=E}I=G+12|0;L=c[I>>2]|0;S=G+16|0;if((L|0)==(c[S>>2]|0)){T=(Fc[c[(c[G>>2]|0)+36>>2]&255](G)|0)&255}else{T=a[L]|0}if((wo(T,16,R,p,s,0,m,w,r,v)|0)!=0){K=R;break}L=c[I>>2]|0;if((L|0)==(c[S>>2]|0)){Fc[c[(c[G>>2]|0)+40>>2]&255](G)|0;E=R;F=G;continue}else{c[I>>2]=L+1;E=R;F=G;continue}}a[K+3|0]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}F=Xa(2147483647,14472,0)|0;c[8330]=F}}while(0);F=xo(K,c[8330]|0,11744,(E=i,i=i+8|0,c[E>>2]=j,E)|0)|0;i=E;if((F|0)!=1){c[h>>2]=4}F=c[A>>2]|0;do{if((F|0)==0){U=0}else{if((c[F+12>>2]|0)!=(c[F+16>>2]|0)){U=F;break}if(!((Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0)==-1)){U=F;break}c[A>>2]=0;U=0}}while(0);A=(U|0)==0;F=c[B>>2]|0;do{if((F|0)==0){J=73}else{if((c[F+12>>2]|0)!=(c[F+16>>2]|0)){if(!A){break}V=b|0;c[V>>2]=U;W=160;X=0;rm(o);rm(m);i=d;return}if((Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0)==-1){c[B>>2]=0;J=73;break}if(!(A^(F|0)==0)){break}V=b|0;c[V>>2]=U;W=160;X=0;rm(o);rm(m);i=d;return}}while(0);do{if((J|0)==73){if(A){break}V=b|0;c[V>>2]=U;W=160;X=0;rm(o);rm(m);i=d;return}}while(0);c[h>>2]=c[h>>2]|2;V=b|0;c[V>>2]=U;W=160;X=0;rm(o);rm(m);i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function wo(b,d,e,f,g,h,i,j,k,l){b=b|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;var m=0,n=0,o=0,p=0,q=0,r=0;m=c[f>>2]|0;n=(m|0)==(e|0);do{if(n){o=(a[l+24|0]|0)==b<<24>>24;if(!o){if(!((a[l+25|0]|0)==b<<24>>24)){break}}c[f>>2]=e+1;a[e]=o?43:45;c[g>>2]=0;p=0;return p|0}}while(0);o=a[i]|0;if((o&1)==0){q=(o&255)>>>1}else{q=c[i+4>>2]|0}if((q|0)!=0&b<<24>>24==h<<24>>24){h=c[k>>2]|0;if((h-j|0)>=160){p=0;return p|0}j=c[g>>2]|0;c[k>>2]=h+4;c[h>>2]=j;c[g>>2]=0;p=0;return p|0}j=l+26|0;h=l;while(1){k=h+1|0;if((a[h]|0)==b<<24>>24){r=h;break}if((k|0)==(j|0)){r=j;break}else{h=k}}h=r-l|0;if((h|0)>23){p=-1;return p|0}do{if((d|0)==8|(d|0)==10){if((h|0)<(d|0)){break}else{p=-1}return p|0}else if((d|0)==16){if((h|0)<22){break}if(n){p=-1;return p|0}if((m-e|0)>=3){p=-1;return p|0}if((a[m-1|0]|0)!=48){p=-1;return p|0}c[g>>2]=0;l=a[27208+h|0]|0;c[f>>2]=m+1;a[m]=l;p=0;return p|0}}while(0);e=a[27208+h|0]|0;c[f>>2]=m+1;a[m]=e;c[g>>2]=(c[g>>2]|0)+1;p=0;return p|0}function xo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;i=i+16|0;g=f|0;h=g;c[h>>2]=e;c[h+4>>2]=0;h=bc(b|0)|0;b=cb(a|0,d|0,g|0)|0;if((h|0)==0){i=f;return b|0}bc(h|0)|0;i=f;return b|0}function yo(a){a=a|0;Sl(a|0);Pu(a);return}function zo(a){a=a|0;Sl(a|0);return}function Ao(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;k=i;i=i+112|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=k|0;m=k+16|0;n=k+32|0;o=k+40|0;p=k+48|0;q=k+56|0;r=k+64|0;s=k+72|0;t=k+80|0;u=k+104|0;if((c[g+4>>2]&1|0)==0){c[n>>2]=-1;v=c[(c[d>>2]|0)+16>>2]|0;w=e|0;c[p>>2]=c[w>>2];c[q>>2]=c[f>>2];Mc[v&127](o,d,p,q,g,h,n);q=c[o>>2]|0;c[w>>2]=q;w=c[n>>2]|0;if((w|0)==1){a[j]=1}else if((w|0)==0){a[j]=0}else{a[j]=1;c[h>>2]=4}c[b>>2]=q;i=k;return}Lm(r,g);q=r|0;r=c[q>>2]|0;if(!((c[8714]|0)==-1)){c[m>>2]=34856;c[m+4>>2]=16;c[m+8>>2]=0;mm(34856,m,114)}m=(c[8715]|0)-1|0;w=c[r+8>>2]|0;do{if((c[r+12>>2]|0)-w>>2>>>0>m>>>0){n=c[w+(m<<2)>>2]|0;if((n|0)==0){break}o=n;Ul(c[q>>2]|0)|0;Lm(s,g);n=s|0;p=c[n>>2]|0;if(!((c[8618]|0)==-1)){c[l>>2]=34472;c[l+4>>2]=16;c[l+8>>2]=0;mm(34472,l,114)}d=(c[8619]|0)-1|0;v=c[p+8>>2]|0;do{if((c[p+12>>2]|0)-v>>2>>>0>d>>>0){x=c[v+(d<<2)>>2]|0;if((x|0)==0){break}y=x;Ul(c[n>>2]|0)|0;z=t|0;A=x;Ec[c[(c[A>>2]|0)+24>>2]&127](z,y);Ec[c[(c[A>>2]|0)+28>>2]&127](t+12|0,y);c[u>>2]=c[f>>2];y=(Bo(e,u,z,t+24|0,o,h,1)|0)==(z|0)|0;a[j]=y;c[b>>2]=c[e>>2];Cm(t+12|0);Cm(t|0);i=k;return}}while(0);o=pc(4)|0;lu(o);Fb(o|0,25544,156)}}while(0);k=pc(4)|0;lu(k);Fb(k|0,25544,156)}function Bo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;k=i;i=i+104|0;l=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[l>>2];l=(f-e|0)/12|0;m=k|0;do{if(l>>>0>100>>>0){n=Gu(l)|0;if((n|0)!=0){o=n;p=n;break}Uu();o=0;p=0}else{o=m;p=0}}while(0);m=(e|0)==(f|0);if(m){q=l;r=0}else{n=l;l=0;s=o;t=e;while(1){u=a[t]|0;if((u&1)==0){v=(u&255)>>>1}else{v=c[t+4>>2]|0}if((v|0)==0){a[s]=2;w=l+1|0;x=n-1|0}else{a[s]=1;w=l;x=n}u=t+12|0;if((u|0)==(f|0)){q=x;r=w;break}else{n=x;l=w;s=s+1|0;t=u}}}t=b|0;b=d|0;d=g;s=0;w=r;r=q;a:while(1){q=c[t>>2]|0;do{if((q|0)==0){y=1}else{l=c[q+12>>2]|0;if((l|0)==(c[q+16>>2]|0)){z=Fc[c[(c[q>>2]|0)+36>>2]&255](q)|0}else{z=c[l>>2]|0}if((z|0)==-1){c[t>>2]=0;y=1;break}else{y=(c[t>>2]|0)==0;break}}}while(0);q=c[b>>2]|0;do{if((q|0)==0){A=1;B=0}else{l=c[q+12>>2]|0;if((l|0)==(c[q+16>>2]|0)){C=Fc[c[(c[q>>2]|0)+36>>2]&255](q)|0}else{C=c[l>>2]|0}if(!((C|0)==-1)){A=0;B=q;break}c[b>>2]=0;A=1;B=0}}while(0);D=c[t>>2]|0;if(!((y^A)&(r|0)!=0)){break}q=c[D+12>>2]|0;if((q|0)==(c[D+16>>2]|0)){E=Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0}else{E=c[q>>2]|0}if(j){F=E}else{F=Qc[c[(c[d>>2]|0)+28>>2]&63](g,E)|0}q=s+1|0;if(m){s=q;w=w;r=r;continue}b:do{if(j){l=r;x=w;n=o;v=0;u=e;while(1){do{if((a[n]|0)==1){G=a[u]|0;H=(G&1)==0;if(H){I=u+4|0}else{I=c[u+8>>2]|0}if((F|0)!=(c[I+(s<<2)>>2]|0)){a[n]=0;J=v;K=x;L=l-1|0;break}if(H){M=(G&255)>>>1}else{M=c[u+4>>2]|0}if((M|0)!=(q|0)){J=1;K=x;L=l;break}a[n]=2;J=1;K=x+1|0;L=l-1|0}else{J=v;K=x;L=l}}while(0);G=u+12|0;if((G|0)==(f|0)){N=L;O=K;P=J;break b}l=L;x=K;n=n+1|0;v=J;u=G}}else{u=r;v=w;n=o;x=0;l=e;while(1){do{if((a[n]|0)==1){G=l;if((a[G]&1)==0){Q=l+4|0}else{Q=c[l+8>>2]|0}if((F|0)!=(Qc[c[(c[d>>2]|0)+28>>2]&63](g,c[Q+(s<<2)>>2]|0)|0)){a[n]=0;R=x;S=v;T=u-1|0;break}H=a[G]|0;if((H&1)==0){U=(H&255)>>>1}else{U=c[l+4>>2]|0}if((U|0)!=(q|0)){R=1;S=v;T=u;break}a[n]=2;R=1;S=v+1|0;T=u-1|0}else{R=x;S=v;T=u}}while(0);H=l+12|0;if((H|0)==(f|0)){N=T;O=S;P=R;break b}u=T;v=S;n=n+1|0;x=R;l=H}}}while(0);if(!P){s=q;w=O;r=N;continue}l=c[t>>2]|0;x=l+12|0;n=c[x>>2]|0;if((n|0)==(c[l+16>>2]|0)){Fc[c[(c[l>>2]|0)+40>>2]&255](l)|0}else{c[x>>2]=n+4}if((N+O|0)>>>0<2>>>0){s=q;w=O;r=N;continue}else{V=O;W=o;X=e}while(1){do{if((a[W]|0)==2){n=a[X]|0;if((n&1)==0){Y=(n&255)>>>1}else{Y=c[X+4>>2]|0}if((Y|0)==(q|0)){Z=V;break}a[W]=0;Z=V-1|0}else{Z=V}}while(0);n=X+12|0;if((n|0)==(f|0)){s=q;w=Z;r=N;continue a}else{V=Z;W=W+1|0;X=n}}}do{if((D|0)==0){_=1}else{X=c[D+12>>2]|0;if((X|0)==(c[D+16>>2]|0)){$=Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0}else{$=c[X>>2]|0}if(($|0)==-1){c[t>>2]=0;_=1;break}else{_=(c[t>>2]|0)==0;break}}}while(0);do{if((B|0)==0){aa=94}else{t=c[B+12>>2]|0;if((t|0)==(c[B+16>>2]|0)){ba=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{ba=c[t>>2]|0}if((ba|0)==-1){c[b>>2]=0;aa=94;break}else{if(_){break}else{aa=96;break}}}}while(0);if((aa|0)==94){if(_){aa=96}}if((aa|0)==96){c[h>>2]=c[h>>2]|2}c:do{if(m){aa=101}else{if((a[o]|0)==2){ca=e;break}else{da=e;ea=o}while(1){_=da+12|0;b=ea+1|0;if((_|0)==(f|0)){aa=101;break c}if((a[b]|0)==2){ca=_;break}else{da=_;ea=b}}}}while(0);if((aa|0)==101){c[h>>2]=c[h>>2]|4;ca=f}if((p|0)==0){fa=100;ga=0;i=k;return ca|0}Hu(p);fa=100;ga=0;i=k;return ca|0}function Co(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Do(a,0,j,k,f,g,h);i=b;return}
|
|
|
|
|
|
|
|
function Xi(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;j=i;i=i+8|0;k=j|0;a[b+1|0]=0;l=b+8|0;m=c[l>>2]|0;n=e+3|0;do{if((m|0)==0){o=Wi(b,n)|0;c[l>>2]=o;if((o|0)==0){p=7;i=j;return p|0}else{q=o+8|0;c[q>>2]=f;c[q+4>>2]=g;c[o+16>>2]=h;r=c[l>>2]|0;break}}else{r=m}}while(0);m=r+24|0;o=c[m>>2]|0;q=n+o|0;s=r+28|0;if((c[s>>2]|0)<(q|0)){t=Gu(q)|0;if((t|0)==0){p=7;i=j;return p|0}u=r+20|0;v=c[u>>2]|0;if((v|0)!=0){cv(t|0,v|0,c[m>>2]|0)|0;Hu(v)}c[u>>2]=t;c[s>>2]=q;w=c[m>>2]|0;x=t}else{w=o;x=c[r+20>>2]|0}o=x+w|0;do{if((e|0)>0){w=b+4|0;t=b+12|0;m=b+20|0;q=b+16|0;s=b+28|0;u=b+32|0;v=b+36|0;y=d;z=r;A=o;B=1;a:while(1){C=c[w>>2]|0;b:do{switch(C|0){case 7:{D=a[y]|0;if((D<<24>>24|0)==0){a[A]=0;E=A+1|0;F=z;break b}else if((D<<24>>24|0)==1){G=z+24|0;c[G>>2]=A-(c[z+20>>2]|0);H=c[m>>2]|0;I=c[q>>2]|0;if((H|0)==(I|0)){J=0}else{J=(H-I<<8)-1|0}K=c[s>>2]|0;L=c[u>>2]|0;if((J-K|0)==(L|0)){$i(t);M=c[u>>2]|0;N=c[s>>2]|0;O=c[q>>2]|0;P=c[m>>2]|0}else{M=L;N=K;O=I;P=H}H=M+N|0;do{if((P|0)!=(O|0)){I=(c[O+(H>>>10<<2)>>2]|0)+((H&1023)<<2)|0;if((I|0)==0){break}c[I>>2]=z}}while(0);c[u>>2]=M+1;c[v>>2]=(c[v>>2]|0)+(c[G>>2]|0);H=Wi(b,n)|0;c[l>>2]=H;if((H|0)==0){p=7;Q=48;break a}I=H+8|0;c[I>>2]=f;c[I+4>>2]=g;c[H+16>>2]=h;H=c[l>>2]|0;I=c[H+20>>2]|0;c[w>>2]=3;E=I;F=H;break b}else if((D<<24>>24|0)==3){a[A]=0;H=A+2|0;a[A+1|0]=0;c[w>>2]=5;I=z+36|0;K=c[I>>2]|0;L=(K-(c[z+32>>2]|0)>>2)+(H-(c[z+20>>2]|0))|0;c[k>>2]=L;if((K|0)==(c[z+40>>2]|0)){fj(z+32|0,k);E=H;F=z;break b}if((K|0)!=0){c[K>>2]=L}c[I>>2]=K+4;E=H;F=z;break b}else{a[A]=0;a[A+1|0]=0;a[A+2|0]=a[y]|0;c[w>>2]=5;E=A+3|0;F=z;break b}break};case 0:case 1:{if((a[y]|0)==0){c[w>>2]=C+1;E=A;F=z;break b}else{c[w>>2]=0;E=A;F=z;break b}break};case 3:{a[A]=a[y]|0;c[w>>2]=4;E=A+1|0;F=z;break};case 5:{H=a[y]|0;if(H<<24>>24==0){c[w>>2]=6;E=A;F=z;break b}else{a[A]=H;E=A+1|0;F=z;break b}break};case 2:{H=a[y]|0;if((H<<24>>24|0)==0){E=A;F=z;break b}else if((H<<24>>24|0)==1){c[w>>2]=3;E=A;F=z;break b}else{c[w>>2]=0;E=A;F=z;break b}break};case 6:{if((a[y]|0)==0){c[w>>2]=7;E=A;F=z;break b}else{a[A]=0;a[A+1|0]=a[y]|0;c[w>>2]=5;E=A+2|0;F=z;break b}break};case 4:{a[A]=a[y]|0;c[w>>2]=5;E=A+1|0;F=z;break};default:{E=A;F=z}}}while(0);if((B|0)>=(e|0)){Q=46;break}y=y+1|0;z=F;A=E;B=B+1|0}if((Q|0)==46){R=F;S=E;T=c[F+20>>2]|0;break}else if((Q|0)==48){i=j;return p|0}}else{R=r;S=o;T=x}}while(0);c[R+24>>2]=S-T;p=0;i=j;return p|0}function Yi(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;if((c[b+8>>2]|0)!=0){ec(6496,15256,375,17864);return 0}a[b+1|0]=0;i=Wi(b,e)|0;do{if((i|0)!=0){j=i+28|0;if((c[j>>2]|0)<(e|0)){k=Gu(e)|0;if((k|0)==0){break}l=i+20|0;m=c[l>>2]|0;if((m|0)!=0){cv(k|0,m|0,c[i+24>>2]|0)|0;Hu(m)}c[l>>2]=k;c[j>>2]=e;n=k}else{n=c[i+20>>2]|0}cv(n|0,d|0,e)|0;k=i+24|0;c[k>>2]=e;j=i+8|0;c[j>>2]=f;c[j+4>>2]=g;c[i+16>>2]=h;Ri(i);j=b+20|0;l=c[j>>2]|0;m=b+16|0;o=c[m>>2]|0;if((l|0)==(o|0)){p=0}else{p=(l-o<<8)-1|0}q=b+28|0;r=c[q>>2]|0;s=b+32|0;t=c[s>>2]|0;if((p-r|0)==(t|0)){$i(b+12|0);u=c[s>>2]|0;v=c[q>>2]|0;w=c[m>>2]|0;x=c[j>>2]|0}else{u=t;v=r;w=o;x=l}l=u+v|0;do{if((x|0)!=(w|0)){o=(c[w+(l>>>10<<2)>>2]|0)+((l&1023)<<2)|0;if((o|0)==0){break}c[o>>2]=i}}while(0);c[s>>2]=u+1;l=b+36|0;c[l>>2]=(c[l>>2]|0)+(c[k>>2]|0);y=0;return y|0}}while(0);Vi(b,i);y=7;return y|0}function Zi(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=b+8|0;e=c[d>>2]|0;if((e|0)==0){f=0;return f|0}g=b+4|0;h=c[g>>2]|0;if((h|0)==6){i=e+24|0;j=c[i>>2]|0;k=j+1|0;l=e+28|0;if((c[l>>2]|0)<(k|0)){m=Gu(k)|0;if((m|0)==0){f=7;return f|0}n=e+20|0;o=c[n>>2]|0;if((o|0)==0){p=j}else{cv(m|0,o|0,j)|0;Hu(o);p=c[i>>2]|0}c[n>>2]=m;c[l>>2]=k;q=p;r=m}else{q=j;r=c[e+20>>2]|0}a[r+q|0]=0;c[i>>2]=(c[i>>2]|0)+1;s=c[g>>2]|0}else{s=h}if((s|0)==7){h=e+24|0;i=c[h>>2]|0;q=i+2|0;r=e+28|0;if((c[r>>2]|0)<(q|0)){j=Gu(q)|0;if((j|0)==0){f=7;return f|0}m=e+20|0;p=c[m>>2]|0;if((p|0)==0){t=i}else{cv(j|0,p|0,i)|0;Hu(p);t=c[h>>2]|0}c[m>>2]=j;c[r>>2]=q;u=t;v=j}else{u=i;v=c[e+20>>2]|0}i=v+u|0;C=0;a[i]=C;C=C>>8;a[i+1|0]=C;c[h>>2]=(c[h>>2]|0)+2;w=c[g>>2]|0}else{w=s}if((w|0)>4){w=b+20|0;s=c[w>>2]|0;h=b+16|0;i=c[h>>2]|0;if((s|0)==(i|0)){x=0}else{x=(s-i<<8)-1|0}u=b+28|0;v=c[u>>2]|0;j=b+32|0;t=c[j>>2]|0;if((x-v|0)==(t|0)){$i(b+12|0);y=c[j>>2]|0;z=c[u>>2]|0;A=c[h>>2]|0;B=c[w>>2]|0}else{y=t;z=v;A=i;B=s}s=y+z|0;do{if((B|0)!=(A|0)){z=(c[A+(s>>>10<<2)>>2]|0)+((s&1023)<<2)|0;if((z|0)==0){break}c[z>>2]=e}}while(0);c[j>>2]=y+1;y=b+36|0;c[y>>2]=(c[y>>2]|0)+(c[e+24>>2]|0);c[d>>2]=0}c[g>>2]=0;f=0;return f|0}function _i(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=a+8|0;d=c[b>>2]|0;if((d|0)!=0){Vi(a,d);c[b>>2]=0}b=a+32|0;d=c[b>>2]|0;if((d|0)==0){e=a+36|0;f=a+4|0;c[f>>2]=0;c[e>>2]=0;return}g=a+16|0;h=a+28|0;i=a+36|0;j=d;while(1){d=c[g>>2]|0;k=c[h>>2]|0;l=c[(c[d+(k>>>10<<2)>>2]|0)+((k&1023)<<2)>>2]|0;c[b>>2]=j-1;m=k+1|0;c[h>>2]=m;if(m>>>0>2047>>>0){Pu(c[d>>2]|0);c[g>>2]=(c[g>>2]|0)+4;c[h>>2]=(c[h>>2]|0)-1024}c[i>>2]=(c[i>>2]|0)-(c[l+24>>2]|0);if((l|0)==0){e=i;n=10;break}Vi(a,l);l=c[b>>2]|0;if((l|0)==0){e=i;n=10;break}else{j=l}}if((n|0)==10){f=a+4|0;c[f>>2]=0;c[e>>2]=0;return}}function $i(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;i=i+48|0;d=b|0;e=b+8|0;f=b+16|0;g=b+40|0;h=a+16|0;j=c[h>>2]|0;if(j>>>0>1023>>>0){c[h>>2]=j-1024;j=a+4|0;h=c[j>>2]|0;k=c[h>>2]|0;l=h+4|0;c[j>>2]=l;m=a+8|0;n=c[m>>2]|0;o=a+12|0;do{if((n|0)==(c[o>>2]|0)){p=a|0;q=c[p>>2]|0;if(l>>>0>q>>>0){r=l;s=((r-q>>2)+1|0)/-2|0;t=n-r|0;fv(h+(s+1<<2)|0,l|0,t|0)|0;r=h+((t>>2)+1+s<<2)|0;c[m>>2]=r;c[j>>2]=(c[j>>2]|0)+(s<<2);u=r;v=13;break}r=n-q>>1;s=(r|0)==0?1:r;r=Nu(s<<2)|0;t=r+(s>>>2<<2)|0;w=r+(s<<2)|0;if((l|0)==(n|0)){x=t;y=q}else{q=l;s=t;do{if((s|0)==0){z=0}else{c[s>>2]=c[q>>2];z=s}s=z+4|0;q=q+4|0;}while((q|0)!=(n|0));x=s;y=c[p>>2]|0}c[p>>2]=r;c[j>>2]=t;c[m>>2]=x;c[o>>2]=w;if((y|0)==0){A=x;v=12;break}Pu(y);A=c[m>>2]|0;v=12}else{A=n;v=12}}while(0);if((v|0)==12){if((A|0)==0){B=0}else{u=A;v=13}}if((v|0)==13){c[u>>2]=k;B=c[m>>2]|0}c[m>>2]=B+4;i=b;return}B=a|0;m=a+8|0;k=c[m>>2]|0;u=a+4|0;A=k-(c[u>>2]|0)>>2;n=a+12|0;y=c[n>>2]|0;x=a|0;o=y-(c[x>>2]|0)|0;if(!(A>>>0<o>>2>>>0)){j=o>>1;o=(j|0)==0?1:j;j=f+12|0;c[f+16>>2]=a+12;a=Nu(o<<2)|0;z=f|0;c[z>>2]=a;l=a+(A<<2)|0;A=f+8|0;c[A>>2]=l;h=f+4|0;c[h>>2]=l;c[j>>2]=a+(o<<2);o=Nu(4096)|0;c[g>>2]=o;cj(f,g);g=c[m>>2]|0;while(1){if((g|0)==(c[u>>2]|0)){break}o=g-4|0;dj(f,o);g=o}f=c[x>>2]|0;c[x>>2]=c[z>>2];c[z>>2]=f;c[u>>2]=c[h>>2];c[h>>2]=g;h=c[m>>2]|0;c[m>>2]=c[A>>2];c[A>>2]=h;z=c[n>>2]|0;c[n>>2]=c[j>>2];c[j>>2]=z;if((h|0)!=(g|0)){c[A>>2]=h+(~((h-4+(-g|0)|0)>>>2)<<2)}if((f|0)==0){i=b;return}Pu(f);i=b;return}f=Nu(4096)|0;if((y|0)!=(k|0)){c[d>>2]=f;aj(B,d);i=b;return}c[e>>2]=f;bj(B,e);e=c[u>>2]|0;B=c[e>>2]|0;f=e+4|0;c[u>>2]=f;d=c[m>>2]|0;do{if((d|0)==(c[n>>2]|0)){k=c[x>>2]|0;if(f>>>0>k>>>0){y=f;g=((y-k>>2)+1|0)/-2|0;h=d-y|0;fv(e+(g+1<<2)|0,f|0,h|0)|0;y=e+((h>>2)+1+g<<2)|0;c[m>>2]=y;c[u>>2]=(c[u>>2]|0)+(g<<2);C=y;v=29;break}y=d-k>>1;g=(y|0)==0?1:y;y=Nu(g<<2)|0;h=y+(g>>>2<<2)|0;A=y+(g<<2)|0;if((f|0)==(d|0)){D=h;E=k}else{k=f;g=h;do{if((g|0)==0){F=0}else{c[g>>2]=c[k>>2];F=g}g=F+4|0;k=k+4|0;}while((k|0)!=(d|0));D=g;E=c[x>>2]|0}c[x>>2]=y;c[u>>2]=h;c[m>>2]=D;c[n>>2]=A;if((E|0)==0){G=D;v=28;break}Pu(E);G=c[m>>2]|0;v=28}else{G=d;v=28}}while(0);if((v|0)==28){if((G|0)==0){H=0}else{C=G;v=29}}if((v|0)==29){c[C>>2]=B;H=c[m>>2]|0}c[m>>2]=H+4;i=b;return}function aj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=c[d>>2]|0;f=a+12|0;do{if((e|0)==(c[f>>2]|0)){g=a+4|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;if(h>>>0>j>>>0){k=h;l=((k-j>>2)+1|0)/-2|0;m=e-k|0;fv(h+(l<<2)|0,h|0,m|0)|0;k=h+(l+(m>>2)<<2)|0;c[d>>2]=k;c[g>>2]=(c[g>>2]|0)+(l<<2);n=k;break}k=e-j>>1;l=(k|0)==0?1:k;k=Nu(l<<2)|0;m=k+(l>>>2<<2)|0;o=k+(l<<2)|0;if((h|0)==(e|0)){p=m;q=j}else{j=h;h=m;do{if((h|0)==0){r=0}else{c[h>>2]=c[j>>2];r=h}h=r+4|0;j=j+4|0;}while((j|0)!=(e|0));p=h;q=c[i>>2]|0}c[i>>2]=k;c[g>>2]=m;c[d>>2]=p;c[f>>2]=o;if((q|0)==0){n=p;break}Pu(q);n=c[d>>2]|0}else{n=e}}while(0);if((n|0)==0){s=0;t=s+4|0;c[d>>2]=t;return}c[n>>2]=c[b>>2];s=c[d>>2]|0;t=s+4|0;c[d>>2]=t;return}function bj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=c[d>>2]|0;f=a|0;do{if((e|0)==(c[f>>2]|0)){g=a+8|0;h=c[g>>2]|0;i=a+12|0;j=c[i>>2]|0;k=j;if(h>>>0<j>>>0){j=h;l=((k-j>>2)+1|0)/2|0;m=j-e|0;j=h+(l-(m>>2)<<2)|0;fv(j|0,e|0,m|0)|0;c[d>>2]=j;c[g>>2]=(c[g>>2]|0)+(l<<2);n=j;break}j=k-e>>1;k=(j|0)==0?1:j;j=Nu(k<<2)|0;l=j+((k+3|0)>>>2<<2)|0;m=j+(k<<2)|0;if((e|0)==(h|0)){o=l;p=e}else{k=e;q=l;do{if((q|0)==0){r=0}else{c[q>>2]=c[k>>2];r=q}q=r+4|0;k=k+4|0;}while((k|0)!=(h|0));o=q;p=c[f>>2]|0}c[f>>2]=j;c[d>>2]=l;c[g>>2]=o;c[i>>2]=m;if((p|0)==0){n=l;break}Pu(p);n=c[d>>2]|0}else{n=e}}while(0);c[n-4>>2]=c[b>>2];c[d>>2]=(c[d>>2]|0)-4;return}function cj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=c[d>>2]|0;f=a+12|0;do{if((e|0)==(c[f>>2]|0)){g=a+4|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;if(h>>>0>j>>>0){k=h;l=((k-j>>2)+1|0)/-2|0;m=e-k|0;fv(h+(l<<2)|0,h|0,m|0)|0;k=h+(l+(m>>2)<<2)|0;c[d>>2]=k;c[g>>2]=(c[g>>2]|0)+(l<<2);n=k;break}k=e-j>>1;l=(k|0)==0?1:k;k=Nu(l<<2)|0;m=k+(l>>>2<<2)|0;o=k+(l<<2)|0;if((h|0)==(e|0)){p=m;q=j}else{j=h;h=m;do{if((h|0)==0){r=0}else{c[h>>2]=c[j>>2];r=h}h=r+4|0;j=j+4|0;}while((j|0)!=(e|0));p=h;q=c[i>>2]|0}c[i>>2]=k;c[g>>2]=m;c[d>>2]=p;c[f>>2]=o;if((q|0)==0){n=p;break}Pu(q);n=c[d>>2]|0}else{n=e}}while(0);if((n|0)==0){s=0;t=s+4|0;c[d>>2]=t;return}c[n>>2]=c[b>>2];s=c[d>>2]|0;t=s+4|0;c[d>>2]=t;return}function dj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=c[d>>2]|0;f=a|0;do{if((e|0)==(c[f>>2]|0)){g=a+8|0;h=c[g>>2]|0;i=a+12|0;j=c[i>>2]|0;k=j;if(h>>>0<j>>>0){j=h;l=((k-j>>2)+1|0)/2|0;m=j-e|0;j=h+(l-(m>>2)<<2)|0;fv(j|0,e|0,m|0)|0;c[d>>2]=j;c[g>>2]=(c[g>>2]|0)+(l<<2);n=j;break}j=k-e>>1;k=(j|0)==0?1:j;j=Nu(k<<2)|0;l=j+((k+3|0)>>>2<<2)|0;m=j+(k<<2)|0;if((e|0)==(h|0)){o=l;p=e}else{k=e;q=l;do{if((q|0)==0){r=0}else{c[q>>2]=c[k>>2];r=q}q=r+4|0;k=k+4|0;}while((k|0)!=(h|0));o=q;p=c[f>>2]|0}c[f>>2]=j;c[d>>2]=l;c[g>>2]=o;c[i>>2]=m;if((p|0)==0){n=l;break}Pu(p);n=c[d>>2]|0}else{n=e}}while(0);c[n-4>>2]=c[b>>2];c[d>>2]=(c[d>>2]|0)-4;return}function ej(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function fj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function gj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=a+4|0;d=c[b>>2]|0;e=a+16|0;f=c[e>>2]|0;g=d+(f>>>10<<2)|0;h=a+8|0;i=c[h>>2]|0;if((i|0)==(d|0)){j=0;k=0;l=a+20|0}else{m=a+20|0;a=f+(c[m>>2]|0)|0;j=(c[d+(a>>>10<<2)>>2]|0)+((a&1023)<<2)|0;k=(c[g>>2]|0)+((f&1023)<<2)|0;l=m}m=g;g=k;a:while(1){k=g;do{if((k|0)==(j|0)){break a}k=k+4|0;}while((k-(c[m>>2]|0)|0)!=4096);k=m+4|0;m=k;g=c[k>>2]|0}c[l>>2]=0;l=i-d>>2;if(l>>>0>2>>>0){i=d;while(1){Pu(c[i>>2]|0);d=(c[b>>2]|0)+4|0;c[b>>2]=d;g=(c[h>>2]|0)-d>>2;if(g>>>0>2>>>0){i=d}else{n=g;break}}}else{n=l}if((n|0)==2){c[e>>2]=1024;return}else if((n|0)==1){c[e>>2]=512;return}else{return}}function hj(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;h=a[g+2|0]|0;if((a[g+13|0]|0)!=0){g=(qd(e)|0)+2&255;a[b|0]=g}g=(nd(e,1)|0)!=0;a[b+1|0]=g&1;i=f+11096+(h*5168|0)+5012|0;if(!((c[i>>2]|0)==3|g^1)){Ue(f+4|0,1006,0)}g=(nd(e,1)|0)!=0;j=b+2|0;k=g&1;a[j]=k;if((c[i>>2]|0)!=0|g^1){l=k}else{Ue(f+4|0,1006,0);l=a[j]|0}a:do{if(!(l<<24>>24==0)){j=qd(e)|0;do{if(!((j|0)==-99999)){if((j|0)>(c[f+11096+(h*5168|0)+616>>2]|0)){break}a[b+3|0]=j;k=qd(e)|0;if((k|0)==-99999|(k|0)>5){Ue(f+4|0,1006,0);m=0;return m|0}g=k+1|0;k=b+4|0;a[k]=g;if((g&255|0)==0){break a}else{n=0}while(1){g=rd(e)|0;if((g+12|0)>>>0>24>>>0){o=15;break}a[b+5+n|0]=g;g=rd(e)|0;if((g+12|0)>>>0>24>>>0){o=17;break}a[b+11+n|0]=g;n=n+1|0;if((n|0)>=(d[k]|0)){break a}}if((o|0)==15){Ue(f+4|0,1006,0);m=0;return m|0}else if((o|0)==17){Ue(f+4|0,1006,0);m=0;return m|0}}}while(0);Ue(f+4|0,1006,0);m=0;return m|0}}while(0);o=qd(e)|0;do{if(!((o|0)==-99999)){n=(c[f+11096+(h*5168|0)+4996>>2]|0)-10|0;if((o|0)>(((n|0)<0?0:n)|0)){break}a[b+17|0]=o;n=qd(e)|0;do{if(!((n|0)==-99999)){l=(c[f+11096+(h*5168|0)+5004>>2]|0)-10|0;if((n|0)>(((l|0)<0?0:l)|0)){break}a[b+18|0]=n;m=1;return m|0}}while(0);Ue(f+4|0,1006,0);m=0;return m|0}}while(0);Ue(f+4|0,1006,0);m=0;return m|0}function ij(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;if((e|0)==2){g=q}else if((e|0)==1){g=t}else{i=f;return}e=c[g>>2]|0;Zk(e,6144,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0);i=g;Zk(e,15168,(g=i,i=i+8|0,c[g>>2]=d[b|0]|0,g)|0);i=g;Zk(e,12656,(g=i,i=i+8|0,c[g>>2]=d[b+1|0]|0,g)|0);i=g;h=b+2|0;Zk(e,9712,(g=i,i=i+8|0,c[g>>2]=d[h]|0,g)|0);i=g;do{if((a[h]|0)!=0){Zk(e,6704,(g=i,i=i+8|0,c[g>>2]=d[b+3|0]|0,g)|0);i=g;j=b+4|0;Zk(e,4920,(g=i,i=i+8|0,c[g>>2]=d[j]|0,g)|0);i=g;if((a[j]|0)==0){break}else{k=0}do{l=a[b+5+k|0]|0;Zk(e,3496,(g=i,i=i+16|0,c[g>>2]=k,c[g+8>>2]=l,g)|0);i=g;l=a[b+11+k|0]|0;Zk(e,2176,(g=i,i=i+16|0,c[g>>2]=k,c[g+8>>2]=l,g)|0);i=g;k=k+1|0;}while((k|0)<(d[j]|0))}}while(0);Zk(e,1128,(g=i,i=i+8|0,c[g>>2]=d[b+17|0]|0,g)|0);i=g;Zk(e,448,(g=i,i=i+8|0,c[g>>2]=d[b+18|0]|0,g)|0);i=g;i=f;return}function jj(b){b=b|0;var c=0;a[b+4138|0]=2;a[b+4155|0]=0;a[b+4156|0]=0;c=b+4139|0;C=0;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;dv(b+4340|0,0,60)|0;lj(b,0);return}function kj(a){a=a|0;var b=0,d=0,e=0;b=c[a+4388>>2]|0;if((b|0)!=0){d=a+4392|0;e=c[d>>2]|0;if((e|0)!=(b|0)){c[d>>2]=e+(~((e-4+(-b|0)|0)>>>2)<<2)}Pu(b)}b=c[a+4376>>2]|0;if((b|0)!=0){e=a+4380|0;d=c[e>>2]|0;if((d|0)!=(b|0)){c[e>>2]=d+(~((d-4+(-b|0)|0)>>>2)<<2)}Pu(b)}b=c[a+4364>>2]|0;if((b|0)!=0){d=a+4368|0;e=c[d>>2]|0;if((e|0)!=(b|0)){c[d>>2]=e+(~((e-4+(-b|0)|0)>>>2)<<2)}Pu(b)}b=c[a+4352>>2]|0;if((b|0)!=0){e=a+4356|0;d=c[e>>2]|0;if((d|0)!=(b|0)){c[e>>2]=d+(~((d-4+(-b|0)|0)>>>2)<<2)}Pu(b)}b=c[a+4340>>2]|0;if((b|0)==0){return}d=a+4344|0;a=c[d>>2]|0;if((a|0)!=(b|0)){c[d>>2]=a+(~((a-4+(-b|0)|0)>>>2)<<2)}Pu(b);return}function lj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;dv(b|0,0,6)|0;a[b+6|0]=1;a[b+7|0]=1;c[b+8>>2]=27;a[b+12|0]=0;a[b+13|0]=0;a[b+14|0]=0;dv(b+16|0,0,19)|0;c[b+36>>2]=1;c[b+40>>2]=1;a[b+44|0]=1;a[b+45|0]=1;a[b+46|0]=1;dv(b+4172|0,0,168)|0;d=c[b+4340>>2]|0;e=b+4344|0;f=c[e>>2]|0;if((f|0)!=(d|0)){c[e>>2]=f+(~((f-4+(-d|0)|0)>>>2)<<2)}d=c[b+4352>>2]|0;f=b+4356|0;e=c[f>>2]|0;if((e|0)!=(d|0)){c[f>>2]=e+(~((e-4+(-d|0)|0)>>>2)<<2)}d=c[b+4364>>2]|0;e=b+4368|0;f=c[e>>2]|0;if((f|0)!=(d|0)){c[e>>2]=f+(~((f-4+(-d|0)|0)>>>2)<<2)}d=c[b+4376>>2]|0;f=b+4380|0;e=c[f>>2]|0;if((e|0)!=(d|0)){c[f>>2]=e+(~((e-4+(-d|0)|0)>>>2)<<2)}d=c[b+4388>>2]|0;e=b+4392|0;f=c[e>>2]|0;if((f|0)==(d|0)){g=b+4160|0;c[g>>2]=0;h=b+47|0;a[h]=0;i=b+48|0;a[i]=0;j=b+49|0;a[j]=0;k=b+52|0;c[k>>2]=0;l=b+56|0;c[l>>2]=0;m=b+60|0;a[m]=0;n=b+4125|0;a[n]=0;o=b+4128|0;c[o>>2]=2;p=b+4132|0;dv(p|0,0,6)|0;return}c[e>>2]=f+(~((f-4+(-d|0)|0)>>>2)<<2);g=b+4160|0;c[g>>2]=0;h=b+47|0;a[h]=0;i=b+48|0;a[i]=0;j=b+49|0;a[j]=0;k=b+52|0;c[k>>2]=0;l=b+56|0;c[l>>2]=0;m=b+60|0;a[m]=0;n=b+4125|0;a[n]=0;o=b+4128|0;c[o>>2]=2;p=b+4132|0;dv(p|0,0,6)|0;return}function mj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;lj(b,0);f=qd(d)|0;a[b+1|0]=f;if((f|0)>63|(f|0)==-99999){Ue(e+4|0,1009,0);g=0;return g|0}f=qd(d)|0;h=b+2|0;a[h]=f;if((f|0)>63|(f|0)==-99999){Ue(e+4|0,1010,0);g=0;return g|0}f=(nd(d,1)|0)&255;a[b+3|0]=f;f=(nd(d,1)|0)&255;a[b+31|0]=f;f=(nd(d,3)|0)&255;a[b+4132|0]=f;f=(nd(d,1)|0)&255;a[b+4|0]=f;f=(nd(d,1)|0)&255;a[b+5|0]=f;f=qd(d)|0;i=f&255;j=b+6|0;a[j]=i;if((f|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}a[j]=i+1;i=qd(d)|0;j=i&255;f=b+7|0;a[f]=j;if((i|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}a[f]=j+1;j=a[h]|0;h=e+11096+(j*5168|0)|0;if((a[h|0]|0)==0){Ue(e+4|0,1010,0);g=0;return g|0}f=rd(d)|0;i=b+8|0;c[i>>2]=f;if((f|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}c[i>>2]=f+26;f=(nd(d,1)|0)&255;a[b+12|0]=f;f=(nd(d,1)|0)&255;a[b+13|0]=f;f=(nd(d,1)|0)&255;a[b+14|0]=f;do{if(f<<24>>24==0){c[b+16>>2]=0}else{i=qd(d)|0;c[b+16>>2]=i;if(!((i|0)==-99999)){break}Ue(e+4|0,1006,0);g=0;return g|0}}while(0);f=rd(d)|0;c[b+20>>2]=f;if((f|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}f=rd(d)|0;c[b+24>>2]=f;if((f|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}f=(nd(d,1)|0)&255;a[b+28|0]=f;f=(nd(d,1)|0)&255;a[b+29|0]=f;f=(nd(d,1)|0)&255;a[b+30|0]=f;f=(nd(d,1)|0)&255;a[b+32|0]=f;f=(nd(d,1)|0)&255;i=b+34|0;a[i]=f;f=(nd(d,1)|0)&255;a[b+33|0]=f;if((a[i]|0)==0){c[b+36>>2]=1;c[b+40>>2]=1;a[b+44|0]=1;a[b+45|0]=0}else{i=qd(d)|0;f=b+36|0;c[f>>2]=i;if((i|0)==-99999|(i|0)>9){Ue(e+4|0,1006,0);g=0;return g|0}c[f>>2]=i+1;i=qd(d)|0;k=b+40|0;c[k>>2]=i;if((i|0)==-99999|(i|0)>9){Ue(e+4|0,1006,0);g=0;return g|0}c[k>>2]=i+1;i=(nd(d,1)|0)&255;a[b+44|0]=i;do{if(i<<24>>24==0){l=c[e+11096+(j*5168|0)+5056>>2]|0;m=c[e+11096+(j*5168|0)+5064>>2]|0;n=(c[f>>2]|0)-1|0;a:do{if((n|0)>0){o=l;p=0;while(1){q=qd(d)|0;r=b+4172+(p<<2)|0;c[r>>2]=q;if((q|0)==-99999){break}s=q+1|0;c[r>>2]=s;r=o-s|0;s=p+1|0;q=(c[f>>2]|0)-1|0;if((s|0)<(q|0)){o=r;p=s}else{t=r;u=q;break a}}Ue(e+4|0,1006,0);g=0;return g|0}else{t=l;u=n}}while(0);if((t|0)<1){g=0;return g|0}c[b+4172+(u<<2)>>2]=t;n=(c[k>>2]|0)-1|0;b:do{if((n|0)>0){l=m;p=0;while(1){o=qd(d)|0;q=b+4212+(p<<2)|0;c[q>>2]=o;if((o|0)==-99999){break}r=o+1|0;c[q>>2]=r;q=l-r|0;r=p+1|0;o=(c[k>>2]|0)-1|0;if((r|0)<(o|0)){l=q;p=r}else{v=q;w=o;break b}}Ue(e+4|0,1006,0);g=0;return g|0}else{v=m;w=n}}while(0);if((v|0)<1){g=0;return g|0}else{c[b+4212+(w<<2)>>2]=v;break}}}while(0);v=(nd(d,1)|0)&255;a[b+45|0]=v}v=b+52|0;c[v>>2]=0;w=b+56|0;c[w>>2]=0;k=(nd(d,1)|0)&255;a[b+46|0]=k;k=(nd(d,1)|0)&255;a[b+47|0]=k;do{if(k<<24>>24==0){a[b+48|0]=0;a[b+49|0]=0}else{t=(nd(d,1)|0)&255;a[b+48|0]=t;t=(nd(d,1)|0)&255;a[b+49|0]=t;if(!(t<<24>>24==0)){break}t=rd(d)|0;c[v>>2]=t;if((t|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}c[v>>2]=t<<1;t=rd(d)|0;c[w>>2]=t;if(!((t|0)==-99999)){c[w>>2]=t<<1;break}Ue(e+4|0,1006,0);g=0;return g|0}}while(0);w=(nd(d,1)|0)&255;a[b+60|0]=w;v=w<<24>>24==0;if(!((a[e+11096+(j*5168|0)+636|0]|0)!=0|v)){Ue(e+4|0,1006,0);g=0;return g|0}do{if(v){cv(b+61|0,e+11096+(j*5168|0)+638|0,4064)|0}else{w=lk(d,h,b+61|0,1)|0;if((w|0)==0){break}Ue(e+4|0,w,0);g=0;return g|0}}while(0);v=(nd(d,1)|0)&255;a[b+4125|0]=v;v=qd(d)|0;w=b+4128|0;c[w>>2]=v;if((v|0)==-99999){Ue(e+4|0,1006,0);g=0;return g|0}c[w>>2]=v+2;if((v|0)>((c[e+11096+(j*5168|0)+612>>2]|0)-2+(c[e+11096+(j*5168|0)+616>>2]|0)|0)){g=0;return g|0}j=(nd(d,1)|0)&255;a[b+4133|0]=j;j=(nd(d,1)|0)&255;a[b+4134|0]=j;do{if(!(j<<24>>24==0)){v=(nd(d,1)|0)&255;w=b+4135|0;a[w]=v;v=(nd(d,1)|0)&255;a[b+4136|0]=v;v=(nd(d,6)|0)&255;a[b+4137|0]=v;if((a[w]|0)==0){break}if(hj(b+4138|0,d,e,b)|0){break}else{g=0}return g|0}}while(0);nj(b,h);a[b|0]=1;g=1;return g|0}function nj(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;f=i;g=e+5040|0;c[b+4160>>2]=(c[g>>2]|0)-(c[b+16>>2]|0);c[b+4164>>2]=(c[g>>2]|0)-(d[b+4141|0]|0);c[b+4168>>2]=d[b+4138|0]|0;h=b+36|0;do{if((a[b+44|0]|0)!=0){j=c[h>>2]|0;k=i;i=i+((j<<2)+4)|0;i=i+7&-8;l=k;do{if((j|0)>=0){k=c[e+5056>>2]|0;m=0;while(1){n=(ga(k,m)|0)/(j|0)|0;c[l+(m<<2)>>2]=n;if((m|0)<(j|0)){m=m+1|0}else{break}}if((j|0)<=0){break}m=0;k=c[l>>2]|0;while(1){n=m+1|0;o=c[l+(n<<2)>>2]|0;c[b+4172+(m<<2)>>2]=o-k;if((n|0)<(c[h>>2]|0)){m=n;k=o}else{break}}}}while(0);l=b+40|0;j=c[l>>2]|0;k=i;i=i+((j<<2)+4)|0;i=i+7&-8;m=k;if((j|0)<0){break}k=c[e+5064>>2]|0;o=0;while(1){n=(ga(k,o)|0)/(j|0)|0;c[m+(o<<2)>>2]=n;if((o|0)<(j|0)){o=o+1|0}else{break}}if((j|0)<=0){break}o=0;k=c[m>>2]|0;while(1){n=o+1|0;p=c[m+(n<<2)>>2]|0;c[b+4212+(o<<2)>>2]=p-k;if((n|0)<(c[l>>2]|0)){o=n;k=p}else{break}}}}while(0);c[b+4252>>2]=0;if((c[h>>2]|0)>0){k=0;o=0;do{o=(c[b+4172+(k<<2)>>2]|0)+o|0;k=k+1|0;c[b+4252+(k<<2)>>2]=o;}while((k|0)<(c[h>>2]|0))}c[b+4296>>2]=0;k=b+40|0;if((c[k>>2]|0)>0){o=0;l=0;do{l=(c[b+4212+(o<<2)>>2]|0)+l|0;o=o+1|0;c[b+4296+(o<<2)>>2]=l;}while((o|0)<(c[k>>2]|0))}o=b+4340|0;l=e+5072|0;m=c[l>>2]|0;j=b+4344|0;p=c[j>>2]|0;n=o|0;q=c[n>>2]|0;r=p-q>>2;do{if(r>>>0<m>>>0){qj(o,m-r|0);s=c[l>>2]|0}else{if(!(r>>>0>m>>>0)){s=m;break}t=q+(m<<2)|0;if((p|0)==(t|0)){s=m;break}c[j>>2]=p+(~((p-4+(-t|0)|0)>>>2)<<2);s=m}}while(0);m=b+4352|0;p=b+4356|0;j=c[p>>2]|0;q=m|0;r=c[q>>2]|0;o=j-r>>2;do{if(o>>>0<s>>>0){qj(m,s-o|0);u=c[l>>2]|0}else{if(!(o>>>0>s>>>0)){u=s;break}t=r+(s<<2)|0;if((j|0)==(t|0)){u=s;break}c[p>>2]=j+(~((j-4+(-t|0)|0)>>>2)<<2);u=s}}while(0);s=b+4364|0;j=b+4368|0;p=c[j>>2]|0;r=s|0;o=c[r>>2]|0;m=p-o>>2;do{if(m>>>0<u>>>0){qj(s,u-m|0);v=c[l>>2]|0}else{if(!(m>>>0>u>>>0)){v=u;break}t=o+(u<<2)|0;if((p|0)==(t|0)){v=u;break}c[j>>2]=p+(~((p-4+(-t|0)|0)>>>2)<<2);v=u}}while(0);u=b+4376|0;p=b+4380|0;j=c[p>>2]|0;o=u|0;m=c[o>>2]|0;s=j-m>>2;do{if(s>>>0<v>>>0){qj(u,v-s|0)}else{if(!(s>>>0>v>>>0)){break}t=m+(v<<2)|0;if((j|0)==(t|0)){break}c[p>>2]=j+(~((j-4+(-t|0)|0)>>>2)<<2)}}while(0);j=b+4388|0;p=c[e+5096>>2]|0;v=b+4392|0;m=c[v>>2]|0;s=j|0;u=c[s>>2]|0;t=m-u>>2;do{if(t>>>0<p>>>0){qj(j,p-t|0)}else{if(!(t>>>0>p>>>0)){break}w=u+(p<<2)|0;if((m|0)==(w|0)){break}c[v>>2]=m+(~((m-4+(-w|0)|0)>>>2)<<2)}}while(0);a:do{if((c[l>>2]|0)>0){m=e+5056|0;v=0;while(1){p=c[m>>2]|0;u=(v|0)%(p|0)|0;t=(v|0)/(p|0)|0;p=c[h>>2]|0;if((p|0)>0){j=-1;w=0;while(1){x=(u|0)<(c[b+4252+(w<<2)>>2]|0)?j:w;y=w+1|0;if((y|0)<(p|0)){j=x;w=y}else{z=x;break}}}else{z=-1}w=c[k>>2]|0;if((w|0)>0){j=-1;p=0;while(1){x=(t|0)<(c[b+4296+(p<<2)>>2]|0)?j:p;y=p+1|0;if((y|0)<(w|0)){j=x;p=y}else{A=x;break}}}else{A=-1}p=(c[n>>2]|0)+(v<<2)|0;c[p>>2]=0;if((z|0)>0){j=b+4212+(A<<2)|0;w=0;x=0;while(1){y=x+(ga(c[b+4172+(w<<2)>>2]|0,c[j>>2]|0)|0)|0;c[p>>2]=y;B=w+1|0;if((B|0)<(z|0)){w=B;x=y}else{C=y;break}}}else{C=0}if((A|0)>0){x=0;w=C;while(1){j=w+(ga(c[b+4212+(x<<2)>>2]|0,c[m>>2]|0)|0)|0;c[p>>2]=j;y=x+1|0;if((y|0)<(A|0)){x=y;w=j}else{D=j;break}}}else{D=C}if(!((A|z|0)>-1)){break}w=D+(ga(t-(c[b+4296+(A<<2)>>2]|0)|0,c[b+4172+(z<<2)>>2]|0)|0)|0;c[p>>2]=w;x=u-(c[b+4252+(z<<2)>>2]|0)+w|0;c[p>>2]=x;c[(c[q>>2]|0)+(x<<2)>>2]=v;v=v+1|0;if((v|0)>=(c[l>>2]|0)){break a}}ec(16944,16440,618,17488)}}while(0);l=c[k>>2]|0;if((l|0)>0){q=e+5056|0;z=0;A=0;D=c[h>>2]|0;C=l;while(1){if((D|0)>0){l=b+4296+(z<<2)|0;v=z+1|0;m=b+4296+(v<<2)|0;x=A;w=0;j=c[m>>2]|0;y=D;while(1){B=c[l>>2]|0;if((B|0)<(j|0)){E=b+4252+(w<<2)|0;F=w+1|0;G=b+4252+(F<<2)|0;H=B;B=c[G>>2]|0;I=j;while(1){J=c[E>>2]|0;if((J|0)<(B|0)){K=c[n>>2]|0;L=c[r>>2]|0;M=c[o>>2]|0;N=J;do{J=K+((ga(c[q>>2]|0,H)|0)+N<<2)|0;c[L+(c[J>>2]<<2)>>2]=x;J=M+((ga(c[q>>2]|0,H)|0)+N<<2)|0;c[J>>2]=x;N=N+1|0;O=c[G>>2]|0;}while((N|0)<(O|0));P=O;Q=c[m>>2]|0}else{P=B;Q=I}N=H+1|0;if((N|0)<(Q|0)){H=N;B=P;I=Q}else{break}}R=Q;S=c[h>>2]|0;T=F}else{R=j;S=y;T=w+1|0}U=x+1|0;if((T|0)<(S|0)){x=U;w=T;j=R;y=S}else{break}}V=U;W=S;X=c[k>>2]|0;Y=v}else{V=A;W=D;X=C;Y=z+1|0}if((Y|0)<(X|0)){z=Y;A=V;D=W;C=X}else{break}}}X=e+5092|0;C=c[X>>2]|0;if((C|0)<=0){i=f;return}W=e+5088|0;D=e+5100|0;V=e+5056|0;e=0;A=c[W>>2]|0;Y=C;while(1){if((A|0)>0){C=c[n>>2]|0;z=c[s>>2]|0;k=0;S=A;do{U=c[D>>2]|0;R=c[g>>2]|0;T=C+((ga(c[V>>2]|0,e<<U>>R)|0)+(k<<U>>R)<<2)|0;h=z+((ga(S,e)|0)+k<<2)|0;c[h>>2]=c[T>>2]<<(R-U<<1);U=(c[g>>2]|0)-(c[D>>2]|0)|0;if((U|0)>0){R=0;T=0;while(1){h=1<<T;if((h&e|0)==0){Z=0}else{Z=h<<1<<T}Q=((h&k|0)==0?0:h<<T)+R+Z|0;h=T+1|0;if((h|0)<(U|0)){R=Q;T=h}else{_=Q;break}}}else{_=0}T=z+((ga(c[W>>2]|0,e)|0)+k<<2)|0;c[T>>2]=(c[T>>2]|0)+_;k=k+1|0;S=c[W>>2]|0;}while((k|0)<(S|0));$=S;aa=c[X>>2]|0}else{$=A;aa=Y}k=e+1|0;if((k|0)<(aa|0)){e=k;A=$;Y=aa}else{break}}i=f;return}function oj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;if((d|0)==2){f=q}else if((d|0)==1){f=t}else{i=e;return}g=c[f>>2]|0;Zk(g,16080,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;Zk(g,15672,(f=i,i=i+8|0,c[f>>2]=a[b+1|0]|0,f)|0);i=f;Zk(g,15304,(f=i,i=i+8|0,c[f>>2]=a[b+2|0]|0,f)|0);i=f;Zk(g,14992,(f=i,i=i+8|0,c[f>>2]=a[b+3|0]|0,f)|0);i=f;Zk(g,14728,(f=i,i=i+8|0,c[f>>2]=a[b+4|0]|0,f)|0);i=f;Zk(g,14432,(f=i,i=i+8|0,c[f>>2]=a[b+5|0]|0,f)|0);i=f;Zk(g,14168,(f=i,i=i+8|0,c[f>>2]=a[b+6|0]|0,f)|0);i=f;Zk(g,13904,(f=i,i=i+8|0,c[f>>2]=a[b+7|0]|0,f)|0);i=f;Zk(g,13664,(f=i,i=i+8|0,c[f>>2]=c[b+8>>2],f)|0);i=f;Zk(g,13464,(f=i,i=i+8|0,c[f>>2]=a[b+12|0]|0,f)|0);i=f;Zk(g,13272,(f=i,i=i+8|0,c[f>>2]=a[b+13|0]|0,f)|0);i=f;h=b+14|0;Zk(g,13072,(f=i,i=i+8|0,c[f>>2]=a[h]|0,f)|0);i=f;if((a[h]|0)!=0){Zk(g,12776,(f=i,i=i+8|0,c[f>>2]=c[b+16>>2],f)|0);i=f}Zk(g,12464,(f=i,i=i+8|0,c[f>>2]=c[b+20>>2],f)|0);i=f;Zk(g,12256,(f=i,i=i+8|0,c[f>>2]=c[b+24>>2],f)|0);i=f;Zk(g,11904,(f=i,i=i+8|0,c[f>>2]=a[b+28|0]|0,f)|0);i=f;Zk(g,11560,(f=i,i=i+8|0,c[f>>2]=a[b+29|0]|0,f)|0);i=f;Zk(g,11280,(f=i,i=i+8|0,c[f>>2]=a[b+30|0]|0,f)|0);i=f;Zk(g,11032,(f=i,i=i+8|0,c[f>>2]=a[b+31|0]|0,f)|0);i=f;Zk(g,10768,(f=i,i=i+8|0,c[f>>2]=a[b+32|0]|0,f)|0);i=f;h=b+34|0;Zk(g,10520,(f=i,i=i+8|0,c[f>>2]=a[h]|0,f)|0);i=f;Zk(g,10192,(f=i,i=i+8|0,c[f>>2]=a[b+33|0]|0,f)|0);i=f;if((a[h]|0)!=0){h=b+36|0;Zk(g,9856,(f=i,i=i+8|0,c[f>>2]=c[h>>2],f)|0);i=f;j=b+40|0;Zk(g,9448,(f=i,i=i+8|0,c[f>>2]=c[j>>2],f)|0);i=f;Zk(g,9112,(f=i,i=i+8|0,c[f>>2]=a[b+44|0]|0,f)|0);i=f;Zk(g,8800,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;if((c[h>>2]|0)>=0){k=0;while(1){Zk(g,8464,(f=i,i=i+8|0,c[f>>2]=c[b+4252+(k<<2)>>2],f)|0);i=f;if((k|0)<(c[h>>2]|0)){k=k+1|0}else{break}}}Zk(g,8280,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;Zk(g,8008,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;if((c[j>>2]|0)>=0){k=0;while(1){Zk(g,8464,(f=i,i=i+8|0,c[f>>2]=c[b+4296+(k<<2)>>2],f)|0);i=f;if((k|0)<(c[j>>2]|0)){k=k+1|0}else{break}}}Zk(g,8280,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;Zk(g,7728,(f=i,i=i+8|0,c[f>>2]=a[b+45|0]|0,f)|0);i=f}Zk(g,7432,(f=i,i=i+8|0,c[f>>2]=a[b+46|0]|0,f)|0);i=f;k=b+47|0;Zk(g,7144,(f=i,i=i+8|0,c[f>>2]=a[k]|0,f)|0);i=f;if((a[k]|0)!=0){Zk(g,6848,(f=i,i=i+8|0,c[f>>2]=a[b+48|0]|0,f)|0);i=f;Zk(g,6576,(f=i,i=i+8|0,c[f>>2]=a[b+49|0]|0,f)|0);i=f;Zk(g,6416,(f=i,i=i+8|0,c[f>>2]=c[b+52>>2],f)|0);i=f;Zk(g,6240,(f=i,i=i+8|0,c[f>>2]=c[b+56>>2],f)|0);i=f}Zk(g,6056,(f=i,i=i+8|0,c[f>>2]=a[b+60|0]|0,f)|0);i=f;Zk(g,5896,(f=i,i=i+8|0,c[f>>2]=a[b+4125|0]|0,f)|0);i=f;Zk(g,5752,(f=i,i=i+8|0,c[f>>2]=c[b+4128>>2],f)|0);i=f;Zk(g,5584,(f=i,i=i+8|0,c[f>>2]=a[b+4132|0]|0,f)|0);i=f;Zk(g,5448,(f=i,i=i+8|0,c[f>>2]=a[b+4133|0]|0,f)|0);i=f;Zk(g,5280,(f=i,i=i+8|0,c[f>>2]=a[b+4134|0]|0,f)|0);i=f;k=b+4135|0;Zk(g,5096,(f=i,i=i+8|0,c[f>>2]=a[k]|0,f)|0);i=f;Zk(g,4880,(f=i,i=i+8|0,c[f>>2]=a[b+4136|0]|0,f)|0);i=f;Zk(g,4752,(f=i,i=i+8|0,c[f>>2]=a[b+4137|0]|0,f)|0);i=f;Zk(g,4632,(f=i,i=i+8|0,c[f>>2]=c[b+4160>>2],f)|0);i=f;Zk(g,4392,(f=i,i=i+8|0,c[f>>2]=c[b+4164>>2],f)|0);i=f;Zk(g,4176,(f=i,i=i+8|0,c[f>>2]=c[b+4168>>2],f)|0);i=f;if((a[k]|0)==0){i=e;return}ij(b+4138|0,d);i=e;return}function pj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;if((a[b+34|0]|0)==0){f=(e|d|0)==0;return f|0}g=c[b+36>>2]|0;if((g|0)>0){h=0}else{f=0;return f|0}while(1){i=h+1|0;if((c[b+4252+(h<<2)>>2]|0)==(d|0)){break}if((i|0)<(g|0)){h=i}else{f=0;j=9;break}}if((j|0)==9){return f|0}h=c[b+40>>2]|0;if((h|0)>0){k=0}else{f=0;return f|0}while(1){g=k+1|0;if((c[b+4296+(k<<2)>>2]|0)==(e|0)){f=1;j=9;break}if((g|0)<(h|0)){k=g}else{f=0;j=9;break}}if((j|0)==9){return f|0}return 0}function qj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=a+8|0;e=a+4|0;f=c[e>>2]|0;g=c[d>>2]|0;h=f;if(!(g-h>>2>>>0<b>>>0)){i=b;j=f;while(1){if((j|0)!=0){c[j>>2]=0}k=i-1|0;if((k|0)==0){break}else{i=k;j=j+4|0}}c[e>>2]=f+(b<<2);return}f=a|0;a=c[f>>2]|0;j=a;i=h-j|0;h=i>>2;k=h+b|0;if(k>>>0>1073741823>>>0){Nr(0)}l=g-j|0;if(l>>2>>>0<536870911>>>0){j=l>>1;l=j>>>0<k>>>0?k:j;if((l|0)==0){m=0;n=0}else{o=l;p=10}}else{o=1073741823;p=10}if((p|0)==10){m=Nu(o<<2)|0;n=o}o=b;b=m+(h<<2)|0;while(1){if((b|0)!=0){c[b>>2]=0}h=o-1|0;if((h|0)==0){break}else{o=h;b=b+4|0}}b=a;cv(m|0,b|0,i)|0;c[f>>2]=m;c[e>>2]=m+(k<<2);c[d>>2]=m+(n<<2);if((a|0)==0){return}Pu(b);return}function rj(c){c=c|0;var d=0;d=c+96|0;C=0;a[d]=C;C=C>>8;a[d+1|0]=C;C=C>>8;a[d+2|0]=C;C=C>>8;a[d+3|0]=C;d=0;do{b[c+(d<<1)>>1]=0;b[c+32+(d<<1)>>1]=0;a[c+64+d|0]=0;a[c+80+d|0]=0;d=d+1|0;}while((d|0)<16);return}function sj(e,f,g,h,j,k,l){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;m=i;do{if((j|0)==0){n=56}else{if(((nd(g,1)|0)&255)<<24>>24==0){n=56;break}do{if(l){o=qd(g)|0;if((o|0)!=-99999&(o|0)<(j|0)){p=o+1|0;break}else{q=0;i=m;return q|0}}else{p=1}}while(0);o=j-p|0;if(!((o|0)>-1)){ec(5088,15040,129,18616);return 0}r=nd(g,1)|0;s=qd(g)|0;if((s|0)==-99999){q=0;i=m;return q|0}t=s+1|0;u=~s;s=k|0;v=d[(c[s>>2]|0)+(o*100|0)+98|0]|0;w=v+1|0;x=i;i=i+w|0;i=i+7&-8;y=i;i=i+w|0;i=i+7&-8;w=0;while(1){z=(nd(g,1)|0)&255;a[x+w|0]=z;if(z<<24>>24==0){z=(nd(g,1)|0)&255;a[y+w|0]=z}else{a[y+w|0]=1}if((w|0)<(v|0)){w=w+1|0}else{break}}w=(r|0)!=0?u:t;z=c[s>>2]|0;A=a[z+(o*100|0)+96|0]|0;B=A&255;D=a[z+(o*100|0)+97|0]|0;z=D&255;E=D<<24>>24==0;a:do{if(E){F=0}else{D=k+4|0;G=0;H=z;b:while(1){I=H;while(1){J=I-1|0;K=c[s>>2]|0;if(!(o>>>0<(((c[D>>2]|0)-K|0)/100|0)>>>0)){n=18;break b}if(!((I-1|0)>>>0<16>>>0)){n=20;break b}L=(b[K+(o*100|0)+32+(J<<1)>>1]|0)+w|0;if((L|0)<0){M=J+B|0;if((a[y+M|0]|0)!=0){break}}if((J|0)>0){I=J}else{F=G;break a}}if((G|0)>15){q=0;n=77;break}b[h+(G<<1)>>1]=L;a[h+64+G|0]=a[x+M|0]|0;I=G+1|0;if((J|0)>0){G=I;H=J}else{F=I;break a}}if((n|0)==18){ec(12504,15040,174,18616);return 0}else if((n|0)==20){ec(9480,15040,175,18616);return 0}else if((n|0)==77){i=m;return q|0}}}while(0);do{if((w|0)<0){if((a[y+v|0]|0)==0){N=F;break}if((F|0)>15){q=0;i=m;return q|0}else{b[h+(F<<1)>>1]=w;a[h+64+F|0]=a[x+v|0]|0;N=F+1|0;break}}else{N=F}}while(0);t=A<<24>>24==0;c:do{if(t){a[h+96|0]=N;O=0}else{u=N;r=0;d:while(1){H=(b[(c[s>>2]|0)+(o*100|0)+(r<<1)>>1]|0)+w|0;do{if((H|0)<0){if((a[y+r|0]|0)==0){P=u;break}if((u|0)>15){q=0;n=77;break d}b[h+(u<<1)>>1]=H;a[h+64+u|0]=a[x+r|0]|0;P=u+1|0}else{P=u}}while(0);H=r+1|0;if((H|0)<(B|0)){u=P;r=H}else{break}}if((n|0)==77){i=m;return q|0}a[h+96|0]=P;if(t){O=0;break}else{Q=0;R=B}while(1){r=c[s>>2]|0;u=R;while(1){S=u-1|0;T=(b[r+(o*100|0)+(S<<1)>>1]|0)+w|0;if((T|0)>0){if((a[y+S|0]|0)!=0){break}}if((S|0)>0){u=S}else{O=Q;break c}}if((Q|0)>15){q=0;break}b[h+32+(Q<<1)>>1]=T;a[h+80+Q|0]=a[x+S|0]|0;u=Q+1|0;if((S|0)>0){Q=u;R=S}else{O=u;break c}}i=m;return q|0}}while(0);do{if((w|0)>0){if((a[y+v|0]|0)==0){U=O;break}if((O|0)>15){q=0;i=m;return q|0}else{b[h+32+(O<<1)>>1]=w;a[h+80+O|0]=a[x+v|0]|0;U=O+1|0;break}}else{U=O}}while(0);do{if(E){V=U&255}else{v=U;t=0;e:while(1){A=(b[(c[s>>2]|0)+(o*100|0)+32+(t<<1)>>1]|0)+w|0;do{if((A|0)>0){u=t+B|0;if((a[y+u|0]|0)==0){W=v;break}if((v|0)>15){q=0;n=77;break e}b[h+32+(v<<1)>>1]=A;a[h+80+v|0]=a[x+u|0]|0;W=v+1|0}else{W=v}}while(0);A=t+1|0;if((A|0)<(z|0)){v=W;t=A}else{n=54;break}}if((n|0)==54){V=W&255;break}else if((n|0)==77){i=m;return q|0}}}while(0);a[h+97|0]=V}}while(0);f:do{if((n|0)==56){V=qd(g)|0;W=qd(g)|0;if((W+V|0)>(c[f+528+((a[f+2|0]|0)-1<<2)>>2]|0)){U=h+96|0;C=0;a[U]=C;C=C>>8;a[U+1|0]=C;C=C>>8;a[U+2|0]=C;C=C>>8;a[U+3|0]=C;Ue(e,1018,0);q=0;i=m;return q|0}if((V|0)>16|(W|0)>16){Ue(e,1018,0);q=0;i=m;return q|0}a[h+96|0]=V;a[h+97|0]=W;g:do{if((V|0)>0){U=0;O=0;while(1){S=qd(g)|0;if((S|0)==-99999){q=0;break}R=(nd(g,1)|0)&255;Q=h+(O<<1)|0;b[Q>>1]=U+65535-S;a[h+64+O|0]=R;R=O+1|0;if((R|0)<(V|0)){U=b[Q>>1]|0;O=R}else{break g}}i=m;return q|0}}while(0);if((W|0)>0){X=0;Y=0}else{break}while(1){V=qd(g)|0;if((V|0)==-99999){q=0;break}O=(nd(g,1)|0)&255;U=h+32+(Y<<1)|0;b[U>>1]=X+1+V;a[h+80+Y|0]=O;O=Y+1|0;if((O|0)<(W|0)){X=b[U>>1]|0;Y=O}else{break f}}i=m;return q|0}}while(0);Y=h+99|0;a[Y]=0;X=a[h+96|0]|0;if(X<<24>>24==0){Z=0;_=0}else{g=X&255;e=0;f=0;while(1){if((a[h+64+e|0]|0)==0){$=f}else{n=f+1&255;a[Y]=n;$=n}n=e+1|0;if((n|0)<(g|0)){e=n;f=$}else{Z=X;_=$;break}}}$=a[h+97|0]|0;if($<<24>>24==0){aa=0}else{X=$&255;f=0;e=_;while(1){if((a[h+80+f|0]|0)==0){ba=e}else{_=e+1&255;a[Y]=_;ba=_}_=f+1|0;if((_|0)<(X|0)){f=_;e=ba}else{aa=$;break}}}a[h+98|0]=aa+Z;q=1;i=m;return q|0}function tj(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;h=e<<1;j=i;i=i+(h+2)|0;i=i+7&-8;k=h|1;a[j+k|0]=0;if((k|0)>0){dv(j|0,46,k|0)|0}a[j+e|0]=124;k=a[d+96|0]|0;if(!(k<<24>>24==0)){h=-e|0;l=k&255;do{l=l-1|0;k=b[d+(l<<1)>>1]|0;m=a[d+64+l|0]|0;do{if((k|0)<(h|0)){Zk(f,16008,(n=i,i=i+16|0,c[n>>2]=k,c[n+8>>2]=m<<24>>24!=0?88:111,n)|0);i=n}else{o=j+(k+e)|0;if(m<<24>>24==0){a[o]=111;break}else{a[o]=88;break}}}while(0);}while((l|0)>0)}l=a[d+97|0]|0;if(l<<24>>24==0){Zk(f,15608,(n=i,i=i+8|0,c[n>>2]=j,n)|0);i=n;i=g;return}h=l&255;do{h=h-1|0;l=b[d+32+(h<<1)>>1]|0;m=a[d+80+h|0]|0;do{if((l|0)>(e|0)){Zk(f,16008,(n=i,i=i+16|0,c[n>>2]=l,c[n+8>>2]=m<<24>>24!=0?88:111,n)|0);i=n}else{k=j+(l+e)|0;if(m<<24>>24==0){a[k]=111;break}else{a[k]=88;break}}}while(0);}while((h|0)>0);Zk(f,15608,(n=i,i=i+8|0,c[n>>2]=j,n)|0);i=n;i=g;return}function uj(b){b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,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;if((a[b+5467|0]|0)==0){return}d=b+40|0;f=b+28|0;g=ga(c[f>>2]|0,c[d>>2]|0)|0;h=b+5760|0;i=ga(g,((c[h>>2]|0)+7|0)/8|0)|0;g=b+44|0;j=b+36|0;k=ga(c[j>>2]|0,c[g>>2]|0)|0;l=b+5768|0;m=ga(k,((c[l>>2]|0)+7|0)/8|0)|0;k=(i|0)>(m|0)?i:m;m=Ou((k|0)>-1?k:-1)|0;if((m|0)==0){Ue((c[b+10332>>2]|0)+4|0,1024,0);return}k=(c[b+5776>>2]|0)==0?1:3;i=b+5828|0;n=b+5820|0;o=b+10352|0;p=b+10340|0;q=b+52|0;r=b+48|0;s=b+5804|0;t=b+4|0;u=m;v=b+5780|0;w=b+5784|0;x=0;y=c[i>>2]|0;a:while(1){z=(x|0)==0;A=z?d:g;B=c[A>>2]|0;C=b+4+(x<<2)|0;D=ga(c[(z?f:j)>>2]|0,B)|0;E=z?h:l;cv(m|0,c[C>>2]|0,ga(D,((c[E>>2]|0)+7|0)/8|0)|0)|0;if((y|0)>0){D=0;F=c[n>>2]|0;G=y;while(1){if((F|0)>0){H=0;do{I=(ga(c[o>>2]|0,D)|0)+H|0;J=e[(c[p>>2]|0)+(I*24|0)+2>>1]|0;I=c[r>>2]|0;if(!(J>>>0<(c[q>>2]|0)-I>>2>>>0)){K=24;break a}L=c[I+(J<<2)>>2]|0;if((L|0)==0){K=24;break a}do{if(z){if((a[L+325|0]|0)==0){break}J=1<<c[s>>2];I=c[t>>2]|0;M=c[d>>2]|0;if((c[h>>2]|0)>8){Aj(b,H,D,0,0,J,J,u,B,I,M);break}else{Bj(b,H,D,0,0,J,J,m,B,I,M);break}}else{if((a[L+326|0]|0)==0){break}M=1<<c[s>>2];I=(M|0)/(c[v>>2]|0)|0;J=(M|0)/(c[w>>2]|0)|0;M=c[C>>2]|0;N=c[A>>2]|0;if((c[E>>2]|0)>8){Aj(b,H,D,0,x,I,J,u,B,M,N);break}else{Bj(b,H,D,0,x,I,J,m,B,M,N);break}}}while(0);H=H+1|0;O=c[n>>2]|0;}while((H|0)<(O|0));P=O;Q=c[i>>2]|0}else{P=F;Q=G}H=D+1|0;if((H|0)<(Q|0)){D=H;F=P;G=Q}else{R=Q;break}}}else{R=y}G=x+1|0;if((G|0)<(k|0)){x=G;y=R}else{K=23;break}}if((K|0)==23){Qu(m);return}else if((K|0)==24){return}}function vj(b){b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;d=b|0;f=b+4|0;c[f>>2]=1;g=b+12|0;Wh(c[g>>2]|0,d);h=c[g>>2]|0;i=c[h+5820>>2]|0;j=i-1|0;k=c[h+5804>>2]|0;l=1<<k;m=b+8|0;n=b+24|0;Yh(h,d,j,c[m>>2]|0,c[n>>2]|0);h=c[m>>2]|0;if((h|0)>0){Yh(c[g>>2]|0,d,j,h-1|0,c[n>>2]|0);o=c[m>>2]|0}else{o=h}h=o+1|0;p=c[g>>2]|0;if((h|0)<(c[p+5828>>2]|0)){Yh(p,d,j,h,c[n>>2]|0);q=c[m>>2]|0}else{q=o}o=b+20|0;n=b+16|0;Th(c[o>>2]|0,c[n>>2]|0,q<<k,q+1<<k);k=c[g>>2]|0;a:do{if((c[k+5820>>2]|0)>0){q=0;b=k;while(1){h=c[m>>2]|0;p=(ga(c[b+10352>>2]|0,h)|0)+q|0;r=e[(c[b+10340>>2]|0)+(p*24|0)+2>>1]|0;p=c[b+48>>2]|0;if(!(r>>>0<(c[b+52>>2]|0)-p>>2>>>0)){s=b;break a}t=c[p+(r<<2)>>2]|0;if((t|0)==0){s=b;break a}do{if((a[t+325|0]|0)!=0){r=c[n>>2]|0;p=c[r+4>>2]|0;u=c[r+40>>2]|0;r=c[o>>2]|0;v=c[r+4>>2]|0;w=c[r+40>>2]|0;if((c[b+5760>>2]|0)>8){Aj(b,q,h,0,0,l,l,p,u,v,w);break}else{Bj(b,q,h,0,0,l,l,p,u,v,w);break}}}while(0);do{if((a[t+326|0]|0)!=0){h=c[g>>2]|0;w=(l|0)/(c[h+5780>>2]|0)|0;v=(l|0)/(c[h+5784>>2]|0)|0;u=c[m>>2]|0;p=c[n>>2]|0;r=c[p+8>>2]|0;x=c[p+44>>2]|0;p=c[o>>2]|0;y=c[p+8>>2]|0;z=c[p+44>>2]|0;if((c[h+5768>>2]|0)>8){Aj(h,q,u,0,1,w,v,r,x,y,z)}else{Bj(h,q,u,0,1,w,v,r,x,y,z)}z=c[g>>2]|0;y=c[m>>2]|0;x=c[n>>2]|0;r=c[x+12>>2]|0;u=c[x+44>>2]|0;x=c[o>>2]|0;h=c[x+12>>2]|0;p=c[x+44>>2]|0;if((c[z+5768>>2]|0)>8){Aj(z,q,y,0,2,w,v,r,u,h,p);break}else{Bj(z,q,y,0,2,w,v,r,u,h,p);break}}}while(0);t=q+1|0;p=c[g>>2]|0;if((t|0)<(c[p+5820>>2]|0)){q=t;b=p}else{s=p;break}}}else{s=k}}while(0);if((i|0)<1){A=s;c[f>>2]=3;Xh(A,d);return}else{B=0;C=s}while(1){s=(ga(c[m>>2]|0,c[C+5820>>2]|0)|0)+B|0;Ek((c[C+10524>>2]|0)+(s*76|0)|0,4);if((B|0)>=(j|0)){break}B=B+1|0;C=c[g>>2]|0}A=c[g>>2]|0;c[f>>2]=3;Xh(A,d);return}function wj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+8|0;f=e|0;g=c[b>>2]|0;if((a[g+5467|0]|0)==0){h=0;i=e;return h|0}j=g+10332|0;k=c[j>>2]|0;l=b+8|0;m=g+10480|0;if((Ph(l,c[g+24>>2]|0,c[g+28>>2]|0,c[g+20>>2]|0,g+764|0,0,k,c[g+10336>>2]|0,c[m>>2]|0,c[m+4>>2]|0,c[g+10488>>2]|0,1)|0)!=0){Ue((c[j>>2]|0)+4|0,1024,0);h=0;i=e;return h|0}j=c[g+5828>>2]|0;Vh(g,j);if((j|0)>0){m=b+10668|0;n=b+10672|0;o=k+375396|0;k=b+10664|0;b=0;do{p=Nu(28)|0;c[p+4>>2]=0;c[p>>2]=22280;c[p+16>>2]=g;c[p+20>>2]=l;c[p+12>>2]=g;c[p+8>>2]=b;c[p+24>>2]=d;q=p;c[f>>2]=q;p=c[m>>2]|0;if(p>>>0<(c[n>>2]|0)>>>0){if((p|0)==0){r=0}else{c[p>>2]=q;r=c[m>>2]|0}c[m>>2]=r+4}else{He(k,f)}Kk(o,q);b=b+1|0;}while((b|0)<(j|0))}_h(g);Uh(g,l);h=1;i=e;return h|0}function xj(a){a=a|0;return}function yj(a){a=a|0;Pu(a);return}function zj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+104|0;f=e|0;mb(f|0,6568,(g=i,i=i+8|0,c[g>>2]=c[d+8>>2],g)|0)|0;i=g;g=ev(f|0)|0;if(g>>>0>4294967279>>>0){nm(0)}if(g>>>0<11>>>0){a[b]=g<<1;h=b+1|0;cv(h|0,f|0,g)|0;j=h+g|0;a[j]=0;k=100;l=0;i=e;return}else{d=g+16&-16;m=Nu(d)|0;c[b+8>>2]=m;c[b>>2]=d|1;c[b+4>>2]=g;h=m;cv(h|0,f|0,g)|0;j=h+g|0;a[j]=0;k=100;l=0;i=e;return}}function Aj(f,g,h,j,k,l,m,n,o,p,q){f=f|0;g=g|0;h=h|0;j=j|0;k=k|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,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0;j=i;i=i+152|0;r=j|0;s=j+8|0;t=j+16|0;u=j+24|0;v=c[f+10352>>2]|0;w=(ga(v,h)|0)+g|0;x=c[f+10340>>2]|0;y=k<<1;z=(d[x+(w*24|0)+4|0]|0)>>>(y>>>0)&3;if((z|0)==0){i=j;return}A=(k|0)==0;B=c[(A?f+5760|0:f+5768|0)>>2]|0;C=(1<<B)-1|0;D=ga(l,g)|0;g=ga(m,h)|0;h=c[(A?f+24|0:f+32|0)>>2]|0;E=c[(A?f+28|0:f+36|0)>>2]|0;F=c[f+10348>>2]|0;G=D>>F;H=g>>F;if(!((G|0)>-1&(G|0)<(v|0))){ec(14920,12440,118,17328)}if(!((H|0)>-1)){ec(9408,12440,119,17328)}I=c[f+10356>>2]|0;if((H|0)>=(I|0)){ec(9408,12440,119,17328)}J=x+(((ga(H,v)|0)+G|0)*24|0)+2|0;G=f+52|0;H=c[f+48>>2]|0;K=c[(c[H+(e[J>>1]<<2)>>2]|0)+800>>2]|0;J=c[f+5820>>2]|0;if(A){L=0;M=0}else{L=(c[f+5784>>2]|0)-1|0;M=(c[f+5780>>2]|0)-1|0}A=c[f+5804>>2]|0;N=A-M|0;O=A-L|0;A=(D+l|0)>(h|0)?h-D|0:l;l=(g+m|0)>(E|0)?E-g|0:m;m=(a[x+(w*24|0)+22|0]|0)!=0;if((z|0)==2){z=(d[x+(w*24|0)+5|0]|0)>>>(y>>>0)&3;if((z|0)==3){c[r>>2]=1;c[r+4>>2]=-1;c[s>>2]=-1;c[s+4>>2]=1;P=-1;Q=1;R=1;S=-1}else if((z|0)==1){c[r>>2]=0;c[r+4>>2]=0;c[s>>2]=-1;c[s+4>>2]=1;P=-1;Q=1;R=0;S=0}else if((z|0)==2){c[r>>2]=-1;c[r+4>>2]=1;c[s>>2]=-1;c[s+4>>2]=1;P=-1;Q=1;R=-1;S=1}else if((z|0)==0){c[r>>2]=-1;c[r+4>>2]=1;c[s>>2]=0;c[s+4>>2]=0;P=0;Q=0;R=-1;S=1}else{P=0;Q=0;R=0;S=0}z=ga(P,o)|0;P=ga(Q,o)|0;a[t|0]=a[x+(w*24|0)+9+(k<<2)|0]|0;a[t+1|0]=a[x+(w*24|0)+9+(k<<2)+1|0]|0;a[t+2|0]=0;a[t+3|0]=a[x+(w*24|0)+9+(k<<2)+2|0]|0;a[t+4|0]=a[x+(w*24|0)+9+(k<<2)+3|0]|0;if((l|0)<=0){i=j;return}Q=(A|0)>0;y=f+5480|0;T=f+10368|0;U=f+10372|0;V=f+10376|0;W=f+10360|0;X=A-1|0;Y=l-1|0;Z=f+5977|0;_=f+10308|0;$=(ga(g>>O,J)|0)+(D>>N)|0;aa=0;a:while(1){ba=aa+g|0;ca=(ga(ba,o)|0)+D|0;da=(ga(ba,q)|0)+D|0;if(Q){ea=ba<<L;fa=(aa|0)==0;ha=ca+z|0;ia=ca+P|0;ja=(aa|0)==(Y|0);ka=0;do{do{if(m){if((a[y]|0)==0){la=28;break}ma=c[T>>2]|0;na=ka+D<<M>>ma;oa=ea>>ma;if(!((na|0)>-1)){la=23;break a}ma=c[U>>2]|0;if((na|0)>=(ma|0)){la=23;break a}if(!((oa|0)>-1)){la=26;break a}if((oa|0)>=(c[V>>2]|0)){la=26;break a}pa=(ga(ma,oa)|0)+na|0;na=(c[W>>2]|0)+(pa*3|0)|0;if(((d[na]|d[na+1|0]<<8)<<16>>16&1024)==0){la=28}}else{la=28}}while(0);b:do{if((la|0)==28){la=0;na=ka+D|0;pa=na<<M;oa=c[T>>2]|0;ma=pa>>oa;qa=ea>>oa;if(!((ma|0)>-1)){la=30;break a}oa=c[U>>2]|0;if((ma|0)>=(oa|0)){la=30;break a}if(!((qa|0)>-1)){la=33;break a}if((qa|0)>=(c[V>>2]|0)){la=33;break a}ra=(ga(oa,qa)|0)+ma|0;ma=(c[W>>2]|0)+(ra*3|0)|0;if(!(((d[ma]|d[ma+1|0]<<8)<<16>>16&2048)==0)){break}if((ka|0)==0|fa|(ka|0)==(X|0)|ja){ma=0;do{ra=(c[r+(ma<<2)>>2]|0)+na|0;qa=(c[s+(ma<<2)>>2]|0)+ba|0;if(!((qa|ra|0)>-1&(ra|0)<(h|0)&(qa|0)<(E|0))){break b}oa=ra<<M>>F;sa=qa<<L>>F;if(!((oa|0)>-1&(oa|0)<(v|0))){la=38;break a}if(!((sa|0)>-1&(sa|0)<(I|0))){la=40;break a}ta=x+(((ga(v,sa)|0)+oa|0)*24|0)+2|0;oa=e[ta>>1]|0;if(!(oa>>>0<(c[G>>2]|0)-H>>2>>>0)){la=113;break a}ta=c[H+(oa<<2)>>2]|0;if((ta|0)==0){la=113;break a}oa=c[ta+800>>2]|0;if((oa|0)<(K|0)){sa=pa>>F;ua=ea>>F;if(!((sa|0)>-1&(sa|0)<(v|0))){la=45;break a}if(!((ua|0)>-1&(ua|0)<(I|0))){la=47;break a}va=x+(((ga(v,ua)|0)+sa|0)*24|0)+2|0;if((a[(c[H+(e[va>>1]<<2)>>2]|0)+764|0]|0)==0){break b}}if((oa|0)>(K|0)){if((a[ta+764|0]|0)==0){break b}}if((a[Z]|0)==0){ta=(ga(qa>>O,J)|0)+(ra>>N)|0;ra=c[_>>2]|0;if((c[ra+(ta<<2)>>2]|0)!=(c[ra+($<<2)>>2]|0)){break b}}ma=ma+1|0;}while((ma|0)<2)}ma=e[n+(ka+ca<<1)>>1]|0;pa=ma-(e[n+(ha+ka+R<<1)>>1]|0)|0;if((pa|0)<0){wa=1}else{wa=(pa|0)>0|2}pa=ma-(e[n+(ia+ka+S<<1)>>1]|0)|0;if((pa|0)<0){xa=-1}else{xa=(pa|0)>0|0}pa=ma+(a[t+(wa+xa)|0]|0)|0;if((pa|0)<0){ya=0}else{ya=((pa|0)>(C|0)?C:pa)&65535}b[p+(da+ka<<1)>>1]=ya}}while(0);ka=ka+1|0;}while((ka|0)<(A|0))}ka=aa+1|0;if((ka|0)<(l|0)){aa=ka}else{la=113;break}}if((la|0)==23){ec(14920,12440,118,17328)}else if((la|0)==26){ec(9408,12440,119,17328)}else if((la|0)==30){ec(14920,12440,118,17328)}else if((la|0)==33){ec(9408,12440,119,17328)}else if((la|0)==38){ec(14920,12440,118,17328)}else if((la|0)==40){ec(9408,12440,119,17328)}else if((la|0)==45){ec(14920,12440,118,17328)}else if((la|0)==47){ec(9408,12440,119,17328)}else if((la|0)==113){i=j;return}}aa=d[x+(w*24|0)+6+k|0]|0;dv(u|0,0,128)|0;c[u+((aa&31)<<2)>>2]=1;c[u+((aa+1&31)<<2)>>2]=2;c[u+((aa+2&31)<<2)>>2]=3;c[u+((aa+3&31)<<2)>>2]=4;aa=B-5|0;B=(l|0)>0;if(!m){if(!B){i=j;return}m=(A|0)>0;ya=(aa|0)>7;xa=0;do{if(m){wa=xa+g|0;t=ga(wa,o)|0;S=ga(wa,q)|0;wa=0;do{R=wa+D|0;$=e[n+(R+t<<1)>>1]|0;_=ya?0:c[u+($>>>(aa>>>0)<<2)>>2]|0;if((_|0)>0){N=(a[_-1+(x+(w*24|0)+9+(k<<2))|0]|0)+$|0;if((N|0)<0){za=0}else{za=((N|0)>(C|0)?C:N)&65535}b[p+(R+S<<1)>>1]=za}wa=wa+1|0;}while((wa|0)<(A|0))}xa=xa+1|0;}while((xa|0)<(l|0));i=j;return}if(!B){i=j;return}B=(A|0)>0;xa=f+5480|0;za=f+10368|0;ya=f+10372|0;m=f+10376|0;wa=f+10360|0;f=(aa|0)>7;S=0;c:while(1){d:do{if(B){t=S+g|0;R=t<<L;N=ga(t,o)|0;$=ga(t,q)|0;if(f){t=a[xa]|0;_=0;while(1){if(t<<24>>24==0){Aa=c[za>>2]|0;Ba=_+D<<M;la=78}else{J=_+D<<M;O=c[za>>2]|0;Z=J>>O;K=R>>O;if(!((Z|0)>-1)){la=87;break c}H=c[ya>>2]|0;if((Z|0)>=(H|0)){la=87;break c}if(!((K|0)>-1)){la=90;break c}if((K|0)>=(c[m>>2]|0)){la=90;break c}v=(ga(H,K)|0)+Z|0;Z=(c[wa>>2]|0)+(v*3|0)|0;if(((d[Z]|d[Z+1|0]<<8)<<16>>16&1024)==0){Aa=O;Ba=J;la=78}}if((la|0)==78){la=0;J=Ba>>Aa;O=R>>Aa;if(!((J|0)>-1)){la=94;break c}if((J|0)>=(c[ya>>2]|0)){la=94;break c}if(!((O|0)>-1)){la=97;break c}if((O|0)>=(c[m>>2]|0)){la=97;break c}}_=_+1|0;if((_|0)>=(A|0)){break d}}}else{Ca=0}do{if((a[xa]|0)==0){_=Ca+D|0;Da=c[za>>2]|0;Ea=_;Fa=_<<M;la=92}else{_=Ca+D|0;t=_<<M;O=c[za>>2]|0;J=t>>O;Z=R>>O;if(!((J|0)>-1)){la=87;break c}v=c[ya>>2]|0;if((J|0)>=(v|0)){la=87;break c}if(!((Z|0)>-1)){la=90;break c}if((Z|0)>=(c[m>>2]|0)){la=90;break c}K=(ga(v,Z)|0)+J|0;J=(c[wa>>2]|0)+(K*3|0)|0;if(((d[J]|d[J+1|0]<<8)<<16>>16&1024)==0){Da=O;Ea=_;Fa=t;la=92}}do{if((la|0)==92){la=0;t=Fa>>Da;_=R>>Da;if(!((t|0)>-1)){la=94;break c}O=c[ya>>2]|0;if((t|0)>=(O|0)){la=94;break c}if(!((_|0)>-1)){la=97;break c}if((_|0)>=(c[m>>2]|0)){la=97;break c}J=(ga(O,_)|0)+t|0;t=(c[wa>>2]|0)+(J*3|0)|0;if(!(((d[t]|d[t+1|0]<<8)<<16>>16&2048)==0)){break}t=e[n+(Ea+N<<1)>>1]|0;J=c[u+(t>>>(aa>>>0)<<2)>>2]|0;if((J|0)<=0){break}_=(a[J-1+(x+(w*24|0)+9+(k<<2))|0]|0)+t|0;if((_|0)<0){Ga=0}else{Ga=((_|0)>(C|0)?C:_)&65535}b[p+(Ea+$<<1)>>1]=Ga}}while(0);Ca=Ca+1|0;}while((Ca|0)<(A|0))}}while(0);$=S+1|0;if(($|0)<(l|0)){S=$}else{la=113;break}}if((la|0)==87){ec(14920,12440,118,17328)}else if((la|0)==90){ec(9408,12440,119,17328)}else if((la|0)==94){ec(14920,12440,118,17328)}else if((la|0)==97){ec(9408,12440,119,17328)}else if((la|0)==113){i=j;return}}function Bj(b,f,g,h,j,k,l,m,n,o,p){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0;h=i;i=i+152|0;q=h|0;r=h+8|0;s=h+16|0;t=h+24|0;u=b+10352|0;v=c[u>>2]|0;w=(ga(v,g)|0)+f|0;x=b+10340|0;y=c[x>>2]|0;z=j<<1;A=(d[y+(w*24|0)+4|0]|0)>>>(z>>>0)&3;if((A|0)==0){i=h;return}B=(j|0)==0;C=c[(B?b+5760|0:b+5768|0)>>2]|0;D=(1<<C)-1|0;E=ga(k,f)|0;f=ga(l,g)|0;g=c[(B?b+24|0:b+32|0)>>2]|0;F=c[(B?b+28|0:b+36|0)>>2]|0;G=b+10348|0;H=c[G>>2]|0;I=E>>H;J=f>>H;if(!((I|0)>-1&(I|0)<(v|0))){ec(14920,12440,118,17328)}if(!((J|0)>-1)){ec(9408,12440,119,17328)}H=b+10356|0;if((J|0)>=(c[H>>2]|0)){ec(9408,12440,119,17328)}K=y+(((ga(J,v)|0)+I|0)*24|0)+2|0;I=b+52|0;v=b+48|0;J=c[(c[(c[v>>2]|0)+(e[K>>1]<<2)>>2]|0)+800>>2]|0;K=c[b+5820>>2]|0;if(B){L=0;M=0}else{L=(c[b+5784>>2]|0)-1|0;M=(c[b+5780>>2]|0)-1|0}B=c[b+5804>>2]|0;N=B-M|0;O=B-L|0;B=(E+k|0)>(g|0)?g-E|0:k;k=(f+l|0)>(F|0)?F-f|0:l;l=(a[y+(w*24|0)+22|0]|0)!=0;if((A|0)!=2){A=d[y+(w*24|0)+6+j|0]|0;dv(t|0,0,128)|0;c[t+((A&31)<<2)>>2]=1;c[t+((A+1&31)<<2)>>2]=2;c[t+((A+2&31)<<2)>>2]=3;c[t+((A+3&31)<<2)>>2]=4;A=C-5|0;C=(k|0)>0;if(!l){if(!C){i=h;return}P=(B|0)>0;Q=(A|0)>7;R=0;do{if(P){S=R+f|0;T=ga(S,n)|0;U=ga(S,p)|0;S=0;do{V=S+E|0;W=d[m+(V+T)|0]|0;X=Q?0:c[t+(W>>>(A>>>0)<<2)>>2]|0;if((X|0)>0){Y=(a[X-1+(y+(w*24|0)+9+(j<<2))|0]|0)+W|0;if((Y|0)<0){Z=0}else{Z=((Y|0)>(D|0)?D:Y)&255}a[o+(V+U)|0]=Z}S=S+1|0;}while((S|0)<(B|0))}R=R+1|0;}while((R|0)<(k|0));i=h;return}if(!C){i=h;return}C=(B|0)>0;R=b+5480|0;Z=b+10368|0;Q=b+10372|0;P=b+10376|0;S=b+10360|0;U=(A|0)>7;T=0;a:while(1){if(C){V=T+f|0;Y=V<<L;W=ga(V,n)|0;X=ga(V,p)|0;V=0;do{if((a[R]|0)==0){_=V+E|0;$=c[Z>>2]|0;aa=_;ba=_<<M;ca=81}else{_=V+E|0;da=_<<M;ea=c[Z>>2]|0;fa=da>>ea;ha=Y>>ea;if(!((fa|0)>-1)){ca=76;break a}ia=c[Q>>2]|0;if((fa|0)>=(ia|0)){ca=76;break a}if(!((ha|0)>-1)){ca=79;break a}if((ha|0)>=(c[P>>2]|0)){ca=79;break a}ja=(ga(ia,ha)|0)+fa|0;fa=(c[S>>2]|0)+(ja*3|0)|0;if(((d[fa]|d[fa+1|0]<<8)<<16>>16&1024)==0){$=ea;aa=_;ba=da;ca=81}}do{if((ca|0)==81){ca=0;da=ba>>$;_=Y>>$;if(!((da|0)>-1)){ca=83;break a}ea=c[Q>>2]|0;if((da|0)>=(ea|0)){ca=83;break a}if(!((_|0)>-1)){ca=86;break a}if((_|0)>=(c[P>>2]|0)){ca=86;break a}fa=(ga(ea,_)|0)+da|0;da=(c[S>>2]|0)+(fa*3|0)|0;if(!(((d[da]|d[da+1|0]<<8)<<16>>16&2048)==0)){break}da=d[m+(aa+W)|0]|0;fa=U?0:c[t+(da>>>(A>>>0)<<2)>>2]|0;if((fa|0)<=0){break}_=(a[fa-1+(y+(w*24|0)+9+(j<<2))|0]|0)+da|0;if((_|0)<0){ka=0}else{ka=((_|0)>(D|0)?D:_)&255}a[o+(aa+X)|0]=ka}}while(0);V=V+1|0;}while((V|0)<(B|0))}V=T+1|0;if((V|0)<(k|0)){T=V}else{ca=102;break}}if((ca|0)==76){ec(14920,12440,118,17328)}else if((ca|0)==79){ec(9408,12440,119,17328)}else if((ca|0)==83){ec(14920,12440,118,17328)}else if((ca|0)==86){ec(9408,12440,119,17328)}else if((ca|0)==102){i=h;return}}T=(d[y+(w*24|0)+5|0]|0)>>>(z>>>0)&3;if((T|0)==1){c[q>>2]=0;c[q+4>>2]=0;c[r>>2]=-1;c[r+4>>2]=1;la=-1;ma=1;na=0;oa=0}else if((T|0)==2){c[q>>2]=-1;c[q+4>>2]=1;c[r>>2]=-1;c[r+4>>2]=1;la=-1;ma=1;na=-1;oa=1}else if((T|0)==3){c[q>>2]=1;c[q+4>>2]=-1;c[r>>2]=-1;c[r+4>>2]=1;la=-1;ma=1;na=1;oa=-1}else if((T|0)==0){c[q>>2]=-1;c[q+4>>2]=1;c[r>>2]=0;c[r+4>>2]=0;la=0;ma=0;na=-1;oa=1}else{la=0;ma=0;na=0;oa=0}T=ga(la,n)|0;la=ga(ma,n)|0;a[s|0]=a[y+(w*24|0)+9+(j<<2)|0]|0;a[s+1|0]=a[y+(w*24|0)+9+(j<<2)+1|0]|0;a[s+2|0]=0;a[s+3|0]=a[y+(w*24|0)+9+(j<<2)+2|0]|0;a[s+4|0]=a[y+(w*24|0)+9+(j<<2)+3|0]|0;if((k|0)<=0){i=h;return}j=(B|0)>0;w=b+5480|0;y=b+10368|0;ma=b+10372|0;z=b+10376|0;ka=b+10360|0;aa=B-1|0;A=k-1|0;t=b+5977|0;U=b+10308|0;b=(ga(f>>O,K)|0)+(E>>N)|0;S=0;b:while(1){P=S+f|0;Q=(ga(P,n)|0)+E|0;$=(ga(P,p)|0)+E|0;if(j){ba=P<<L;Z=(S|0)==0;R=Q+T|0;C=Q+la|0;V=(S|0)==(A|0);X=0;do{do{if(l){if((a[w]|0)==0){ca=28;break}W=c[y>>2]|0;Y=X+E<<M>>W;_=ba>>W;if(!((Y|0)>-1)){ca=23;break b}W=c[ma>>2]|0;if((Y|0)>=(W|0)){ca=23;break b}if(!((_|0)>-1)){ca=26;break b}if((_|0)>=(c[z>>2]|0)){ca=26;break b}da=(ga(W,_)|0)+Y|0;Y=(c[ka>>2]|0)+(da*3|0)|0;if(((d[Y]|d[Y+1|0]<<8)<<16>>16&1024)==0){ca=28}}else{ca=28}}while(0);c:do{if((ca|0)==28){ca=0;Y=X+E|0;da=Y<<M;_=c[y>>2]|0;W=da>>_;fa=ba>>_;if(!((W|0)>-1)){ca=30;break b}_=c[ma>>2]|0;if((W|0)>=(_|0)){ca=30;break b}if(!((fa|0)>-1)){ca=33;break b}if((fa|0)>=(c[z>>2]|0)){ca=33;break b}ea=(ga(_,fa)|0)+W|0;W=(c[ka>>2]|0)+(ea*3|0)|0;if(!(((d[W]|d[W+1|0]<<8)<<16>>16&2048)==0)){break}if((X|0)==0|Z|(X|0)==(aa|0)|V){W=0;do{ea=(c[q+(W<<2)>>2]|0)+Y|0;fa=(c[r+(W<<2)>>2]|0)+P|0;if(!((fa|ea|0)>-1&(ea|0)<(g|0)&(fa|0)<(F|0))){break c}_=c[G>>2]|0;ja=ea<<M>>_;ha=fa<<L>>_;if(!((ja|0)>-1)){ca=39;break b}ia=c[u>>2]|0;if((ja|0)>=(ia|0)){ca=39;break b}if(!((ha|0)>-1)){ca=42;break b}pa=c[H>>2]|0;if((ha|0)>=(pa|0)){ca=42;break b}qa=(ga(ia,ha)|0)+ja|0;ja=c[x>>2]|0;ha=e[ja+(qa*24|0)+2>>1]|0;qa=c[v>>2]|0;if(!(ha>>>0<(c[I>>2]|0)-qa>>2>>>0)){ca=102;break b}ra=c[qa+(ha<<2)>>2]|0;if((ra|0)==0){ca=102;break b}ha=c[ra+800>>2]|0;if((ha|0)<(J|0)){sa=da>>_;ta=ba>>_;if(!((sa|0)>-1&(sa|0)<(ia|0))){ca=47;break b}if(!((ta|0)>-1&(ta|0)<(pa|0))){ca=49;break b}pa=ja+(((ga(ia,ta)|0)+sa|0)*24|0)+2|0;if((a[(c[qa+(e[pa>>1]<<2)>>2]|0)+764|0]|0)==0){break c}}if((ha|0)>(J|0)){if((a[ra+764|0]|0)==0){break c}}if((a[t]|0)==0){ra=(ga(fa>>O,K)|0)+(ea>>N)|0;ea=c[U>>2]|0;if((c[ea+(ra<<2)>>2]|0)!=(c[ea+(b<<2)>>2]|0)){break c}}W=W+1|0;}while((W|0)<2)}W=d[m+(X+Q)|0]|0;da=W-(d[m+(R+X+na)|0]|0)|0;if((da|0)<0){ua=1}else{ua=(da|0)>0|2}da=W-(d[m+(C+X+oa)|0]|0)|0;if((da|0)<0){va=-1}else{va=(da|0)>0|0}da=W+(a[s+(ua+va)|0]|0)|0;if((da|0)<0){wa=0}else{wa=((da|0)>(D|0)?D:da)&255}a[o+($+X)|0]=wa}}while(0);X=X+1|0;}while((X|0)<(B|0))}X=S+1|0;if((X|0)<(k|0)){S=X}else{ca=102;break}}if((ca|0)==23){ec(14920,12440,118,17328)}else if((ca|0)==26){ec(9408,12440,119,17328)}else if((ca|0)==30){ec(14920,12440,118,17328)}else if((ca|0)==33){ec(9408,12440,119,17328)}else if((ca|0)==39){ec(14920,12440,118,17328)}else if((ca|0)==42){ec(9408,12440,119,17328)}else if((ca|0)==47){ec(14920,12440,118,17328)}else if((ca|0)==49){ec(9408,12440,119,17328)}else if((ca|0)==102){i=h;return}}function Cj(a,b){a=a|0;b=b|0;var d=0;if((b|0)==1){d=c[28672+(a<<2)>>2]|0}else if((b|0)==0){d=c[28704+(a<<2)>>2]|0}else if((b|0)==2){d=c[28640+(a<<2)>>2]|0}else{d=0}return d|0}function Dj(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=(c[27544+(g*24|0)+(h<<2)>>2]|0)+((f<<h)+e<<1)|0;e=b;C=(d[i]|d[i+1|0]<<8)<<16>>16;a[e]=C;C=C>>8;a[e+1|0]=C;return}function Ej(){var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;b=1;while(1){e=c[28672+(b<<2)>>2]|0;f=1<<b;if((f|0)>0){g=0;h=0;while(1){i=h&255;j=g;k=0;while(1){a[e+(j<<1)|0]=k;a[e+(j<<1)+1|0]=i;l=k+1|0;if((l|0)<(f|0)){j=j+1|0;k=l}else{break}}k=h+1|0;if((k|0)<(f|0)){g=g+f|0;h=k}else{break}}h=c[28640+(b<<2)>>2]|0;g=0;e=0;while(1){k=e&255;j=g;i=0;while(1){a[h+(j<<1)|0]=k;a[h+(j<<1)+1|0]=i;l=i+1|0;if((l|0)<(f|0)){j=j+1|0;i=l}else{break}}i=e+1|0;if((i|0)<(f|0)){g=g+f|0;e=i}else{break}}}e=c[28704+(b<<2)>>2]|0;g=f<<b;h=0;i=0;j=0;while(1){if((j|0)<(g|0)){k=h;l=i;while(1){if((k|0)>-1){m=l;n=k;break}else{k=l;l=0}}}else{if((h|0)>-1){m=i;n=h}else{break}}if((m|0)<(f|0)&(n|0)<(f|0)){a[e+(j<<1)|0]=m;a[e+(j<<1)+1|0]=n;o=j+1|0}else{o=j}h=n-1|0;i=m+1|0;j=o}j=b+1|0;if((j|0)<6){b=j}else{p=2;break}}do{b=1<<p;o=(b|0)>0;m=p-2|0;n=(1<<m<<m)-1|0;j=28704+(m<<2)|0;i=28672+(m<<2)|0;h=28640+(m<<2)|0;m=0;do{if(o){e=27544+(m*24|0)+(p<<2)|0;f=(m|0)==0;g=0;do{l=g<<p;k=c[e>>2]|0;if(f){q=0;do{r=q+l|0;s=c[j>>2]|0;t=16;u=n;while(1){v=(t|0)==0;w=(v<<31>>31)+u|0;x=v?15:t-1|0;if((((d[s+(w<<1)|0]|0)<<2)+(d[43504+(x<<1)|0]|0)|0)!=(q|0)){t=x;u=w;continue}if((((d[s+(w<<1)+1|0]|0)<<2)+(d[43505+(x<<1)|0]|0)|0)==(g|0)){break}else{t=x;u=w}}a[k+(r<<1)|0]=w;a[k+(r<<1)+1|0]=x;q=q+1|0;}while((q|0)<(b|0))}else{q=0;do{u=q+l|0;if((m|0)==2){y=38048;z=c[h>>2]|0}else if((m|0)==1){y=40776;z=c[i>>2]|0}else{y=0;z=0}t=16;s=n;while(1){v=(t|0)==0;A=(v<<31>>31)+s|0;B=v?15:t-1|0;if((((d[z+(A<<1)|0]|0)<<2)+(d[y+(B<<1)|0]|0)|0)!=(q|0)){t=B;s=A;continue}if((((d[z+(A<<1)+1|0]|0)<<2)+(d[y+(B<<1)+1|0]|0)|0)==(g|0)){break}else{t=B;s=A}}a[k+(u<<1)|0]=A;a[k+(u<<1)+1|0]=B;q=q+1|0;}while((q|0)<(b|0))}g=g+1|0;}while((g|0)<(b|0))}m=m+1|0;}while((m|0)<3);p=p+1|0;}while((p|0)<6);return}function Fj(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;f=0;while(1){h=nd(d,8)|0;i=h+f|0;if((h|0)==255){f=i}else{j=0;break}}do{f=nd(d,8)|0;j=f+j|0;}while((f|0)==255);c[e>>2]=i;c[e+4>>2]=j;if((i|0)!=132){k=0;return k|0}i=nd(d,8)|0;j=e+8|0;c[j>>2]=i;if((g|0)==0){k=1025;return k|0}f=(c[g+476>>2]|0)==0?1:3;g=0;h=i;while(1){if((h|0)==2){i=nd(d,32)|0;c[e+68+(g<<2)>>2]=i}else if((h|0)==1){i=(nd(d,16)|0)&65535;b[e+60+(g<<1)>>1]=i}else if((h|0)==0){i=(nd(d,8)|0)&255;a[e+12+(g<<4)|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+1|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+2|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+3|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+4|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+5|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+6|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+7|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+8|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+9|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+10|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+11|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+12|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+13|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+14|0]=i;i=(nd(d,8)|0)&255;a[e+12+(g<<4)+15|0]=i}i=g+1|0;if((i|0)>=(f|0)){k=0;break}g=i;h=c[j>>2]|0}return k|0}function Gj(a,b){a=a|0;b=b|0;return}function Hj(f,g){f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0;h=i;i=i+168|0;j=h|0;k=h+152|0;if((c[f>>2]|0)!=132){l=0;i=h;return l|0}if((a[(c[g+10332>>2]|0)+512|0]|0)==0){l=0;i=h;return l|0}m=k|0;if((a[g+100|0]|0)==0){l=0;i=h;return l|0}n=(c[g+1240>>2]|0)==0?1:3;o=g+24|0;p=g+32|0;r=g+28|0;s=g+36|0;t=g+40|0;u=g+44|0;v=f+8|0;w=g+5760|0;x=g+5768|0;y=0;a:while(1){z=(y|0)==0;A=c[(z?o:p)>>2]|0;B=c[(z?r:s)>>2]|0;C=c[g+4+(y<<2)>>2]|0;D=c[(z?t:u)>>2]|0;E=c[v>>2]|0;if((E|0)==0){F=c[(z?w:x)>>2]|0;qi(j);b:do{if((B|0)>0){G=A<<1;H=(A|0)<0?-1:G;I=C;J=(A|0)>0;if((F|0)>8){K=0;L=0}else{if(J){M=0;while(1){ri(j,C+(ga(M,D)|0)|0,A);N=M+1|0;if((N|0)<(B|0)){M=N}else{O=0;break b}}}else{M=0;while(1){ri(j,C+(ga(M,D)|0)|0,A);N=M+1|0;if((N|0)<(B|0)){M=N}else{O=0;break b}}}}while(1){if((K|0)==0){P=Ou(H)|0}else{P=K}if(J){M=ga(L,D)|0;N=0;do{Q=I+(N+M<<1)|0;R=N<<1;a[P+R|0]=b[Q>>1];a[P+(R|1)|0]=(e[Q>>1]|0)>>>8;N=N+1|0;}while((N|0)<(A|0))}ri(j,P,G);N=L+1|0;if((N|0)<(B|0)){K=P;L=N}else{O=P;break}}}else{O=0}}while(0);ti(m,j);if((O|0)==0){S=0}else{Qu(O);S=0}while(1){F=S+1|0;if((a[k+S|0]|0)!=(a[f+12+(y<<4)+S|0]|0)){T=33;break a}if((F|0)<16){S=F}else{break}}}else if((E|0)==2){F=(B|0)>0;do{if((c[(z?w:x)>>2]|0)<9){if(!F){U=0;break}G=(A|0)>0;I=0;J=0;while(1){if(G){H=I>>>8^I;N=ga(I,D)|0;M=0;Q=J;while(1){R=((H^M^M>>>8)&255^d[C+(M+N)|0])+Q|0;V=M+1|0;if((V|0)<(A|0)){M=V;Q=R}else{W=R;break}}}else{W=J}Q=I+1|0;if((Q|0)<(B|0)){I=Q;J=W}else{U=W;break}}}else{if(!F){U=0;break}J=(A|0)>0;I=0;G=0;while(1){if(J){Q=I>>>8^I;M=ga(I,D)|0;N=0;H=G;while(1){R=(Q^N^N>>>8)&255;V=R+H+(R^d[C+(N+M)|0])|0;R=N+1|0;if((R|0)<(A|0)){N=R;H=V}else{X=V;break}}}else{X=G}H=I+1|0;if((H|0)<(B|0)){I=H;G=X}else{U=X;break}}}}while(0);Y=c[f+68+(y<<2)>>2]|0;if((U|0)!=(Y|0)){T=64;break}}else if((E|0)==1){do{if((B|0)>0){F=(c[(z?w:x)>>2]|0)>8;G=A<<1;I=(A|0)<0?-1:G;J=C;H=(A|0)>0;N=0;M=0;Q=7439;while(1){do{if(F){if((N|0)==0){Z=Ou(I)|0}else{Z=N}if(!H){_=Z;$=G;aa=Z;break}V=ga(M,D)|0;R=0;while(1){ba=J+(R+V<<1)|0;ca=R<<1;a[Z+ca|0]=b[ba>>1];a[Z+(ca|1)|0]=(e[ba>>1]|0)>>>8;ba=R+1|0;if((ba|0)<(A|0)){R=ba}else{_=Z;$=G;aa=Z;break}}}else{_=C+(ga(M,D)|0)|0;$=A;aa=N}}while(0);if(($|0)>0){R=0;V=Q;while(1){ba=d[_+R|0]^(V&65535)>>>8;ca=(ba&65535)>>>4^ba;ba=(ca|V<<8)^ca<<5^ca<<12;ca=R+1|0;if((ca|0)<($|0)){R=ca;V=ba}else{da=ba;break}}}else{da=Q}V=M+1|0;if((V|0)<(B|0)){N=aa;M=V;Q=da}else{break}}Q=da&65535;if((aa|0)==0){ea=Q;break}Qu(aa);ea=Q}else{ea=7439}}while(0);fa=e[f+60+(y<<1)>>1]|0;if((ea|0)!=(fa|0)){T=49;break}}B=y+1|0;if((B|0)<(n|0)){y=B}else{l=0;T=66;break}}if((T|0)==33){ic(c[q>>2]|0,12208,(ha=i,i=i+8|0,c[ha>>2]=c[g+92>>2],ha)|0)|0;i=ha;l=5;i=h;return l|0}else if((T|0)==49){y=c[g+92>>2]|0;ic(c[q>>2]|0,11840,(ha=i,i=i+24|0,c[ha>>2]=fa,c[ha+8>>2]=ea,c[ha+16>>2]=y,ha)|0)|0;i=ha;l=5;i=h;return l|0}else if((T|0)==64){y=c[g+92>>2]|0;ic(c[q>>2]|0,11840,(ha=i,i=i+24|0,c[ha>>2]=Y,c[ha+8>>2]=U,c[ha+16>>2]=y,ha)|0)|0;i=ha;l=5;i=h;return l|0}else if((T|0)==66){i=h;return l|0}return 0}function Ij(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,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;h=a[g+93784+((c[f+8>>2]|0)*4400|0)+2|0]|0;i=qd(e)|0;j=f+380|0;a[j]=i;if(i>>>0>7>>>0){k=0;return k|0}i=g+11096+(h*5168|0)+476|0;do{if((c[i>>2]|0)==0){l=f+381|0}else{m=rd(e)|0;n=(d[j]|0)+m|0;if(n>>>0>7>>>0){k=0;return k|0}else{m=f+381|0;a[m]=n;l=m;break}}}while(0);m=f+328|0;n=g+11096+(h*5168|0)+5164|0;o=g+11096+(h*5168|0)+5160|0;h=f+20|0;g=f+332|0;p=0;a:while(1){if((p|0)==0){q=m;r=9}else if((p|0)==1){if((c[h>>2]|0)==0){q=g;r=9}else{k=1;r=33;break}}do{if((r|0)==9){r=0;s=c[q>>2]|0;t=s-1|0;u=(s|0)<1;if(!u){s=0;while(1){v=(nd(e,1)|0)&255;a[f+382+(p<<4)+s|0]=v;if((s|0)<(t|0)){s=s+1|0}else{break}}}if((c[i>>2]|0)!=0){if(u){break}else{w=0}while(1){s=(nd(e,1)|0)&255;a[f+414+(p<<4)+w|0]=s;if((w|0)<(t|0)){w=w+1|0}else{break}}}if(u){break}else{x=0}while(1){if((a[f+382+(p<<4)+x|0]|0)==0){b[f+446+(p<<5)+(x<<1)>>1]=1<<d[j];a[f+510+(p<<4)+x|0]=0}else{s=rd(e)|0;if((s+128|0)>>>0>255>>>0){k=0;r=33;break a}b[f+446+(p<<5)+(x<<1)>>1]=(1<<d[j])+s;s=rd(e)|0;v=c[o>>2]|0;if((s|0)<(-v|0)|(s|0)>(v-1|0)){k=0;r=33;break a}a[f+510+(p<<4)+x|0]=s}if((a[f+414+(p<<4)+x|0]|0)==0){s=1<<d[l]&65535;b[f+542+(p<<6)+(x<<2)>>1]=s;a[f+670+(p<<5)+(x<<1)|0]=0;b[f+542+(p<<6)+(x<<2)+2>>1]=s;a[f+670+(p<<5)+(x<<1)+1|0]=0}else{s=0;do{v=rd(e)|0;if((v+128|0)>>>0>255>>>0){k=0;r=33;break a}y=f+542+(p<<6)+(x<<2)+(s<<1)|0;b[y>>1]=(1<<d[l])+v;v=rd(e)|0;z=c[n>>2]|0;if((v|0)<(z*-4|0|0)){k=0;r=33;break a}if((v|0)>((z<<2)-1|0)){k=0;r=33;break a}A=ga(b[y>>1]|0,z)|0;y=z+v-(A>>d[l])|0;A=-z|0;do{if((y|0)<(A|0)){B=A&255}else{v=z-1|0;if((y|0)>(v|0)){B=v&255;break}else{B=y&255;break}}}while(0);a[f+670+(p<<5)+(x<<1)+s|0]=B;s=s+1|0;}while((s|0)<2)}if((x|0)<(t|0)){x=x+1|0}else{break}}}}while(0);t=p+1|0;if((t|0)<2){p=t}else{k=1;r=33;break}}if((r|0)==33){return k|0}return 0}function Jj(d){d=d|0;var e=0,f=0,g=0,h=0,i=0;c[d>>2]=0;a[d+4|0]=0;a[d+5|0]=0;c[d+8>>2]=0;a[d+12|0]=0;c[d+28>>2]=0;a[d+32|0]=0;dv(d+16|0,0,10)|0;rj(d+34|0);c[d+136>>2]=0;c[d+140>>2]=0;c[d+144>>2]=0;e=0;do{a[d+148+e|0]=0;c[d+164+(e<<2)>>2]=0;a[d+228+e|0]=0;a[d+244+e|0]=0;c[d+260+(e<<2)>>2]=0;e=e+1|0;}while((e|0)<16);c[d+376>>2]=0;a[d+380|0]=0;a[d+381|0]=0;dv(d+324|0,0,49)|0;e=0;while(1){a[d+382+e|0]=0;a[d+414+e|0]=0;b[d+446+(e<<1)>>1]=0;a[d+510+e|0]=0;b[d+542+(e<<2)+2>>1]=0;b[d+542+(e<<2)>>1]=0;a[d+670+(e<<1)+1|0]=0;a[d+670+(e<<1)|0]=0;f=e+1|0;if((f|0)<16){e=f}else{g=0;break}}do{a[d+398+g|0]=0;a[d+430+g|0]=0;b[d+478+(g<<1)>>1]=0;a[d+526+g|0]=0;b[d+606+(g<<2)+2>>1]=0;b[d+606+(g<<2)>>1]=0;a[d+702+(g<<1)+1|0]=0;a[d+702+(g<<1)|0]=0;g=g+1|0;}while((g|0)<16);c[d+756>>2]=0;c[d+760>>2]=0;a[d+764|0]=0;c[d+768>>2]=0;c[d+772>>2]=0;dv(d+736|0,0,19)|0;g=c[d+776>>2]|0;e=d+780|0;f=c[e>>2]|0;if((f|0)!=(g|0)){c[e>>2]=f+(~((f-4+(-g|0)|0)>>>2)<<2)}dv(d+788|0,0,24)|0;rj(d+812|0);c[d+912>>2]=0;g=0;while(1){c[d+916+(g<<2)>>2]=0;c[d+1044+(g<<2)>>2]=0;c[d+1172+(g<<2)>>2]=0;a[d+1300+g|0]=0;f=g+1|0;if((f|0)<16){g=f}else{h=0;break}}do{c[d+980+(h<<2)>>2]=0;c[d+1108+(h<<2)>>2]=0;c[d+1236+(h<<2)>>2]=0;a[d+1316+h|0]=0;h=h+1|0;}while((h|0)<16);h=c[d+1344>>2]|0;g=d+1348|0;f=c[g>>2]|0;if((f|0)==(h|0)){i=d+1340|0;a[i]=0;return}c[g>>2]=f+(~((f-4+(-h|0)|0)>>>2)<<2);i=d+1340|0;a[i]=0;return}function Kj(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0;a[g]=0;Jj(b);h=b+12|0;a[h]=0;i=(nd(e,1)|0)&255;j=b+4|0;a[j]=i;if((a[f+377210|0]|0)!=0){i=(nd(e,1)|0)&255;a[b+5|0]=i}i=qd(e)|0;c[b+8>>2]=i;if((i|0)>64|(i|0)==-99999){Ue(f+4|0,1009,0);k=0;return k|0}if((a[f+93784+(i*4400|0)|0]|0)==0){Ue(f+4|0,1009,0);k=0;return k|0}l=a[f+93784+(i*4400|0)+2|0]|0;m=f+11096+(l*5168|0)|0;if((a[m|0]|0)==0){Ue(f+4|0,1010,0);a[g]=0;k=0;return k|0}if((a[j]|0)==0){if((a[f+93784+(i*4400|0)+3|0]|0)==0){n=0}else{n=(nd(e,1)|0)&255}a[h]=n;n=c[f+11096+(l*5168|0)+5072>>2]|0;o=0;while(1){if((1<<o|0)<(n|0)){o=o+1|0}else{break}}n=nd(e,o)|0;if((a[h]|0)==0){p=0}else{if((n|0)==0){a[g]=0;Ue(f+4|0,1021,0);k=0;return k|0}o=c[f+376224>>2]|0;if((o|0)==0){k=16;return k|0}cv(b|0,o|0,776)|0;q=(o|0)==(b|0);if(!q){tf(b+776|0,c[o+776>>2]|0,c[o+780>>2]|0)}cv(b+788|0,o+788|0,544)|0;Jd(b+1332|0,o+1332|0)|0;a[b+1340|0]=a[o+1340|0]|0;if(!q){tf(b+1344|0,c[o+1344>>2]|0,c[o+1348>>2]|0)}a[j]=0;a[h]=1;p=1}c[b+16>>2]=n;if((n|0)>=0){r=p;s=n;t=25}}else{a[h]=0;c[b+16>>2]=0;r=0;s=0;t=25}do{if((t|0)==25){h=b+16|0;if((s|0)>=(c[f+11096+(l*5168|0)+5072>>2]|0)){break}a:do{if(r<<24>>24==0){n=f+93784+(i*4400|0)+4132|0;if((a[n]|0)>0){p=0;do{od(e,1);p=p+1|0;}while((p|0)<(a[n]|0))}n=qd(e)|0;p=b+20|0;c[p>>2]=n;if((n|0)>2|(n|0)==-99999){Ue(f+4|0,1007,0);a[g]=0;k=0;return k|0}if((a[f+93784+(i*4400|0)+31|0]|0)==0){a[b+24|0]=1}else{n=(nd(e,1)|0)&255;a[b+24|0]=n}if((a[f+11096+(l*5168|0)+480|0]|0)==1){n=(nd(e,2)|0)&255;a[b+25|0]=n}n=b+28|0;c[n>>2]=0;j=b+32|0;a[j]=0;do{if(((a[f+377208|0]|0)-19&255)>>>0<2>>>0){c[n>>2]=0;c[b+140>>2]=0;c[b+144>>2]=0;u=0}else{o=f+11096+(l*5168|0)+520|0;q=nd(e,c[o>>2]|0)|0;c[n>>2]=q;q=(nd(e,1)|0)&255;a[j]=q;do{if(q<<24>>24==0){v=b+34|0;w=f+11096+(l*5168|0)+4724|0;x=f+11096+(l*5168|0)+4720|0;sj((f|0)==0?0:f+4|0,m,e,v,((c[w>>2]|0)-(c[x>>2]|0)|0)/100|0,f+11096+(l*5168|0)+4720|0,1)|0;c[b+808>>2]=((c[w>>2]|0)-(c[x>>2]|0)|0)/100|0;cv(b+812|0,v|0,100)|0}else{v=f+11096+(l*5168|0)+4724|0;x=c[v>>2]|0;w=f+11096+(l*5168|0)+4720|0;y=c[w>>2]|0;z=(x-y|0)/100|0;A=0;while(1){if((1<<A|0)<(z|0)){A=A+1|0}else{break}}if((A|0)>0){z=nd(e,A)|0;c[b+136>>2]=z;B=z;C=c[v>>2]|0;D=c[w>>2]|0}else{c[b+136>>2]=0;B=0;C=x;D=y}if((B|0)<((C-D|0)/100|0|0)){c[b+808>>2]=B;cv(b+812|0,D+(B*100|0)|0,100)|0;break}Ue(f+4|0,1015,0);k=8;return k|0}}while(0);b:do{if((a[f+11096+(l*5168|0)+4732|0]|0)==0){c[b+140>>2]=0;c[b+144>>2]=0;E=0}else{q=f+11096+(l*5168|0)+4736|0;do{if((c[q>>2]|0)>0){z=qd(e)|0;c[b+140>>2]=z;if((z|0)==-99999){k=8}else{break}return k|0}else{c[b+140>>2]=0}}while(0);y=qd(e)|0;x=b+144|0;c[x>>2]=y;if((y|0)==-99999){k=8;return k|0}w=b+140|0;v=c[w>>2]|0;A=v+y|0;if((A+(d[b+908|0]|0)+(d[b+909|0]|0)|0)>(c[f+11096+(l*5168|0)+528+((a[f+11096+(l*5168|0)+2|0]|0)-1<<2)>>2]|0)){Ue(f+4|0,1018,0);a[g]=0;k=0;return k|0}if((A|0)>0){F=0;G=0;H=v}else{E=0;break}while(1){if((F|0)<(H|0)){v=c[q>>2]|0;A=0;while(1){if((1<<A|0)<(v|0)){A=A+1|0}else{break}}v=nd(e,A)|0;y=b+148+F|0;a[y]=v;z=v&255;if((z|0)>=(c[q>>2]|0)){break}c[f+376228+(F<<2)>>2]=c[f+11096+(l*5168|0)+4740+(z<<2)>>2];z=a[(d[y]|0)+(f+11096+(l*5168|0)+4868)|0]|0;c[f+376292+(F<<2)>>2]=z;I=z}else{z=nd(e,c[o>>2]|0)|0;y=b+164+(F<<2)|0;c[y>>2]=z;z=(nd(e,1)|0)&255;v=b+228+F|0;a[v]=z;c[f+376228+(F<<2)>>2]=c[y>>2];y=a[v]|0;c[f+376292+(F<<2)>>2]=y;I=y}y=((I|0)!=0)+G|0;v=(nd(e,1)|0)&255;a[b+244+F|0]=v;if(v<<24>>24==0){c[b+260+(F<<2)>>2]=0;J=0}else{v=qd(e)|0;c[b+260+(F<<2)>>2]=v;if((v|0)==-99999){k=8;t=194;break}else{J=v}}do{if((F|0)==0){t=68}else{if((F|0)==(c[w>>2]|0)){t=68;break}c[f+376356+(F<<2)>>2]=(c[f+376356+(F-1<<2)>>2]|0)+J}}while(0);if((t|0)==68){t=0;c[f+376356+(F<<2)>>2]=J}A=F+1|0;v=c[w>>2]|0;if((A|0)<((c[x>>2]|0)+v|0)){F=A;G=y;H=v}else{E=y;break b}}if((t|0)==194){return k|0}Ue(f+4|0,1023,0);a[g]=0;k=0;return k|0}}while(0);if((a[f+11096+(l*5168|0)+4900|0]|0)==0){a[b+324|0]=0;u=E;break}else{o=(nd(e,1)|0)&255;a[b+324|0]=o;u=E;break}}}while(0);do{if((a[f+11096+(l*5168|0)+4703|0]|0)==0){a[b+325|0]=0;a[b+326|0]=0}else{j=(nd(e,1)|0)&255;a[b+325|0]=j;if((c[f+11096+(l*5168|0)+5012>>2]|0)==0){a[b+326|0]=0;break}else{j=(nd(e,1)|0)&255;a[b+326|0]=j;break}}}while(0);j=b+328|0;c[j>>2]=0;n=b+332|0;c[n>>2]=0;do{if((c[p>>2]|0)>>>0<2>>>0){o=(nd(e,1)|0)&255;a[b+327|0]=o;do{if(o<<24>>24==0){x=a[f+93784+(i*4400|0)+6|0]|0;c[j>>2]=x;K=a[f+93784+(i*4400|0)+7|0]|0;L=x;t=90}else{x=qd(e)|0;c[j>>2]=x;if((x|0)==-99999){Ue(f+4|0,1007,0);k=8;return k|0}w=x+1|0;c[j>>2]=w;if((c[p>>2]|0)!=0){M=w;break}w=qd(e)|0;c[n>>2]=w;if(!((w|0)==-99999)){K=w+1|0;L=c[j>>2]|0;t=90;break}Ue(f+4|0,1007,0);k=8;return k|0}}while(0);if((t|0)==90){c[n>>2]=K;M=L}if((M|0)>16){k=8;return k|0}if((c[n>>2]|0)>16){k=8;return k|0}o=(d[b+911|0]|0)+u|0;c[b+912>>2]=o;do{if((a[f+93784+(i*4400|0)+4125|0]|0)!=0&(o|0)>1){w=0;while(1){if((1<<w|0)<(o|0)){w=w+1|0}else{break}}x=(nd(e,1)|0)&255;a[b+336|0]=x;do{if(!(x<<24>>24==0)){if((c[j>>2]|0)>0){N=0}else{break}do{q=(nd(e,w)|0)&255;a[b+338+N|0]=q;N=N+1|0;}while((N|0)<(c[j>>2]|0))}}while(0);if((c[p>>2]|0)!=0){a[b+337|0]=0;break}x=(nd(e,1)|0)&255;a[b+337|0]=x;if(x<<24>>24==0){break}if((c[n>>2]|0)>0){O=0}else{break}do{x=(nd(e,w)|0)&255;a[b+354+O|0]=x;O=O+1|0;}while((O|0)<(c[n>>2]|0))}else{a[b+336|0]=0;a[b+337|0]=0}}while(0);if((c[p>>2]|0)==0){o=(nd(e,1)|0)&255;a[b+370|0]=o}if((a[f+93784+(i*4400|0)+5|0]|0)==0){a[b+371|0]=0}else{o=(nd(e,1)|0)&255;a[b+371|0]=o}do{if((a[b+324|0]|0)!=0){do{if((c[p>>2]|0)==0){o=(nd(e,1)|0)&255;a[b+372|0]=o;w=b+372|0;if(!(o<<24>>24==0)){P=o;Q=w;t=113;break}if((c[n>>2]|0)>1){R=w;t=115}else{S=0;t=118}}else{a[b+372|0]=1;P=1;Q=b+372|0;t=113}}while(0);if((t|0)==113){if((c[j>>2]|0)>1){R=Q;t=115}else{S=P;t=118}}do{if((t|0)==115){w=qd(e)|0;c[b+376>>2]=w;if(!((w|0)==-99999)){T=w;U=a[R]|0;break}Ue(f+4|0,1007,0);k=8;return k|0}else if((t|0)==118){c[b+376>>2]=0;T=0;U=S}}while(0);if(U<<24>>24==0){if((T|0)<(c[n>>2]|0)){break}}else{if((T|0)<(c[j>>2]|0)){break}}Ue(f+4|0,8,0);k=8;return k|0}}while(0);if((a[f+93784+(i*4400|0)+29|0]|0)==0){t=125}else{if((c[p>>2]|0)==1){t=127}else{t=125}}do{if((t|0)==125){if((a[f+93784+(i*4400|0)+30|0]|0)==0){break}if((c[p>>2]|0)==0){t=127}}}while(0);do{if((t|0)==127){if(Ij(e,b,f)|0){break}Ue(f+4|0,8,0);k=8;return k|0}}while(0);w=qd(e)|0;c[b+736>>2]=w;if(!((w|0)==-99999)){c[b+804>>2]=5-w;break}Ue(f+4|0,1007,0);k=8;return k|0}}while(0);p=rd(e)|0;c[b+740>>2]=p;if((p|0)==-99999){Ue(f+4|0,1007,0);k=8;return k|0}do{if((a[f+93784+(i*4400|0)+28|0]|0)==0){c[b+744>>2]=0;c[b+748>>2]=0}else{p=rd(e)|0;c[b+744>>2]=p;if((p|0)==-99999){Ue(f+4|0,1007,0);k=8;return k|0}p=rd(e)|0;c[b+748>>2]=p;if(!((p|0)==-99999)){break}Ue(f+4|0,1007,0);k=8;return k|0}}while(0);if((a[f+93784+(i*4400|0)+4140|0]|0)!=0){p=(nd(e,1)|0)&255;a[b+752|0]=p}if((a[f+93784+(i*4400|0)+48|0]|0)==0){a[b+753|0]=0;V=1}else{p=(nd(e,1)|0)&255;a[b+753|0]=p;V=p<<24>>24==0}p=b+756|0;c[p>>2]=c[f+93784+(i*4400|0)+52>>2];j=b+760|0;c[j>>2]=c[f+93784+(i*4400|0)+56>>2];do{if(V){a[b+754|0]=a[f+93784+(i*4400|0)+49|0]|0}else{n=(nd(e,1)|0)&255;a[b+754|0]=n;if(!(n<<24>>24==0)){break}n=rd(e)|0;c[p>>2]=n;if((n|0)==-99999){Ue(f+4|0,1007,0);k=8;return k|0}c[p>>2]=n<<1;n=rd(e)|0;c[j>>2]=n;if(!((n|0)==-99999)){c[j>>2]=n<<1;break}Ue(f+4|0,1007,0);k=8;return k|0}}while(0);j=a[f+93784+(i*4400|0)+46|0]|0;c:do{if(!(j<<24>>24==0)){do{if((a[b+325|0]|0)==0){if((a[b+326|0]|0)!=0){break}if((a[b+754|0]|0)!=0){break c}}}while(0);p=(nd(e,1)|0)&255;a[b+764|0]=p;break a}}while(0);a[b+764|0]=j}}while(0);p=f+93784+(i*4400|0)+34|0;do{if((a[p]|0)==0){if((a[f+93784+(i*4400|0)+33|0]|0)!=0){t=161;break}c[b+768>>2]=0}else{t=161}}while(0);d:do{if((t|0)==161){n=qd(e)|0;w=b+768|0;c[w>>2]=n;if((n|0)==-99999){Ue(f+4|0,1007,0);k=8;return k|0}do{if((a[f+93784+(i*4400|0)+33|0]|0)!=0){if((((c[h>>2]|0)/(c[f+11096+(l*5168|0)+5056>>2]|0)|0)+n|0)<(c[f+11096+(l*5168|0)+5064>>2]|0)){break}Ue(f+4|0,1007,0);k=8;return k|0}}while(0);do{if((a[p]|0)!=0){if((n|0)<=(ga(c[f+93784+(i*4400|0)+40>>2]|0,c[f+93784+(i*4400|0)+36>>2]|0)|0)){break}Ue(f+4|0,1007,0);k=8;return k|0}}while(0);j=b+776|0;o=b+780|0;x=c[o>>2]|0;y=j|0;q=c[y>>2]|0;v=x-q>>2;do{if(v>>>0<n>>>0){qj(j,n-v|0);W=c[w>>2]|0}else{if(!(v>>>0>n>>>0)){W=n;break}A=q+(n<<2)|0;if((x|0)==(A|0)){W=n;break}c[o>>2]=x+(~((x-4+(-A|0)|0)>>>2)<<2);W=n}}while(0);if((W|0)<=0){break}n=qd(e)|0;x=b+772|0;c[x>>2]=n;if((n|0)==-99999){Ue(f+4|0,1007,0);k=8;return k|0}o=n+1|0;c[x>>2]=o;if((n|0)>31){k=8;return k|0}if((c[w>>2]|0)>0){X=0;Y=o}else{break}while(1){o=(nd(e,Y)|0)+1|0;n=c[y>>2]|0;q=n+(X<<2)|0;c[q>>2]=o;if((X|0)>0){c[q>>2]=o+(c[n+(X-1<<2)>>2]|0)}n=X+1|0;if((n|0)>=(c[w>>2]|0)){break d}X=n;Y=c[x>>2]|0}}}while(0);do{if((a[f+93784+(i*4400|0)+4133|0]|0)!=0){p=qd(e)|0;h=b+788|0;c[h>>2]=p;if((p|0)==-99999|(p|0)>1e3){Ue(f+4|0,1007,0);k=8;return k|0}else{if((p|0)>0){Z=0}else{break}do{nd(e,8)|0;Z=Z+1|0;}while((Z|0)<(c[h>>2]|0))}}}while(0);c[b+792>>2]=(c[b+740>>2]|0)+(c[f+93784+(i*4400|0)+8>>2]|0);h=c[b+20>>2]|0;if((h|0)==2){c[b+796>>2]=0}else if((h|0)==1){c[b+796>>2]=(a[b+371|0]|0)+1}else if((h|0)==0){c[b+796>>2]=2-(a[b+371|0]|0)}c[b+804>>2]=5-(c[b+736>>2]|0);a[g]=1;k=0;return k|0}}while(0);Ue(f+4|0,1020,0);k=8;return k|0}function Lj(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,u=0,v=0,w=0,x=0,y=0;h=i;if((g|0)==2){j=q}else if((g|0)==1){j=t}else{i=h;return}g=c[j>>2]|0;j=e+8|0;k=c[j>>2]|0;if((a[f+93784+(k*4400|0)|0]|0)==0){ec(12424,14776,1278,17264)}l=a[f+93784+(k*4400|0)+2|0]|0;if((a[f+11096+(l*5168|0)|0]|0)==0){ec(12192,14776,1281,17264)}Zk(g,11792,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;n=e+4|0;Zk(g,11512,(m=i,i=i+8|0,c[m>>2]=a[n]|0,m)|0);i=m;o=f+377208|0;if(((a[o]|0)-16&255)>>>0<8>>>0){Zk(g,11232,(m=i,i=i+8|0,c[m>>2]=a[e+5|0]|0,m)|0);i=m}Zk(g,10984,(m=i,i=i+8|0,c[m>>2]=c[j>>2],m)|0);i=m;if((a[n]|0)==0){Zk(g,10720,(m=i,i=i+8|0,c[m>>2]=a[e+12|0]|0,m)|0);i=m;Zk(g,10472,(m=i,i=i+8|0,c[m>>2]=c[e+16>>2],m)|0);i=m}n=e+20|0;j=c[n>>2]|0;if((j|0)==0){p=66}else{p=(j|0)==1?80:73}Zk(g,10144,(m=i,i=i+8|0,c[m>>2]=p,m)|0);i=m;if((a[f+93784+(k*4400|0)+31|0]|0)!=0){Zk(g,9808,(m=i,i=i+8|0,c[m>>2]=a[e+24|0]|0,m)|0);i=m}if((a[f+11096+(l*5168|0)+480|0]|0)==1){Zk(g,9360,(m=i,i=i+8|0,c[m>>2]=a[e+25|0]|0,m)|0);i=m}Zk(g,9064,(m=i,i=i+8|0,c[m>>2]=c[e+28>>2],m)|0);i=m;do{if(!(((a[o]|0)-19&255)>>>0<2>>>0)){p=e+32|0;Zk(g,8752,(m=i,i=i+8|0,c[m>>2]=a[p]|0,m)|0);i=m;j=f+11096+(l*5168|0)+4720|0;r=(c[f+11096+(l*5168|0)+4724>>2]|0)-(c[j>>2]|0)|0;do{if((a[p]|0)==0){Zk(g,8440,(m=i,i=i+8|0,c[m>>2]=(r|0)/100|0,m)|0);i=m;tj(e+34|0,16,g)}else{if((r|0)<=100){break}s=e+136|0;Zk(g,8232,(m=i,i=i+8|0,c[m>>2]=c[s>>2],m)|0);i=m;tj((c[j>>2]|0)+((c[s>>2]|0)*100|0)|0,16,g)}}while(0);if((a[f+11096+(l*5168|0)+4732|0]|0)!=0){if((c[f+11096+(l*5168|0)+4736>>2]|0)>0){Zk(g,7960,(m=i,i=i+8|0,c[m>>2]=c[e+140>>2],m)|0);i=m}Zk(g,7680,(m=i,i=i+8|0,c[m>>2]=c[e+144>>2],m)|0);i=m}if((a[f+11096+(l*5168|0)+4900|0]|0)==0){break}Zk(g,7392,(m=i,i=i+8|0,c[m>>2]=a[e+324|0]|0,m)|0);i=m}}while(0);if((a[f+11096+(l*5168|0)+4703|0]|0)!=0){Zk(g,7088,(m=i,i=i+8|0,c[m>>2]=a[e+325|0]|0,m)|0);i=m;Zk(g,6808,(m=i,i=i+8|0,c[m>>2]=a[e+326|0]|0,m)|0);i=m}if((c[n>>2]|0)>>>0<2>>>0){o=e+327|0;Zk(g,6528,(m=i,i=i+8|0,c[m>>2]=a[o]|0,m)|0);i=m;j=e+328|0;r=(a[o]|0)!=0?31320:6040;Zk(g,6376,(m=i,i=i+16|0,c[m>>2]=c[j>>2],c[m+8>>2]=r,m)|0);i=m;if((c[n>>2]|0)==0){r=(a[o]|0)!=0?31320:6040;Zk(g,5856,(m=i,i=i+16|0,c[m>>2]=c[e+332>>2],c[m+8>>2]=r,m)|0);i=m}do{if((a[f+93784+(k*4400|0)+4125|0]|0)!=0){if((c[e+912>>2]|0)<=1){break}r=e+336|0;Zk(g,5712,(m=i,i=i+8|0,c[m>>2]=a[r]|0,m)|0);i=m;do{if((a[r]|0)!=0){if((c[j>>2]|0)>0){u=0}else{break}do{o=d[e+338+u|0]|0;Zk(g,5552,(m=i,i=i+16|0,c[m>>2]=u,c[m+8>>2]=o,m)|0);i=m;u=u+1|0;}while((u|0)<(c[j>>2]|0))}}while(0);r=e+337|0;Zk(g,5392,(m=i,i=i+8|0,c[m>>2]=a[r]|0,m)|0);i=m;if((a[r]|0)==0){break}r=e+332|0;if((c[r>>2]|0)>0){v=0}else{break}do{o=d[e+354+v|0]|0;Zk(g,5552,(m=i,i=i+16|0,c[m>>2]=v,c[m+8>>2]=o,m)|0);i=m;v=v+1|0;}while((v|0)<(c[r>>2]|0))}}while(0);if((c[n>>2]|0)==0){Zk(g,5224,(m=i,i=i+8|0,c[m>>2]=a[e+370|0]|0,m)|0);i=m}Zk(g,5008,(m=i,i=i+8|0,c[m>>2]=a[e+371|0]|0,m)|0);i=m;if((a[e+324|0]|0)!=0){Zk(g,4832,(m=i,i=i+8|0,c[m>>2]=a[e+372|0]|0,m)|0);i=m;Zk(g,4712,(m=i,i=i+8|0,c[m>>2]=c[e+376>>2],m)|0);i=m}if((a[f+93784+(k*4400|0)+29|0]|0)==0){w=47}else{if((c[n>>2]|0)==1){w=49}else{w=47}}do{if((w|0)==47){if((a[f+93784+(k*4400|0)+30|0]|0)==0){break}if((c[n>>2]|0)==0){w=49}}}while(0);a:do{if((w|0)==49){Zk(g,4480,(m=i,i=i+8|0,c[m>>2]=d[e+380|0]|0,m)|0);i=m;if((c[f+11096+(l*5168|0)+476>>2]|0)!=0){Zk(g,4248,(m=i,i=i+8|0,c[m>>2]=d[e+381|0]|0,m)|0);i=m}v=e+332|0;u=0;do{if((u|0)==1){if((c[n>>2]|0)==0){x=v;w=54}else{break a}}else if((u|0)==0){x=j;w=54}do{if((w|0)==54){w=0;r=c[x>>2]|0;o=r-1|0;if((r|0)<1){break}else{y=0}while(1){r=b[e+446+(u<<5)+(y<<1)>>1]|0;Zk(g,4096,(m=i,i=i+24|0,c[m>>2]=u,c[m+8>>2]=y,c[m+16>>2]=r,m)|0);i=m;r=a[e+510+(u<<4)+y|0]|0;Zk(g,4008,(m=i,i=i+24|0,c[m>>2]=u,c[m+8>>2]=y,c[m+16>>2]=r,m)|0);i=m;r=b[e+542+(u<<6)+(y<<2)>>1]|0;Zk(g,3944,(m=i,i=i+32|0,c[m>>2]=u,c[m+8>>2]=y,c[m+16>>2]=0,c[m+24>>2]=r,m)|0);i=m;r=a[e+670+(u<<5)+(y<<1)|0]|0;Zk(g,3880,(m=i,i=i+32|0,c[m>>2]=u,c[m+8>>2]=y,c[m+16>>2]=0,c[m+24>>2]=r,m)|0);i=m;r=b[e+542+(u<<6)+(y<<2)+2>>1]|0;Zk(g,3944,(m=i,i=i+32|0,c[m>>2]=u,c[m+8>>2]=y,c[m+16>>2]=1,c[m+24>>2]=r,m)|0);i=m;r=a[e+670+(u<<5)+(y<<1)+1|0]|0;Zk(g,3880,(m=i,i=i+32|0,c[m>>2]=u,c[m+8>>2]=y,c[m+16>>2]=1,c[m+24>>2]=r,m)|0);i=m;if((y|0)<(o|0)){y=y+1|0}else{break}}}}while(0);u=u+1|0;}while((u|0)<2)}}while(0);Zk(g,3792,(m=i,i=i+8|0,c[m>>2]=c[e+736>>2],m)|0);i=m}Zk(g,3624,(m=i,i=i+8|0,c[m>>2]=c[e+740>>2],m)|0);i=m;if((a[f+93784+(k*4400|0)+28|0]|0)!=0){Zk(g,3464,(m=i,i=i+8|0,c[m>>2]=c[e+744>>2],m)|0);i=m;Zk(g,3360,(m=i,i=i+8|0,c[m>>2]=c[e+748>>2],m)|0);i=m}y=e+753|0;if((a[f+93784+(k*4400|0)+48|0]|0)!=0){Zk(g,3144,(m=i,i=i+8|0,c[m>>2]=a[y]|0,m)|0);i=m}x=e+754|0;w=((a[y]|0)!=0?2896:2816)|0;Zk(g,3088,(m=i,i=i+16|0,c[m>>2]=a[x]|0,c[m+8>>2]=w,m)|0);i=m;do{if((a[y]|0)!=0){if((a[x]|0)!=0){break}Zk(g,2696,(m=i,i=i+8|0,c[m>>2]=c[e+756>>2],m)|0);i=m;Zk(g,2600,(m=i,i=i+8|0,c[m>>2]=c[e+760>>2],m)|0);i=m}}while(0);b:do{if((a[f+93784+(k*4400|0)+46|0]|0)!=0){do{if((a[e+325|0]|0)==0){if((a[e+326|0]|0)!=0){break}if((a[x]|0)!=0){break b}}}while(0);Zk(g,2480,(m=i,i=i+8|0,c[m>>2]=a[e+764|0]|0,m)|0);i=m}}while(0);do{if((a[f+93784+(k*4400|0)+34|0]|0)==0){if((a[f+93784+(k*4400|0)+33|0]|0)!=0){break}i=h;return}}while(0);k=e+768|0;Zk(g,2320,(m=i,i=i+8|0,c[m>>2]=c[k>>2],m)|0);i=m;if((c[k>>2]|0)<=0){i=h;return}Zk(g,2136,(m=i,i=i+8|0,c[m>>2]=c[e+772>>2],m)|0);i=m;if((c[k>>2]|0)<=0){i=h;return}f=e+776|0;e=0;do{x=c[(c[f>>2]|0)+(e<<2)>>2]|0;Zk(g,2048,(m=i,i=i+16|0,c[m>>2]=e,c[m+8>>2]=x,m)|0);i=m;e=e+1|0;}while((e|0)<(c[k>>2]|0));i=h;return}function Mj(){var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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=Gu(11296)|0;if((b|0)==0){e=0;return e|0}dv(b|0,-1|0,11296)|0;c[7766]=b;c[7767]=b;c[7768]=b;c[7769]=b;c[7770]=b;c[7771]=b;c[7772]=b;c[7773]=b;f=b+16|0;c[7774]=f;c[7775]=f;c[7776]=f;c[7777]=f;c[7778]=f;c[7779]=f;c[7780]=f;c[7781]=f;f=b+1056|0;c[7782]=b+32;c[7783]=b+96;c[7784]=b+160;c[7785]=b+224;c[7786]=b+288;c[7787]=b+352;c[7788]=b+416;c[7789]=b+480;c[7790]=b+544;c[7791]=b+608;c[7792]=b+672;c[7793]=b+736;c[7794]=b+800;c[7795]=b+864;c[7796]=b+928;c[7797]=b+992;c[7798]=f;c[7802]=f;f=b+1312|0;c[7799]=f;c[7803]=f;f=b+1568|0;c[7800]=f;c[7804]=f;f=b+1824|0;c[7801]=f;c[7805]=f;f=b+2080|0;c[7806]=f;c[7810]=f;f=b+2336|0;c[7807]=f;c[7811]=f;f=b+2592|0;c[7808]=f;c[7812]=f;f=b+2848|0;c[7809]=f;c[7813]=f;f=b+3104|0;c[7814]=f;c[7818]=f;f=b+4128|0;c[7815]=f;c[7819]=f;f=b+5152|0;c[7816]=f;c[7820]=f;f=b+6176|0;c[7817]=f;c[7821]=f;f=b+7200|0;c[7822]=f;c[7826]=f;f=b+8224|0;c[7823]=f;c[7827]=f;f=b+9248|0;c[7824]=f;c[7828]=f;f=b+10272|0;c[7825]=f;c[7829]=f;f=2;a:while(1){b=1<<f;g=(b|0)>0;h=b>>2;i=(h|0)==1;j=f-2|0;k=(h|0)==2;h=0;do{l=(h|0)==0;m=0;do{n=(m|0)==0?9:15;o=0;do{if(g){p=31064+(j<<6)+(h<<5)+(m<<4)+(o<<2)|0;q=0;do{r=q<<2;s=q<<f;t=-q|0;u=q>>2;v=q&3;w=(v|0)==0;x=(v|0)==1|0;if(i){y=0;do{z=d[27272+(y+r)|0]|0;A=l?z:z+27|0;z=(c[p>>2]|0)+(y+s)|0;B=a[z]|0;if(!(B<<24>>24==-1|(B&255|0)==(A|0))){C=26;break a}a[z]=A;y=y+1|0;}while((y|0)<(b|0))}else{y=0;do{do{if((y|0)==(t|0)){D=0}else{r=y>>2;A=y&3;do{if((o|0)==1){E=w?2:x}else if((o|0)==2){if((A|0)==0){E=2;break}E=(A|0)==1|0}else if((o|0)==0){z=A+v|0;if((z|0)>2){E=0;break}E=(z|0)>0?1:2}else{E=2}}while(0);if(l){A=(r+u|0)>0?E+3|0:E;if(k){D=A+n|0;break}else{D=A+21|0;break}}else{if(k){D=E+9|0;break}else{D=E|12;break}}}}while(0);A=l?D:D+27|0;z=(c[p>>2]|0)+(y+s)|0;B=a[z]|0;if(!(B<<24>>24==-1|(B&255|0)==(A|0))){C=26;break a}a[z]=A;y=y+1|0;}while((y|0)<(b|0))}q=q+1|0;}while((q|0)<(b|0))}o=o+1|0;}while((o|0)<4);m=m+1|0;}while((m|0)<2);h=h+1|0;}while((h|0)<2);h=f+1|0;if((h|0)<6){f=h}else{e=1;C=33;break}}if((C|0)==26){ec(1728,14776,2100,18008);return 0}else if((C|0)==33){return e|0}return 0}function Nj(){Hu(c[7766]|0);c[7766]=0;return}function Oj(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;g=i;i=i+24|0;h=g|0;j=c[b+18600>>2]|0;k=c[b+18596>>2]|0;l=h|0;dv(l|0,0,17)|0;do{if((e|0)>0){m=ga(c[k+5820>>2]|0,f)|0;n=c[k+10308>>2]|0;if((c[b>>2]|0)<=(c[j+800>>2]|0)){o=1;break}if((c[n+(m+e<<2)>>2]|0)!=(c[n+(e-1+m<<2)>>2]|0)){o=1;break}o=((ud(b+18556|0,c[b+18580>>2]|0)|0)&255)<<24>>24==0}else{o=1}}while(0);do{if((f|0)>0&o){m=c[k+5820>>2]|0;n=c[k+10308>>2]|0;if(((c[b>>2]|0)-m|0)<(c[j+800>>2]|0)){p=0;break}q=n+((ga(m,f)|0)+e<<2)|0;r=n+((ga(m,f-1|0)|0)+e<<2)|0;if((c[q>>2]|0)!=(c[r>>2]|0)){p=0;break}p=((ud(b+18556|0,c[b+18580>>2]|0)|0)&255)<<24>>24!=0}else{p=0}}while(0);if(o&(p^1)){r=(c[k+5776>>2]|0)==0?1:3;q=j+325|0;m=b+18556|0;n=b+18580|0;b=k+5760|0;s=k+5768|0;t=k+10087|0;u=k+10088|0;v=h+1|0;w=j+326|0;j=0;do{x=(j|0)==0;if((a[q]|0)!=0&x){y=13}else{if((a[w]|0)!=0&(j|0)>0){y=13}}do{if((y|0)==13){y=0;do{if(x){if((ud(m,(c[n>>2]|0)+1|0)|0)==0){z=0}else{A=(wd(m)|0)==0;z=A?1:2}a[l]=z;B=z}else{if((j|0)!=1){B=(d[l]|0)>>>(j<<1>>>0)&3;break}if((ud(m,(c[n>>2]|0)+1|0)|0)==0){C=0}else{A=(wd(m)|0)==0;C=A?1:2}a[l]=C<<4|C<<2|d[l];B=C&255}}while(0);if(B<<24>>24==0){break}A=x?b:s;D=c[A>>2]|0;E=(xd(m,(D|0)<10?(1<<D-5)-1|0:31)|0)&255;D=h+5+(j<<2)|0;a[D]=E;F=c[A>>2]|0;G=(xd(m,(F|0)<10?(1<<F-5)-1|0:31)|0)&255;F=h+5+(j<<2)+1|0;a[F]=G;H=c[A>>2]|0;I=(xd(m,(H|0)<10?(1<<H-5)-1|0:31)|0)&255;H=h+5+(j<<2)+2|0;a[H]=I;J=c[A>>2]|0;A=(xd(m,(J|0)<10?(1<<J-5)-1|0:31)|0)&255;J=h+5+(j<<2)+3|0;a[J]=A;do{if(B<<24>>24==1){if(E<<24>>24==0){K=0}else{L=(wd(m)|0)!=0;K=L?-1:1}if(G<<24>>24==0){M=0}else{L=(wd(m)|0)!=0;M=L?-1:1}if(I<<24>>24==0){N=0}else{L=(wd(m)|0)!=0;N=L?-1:1}if(A<<24>>24==0){O=0}else{L=(wd(m)|0)!=0;O=L?-1:1}L=(yd(m,5)|0)&255;a[h+2+j|0]=L;P=K;Q=M;R=a[F]|0;S=N;T=a[H]|0;U=O;V=a[J]|0}else{if(x){L=(yd(m,2)|0)&255;a[v]=L;P=1;Q=1;R=G;S=-1;T=I;U=-1;V=A;break}if((j|0)!=1){P=1;Q=1;R=G;S=-1;T=I;U=-1;V=A;break}L=(yd(m,2)|0)&255;a[v]=d[v]|L<<2|L<<4;P=1;Q=1;R=G;S=-1;T=I;U=-1;V=A}}while(0);A=d[x?t:u]|0;I=(ga(a[D]<<A,P)|0)&255;a[D]=I;I=(ga(R<<24>>24<<A,Q)|0)&255;a[F]=I;I=(ga(T<<24>>24<<A,S)|0)&255;a[H]=I;I=(ga(V<<24>>24<<A,U)|0)&255;a[J]=I}}while(0);j=j+1|0;}while((j|0)<(r|0));r=(ga(c[k+10352>>2]|0,f)|0)+e|0;cv((c[k+10340>>2]|0)+(r*24|0)+4|0,l|0,17)|0}if(!o){o=ga(c[k+10352>>2]|0,f)|0;l=c[k+10340>>2]|0;cv(l+((o+e|0)*24|0)+4|0,l+((e-1+o|0)*24|0)+4|0,17)|0}if(!p){i=g;return}p=c[k+10352>>2]|0;o=(ga(p,f-1|0)|0)+e|0;l=c[k+10340>>2]|0;cv(l+(((ga(p,f)|0)+e|0)*24|0)+4|0,l+(o*24|0)+4|0,17)|0;i=g;return}function Pj(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=c[d+18600>>2]|0;f=c[d+18596>>2]|0;g=c[d>>2]|0;h=c[f+5820>>2]|0;i=(g|0)%(h|0)|0;j=(g|0)/(h|0)|0;h=f+5804|0;g=c[h>>2]|0;k=i<<g;l=j<<g;m=c[f+10352>>2]|0;n=(ga(m,j)|0)+i|0;o=c[f+10340>>2]|0;b[o+(n*24|0)>>1]=c[e+800>>2];n=c[e>>2]&65535;p=c[f+10348>>2]|0;q=k>>p;r=l>>p;if(!((q|0)>-1&(q|0)<(m|0))){ec(1024,904,128,17320)}if(!((r|0)>-1)){ec(816,904,129,17320)}if((r|0)>=(c[f+10356>>2]|0)){ec(816,904,129,17320)}f=o+(((ga(m,r)|0)+q|0)*24|0)+2|0;b[f>>1]=n;do{if((a[e+325|0]|0)==0){if((a[e+326|0]|0)==0){s=g}else{break}Qj(d,k,l,s,0);return}}while(0);Oj(d,i,j,0);s=c[h>>2]|0;Qj(d,k,l,s,0);return}function Qj(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,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,D=0,E=0,F=0,G=0,H=0,I=0;j=e+18596|0;k=e+18600|0;l=e+18516|0;m=e+18508|0;n=e+18512|0;o=e+18556|0;p=e+18580|0;q=i;i=h;h=g;g=f;a:while(1){r=c[j>>2]|0;f=1<<i;s=r+1248|0;t=c[s>>2]|0;do{if((f+g|0)>(t|0)){u=28}else{v=c[r+1252>>2]|0;if((f+h|0)>(v|0)){u=28;break}if((c[r+5800>>2]|0)>=(i|0)){u=28;break}w=g-1|0;do{if((w|h|0)>-1&(t|0)>(w|0)&(v|0)>(h|0)){x=c[r+5804>>2]|0;y=ga(h>>x,c[r+5820>>2]|0)|0;z=y+(g>>x)|0;A=y+(w>>x)|0;x=c[r+10340>>2]|0;if((b[x+(z*24|0)>>1]|0)!=(b[x+(A*24|0)>>1]|0)){B=0;break}x=c[r+10308>>2]|0;B=(c[x+(z<<2)>>2]|0)==(c[x+(A<<2)>>2]|0)|0}else{B=0}}while(0);A=h-1|0;do{if((A|g|0)>-1&(t|0)>(g|0)&(v|0)>(A|0)){x=c[r+5804>>2]|0;z=c[r+5820>>2]|0;y=g>>x;D=(ga(h>>x,z)|0)+y|0;E=(ga(A>>x,z)|0)+y|0;y=c[r+10340>>2]|0;if((b[y+(D*24|0)>>1]|0)!=(b[y+(E*24|0)>>1]|0)){F=0;break}y=c[r+10308>>2]|0;F=(c[y+(D<<2)>>2]|0)==(c[y+(E<<2)>>2]|0)|0}else{F=0}}while(0);if((B|0)==0){G=2}else{v=c[r+10368>>2]|0;E=w>>v;y=h>>v;if(!((E|0)>-1)){u=14;break a}v=c[r+10372>>2]|0;if((E|0)>=(v|0)){u=14;break a}if(!((y|0)>-1)){u=17;break a}if((y|0)>=(c[r+10376>>2]|0)){u=17;break a}D=(ga(v,y)|0)+E|0;E=(c[r+10360>>2]|0)+(D*3|0)|0;G=(((d[E]|d[E+1|0]<<8)<<16>>16&65535)>>>6&255&3|0)>(q|0)|2}if((F|0)==0){H=0}else{E=c[r+10368>>2]|0;D=g>>E;y=A>>E;if(!((D|0)>-1)){u=22;break a}E=c[r+10372>>2]|0;if((D|0)>=(E|0)){u=22;break a}if(!((y|0)>-1)){u=25;break a}if((y|0)>=(c[r+10376>>2]|0)){u=25;break a}v=(ga(E,y)|0)+D|0;D=(c[r+10360>>2]|0)+(v*3|0)|0;H=(((d[D]|d[D+1|0]<<8)<<16>>16&65535)>>>6&255&3|0)>(q|0)|0}I=ud(o,(c[p>>2]|0)+(H+G)|0)|0}}while(0);if((u|0)==28){u=0;I=(c[r+5800>>2]|0)<(i|0)|0}do{if((a[r+5946|0]|0)!=0){if((c[r+10092>>2]|0)>(i|0)){break}c[m>>2]=0;c[n>>2]=0}}while(0);do{if((a[(c[k>>2]|0)+752|0]|0)!=0){if((c[r+10096>>2]|0)>(i|0)){break}c[l>>2]=0}}while(0);if((I|0)==0){u=42;break}t=i-1|0;f=1<<t;D=f+g|0;v=f+h|0;f=q+1|0;Qj(e,g,h,t,f);if((D|0)<(c[s>>2]|0)){Qj(e,D,h,t,f)}y=r+1252|0;if((v|0)<(c[y>>2]|0)){Qj(e,g,v,t,f)}if((D|0)>=(c[s>>2]|0)){u=48;break}if((v|0)<(c[y>>2]|0)){q=f;i=t;h=v;g=D}else{u=48;break}}if((u|0)==14){ec(1024,904,118,17320)}else if((u|0)==17){ec(816,904,119,17320)}else if((u|0)==22){ec(1024,904,118,17320)}else if((u|0)==25){ec(816,904,119,17320)}else if((u|0)==42){I=c[r+10368>>2]|0;l=g>>I;k=h>>I;n=1<<i-I;I=n+k|0;if((n|0)>0){m=n+l|0;n=r+10372|0;G=r+10360|0;r=(q&65535)<<6&192;H=k;do{k=l;do{p=(ga(c[n>>2]|0,H)|0)+k|0;o=(c[G>>2]|0)+(p*3|0)|0;C=(d[o]|d[o+1|0]<<8)<<16>>16&-193|r;a[o]=C;C=C>>8;a[o+1|0]=C;k=k+1|0;}while((k|0)<(m|0));H=H+1|0;}while((H|0)<(I|0))}Xj(e,g,h,i,q);return}else if((u|0)==48){return}}function Rj(f,g,h,j,k){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0;l=i;i=i+152|0;m=l|0;n=l+8|0;o=l+72|0;p=l+104|0;q=l+120|0;r=l+136|0;s=c[f+18596>>2]|0;t=s+764|0;u=c[s+10368>>2]|0;v=g>>u;w=h>>u;if(!((v|0)>-1)){ec(1024,904,118,17320);return 0}u=c[s+10372>>2]|0;if((v|0)>=(u|0)){ec(1024,904,118,17320);return 0}if(!((w|0)>-1)){ec(816,904,119,17320);return 0}if((w|0)>=(c[s+10376>>2]|0)){ec(816,904,119,17320);return 0}x=(ga(u,w)|0)+v|0;v=(c[s+10360>>2]|0)+(x*3|0)|0;x=((d[v]|d[v+1|0]<<8)<<16>>16&65535)>>>8&3;v=(k|0)==0;do{if(v){w=c[s+10448>>2]|0;u=g>>w;y=h>>w;z=1<<j-w;w=z+y|0;if((z|0)<=0){break}A=z+u|0;z=s+10452|0;B=s+10440|0;C=y;do{y=u;do{D=(ga(c[z>>2]|0,C)|0)+y|0;E=(c[B>>2]|0)+D|0;a[E]=a[E]|-128;y=y+1|0;}while((y|0)<(A|0));C=C+1|0;}while((C|0)<(w|0))}}while(0);do{if((a[s+5945|0]|0)==0){F=17}else{if((a[f+32|0]|0)!=0){F=17;break}if((c[s+10100>>2]|0)<(j|0)){F=17;break}w=(ud(f+18556|0,(c[f+18580>>2]|0)+((k|0)!=0?142:141)|0)|0)&255;a[f+33+k|0]=w}}while(0);if((F|0)==17){a[f+33+k|0]=0}w=f+36|0;a[w]=0;do{if(x<<24>>24==1){if((a[s+5751|0]|0)==0){F=24;break}C=f+33+k|0;if((a[C]|0)==0){if((a[f+32|0]|0)==0){F=24;break}}A=f+18580|0;B=f+18556|0;z=(k|0)!=0;u=(ud(B,(c[A>>2]|0)+(z?144:143)|0)|0)&255;a[w]=u;if(u<<24>>24==0){G=C;break}u=(ud(B,(c[A>>2]|0)+(z?146:145)|0)|0)&255;a[f+37|0]=u;G=C}else{F=24}}while(0);if((F|0)==24){a[w]=0;G=f+33+k|0}C=v?2:0;if((a[G]|0)==0){if((a[f+32|0]|0)==0){H=C}else{F=27}}else{F=27}if((F|0)==27){H=C|1}C=f+18580|0;u=c[C>>2]|0;z=(j<<1)-1|0;if(v){I=(j*3|0)-6+(j-1>>2)+25|0;J=j+1>>2}else{I=40;J=j-2|0}A=(z|0)>0;if(A){B=f+18556|0;y=0;while(1){E=y+1|0;if((ud(B,u+(I+(y>>J))|0)|0)==0){K=y;break}if((E|0)<(z|0)){y=E}else{K=z;break}}L=K;M=c[C>>2]|0}else{L=z;M=u}if(v){N=(j*3|0)-6+(j-1>>2)+43|0;O=j+1>>2}else{N=58;O=j-2|0}a:do{if(A){u=f+18556|0;K=0;while(1){y=K+1|0;if((ud(u,M+(N+(K>>O))|0)|0)==0){P=K;break a}if((y|0)<(z|0)){K=y}else{P=z;break}}}else{P=z}}while(0);if((L|0)>3){z=(L>>1)-1|0;Q=(yd(f+18556|0,z)|0)+((L&1|2)<<z)|0}else{Q=L}if((P|0)>3){L=(P>>1)-1|0;R=(yd(f+18556|0,L)|0)+((P&1|2)<<L)|0}else{R=P}P=x<<24>>24==0;if(P){do{if(v){x=c[s+10408>>2]|0;L=g>>x;z=h>>x;if(!((L|0)>-1)){ec(1024,904,118,17320);return 0}x=c[s+10412>>2]|0;if((L|0)>=(x|0)){ec(1024,904,118,17320);return 0}if(!((z|0)>-1)){ec(816,904,119,17320);return 0}if((z|0)<(c[s+10416>>2]|0)){O=(ga(x,z)|0)+L|0;S=ei(j,d[(c[s+10400>>2]|0)+O|0]|0,0,t)|0;break}else{ec(816,904,119,17320);return 0}}else{O=c[s+10428>>2]|0;L=g>>O;z=h>>O;if(!((L|0)>-1)){ec(1024,904,118,17320);return 0}O=c[s+10432>>2]|0;if((L|0)>=(O|0)){ec(1024,904,118,17320);return 0}if(!((z|0)>-1)){ec(816,904,119,17320);return 0}if((z|0)<(c[s+10436>>2]|0)){x=(ga(O,z)|0)+L|0;S=ei(j,a[(c[s+10420>>2]|0)+x|0]&63,k,t)|0;break}else{ec(816,904,119,17320);return 0}}}while(0);t=(S|0)==2;T=t?Q:R;U=t?R:Q;V=S}else{T=R;U=Q;V=0}Q=j-2|0;R=Cj(Q,V)|0;S=Cj(2,V)|0;Dj(m,U,T,V,j);T=a[m+1|0]|0;U=d[m|0]|0;dv(n|0,0,1<<Q<<Q|0)|0;m=f+14404+(k<<1)|0;b[m>>1]=0;t=f+18556|0;x=(V|0)!=0|0;V=(k|0)!=0|0;L=(T&255)-1|0;z=o|0;O=r|0;N=p|0;M=s+5749|0;A=f+32|0;K=v?42:43;u=(k|0)>0;y=s+10408|0;J=s+10412|0;I=s+10416|0;B=s+10400|0;E=s+5750|0;D=s+5936|0;W=s+5755|0;X=f+18588+H|0;H=s+10428|0;Y=s+10432|0;Z=s+10436|0;_=s+10420|0;s=0;$=0;aa=U;ba=1;b:while(1){ca=a[R+(aa<<1)|0]|0;da=a[R+(aa<<1)+1|0]|0;ea=(aa|0)>0;do{if((aa|0)<(U|0)&ea){fa=ca&255;ha=d[n+(((da&255)<<Q)+fa)|0]|0;ia=ha&1|ha>>>1;if((ud(t,(c[C>>2]|0)+((v?ia:ia+2|0)+61)|0)|0)==0){ja=ba;ka=$;la=s}else{ma=1;na=fa;F=69}}else{if(!((aa|0)==0|(aa|0)==(U|0))){ja=ba;ka=$;la=s;break}ma=0;na=ca&255;F=69}}while(0);do{if((F|0)==69){F=0;if(!(ca<<24>>24==0)){fa=n+(na-1+((da&255)<<Q))|0;a[fa]=a[fa]|1}fa=da&255;if(!(da<<24>>24==0)){ia=n+((fa-1<<Q)+na)|0;a[ia]=a[ia]|2}ia=na<<2;ha=fa<<2;oa=c[31064+(Q<<6)+(V<<5)+(x<<4)+(d[n+((fa<<Q)+na)|0]<<2)>>2]|0;fa=(aa|0)==(U|0);pa=fa?L:15;if(fa){b[z>>1]=1;a[O]=1;a[N]=T;qa=1}else{qa=0}if((pa|0)>0){fa=qa;ra=pa;sa=ma;while(1){ta=(d[S+(ra<<1)|0]|0)+ia|0;ua=(d[S+(ra<<1)+1|0]|0)+ha|0;do{if((a[M]|0)==0){F=79}else{if((a[A]|0)!=0){va=K;break}if((a[G]|0)==0){F=79}else{va=K}}}while(0);if((F|0)==79){F=0;va=a[oa+(ta+(ua<<j))|0]|0}if((ud(t,(c[C>>2]|0)+((va&255)+65)|0)|0)==0){wa=sa;xa=fa}else{b[o+(fa<<1)>>1]=1;a[r+fa|0]=1;a[p+fa|0]=ra;wa=0;xa=fa+1|0}ya=ra-1|0;if((ya|0)>0){fa=xa;ra=ya;sa=wa}else{za=xa;Aa=wa;break}}}else{za=qa;Aa=ma}do{if((pa|0)>-1){if((Aa|0)!=0){b[o+(za<<1)>>1]=1;a[r+za|0]=1;a[p+za|0]=0;Ba=za+1|0;break}do{if((a[M]|0)==0){F=88}else{if((a[A]|0)!=0){Ca=K;break}if((a[G]|0)==0){F=88}else{Ca=K}}}while(0);if((F|0)==88){F=0;Ca=a[oa+((ha<<j)+ia)|0]|0}if((ud(t,(c[C>>2]|0)+((Ca&255)+65)|0)|0)==0){Ba=za;break}b[o+(za<<1)>>1]=1;a[r+za|0]=1;a[p+za|0]=0;Ba=za+1|0}else{Ba=za}}while(0);if((Ba|0)==0){ja=ba;ka=$;la=s;break}oa=((aa|0)==0|u?0:2)|(ba|0)==0;pa=(Ba|0)>8?8:Ba;do{if((pa|0)>0){ua=oa<<2;ta=s;sa=$;ra=-1;fa=1;ya=0;while(1){do{if((ya|0)==0){Da=1}else{if((ta|0)<=0){Da=ta;break}Da=(sa|0)==1?0:ta+1|0}}while(0);Ea=((Da|0)<3?Da:3)+ua|0;Fa=ud(t,(c[C>>2]|0)+((u?Ea+16|0:Ea)+109)|0)|0;if((Fa|0)==0){a[r+ya|0]=0;Ga=((fa-1|0)>>>0<2>>>0)+fa|0;Ha=ra}else{Ea=o+(ya<<1)|0;b[Ea>>1]=(b[Ea>>1]|0)+1;Ga=0;Ha=(ra|0)==-1?ya:ra}Ea=ya+1|0;if((Ea|0)<(pa|0)){ta=Da;sa=Fa;ra=Ha;fa=Ga;ya=Ea}else{break}}if((Ha|0)==-1){Ia=Ga;Ja=Fa;Ka=Da;break}ya=ud(t,(c[C>>2]|0)+((u?oa|4:oa)+133)|0)|0;fa=o+(Ha<<1)|0;b[fa>>1]=(e[fa>>1]|0)+ya;a[r+Ha|0]=ya;Ia=Ga;Ja=Fa;Ka=Da}else{Ia=1;Ja=$;Ka=s}}while(0);if(v){oa=c[y>>2]|0;pa=g>>oa;ya=h>>oa;if(!((pa|0)>-1)){F=107;break b}oa=c[J>>2]|0;if((pa|0)>=(oa|0)){F=107;break b}if(!((ya|0)>-1)){F=110;break b}if((ya|0)>=(c[I>>2]|0)){F=110;break b}fa=(ga(oa,ya)|0)+pa|0;La=d[(c[B>>2]|0)+fa|0]|0}else{fa=c[H>>2]|0;pa=g>>fa;ya=h>>fa;if(!((pa|0)>-1)){F=114;break b}fa=c[Y>>2]|0;if((pa|0)>=(fa|0)){F=114;break b}if(!((ya|0)>-1)){F=117;break b}if((ya|0)>=(c[Z>>2]|0)){F=117;break b}oa=(ga(fa,ya)|0)+pa|0;La=a[(c[_>>2]|0)+oa|0]&63}c:do{if((a[A]|0)==0){do{if(P){if((a[E]|0)==0){break}if((a[G]|0)==0){break}if((La&239|0)==10){Ma=0;break c}}}while(0);if((a[w]|0)!=0){Ma=0;break}Ma=((a[N]|0)-(a[p+(Ba-1)|0]|0)|0)>3|0}else{Ma=0}}while(0);oa=Ba-1|0;if((oa|0)>0){pa=0;do{ya=(wd(t)|0)&255;a[q+pa|0]=ya;pa=pa+1|0;}while((pa|0)<(oa|0))}pa=(Ma|0)==0;if((a[D]|0)==0|pa){ya=(wd(t)|0)&255;a[q+oa|0]=ya}else{a[q+oa|0]=0}if((a[W]|0)==0){Na=0}else{Na=(d[X]|0)>>>2}if((Ba|0)>0){Oa=0;Pa=Na;Qa=1;Ra=0}else{ja=Ia;ka=Ja;la=Ka;break}while(1){ya=b[o+(Ra<<1)>>1]|0;do{if((a[r+Ra|0]|0)==0){Sa=0;Ta=Qa;Ua=Pa}else{fa=-1;while(1){Va=fa+1|0;ra=wd(t)|0;if((fa|0)>63){Wa=0;break}if((ra|0)==0){F=137;break}else{fa=Va}}do{if((F|0)==137){F=0;if((Va|0)<4){Wa=(yd(t,Pa)|0)+(Va<<Pa)|0;break}else{ra=fa-2|0;Wa=(yd(t,ra+Pa|0)|0)+((1<<ra)+2<<Pa)|0;break}}}while(0);fa=(a[W]|0)==0;ra=(Wa+ya|0)>(3<<Pa|0);if(fa){if(!ra){Sa=Wa;Ta=0;Ua=Pa;break}sa=Pa+1|0;Sa=Wa;Ta=0;Ua=(sa|0)>4?4:sa;break}sa=(ra&1)+Pa|0;if(fa|Qa^1){Sa=Wa;Ta=0;Ua=sa;break}fa=a[X]|0;ra=(fa&255)>>>2;if((Wa|0)>=(3<<ra|0)){a[X]=fa+1;Sa=Wa;Ta=0;Ua=sa;break}if((Wa<<1|0)>=(1<<ra|0)|fa<<24>>24==0){Sa=Wa;Ta=0;Ua=sa;break}a[X]=fa-1;Sa=Wa;Ta=0;Ua=sa}}while(0);sa=Sa+ya|0;fa=sa&65535;ra=(a[q+Ra|0]|0)==0?fa:-fa&65535;do{if((a[D]|0)==0|pa){Xa=ra;Ya=Oa}else{fa=sa+Oa|0;if((Ra|0)!=(oa|0)){Xa=ra;Ya=fa;break}Xa=(fa&1|0)==0?ra:-ra&65535;Ya=fa}}while(0);ra=a[p+Ra|0]|0;sa=(d[S+(ra<<1)|0]|0)+ia|0;ya=(d[S+(ra<<1)+1|0]|0)+ha|0;b[f+2116+(k<<11)+(b[m>>1]<<1)>>1]=Xa;b[f+8260+(k<<11)+(b[m>>1]<<1)>>1]=sa+(ya<<j);b[m>>1]=(b[m>>1]|0)+1;ya=Ra+1|0;if((ya|0)<(Ba|0)){Oa=Ya;Pa=Ua;Qa=Ta;Ra=ya}else{ja=Ia;ka=Ja;la=Ka;break}}}}while(0);if(ea){s=la;$=ka;aa=aa-1|0;ba=ja}else{F=153;break}}if((F|0)==107){ec(1024,904,118,17320);return 0}else if((F|0)==110){ec(816,904,119,17320);return 0}else if((F|0)==114){ec(1024,904,118,17320);return 0}else if((F|0)==117){ec(816,904,119,17320);return 0}else if((F|0)==153){i=l;return 0}return 0}function Sj(b,e,f,g,h,i,j,k,l,m,n,o,p){b=b|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;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;if((o|0)==-1){ec(1560,14776,3547,18792);return 0}if((p|0)==-1){ec(1424,14776,3548,18792);return 0}if((n|0)==-1){ec(1392,14776,3549,18792);return 0}l=b+18596|0;q=c[l>>2]|0;r=c[q+5776>>2]|0;s=(r|0)==3;t=((s^1)<<31>>31)+k|0;u=(t|0)<2?2:t;t=b+33|0;C=0;a[t]=C;C=C>>8;a[t+1|0]=C;C=C>>8;a[t+2|0]=C;C=C>>8;a[t+3|0]=C;t=c[q+10368>>2]|0;v=e>>t;w=f>>t;if(!((v|0)>-1)){ec(1024,904,118,17320);return 0}t=c[q+10372>>2]|0;if((v|0)>=(t|0)){ec(1024,904,118,17320);return 0}if(!((w|0)>-1)){ec(816,904,119,17320);return 0}if((w|0)>=(c[q+10376>>2]|0)){ec(816,904,119,17320);return 0}x=(ga(t,w)|0)+v|0;v=(c[q+10360>>2]|0)+(x*3|0)|0;x=((d[v]|d[v+1|0]<<8)<<16>>16&65535)>>>8&3;v=x&255;w=(n|0)!=0;n=w^1;t=(p|o|0)==0;do{if(!(t&n)){do{if((a[q+5946|0]|0)==0){y=0}else{z=b+18508|0;if((c[z>>2]|0)!=0){y=0;break}A=b+18556|0;B=b+18580|0;do{if((ud(A,(c[B>>2]|0)+139|0)|0)==0){D=0;E=0}else{F=1;G=0;while(1){if((ud(A,(c[B>>2]|0)+140|0)|0)==0){H=F;break}I=F+1|0;J=G+1|0;if((J|0)<4){F=I;G=J}else{H=I;break}}if((H|0)==5){K=(zd(A,0)|0)+5|0}else{K=H}if((K|0)==0){D=0;E=0;break}D=(wd(A)|0)<<1;E=K}}while(0);c[z>>2]=1;A=ga(1-D|0,E)|0;c[b+18512>>2]=A;y=1}}while(0);do{if((a[(c[b+18600>>2]|0)+752|0]|0)==0|t){L=32}else{if((a[b+32|0]|0)!=0){L=32;break}A=b+18516|0;if((c[A>>2]|0)!=0){L=32;break}B=b+18556|0;G=b+18580|0;F=ud(B,(c[G>>2]|0)+23|0)|0;I=c[l>>2]|0;if((F|0)==0){c[A>>2]=1;c[b+18520>>2]=0;c[b+18524>>2]=0;break}if((d[I+10074|0]|0)>>>0>1>>>0){M=ud(B,(c[G>>2]|0)+24|0)|0}else{M=0}c[A>>2]=1;c[b+18520>>2]=a[I+10075+M|0]|0;c[b+18524>>2]=a[I+10081+M|0]|0}}while(0);if((L|0)==32){if(!y){break}}Qk(b,e,f,i,j)}}while(0);y=1<<k;M=1<<u;t=c[l>>2]|0;E=c[t+5780>>2]|0;D=c[t+5784>>2]|0;t=b+28|0;c[t>>2]=0;if(w){Rj(b,e,f,k,0)|0}Tj(b,e,f,i,j,y,0,v,w);if(!((k|0)>2|s)){if((m|0)!=3){return 0}m=(o&1|0)!=0;if(m){Rj(b,g,h,k,1)|0}if((c[(c[l>>2]|0)+5776>>2]|0)!=0){Tj(b,(g|0)/(E|0)|0,(h|0)/(D|0)|0,(i|0)/(E|0)|0,(j|0)/(D|0)|0,y,1,v,m)}m=(o&2|0)!=0;if(m){Rj(b,g,y+h|0,k,1)|0}s=(r|0)==2;if(s){Tj(b,(g|0)/(E|0)|0,((h|0)/(D|0)|0)+y|0,(i|0)/(E|0)|0,(j|0)/(D|0)|0,y,1,v,m)}m=(p&1|0)!=0;if(m){Rj(b,g,h,k,2)|0}if((c[(c[l>>2]|0)+5776>>2]|0)!=0){Tj(b,(g|0)/(E|0)|0,(h|0)/(D|0)|0,(i|0)/(E|0)|0,(j|0)/(D|0)|0,y,2,v,m)}m=(p&2|0)!=0;if(m){Rj(b,g,M+h|0,k,2)|0}if(!s){return 0}Tj(b,(g|0)/(E|0)|0,((h|0)/(D|0)|0)+y|0,(i|0)/(E|0)|0,(j|0)/(D|0)|0,y,2,v,m);return 0}m=c[l>>2]|0;a:do{if((a[m+10071|0]|0)==0|n){N=0;O=0}else{do{if(!(x<<24>>24==1)){y=c[m+10428>>2]|0;h=e>>y;g=f>>y;if(!((h|0)>-1)){ec(1024,904,118,17320);return 0}y=c[m+10432>>2]|0;if((h|0)>=(y|0)){ec(1024,904,118,17320);return 0}if(!((g|0)>-1)){ec(816,904,119,17320);return 0}if((g|0)<(c[m+10436>>2]|0)){s=(ga(y,g)|0)+h|0;if((a[(c[m+10420>>2]|0)+s|0]|0)<0){break}else{N=0;O=0;break a}}else{ec(816,904,119,17320);return 0}}}while(0);s=b+18556|0;h=b+18580|0;g=0;while(1){if((ud(s,(c[h>>2]|0)+(g+162)|0)|0)==0){L=49;break}y=g+1|0;if((y|0)<4){g=y}else{P=y;break}}if((L|0)==49){if((g|0)==0){N=1;O=0;break}else{P=g}}N=1;O=1-((ud(s,(c[h>>2]|0)+170|0)|0)<<1)<<P-1}}while(0);c[t>>2]=O;O=(o&1|0)!=0;if(O){Rj(b,e,f,u,1)|0}if((c[(c[l>>2]|0)+5776>>2]|0)!=0){Tj(b,(e|0)/(E|0)|0,(f|0)/(D|0)|0,(i|0)/(E|0)|0,(j|0)/(D|0)|0,M,1,v,O)}O=(r|0)==2;if(O){r=(o&2|0)!=0;if(r){Rj(b,e,(D<<u)+f|0,u,1)|0}Tj(b,(e|0)/(E|0)|0,((f|0)/(D|0)|0)+M|0,(i|0)/(E|0)|0,((j|0)/(D|0)|0)+M|0,M,1,v,r)}do{if(N){r=b+18556|0;o=b+18580|0;P=0;while(1){if((ud(r,(c[o>>2]|0)+(P+166)|0)|0)==0){L=63;break}m=P+1|0;if((m|0)<4){P=m}else{Q=m;break}}if((L|0)==63){if((P|0)==0){R=0;break}else{Q=P}}R=1-((ud(r,(c[o>>2]|0)+171|0)|0)<<1)<<Q-1}else{R=0}}while(0);c[t>>2]=R;R=(p&1|0)!=0;if(R){Rj(b,e,f,u,2)|0}if((c[(c[l>>2]|0)+5776>>2]|0)!=0){Tj(b,(e|0)/(E|0)|0,(f|0)/(D|0)|0,(i|0)/(E|0)|0,(j|0)/(D|0)|0,M,2,v,R)}if(!O){return 0}O=(p&2|0)!=0;if(O){Rj(b,e,(D<<u)+f|0,u,2)|0}Tj(b,(e|0)/(E|0)|0,((f|0)/(D|0)|0)+M|0,(i|0)/(E|0)|0,((j|0)/(D|0)|0)+M|0,M,2,v,O);return 0}function Tj(e,f,g,h,i,j,k,l,m){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;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;n=e+18596|0;o=c[n>>2]|0;p=(l|0)==0;do{if(p){do{if((k|0)==0){l=c[o+10408>>2]|0;q=f>>l;r=g>>l;if(!((q|0)>-1)){ec(1024,904,118,17320)}l=c[o+10412>>2]|0;if((q|0)>=(l|0)){ec(1024,904,118,17320)}if(!((r|0)>-1)){ec(816,904,119,17320)}if((r|0)<(c[o+10416>>2]|0)){s=(ga(l,r)|0)+q|0;t=d[(c[o+10400>>2]|0)+s|0]|0;break}else{ec(816,904,119,17320)}}else{s=ga(c[o+5780>>2]|0,f)|0;q=ga(c[o+5784>>2]|0,g)|0;r=c[o+10428>>2]|0;l=s>>r;s=q>>r;if(!((l|0)>-1)){ec(1024,904,118,17320)}r=c[o+10432>>2]|0;if((l|0)>=(r|0)){ec(1024,904,118,17320)}if(!((s|0)>-1)){ec(816,904,119,17320)}if((s|0)<(c[o+10436>>2]|0)){q=(ga(r,s)|0)+l|0;t=a[(c[o+10420>>2]|0)+q|0]&63;break}else{ec(816,904,119,17320)}}}while(0);q=t>>>0>34>>>0?1:t;fi(o,f,g,q,j,k);do{if((a[(c[n>>2]|0)+5750|0]|0)==0){u=0}else{if((a[e+32|0]|0)==0){if((a[e+33+k|0]|0)==0){u=0;break}}u=(q&239|0)==10}}while(0);v=u&(q|0)==26?2:u&1}else{if((a[e+36|0]|0)==0){v=0;break}v=(a[e+37|0]|0)!=0?2:1}}while(0);if(m){Rk(e,f,g,h,i,j,k,(a[e+33+k|0]|0)!=0,p,v);return}if((k|0)==0){return}if((c[e+28>>2]|0)==0){return}b[e+14404+(k<<1)>>1]=0;Rk(e,f,g,h,i,j,k,(a[e+33+k|0]|0)!=0,p,0);return}function Uj(b,e,f,g,h,i,j,k,l,m,n,o,p,q,r){b=b|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;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,Q=0,R=0,S=0,T=0,U=0,V=0;s=b+18596|0;t=c[s>>2]|0;u=c[t+10368>>2]|0;v=e>>u;if(!((v|0)>-1)){ec(1024,904,118,17320)}w=(o|0)==1;x=b+18556|0;y=b+18580|0;z=(o|0)!=0;A=e;e=f;B=g;g=h;h=k;k=l;l=m;m=q;q=r;r=t;t=v;v=f>>u;f=u;a:while(1){u=c[r+10372>>2]|0;if((t|0)>=(u|0)){C=4;break}if(!((v|0)>-1)){C=7;break}D=c[r+10376>>2]|0;if((v|0)>=(D|0)){C=7;break}E=(ga(u,v)|0)+t|0;F=c[r+10360>>2]|0;G=F+(E*3|0)|0;H=((d[G]|d[G+1|0]<<8)<<16>>16&65535)>>>8&3;if((H&255|0)!=(p|0)){C=9;break}G=(c[r+5868>>2]|0)<(h|0);do{if(G){C=15}else{if((k|0)>=(n|0)|(c[r+5864>>2]|0)>=(h|0)|z&(k|0)==0){C=15;break}E=5-h|0;if(!(E>>>0<3>>>0)){C=13;break a}I=ud(x,(c[y>>2]|0)+(E+20)|0)|0;C=21}}while(0);do{if((C|0)==15){C=0;E=A>>f;J=e>>f;if(!((E|0)>-1&(E|0)<(u|0))){C=16;break a}if(!((J|0)>-1&(J|0)<(D|0))){C=18;break a}if(G){C=22;break}K=F+(((ga(u,J)|0)+E|0)*3|0)|0;E=K;I=(w&(k|0)==0|(c[r+1392>>2]|k|0)==0&H<<24>>24==1&((d[E]|d[E+1|0]<<8)<<16>>16&56)!=0)&1;C=21}}while(0);if((C|0)==21){C=0;if((I|0)==0){L=0}else{C=22}}if((C|0)==22){C=0;u=c[r+10448>>2]|0;F=A>>u;G=e>>u;if(!((F|0)>-1)){C=24;break}u=c[r+10452>>2]|0;if((F|0)>=(u|0)){C=24;break}if(!((G|0)>-1)){C=27;break}if((G|0)>=(c[r+10456>>2]|0)){C=27;break}D=(ga(u,G)|0)+F|0;F=(c[r+10440>>2]|0)+D|0;a[F]=d[F]|0|1<<k;L=1}F=c[r+5776>>2]|0;if((h|0)>2){if((F|0)==0){M=-1;C=41}else{C=32}}else{if((F|0)==3){C=32}else{M=-1;C=41}}if((C|0)==32){C=0;do{if(m<<24>>24==0){N=-1}else{F=k+16|0;D=ud(x,(c[y>>2]|0)+F|0)|0;if((c[r+5776>>2]|0)!=2){N=D;break}if(!((h|0)==3|L^1)){N=D;break}N=(ud(x,(c[y>>2]|0)+F|0)|0)<<1|D}}while(0);do{if(q<<24>>24==0){O=-1}else{D=k+16|0;F=ud(x,(c[y>>2]|0)+D|0)|0;if((c[r+5776>>2]|0)!=2){O=F;break}if(!((h|0)==3|L^1)){O=F;break}O=(ud(x,(c[y>>2]|0)+D|0)|0)<<1|F}}while(0);if((N|0)<0){M=O;C=41}else{P=N;Q=O}}if((C|0)==41){C=0;F=(h|0)==2;if((k|0)==0&F){C=42;break}P=(k|0)>0&F?m&255:0;Q=M}if((Q|0)<0){R=(k|0)>0&(h|0)==2?q&255:0}else{R=Q}if(!L){C=48;break}F=h-1|0;D=1<<F;G=D+A|0;u=D+e|0;D=k+1|0;E=P&255;K=R&255;Uj(b,A,e,A,e,i,j,F,D,0,n,o,p,E,K);Uj(b,G,e,A,e,i,j,F,D,1,n,o,p,E,K);Uj(b,A,u,A,e,i,j,F,D,2,n,o,p,E,K);J=c[s>>2]|0;S=c[J+10368>>2]|0;T=G>>S;if((T|0)>-1){B=A;A=G;g=e;e=u;h=F;k=D;l=3;m=E;q=K;r=J;t=T;v=u>>S;f=S}else{C=4;break}}if((C|0)==4){ec(1024,904,118,17320)}else if((C|0)==7){ec(816,904,119,17320)}else if((C|0)==9){ec(1368,14776,3827,18816)}else if((C|0)==13){ec(416,14776,1820,17880)}else if((C|0)==16){ec(1024,904,118,17320)}else if((C|0)==18){ec(816,904,119,17320)}else if((C|0)==24){ec(1024,904,128,17320)}else if((C|0)==27){ec(816,904,129,17320)}else if((C|0)==42){ec(1320,14776,3894,18816)}else if((C|0)==48){C=(k|0)==0;if(H<<24>>24!=0&C&(P|0)==0&(R|0)==0){U=1;V=Sj(b,A,e,B,g,i,j,h,0,l,U,P,R)|0;return}U=ud(x,(c[y>>2]|0)+(C&1|14)|0)|0;V=Sj(b,A,e,B,g,i,j,h,0,l,U,P,R)|0;return}}function Vj(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=a+18556|0;d=a+18580|0;g=ud(e,(c[d>>2]|0)+150|0)|0;h=ud(e,(c[d>>2]|0)+150|0)|0;i=(g|0)==0;if(i){j=0}else{j=ud(e,(c[d>>2]|0)+151|0)|0}g=(h|0)==0;if(g){k=0}else{k=ud(e,(c[d>>2]|0)+151|0)|0}do{if(i){l=0}else{if((j|0)==0){m=-1}else{m=zd(e,1)|0}if((wd(e)|0)==0){l=m+2&65535;break}l=-2-m&65535}}while(0);do{if(g){n=0}else{if((k|0)==0){o=-1}else{o=zd(e,1)|0}if((wd(e)|0)==0){n=o+2&65535;break}n=-2-o&65535}}while(0);b[a+18+(f<<2)>>1]=l;b[a+18+(f<<2)+2>>1]=n;return}function Wj(d,e,f,g,h,i,j,k,l,m){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;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;n=d+18600|0;o=c[n>>2]|0;p=d+18556|0;q=d+18580|0;r=ud(p,(c[q>>2]|0)+147|0)|0;s=d+16|0;t=d+26|0;u=(r&255)<<4&16|a[t]&-17;a[t]=u;if((r|0)!=0){a:do{if((c[(c[n>>2]|0)+804>>2]|0)<2){v=0}else{if((ud(p,(c[q>>2]|0)+148|0)|0)==0){v=0;break}if(((c[(c[n>>2]|0)+804>>2]|0)-1|0)>1){w=1}else{v=1;break}while(1){r=w+1|0;if((wd(p)|0)==0){v=w&255;break a}if((r|0)<((c[(c[n>>2]|0)+804>>2]|0)-1|0)){w=r}else{v=r&255;break}}}}while(0);a[t]=a[t]&31|v<<5;x=d+18592|0;y=c[x>>2]|0;z=y|0;A=c[n>>2]|0;B=d+18596|0;C=c[B>>2]|0;Ii(z,A,C,s,e,f,g,h,l,i,j,m);return}if((c[o+20>>2]|0)==0){v=c[q>>2]|0;do{if((j+i|0)==12){D=ud(p,v+160|0)|0}else{if((ud(p,v+(k+156)|0)|0)!=0){D=2;break}D=ud(p,v+160|0)|0}}while(0);v=D+1|0;a[t]=a[t]&-4|v&3;if((v|0)==2){E=2}else{F=v;G=15}}else{a[t]=u&-4|1;F=1;G=15}do{if((G|0)==15){u=(c[o+328>>2]|0)-1|0;b:do{if((u|0)==0){H=0}else{if((ud(p,(c[q>>2]|0)+154|0)|0)==0){H=0;break}v=u&255;D=0;while(1){k=D+1|0;if((k|0)==(u|0)){H=v;break b}if((D|0)==0){I=ud(p,(c[q>>2]|0)+155|0)|0}else{I=wd(p)|0}if((I|0)==0){H=k&255;break}else{D=k}}}}while(0);a[s|0]=H;Vj(d,0,0,0);u=(ud(p,(c[q>>2]|0)+152|0)|0)&255;a[t]=u<<2&4|a[t]&-5;if((F|0)!=1){E=F;break}x=d+18592|0;y=c[x>>2]|0;z=y|0;A=c[n>>2]|0;B=d+18596|0;C=c[B>>2]|0;Ii(z,A,C,s,e,f,g,h,l,i,j,m);return}}while(0);F=(c[o+332>>2]|0)-1|0;c:do{if((F|0)==0){J=0}else{if((ud(p,(c[q>>2]|0)+154|0)|0)==0){J=0;break}H=F&255;I=0;while(1){G=I+1|0;if((G|0)==(F|0)){J=H;break c}if((I|0)==0){K=ud(p,(c[q>>2]|0)+155|0)|0}else{K=wd(p)|0}if((K|0)==0){J=G&255;break}else{I=G}}}}while(0);a[d+17|0]=J;if((a[o+370|0]|0)!=0&(E|0)==3){b[d+22>>1]=0;b[d+24>>1]=0}else{Vj(d,0,0,1)}E=(ud(p,(c[q>>2]|0)+152|0)|0)&255;a[t]=E<<3&8|a[t]&-9;x=d+18592|0;y=c[x>>2]|0;z=y|0;A=c[n>>2]|0;B=d+18596|0;C=c[B>>2]|0;Ii(z,A,C,s,e,f,g,h,l,i,j,m);return}function Xj(e,f,g,h,j){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0;k=i;i=i+88|0;l=k|0;m=k+24|0;n=k+40|0;o=k+56|0;p=k+72|0;q=e+18596|0;r=c[q>>2]|0;s=e+18600|0;t=c[s>>2]|0;u=r+10368|0;v=c[u>>2]|0;w=f>>v;x=g>>v;y=1<<h-v;z=y+x|0;if((y|0)>0){A=y+w|0;y=r+10372|0;B=r+10360|0;D=x;do{x=w;do{E=(ga(c[y>>2]|0,D)|0)+x|0;F=(c[B>>2]|0)+(E*3|0)|0;C=(d[F]|d[F+1|0]<<8)<<16>>16&-8;a[F]=C;C=C>>8;a[F+1|0]=C;x=x+1|0;}while((x|0)<(A|0));D=D+1|0;}while((D|0)<(z|0));G=c[u>>2]|0}else{G=v}v=f>>G;z=g>>G;if(!((v|0)>-1)){ec(1024,904,128,17320)}G=r+10372|0;D=c[G>>2]|0;if((v|0)>=(D|0)){ec(1024,904,128,17320)}if(!((z|0)>-1)){ec(816,904,129,17320)}A=r+10376|0;if((z|0)>=(c[A>>2]|0)){ec(816,904,129,17320)}B=(ga(D,z)|0)+v|0;v=r+10360|0;z=(c[v>>2]|0)+(B*3|0)|0;C=(d[z]|d[z+1|0]<<8)<<16>>16&-8|h&7;a[z]=C;C=C>>8;a[z+1|0]=C;z=c[r+10448>>2]|0;B=f>>z;D=g>>z;y=1<<h-z;z=y+D|0;if((y|0)>0){w=y+B|0;y=r+10452|0;x=r+10440|0;F=D;do{D=B;do{E=(ga(c[y>>2]|0,F)|0)+D|0;a[(c[x>>2]|0)+E|0]=0;D=D+1|0;}while((D|0)<(w|0));F=F+1|0;}while((F|0)<(z|0))}z=1<<h;Qk(e,f,g,f,g);do{if((a[r+5964|0]|0)==0){a[e+32|0]=0}else{F=ud(e+18556|0,(c[e+18580>>2]|0)+161|0)|0;a[e+32|0]=F;if((F|0)==0){break}F=c[u>>2]|0;w=f>>F;x=g>>F;y=1<<h-F;F=y+x|0;if((y|0)>0){B=y+w|0;y=x;do{x=w;do{D=(ga(c[G>>2]|0,y)|0)+x|0;E=(c[v>>2]|0)+(D*3|0)|0;C=(d[E]|d[E+1|0]<<8)<<16>>16|2048;a[E]=C;C=C>>8;a[E+1|0]=C;x=x+1|0;}while((x|0)<(B|0));y=y+1|0;}while((y|0)<(F|0))}F=c[r+10348>>2]|0;y=f>>F;B=g>>F;if(!((y|0)>-1)){ec(1024,904,128,17320)}F=c[r+10352>>2]|0;if((y|0)>=(F|0)){ec(1024,904,128,17320)}if(!((B|0)>-1)){ec(816,904,129,17320)}if((B|0)<(c[r+10356>>2]|0)){w=(ga(F,B)|0)+y|0;a[(c[r+10340>>2]|0)+(w*24|0)+22|0]=1;break}else{ec(816,904,129,17320)}}}while(0);w=t+20|0;do{if((c[w>>2]|0)==2){H=0}else{t=c[q>>2]|0;y=f-1|0;do{if((y|g|0)<0){I=0}else{if((c[t+1248>>2]|0)<=(y|0)){I=0;break}if((c[t+1252>>2]|0)<=(g|0)){I=0;break}B=c[t+5804>>2]|0;F=ga(g>>B,c[t+5820>>2]|0)|0;x=F+(f>>B)|0;E=F+(y>>B)|0;B=c[t+10340>>2]|0;if((b[B+(x*24|0)>>1]|0)!=(b[B+(E*24|0)>>1]|0)){I=0;break}B=c[t+10308>>2]|0;I=(c[B+(x<<2)>>2]|0)==(c[B+(E<<2)>>2]|0)|0}}while(0);E=g-1|0;do{if((E|f|0)<0){J=0}else{if((c[t+1248>>2]|0)<=(f|0)){J=0;break}if((c[t+1252>>2]|0)<=(E|0)){J=0;break}B=c[t+5804>>2]|0;x=c[t+5820>>2]|0;F=f>>B;D=(ga(g>>B,x)|0)+F|0;K=(ga(E>>B,x)|0)+F|0;F=c[t+10340>>2]|0;if((b[F+(D*24|0)>>1]|0)!=(b[F+(K*24|0)>>1]|0)){J=0;break}F=c[t+10308>>2]|0;J=(c[F+(D<<2)>>2]|0)==(c[F+(K<<2)>>2]|0)|0}}while(0);do{if((I|0)==0){L=5}else{K=c[t+10368>>2]|0;F=y>>K;D=g>>K;if(!((F|0)>-1)){ec(1024,904,118,17320)}K=c[t+10372>>2]|0;if((F|0)>=(K|0)){ec(1024,904,118,17320)}if(!((D|0)>-1)){ec(816,904,119,17320)}if((D|0)<(c[t+10376>>2]|0)){x=(ga(K,D)|0)+F|0;F=(c[t+10360>>2]|0)+(x*3|0)|0;L=((d[F]|d[F+1|0]<<8)<<16>>16&768)==512?6:5;break}else{ec(816,904,119,17320)}}}while(0);do{if((J|0)==0){M=0}else{y=c[t+10368>>2]|0;F=f>>y;x=E>>y;if(!((F|0)>-1)){ec(1024,904,118,17320)}y=c[t+10372>>2]|0;if((F|0)>=(y|0)){ec(1024,904,118,17320)}if(!((x|0)>-1)){ec(816,904,119,17320)}if((x|0)<(c[t+10376>>2]|0)){D=(ga(y,x)|0)+F|0;F=(c[t+10360>>2]|0)+(D*3|0)|0;M=((d[F]|d[F+1|0]<<8)<<16>>16&768)==512|0;break}else{ec(816,904,119,17320)}}}while(0);t=e+18556|0;E=e+18580|0;if(((ud(t,(c[E>>2]|0)+(M+L)|0)|0)&255)<<24>>24==0){if((c[w>>2]|0)==2){H=0;break}H=(ud(t,(c[E>>2]|0)+149|0)|0)==0|0;break}a:do{if((c[(c[s>>2]|0)+804>>2]|0)<2){N=0}else{if((ud(t,(c[E>>2]|0)+148|0)|0)==0){N=0;break}if(((c[(c[s>>2]|0)+804>>2]|0)-1|0)>1){O=1}else{N=1;break}while(1){F=O+1|0;if((wd(t)|0)==0){N=O&255;break a}if((F|0)<((c[(c[s>>2]|0)+804>>2]|0)-1|0)){O=F}else{N=F&255;break}}}}while(0);t=e+26|0;a[t]=N<<5|a[t]&15|16;t=c[u>>2]|0;E=f>>t;F=g>>t;if(!((E|0)>-1)){ec(1024,904,128,17320)}t=c[G>>2]|0;if((E|0)>=(t|0)){ec(1024,904,128,17320)}if(!((F|0)>-1)){ec(816,904,129,17320)}if((F|0)>=(c[A>>2]|0)){ec(816,904,129,17320)}D=(ga(t,F)|0)+E|0;E=(c[v>>2]|0)+(D*3|0)|0;C=(d[E]|d[E+1|0]<<8)<<16>>16&-57;a[E]=C;C=C>>8;a[E+1|0]=C;E=c[u>>2]|0;D=f>>E;F=g>>E;t=1<<h-E;E=t+F|0;if((t|0)>0){x=t+D|0;t=F;do{F=D;do{y=(ga(c[G>>2]|0,t)|0)+F|0;K=(c[v>>2]|0)+(y*3|0)|0;C=(d[K]|d[K+1|0]<<8)<<16>>16&-769|512;a[K]=C;C=C>>8;a[K+1|0]=C;F=F+1|0;}while((F|0)<(x|0));t=t+1|0;}while((t|0)<(E|0))}Ii(c[e+18592>>2]|0,c[s>>2]|0,c[q>>2]|0,e+16|0,f,g,0,0,z,z,z,0);i=k;return}}while(0);s=c[u>>2]|0;N=f>>s;O=g>>s;w=1<<h-s;s=w+O|0;if((w|0)>0){L=w+N|0;w=(H&65535)<<8;M=O;do{O=N;do{J=(ga(c[G>>2]|0,M)|0)+O|0;I=(c[v>>2]|0)+(J*3|0)|0;C=(d[I]|d[I+1|0]<<8)<<16>>16&-769|w;a[I]=C;C=C>>8;a[I+1|0]=C;O=O+1|0;}while((O|0)<(L|0));M=M+1|0;}while((M|0)<(s|0))}s=(H|0)!=0;if(s){P=87}else{if((c[r+5800>>2]|0)==(h|0)){P=87}else{Q=0;R=0}}if((P|0)==87){M=c[q>>2]|0;L=(H|0)==0;w=e+18556|0;N=e+18580|0;O=ud(w,(c[N>>2]|0)+8|0)|0;do{if(L){S=(O|0)!=0?0:3}else{if((O|0)!=0){S=0;break}I=ud(w,(c[N>>2]|0)+9|0)|0;if((c[M+5800>>2]|0)>=(h|0)){if((I|0)!=0){S=1;break}if((h|0)==3){S=2;break}S=3-(ud(w,(c[N>>2]|0)+10|0)|0)|0;break}if((a[M+5466|0]|0)==0){S=(I|0)!=0?1:2;break}if((ud(w,(c[N>>2]|0)+11|0)|0)!=0){S=(I|0)!=0?1:2;break}J=(I|0)!=0;I=J^1;E=(wd(w)|0)==0;if(!(E|I)){S=5;break}if(J&E){S=4;break}if(E&I){S=6;break}if(!(J|E)){S=7;break}ec(536,14776,1760,17936)}}while(0);Q=(S|0)==3&L&1;R=S}S=c[u>>2]|0;L=f>>S;w=g>>S;if(!((L|0)>-1)){ec(1024,904,128,17320)}S=c[G>>2]|0;if((L|0)>=(S|0)){ec(1024,904,128,17320)}if(!((w|0)>-1)){ec(816,904,129,17320)}if((w|0)>=(c[A>>2]|0)){ec(816,904,129,17320)}A=(ga(S,w)|0)+L|0;L=(c[v>>2]|0)+(A*3|0)|0;C=(d[L]|d[L+1|0]<<8)<<16>>16&-57|(R&65535)<<3&56;a[L]=C;C=C>>8;a[L+1|0]=C;L=(H|0)==0;A=(R|0)==0;b:do{if(L){do{if(A){if((a[r+5468|0]|0)==0){T=z;U=0;break}if((c[r+5884>>2]|0)>(h|0)){P=165;break}if((c[r+5888>>2]|0)<(h|0)){P=165;break}w=e+18556|0;if((vd(w)|0)==0){P=165;break}S=c[u>>2]|0;N=f>>S;M=g>>S;O=1<<h-S;S=O+M|0;if((O|0)>0){E=O+N|0;O=M;do{M=N;do{J=(ga(c[G>>2]|0,O)|0)+M|0;I=(c[v>>2]|0)+(J*3|0)|0;C=(d[I]|d[I+1|0]<<8)<<16>>16|1024;a[I]=C;C=C>>8;a[I+1|0]=C;M=M+1|0;}while((M|0)<(E|0));O=O+1|0;}while((O|0)<(S|0))}S=c[r+10348>>2]|0;O=f>>S;E=g>>S;if(!((O|0)>-1)){ec(1024,904,128,17320)}S=c[r+10352>>2]|0;if((O|0)>=(S|0)){ec(1024,904,128,17320)}if(!((E|0)>-1)){ec(816,904,129,17320)}if((E|0)>=(c[r+10356>>2]|0)){ec(816,904,129,17320)}N=(ga(S,E)|0)+O|0;a[(c[r+10340>>2]|0)+(N*24|0)+22|0]=1;N=e+18560|0;O=c[N>>2]|0;E=l|0;c[E>>2]=O;c[l+4>>2]=(c[e+18564>>2]|0)-O;O=l+8|0;c[O>>2]=0;c[O+4>>2]=0;c[l+16>>2]=0;O=c[q>>2]|0;S=c[O+5760>>2]|0;M=a[O+5469|0]|0;I=c[O+40>>2]|0;J=c[O+4>>2]|0;do{if((S|0)>8){O=J+((ga(I,g)|0)+f<<1)|0;t=S-M|0;if((z|0)>0){V=0}else{break}do{x=ga(V,I)|0;D=0;do{F=(nd(l,M)|0)<<t&65535;b[O+(D+x<<1)>>1]=F;D=D+1|0;}while((D|0)<(z|0));V=V+1|0;}while((V|0)<(z|0))}else{O=S-M|0;if((z|0)>0){W=0}else{break}do{t=(ga(W+g|0,I)|0)+f|0;D=0;do{x=(nd(l,M)|0)<<O&255;a[J+(t+D)|0]=x;D=D+1|0;}while((D|0)<(z|0));W=W+1|0;}while((W|0)<(z|0))}}while(0);J=c[q>>2]|0;do{if((c[J+5776>>2]|0)!=0){M=c[J+5768>>2]|0;I=c[J+5780>>2]|0;S=(z|0)/(I|0)|0;O=c[J+5784>>2]|0;D=(z|0)/(O|0)|0;t=(f|0)/(I|0)|0;x=(g|0)/(O|0)|0;F=a[J+5470|0]|0;K=F<<24>>24;y=c[J+44>>2]|0;B=c[J+8>>2]|0;if((M|0)>8){X=B+((ga(y,x)|0)+t<<1)|0;Y=M-K|0;if((D|0)>0){Z=(S|0)>0;_=0;do{if(Z){$=ga(_,y)|0;aa=0;do{ba=(nd(l,K)|0)<<Y&65535;b[X+(aa+$<<1)>>1]=ba;aa=aa+1|0;}while((aa|0)<(S|0))}_=_+1|0;}while((_|0)<(D|0));_=c[q>>2]|0;ca=_;da=c[_+5780>>2]|0;ea=c[_+5784>>2]|0;fa=a[_+5470|0]|0;ha=c[_+5768>>2]|0;ia=c[_+44>>2]|0}else{ca=J;da=I;ea=O;fa=F;ha=M;ia=y}_=(z|0)/(da|0)|0;X=(z|0)/(ea|0)|0;Y=fa<<24>>24;Z=(c[ca+12>>2]|0)+((ga((g|0)/(ea|0)|0,ia)|0)+((f|0)/(da|0)|0)<<1)|0;aa=ha-Y|0;if((X|0)<=0){break}$=(_|0)>0;ba=0;do{if($){ja=ga(ba,ia)|0;ka=0;do{la=(nd(l,Y)|0)<<aa&65535;b[Z+(ka+ja<<1)>>1]=la;ka=ka+1|0;}while((ka|0)<(_|0))}ba=ba+1|0;}while((ba|0)<(X|0))}else{X=M-K|0;if((D|0)>0){ba=(S|0)>0;_=0;do{if(ba){Z=(ga(_+x|0,y)|0)+t|0;aa=0;do{Y=(nd(l,K)|0)<<X&255;a[B+(Z+aa)|0]=Y;aa=aa+1|0;}while((aa|0)<(S|0))}_=_+1|0;}while((_|0)<(D|0));D=c[q>>2]|0;ma=D;na=c[D+5780>>2]|0;oa=c[D+5784>>2]|0;pa=a[D+5470|0]|0;qa=c[D+5768>>2]|0;ra=c[D+44>>2]|0}else{ma=J;na=I;oa=O;pa=F;qa=M;ra=y}D=(z|0)/(na|0)|0;_=(z|0)/(oa|0)|0;S=(f|0)/(na|0)|0;B=(g|0)/(oa|0)|0;X=pa<<24>>24;K=c[ma+12>>2]|0;t=qa-X|0;if((_|0)<=0){break}x=(D|0)>0;ba=0;do{if(x){aa=(ga(ba+B|0,ra)|0)+S|0;Z=0;do{Y=(nd(l,X)|0)<<t&255;a[K+(aa+Z)|0]=Y;Z=Z+1|0;}while((Z|0)<(D|0))}ba=ba+1|0;}while((ba|0)<(_|0))}}}while(0);pd(l);c[N>>2]=c[E>>2];td(w);i=k;return}else{P=165}}while(0);do{if((P|0)==165){if((R|0)!=3){T=z;U=0;break}T=(z|0)/2|0;U=-1}}while(0);J=U+h|0;_=(z|0)>0;if(_){ba=e+18556|0;D=e+18580|0;K=0;t=0;while(1){X=0;S=t;while(1){B=ud(ba,(c[D>>2]|0)+12|0)|0;sa=S+1|0;c[m+(S<<2)>>2]=B;B=X+T|0;if((B|0)<(z|0)){X=B;S=sa}else{break}}S=K+T|0;if((S|0)<(z|0)){K=S;t=sa}else{break}}}t=f-1|0;do{if((t|g|0)<0){ta=0}else{if((c[r+1248>>2]|0)<=(t|0)){ta=0;break}if((c[r+1252>>2]|0)<=(g|0)){ta=0;break}K=c[r+5804>>2]|0;D=ga(g>>K,c[r+5820>>2]|0)|0;ba=D+(f>>K)|0;S=D+(t>>K)|0;K=c[r+10340>>2]|0;if((b[K+(ba*24|0)>>1]|0)!=(b[K+(S*24|0)>>1]|0)){ta=0;break}K=c[r+10308>>2]|0;ta=(c[K+(ba<<2)>>2]|0)==(c[K+(S<<2)>>2]|0)|0}}while(0);t=g-1|0;do{if((t|f|0)<0){ua=0}else{if((c[r+1248>>2]|0)<=(f|0)){ua=0;break}if((c[r+1252>>2]|0)<=(t|0)){ua=0;break}S=c[r+5804>>2]|0;K=c[r+5820>>2]|0;ba=f>>S;D=(ga(g>>S,K)|0)+ba|0;X=(ga(t>>S,K)|0)+ba|0;ba=c[r+10340>>2]|0;if((b[ba+(D*24|0)>>1]|0)!=(b[ba+(X*24|0)>>1]|0)){ua=0;break}ba=c[r+10308>>2]|0;ua=(c[ba+(D<<2)>>2]|0)==(c[ba+(X<<2)>>2]|0)|0}}while(0);if(_){t=e+18556|0;X=(ta|0)!=0;ba=(ua|0)!=0;D=r+5872|0;K=r+5876|0;S=p|0;w=r+10408|0;E=r+10412|0;N=r+10400|0;B=p+4|0;x=p+8|0;y=0;M=0;while(1){F=y+g|0;O=(y|0)>0|ba;I=0;Z=M;do{aa=c[m+(Z<<2)>>2]|0;if((aa|0)==0){Y=yd(t,5)|0;c[o+(Z<<2)>>2]=Y}else{Y=xd(t,2)|0;c[n+(Z<<2)>>2]=Y}Y=I+f|0;$=c[D>>2]|0;ka=(ga(F>>$,c[K>>2]|0)|0)+(Y>>$)|0;di(S,Y,F,ka,(I|0)>0|X,O,r);if((aa|0)==1){va=c[p+(c[n+(Z<<2)>>2]<<2)>>2]&255}else{aa=c[S>>2]|0;Y=c[B>>2]|0;if((aa|0)>(Y|0)){c[S>>2]=Y;c[B>>2]=aa;wa=Y;xa=aa}else{wa=aa;xa=Y}Y=c[x>>2]|0;if((wa|0)>(Y|0)){c[S>>2]=Y;c[x>>2]=wa;ya=wa;za=Y}else{ya=Y;za=wa}if((xa|0)>(ya|0)){c[B>>2]=ya;c[x>>2]=xa;Aa=ya;Ba=xa}else{Aa=xa;Ba=ya}Y=c[o+(Z<<2)>>2]|0;aa=((Y|0)>=(za|0))+Y|0;Y=((aa|0)>=(Aa|0))+aa|0;va=((Y|0)>=(Ba|0))+Y&255}Y=1<<J-(c[w>>2]|0);if((Y|0)>0){aa=0;do{$=0;do{ja=$+ka+(ga(c[E>>2]|0,aa)|0)|0;a[(c[N>>2]|0)+ja|0]=va;$=$+1|0;}while(($|0)<(Y|0));aa=aa+1|0;}while((aa|0)<(Y|0))}Z=Z+1|0;I=I+T|0;}while((I|0)<(z|0));I=y+T|0;if((I|0)<(z|0)){y=I;M=Z}else{break}}}M=r+5776|0;y=c[M>>2]|0;if((y|0)==0){break}else if((y|0)!=3){y=e+18556|0;if((ud(y,(c[e+18580>>2]|0)+13|0)|0)==0){Ca=4}else{Ca=yd(y,2)|0}y=c[r+10408>>2]|0;N=f>>y;E=g>>y;if(!((N|0)>-1)){ec(1024,904,118,17320)}y=c[r+10412>>2]|0;if((N|0)>=(y|0)){ec(1024,904,118,17320)}if(!((E|0)>-1)){ec(816,904,119,17320)}if((E|0)>=(c[r+10416>>2]|0)){ec(816,904,119,17320)}w=(ga(y,E)|0)+N|0;N=d[(c[r+10400>>2]|0)+w|0]|0;w=(Ca|0)==4;if(w){Da=N}else{E=c[19448+(Ca<<2)>>2]|0;Da=(E|0)==(N|0)?34:E}if((c[M>>2]|0)==2){Ea=d[30544+Da|0]|0}else{Ea=Da}Yj(r,f,g,h,Ea,w);break}if(!_){break}w=e+18556|0;M=e+18580|0;E=r+10408|0;N=r+10412|0;y=r+10416|0;x=r+10400|0;B=0;c:while(1){S=B+g|0;X=0;do{K=X+f|0;if((ud(w,(c[M>>2]|0)+13|0)|0)==0){Fa=4}else{Fa=yd(w,2)|0}D=c[E>>2]|0;t=K>>D;ba=S>>D;if(!((t|0)>-1)){P=211;break c}D=c[N>>2]|0;if((t|0)>=(D|0)){P=211;break c}if(!((ba|0)>-1)){P=214;break c}if((ba|0)>=(c[y>>2]|0)){P=214;break c}I=(ga(D,ba)|0)+t|0;t=d[(c[x>>2]|0)+I|0]|0;I=(Fa|0)==4;if(I){Ga=t}else{ba=c[19448+(Fa<<2)>>2]|0;Ga=(ba|0)==(t|0)?34:ba}Yj(r,K,S,J,Ga,I);X=X+T|0;}while((X|0)<(z|0));B=B+T|0;if((B|0)>=(z|0)){break b}}if((P|0)==211){ec(1024,904,118,17320)}else if((P|0)==214){ec(816,904,119,17320)}}else{if(A){Wj(e,f,g,0,0,z,z,j,z,0);break}switch(R|0){case 1:{B=(z|0)/2|0;Wj(e,f,g,0,0,z,B,j,z,0);Wj(e,f,g,0,B,z,B,j,z,1);break b;break};case 2:{B=(z|0)/2|0;Wj(e,f,g,0,0,B,z,j,z,0);Wj(e,f,g,B,0,B,z,j,z,1);break b;break};case 4:{B=(z|0)/4|0;Wj(e,f,g,0,0,z,B,j,z,0);Wj(e,f,g,0,B,z,(3<<h|0)/4|0,j,z,1);break b;break};case 5:{B=(3<<h|0)/4|0;Wj(e,f,g,0,0,z,B,j,z,0);Wj(e,f,g,0,B,z,(z|0)/4|0,j,z,1);break b;break};case 6:{B=(z|0)/4|0;Wj(e,f,g,0,0,B,z,j,z,0);Wj(e,f,g,B,0,(3<<h|0)/4|0,z,j,z,1);break b;break};case 7:{B=(3<<h|0)/4|0;Wj(e,f,g,0,0,B,z,j,z,0);Wj(e,f,g,B,0,(z|0)/4|0,z,j,z,1);break b;break};case 3:{B=(z|0)/2|0;Wj(e,f,g,0,0,B,B,j,z,0);Wj(e,f,g,B,0,B,B,j,z,1);Wj(e,f,g,0,B,B,B,j,z,2);Wj(e,f,g,B,B,B,B,j,z,3);break b;break};default:{ec(14128,14776,4511,18912)}}}}while(0);do{if(s){if(!((R|0)!=0|(a[e+26|0]&16)==0)){break}if((ud(e+18556|0,(c[e+18580>>2]|0)+153|0)|0)!=0){break}i=k;return}}while(0);if(L){Ha=(c[r+1396>>2]|0)+Q|0}else{Ha=c[r+1392>>2]|0}L=(c[r+5776>>2]|0)!=0|0;Uj(e,f,g,f,g,f,g,h,0,0,Ha,Q,H,L,L);i=k;return}function Yj(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0;if(h){i=(g|128)&255}else{i=g&255}g=1<<f-(c[b+10408>>2]|0);f=c[b+5872>>2]|0;h=b+5876|0;j=(ga(e>>f,c[h>>2]|0)|0)+(d>>f)|0;if((g|0)<=0){return}f=b+5880|0;d=b+10432|0;e=b+10424|0;k=b+10420|0;b=0;a:while(1){l=0;do{if((l|0)>=(c[h>>2]|0)){m=7;break a}if((b|0)>=(c[f>>2]|0)){m=9;break a}n=j+l+(ga(c[d>>2]|0,b)|0)|0;if((n|0)>=(c[e>>2]|0)){m=11;break a}a[(c[k>>2]|0)+n|0]=i;l=l+1|0;}while((l|0)<(g|0));l=b+1|0;if((l|0)<(g|0)){b=l}else{m=14;break}}if((m|0)==7){ec(776,904,659,17736)}else if((m|0)==9){ec(704,904,660,17736)}else if((m|0)==11){ec(640,904,663,17736)}else if((m|0)==14){return}}function Zj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,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,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;f=b+18596|0;g=c[f>>2]|0;h=c[g+5820>>2]|0;i=b+12|0;j=g+5965|0;do{if(!e){if((a[j]|0)==0){break}k=c[i>>2]|0;if((k|0)<=0){break}if((c[b+8>>2]|0)!=0){break}if((h|0)>1){l=k-1|0;m=b+18604|0;n=c[m>>2]|0;if(l>>>0<(c[n+10680>>2]|0)-(c[n+10676>>2]|0)>>3>>>0){Yh(g,c[b+18612>>2]|0,1,l,1);Jd(b+18580|0,(c[(c[m>>2]|0)+10676>>2]|0)+((c[i>>2]|0)-1<<3)|0)|0;Hd((c[(c[m>>2]|0)+10676>>2]|0)+((c[i>>2]|0)-1<<3)|0);break}else{o=2;return o|0}}else{Yh(g,c[b+18612>>2]|0,0,k-1|0,1);k=c[b+18600>>2]|0;m=c[k+796>>2]|0;if(m>>>0<3>>>0){Fd(b+18580|0,m,c[k+792>>2]|0);k=b+18588|0;C=0;a[k]=C;C=C>>8;a[k+1|0]=C;C=C>>8;a[k+2|0]=C;C=C>>8;a[k+3|0]=C;break}else{ec(1856,14776,1508,18744);return 0}}}}while(0);e=b+8|0;k=h-1|0;m=b+18612|0;l=b+18580|0;n=b+18584|0;p=g+5828|0;q=b+18604|0;r=b+18556|0;s=g+5935|0;t=b+18600|0;u=b+4|0;v=b|0;w=g+5966|0;x=g+10296|0;g=c[e>>2]|0;y=c[i>>2]|0;z=c[f>>2]|0;a:while(1){A=(ga(y,h)|0)+g|0;if(!(A>>>0<(c[z+10276>>2]|0)-(c[z+10272>>2]|0)>>2>>>0)){o=2;B=38;break}if((g|0)>=(c[z+5820>>2]|0)){o=2;B=38;break}if((y|0)>=(c[z+5828>>2]|0)){o=2;B=38;break}if((y|0)>0&d&(g|0)<(k|0)){Yh(z,c[m>>2]|0,g+1|0,y-1|0,1)}if((c[n>>2]|0)==0){o=2;B=38;break}Pj(b);do{if((a[j]|0)!=0&(g|0)==1){if((y|0)>=((c[p>>2]|0)-1|0)){break}D=c[q>>2]|0;E=c[D+10676>>2]|0;if(!((c[D+10680>>2]|0)-E>>3>>>0>y>>>0)){o=2;B=38;break a}Jd(E+(y<<3)|0,l)|0;Id((c[(c[q>>2]|0)+10676>>2]|0)+(y<<3)|0)}}while(0);E=vd(r)|0;D=(E|0)!=0;do{if(D){if((a[s]|0)==0){break}Jd((c[t>>2]|0)+1332|0,l)|0;Id((c[t>>2]|0)+1332|0);a[(c[t>>2]|0)+1340|0]=1}}while(0);Ek((c[(c[f>>2]|0)+10524>>2]|0)+(A*76|0)|0,1);F=c[i>>2]|0;G=c[u>>2]|0;H=G+1|0;c[u>>2]=H;I=c[f>>2]|0;J=c[I+5836>>2]|0;if((H|0)<(J|0)){K=c[(c[I+10284>>2]|0)+(H<<2)>>2]|0;c[v>>2]=K;L=I+5820|0;M=(K|0)%(c[L>>2]|0)|0;c[e>>2]=M;N=(K|0)/(c[L>>2]|0)|0;c[i>>2]=N;O=M;P=N}else{c[v>>2]=J;N=I+5820|0;M=(J|0)%(c[N>>2]|0)|0;c[e>>2]=M;L=(J|0)/(c[N>>2]|0)|0;c[i>>2]=L;if((E|0)==0){B=28;break}else{O=M;P=L}}if(D){o=0;B=38;break}if((a[w]|0)==0){Q=0}else{L=c[x>>2]|0;Q=(c[L+(H<<2)>>2]|0)!=(c[L+(G<<2)>>2]|0)|0}if((a[j]|0)==0){R=0}else{R=(F|0)!=(P|0)|0}if((R|Q|0)==0){g=O;y=P;z=I}else{B=35;break}}if((B|0)==28){Ue((c[b+18592>>2]|0)+4|0,1004,0);a[(c[f>>2]|0)+10516|0]=3;o=2;return o|0}else if((B|0)==35){if((vd(r)|0)==0){Ue((c[b+18592>>2]|0)+4|0,1017,0);a[(c[f>>2]|0)+10516|0]=3;o=2;return o|0}else{td(r);o=1;return o|0}}else if((B|0)==38){return o|0}return 0}function _j(b){b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=c[b+18596>>2]|0;f=d+5932|0;g=b+18600|0;h=c[g>>2]|0;if((a[h+12|0]|0)==0){i=c[h+796>>2]|0;if(!(i>>>0<3>>>0)){ec(1856,14776,1508,18744);return 0}Fd(b+18580|0,i,c[h+792>>2]|0);i=b+18588|0;C=0;a[i]=C;C=C>>8;a[i+1|0]=C;C=C>>8;a[i+2|0]=C;C=C>>8;a[i+3|0]=C;j=1;return j|0}i=c[h+16>>2]|0;h=e[(c[d+10340>>2]|0)+((c[(c[d+10284>>2]|0)+((c[(c[d+10272>>2]|0)+(i<<2)>>2]|0)-1<<2)>>2]|0)*24|0)+2>>1]|0;k=c[d+48>>2]|0;if(!(h>>>0<(c[d+52>>2]|0)-k>>2>>>0)){j=0;return j|0}l=c[k+(h<<2)>>2]|0;h=c[d+5820>>2]|0;if(pj(f,(i|0)%(h|0)|0,(i|0)/(h|0)|0)|0){h=c[g>>2]|0;g=c[h+796>>2]|0;if(!(g>>>0<3>>>0)){ec(1856,14776,1508,18744);return 0}Fd(b+18580|0,g,c[h+792>>2]|0);h=b+18588|0;C=0;a[h]=C;C=C>>8;a[h+1|0]=C;C=C>>8;a[h+2|0]=C;C=C>>8;a[h+3|0]=C;j=1;return j|0}h=c[b+18604>>2]|0;g=c[b+18608>>2]|0;i=c[h+10632>>2]|0;f=(c[h+10636>>2]|0)-i>>2;if(f>>>0>1>>>0){m=1}else{j=0;return j|0}while(1){h=m+1|0;if((c[i+(m<<2)>>2]|0)==(g|0)){break}if(h>>>0<f>>>0){m=h}else{j=0;n=16;break}}if((n|0)==16){return j|0}n=c[i+(m-1<<2)>>2]|0;if((n|0)==0){j=0;return j|0}Dk(n+44|0,c[n+120>>2]|0);if((a[l+1340|0]|0)==0){j=0;return j|0}n=l+1332|0;Jd(b+18580|0,n)|0;Hd(n);j=1;return j|0}function $j(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+104|0;f=e|0;mb(f|0,1216,(g=i,i=i+8|0,c[g>>2]=c[d+12>>2],g)|0)|0;i=g;g=ev(f|0)|0;if(g>>>0>4294967279>>>0){nm(0)}if(g>>>0<11>>>0){a[b]=g<<1;h=b+1|0;cv(h|0,f|0,g)|0;j=h+g|0;a[j]=0;k=100;l=0;i=e;return}else{d=g+16&-16;m=Nu(d)|0;c[b+8>>2]=m;c[b>>2]=d|1;c[b+4>>2]=g;h=m;cv(h|0,f|0,g)|0;j=h+g|0;a[j]=0;k=100;l=0;i=e;return}}function ak(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+104|0;f=e|0;g=c[d+16>>2]|0;mb(f|0,1104,(h=i,i=i+16|0,c[h>>2]=c[d+12>>2],c[h+8>>2]=g,h)|0)|0;i=h;h=ev(f|0)|0;if(h>>>0>4294967279>>>0){nm(0)}if(h>>>0<11>>>0){a[b]=h<<1;j=b+1|0;cv(j|0,f|0,h)|0;k=j+h|0;a[k]=0;l=100;m=0;i=e;return}else{g=h+16&-16;d=Nu(g)|0;c[b+8>>2]=d;c[b>>2]=g|1;c[b+4>>2]=h;j=d;cv(j|0,f|0,h)|0;k=j+h|0;a[k]=0;l=100;m=0;i=e;return}}function bk(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=c[b+20>>2]|0;e=d+18596|0;f=c[e>>2]|0;g=b|0;h=b+4|0;c[h>>2]=1;Wh(f,g);i=c[e>>2]|0;e=c[d+4>>2]|0;j=c[i+5836>>2]|0;if((e|0)<(j|0)){k=c[(c[i+10284>>2]|0)+(e<<2)>>2]|0;c[d>>2]=k;e=i+5820|0;c[d+8>>2]=(k|0)%(c[e>>2]|0)|0;c[d+12>>2]=(k|0)/(c[e>>2]|0)|0}else{c[d>>2]=j;e=i+5820|0;c[d+8>>2]=(j|0)%(c[e>>2]|0)|0;c[d+12>>2]=(j|0)/(c[e>>2]|0)|0}e=b+8|0;do{if((a[e]|0)==0){b=c[d+18600>>2]|0;j=c[b+796>>2]|0;if(j>>>0<3>>>0){Fd(d+18580|0,j,c[b+792>>2]|0);b=d+18588|0;C=0;a[b]=C;C=C>>8;a[b+1|0]=C;C=C>>8;a[b+2|0]=C;C=C>>8;a[b+3|0]=C;break}else{ec(1856,14776,1508,18744)}}else{if(_j(d)|0){break}c[h>>2]=3;Fk((c[d+18608>>2]|0)+44|0,1);Xh(f,g);return}}while(0);td(d+18556|0);Zj(d,0,(a[e]|0)!=0)|0;c[h>>2]=3;Fk((c[d+18608>>2]|0)+44|0,1);Xh(f,g);return}function ck(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c[b+16>>2]|0;e=d+18596|0;f=c[e>>2]|0;g=f+5820|0;h=c[g>>2]|0;i=b|0;j=b+4|0;c[j>>2]=1;Wh(f,i);k=c[e>>2]|0;e=c[d+4>>2]|0;l=c[k+5836>>2]|0;if((e|0)<(l|0)){m=c[(c[k+10284>>2]|0)+(e<<2)>>2]|0;c[d>>2]=m;e=k+5820|0;c[d+8>>2]=(m|0)%(c[e>>2]|0)|0;c[d+12>>2]=(m|0)/(c[e>>2]|0)|0;n=m}else{c[d>>2]=l;m=k+5820|0;c[d+8>>2]=(l|0)%(c[m>>2]|0)|0;c[d+12>>2]=(l|0)/(c[m>>2]|0)|0;n=l}l=(n|0)/(h|0)|0;n=b+8|0;do{if((a[n]|0)!=0){if(_j(d)|0){break}if((h|0)>0){b=ga(l,h)|0;m=f+10524|0;k=0;do{Ek((c[m>>2]|0)+((k+b|0)*76|0)|0,1);k=k+1|0;}while((k|0)<(h|0))}c[j>>2]=3;Fk((c[d+18608>>2]|0)+44|0,1);Xh(f,i);return}}while(0);td(d+18556|0);if((a[n]|0)==0){o=0}else{o=(a[(c[d+18600>>2]|0)+12|0]|0)==0}Zj(d,1,o)|0;a:do{if((c[d+12>>2]|0)==(l|0)){o=c[g>>2]|0;n=c[d+8>>2]|0;if((n|0)>=(o|0)){break}k=f+5828|0;b=ga(l,h)|0;m=f+10524|0;e=n;n=o;while(1){do{if((e|0)<(n|0)){if((l|0)>=(c[k>>2]|0)){break}Ek((c[m>>2]|0)+((e+b|0)*76|0)|0,1)}}while(0);p=e+1|0;if((p|0)>=(o|0)){break a}e=p;n=c[g>>2]|0}}}while(0);c[j>>2]=3;Fk((c[d+18608>>2]|0)+44|0,1);Xh(f,i);return}function dk(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[b+18596>>2]|0;e=c[b+4>>2]|0;f=c[d+5836>>2]|0;if((e|0)<(f|0)){g=c[(c[d+10284>>2]|0)+(e<<2)>>2]|0;c[b>>2]=g;e=d+5820|0;c[b+8>>2]=(g|0)%(c[e>>2]|0)|0;c[b+12>>2]=(g|0)/(c[e>>2]|0)|0}else{c[b>>2]=f;e=d+5820|0;c[b+8>>2]=(f|0)%(c[e>>2]|0)|0;c[b+12>>2]=(f|0)/(c[e>>2]|0)|0}e=b+18600|0;f=c[e>>2]|0;if(!(_j(b)|0)){h=18;return h|0}g=b+18556|0;td(g);i=b+18560|0;j=g|0;g=b+18592|0;k=d+5966|0;d=b+18580|0;l=b+18588|0;m=(a[f+12|0]|0)==0;f=0;while(1){do{if((f|0)>0){n=f-1|0;o=c[e>>2]|0;p=c[o+776>>2]|0;if(n>>>0<(c[o+780>>2]|0)-p>>2>>>0){if(((c[i>>2]|0)-2-(c[j>>2]|0)|0)==(c[p+(n<<2)>>2]|0)){break}}Ue((c[g>>2]|0)+4|0,1003,1)}}while(0);n=f+1|0;if(((Zj(b,0,m)|0)&-3|0)==0){h=0;q=15;break}if((a[k]|0)==0){m=0;f=n;continue}p=c[e>>2]|0;o=c[p+796>>2]|0;if(!(o>>>0<3>>>0)){q=13;break}Fd(d,o,c[p+792>>2]|0);C=0;a[l]=C;C=C>>8;a[l+1|0]=C;C=C>>8;a[l+2|0]=C;C=C>>8;a[l+3|0]=C;m=0;f=n}if((q|0)==13){ec(1856,14776,1508,18744);return 0}else if((q|0)==15){return h|0}return 0}function ek(a){a=a|0;return}function fk(a){a=a|0;Pu(a);return}function gk(a){a=a|0;return}function hk(a){a=a|0;Pu(a);return}function ik(b){b=b|0;c[b+4720>>2]=0;c[b+4724>>2]=0;c[b+4728>>2]=0;kl(b+4904|0);dv(b+4984|0,0,9)|0;a[b|0]=0;return}function jk(a){a=a|0;var b=0,d=0;b=c[a+4720>>2]|0;if((b|0)==0){return}d=a+4724|0;a=c[d>>2]|0;if((a|0)!=(b|0)){c[d>>2]=a+(~(((a-100+(-b|0)|0)>>>0)/100|0)*100|0)}Pu(b);return}
|
|
|
|
|
|
|
|
function cr(e,f,g,h,j,k,l,m,n,o,p){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0;q=i;i=i+408|0;r=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[r>>2];r=q|0;s=q+400|0;t=i;i=i+1|0;i=i+7&-8;u=i;i=i+1|0;i=i+7&-8;v=i;i=i+12|0;i=i+7&-8;w=i;i=i+12|0;i=i+7&-8;x=i;i=i+12|0;i=i+7&-8;y=i;i=i+12|0;i=i+7&-8;z=i;i=i+12|0;i=i+7&-8;A=i;i=i+4|0;i=i+7&-8;B=i;i=i+4|0;i=i+7&-8;C=r|0;c[s>>2]=0;D=v;dv(D|0,0,12)|0;E=w;dv(E|0,0,12)|0;F=x;dv(F|0,0,12)|0;G=y;dv(G|0,0,12)|0;H=z;dv(H|0,0,12)|0;gr(g,h,s,t,u,v,w,x,y,A);h=n|0;c[o>>2]=c[h>>2];g=e|0;e=f|0;f=s;s=m+8|0;m=y+1|0;I=y+4|0;J=y+8|0;K=x+1|0;L=x+4|0;M=x+8|0;N=(j&512|0)!=0;j=w+1|0;O=w+8|0;P=w+4|0;Q=z;R=Q+1|0;S=z+8|0;T=z+4|0;U=f+3|0;V=n+4|0;n=v+4|0;W=p;p=194;X=C;Y=C;C=r+400|0;r=0;Z=0;a:while(1){_=c[g>>2]|0;do{if((_|0)==0){$=0}else{if((c[_+12>>2]|0)!=(c[_+16>>2]|0)){$=_;break}if((Fc[c[(c[_>>2]|0)+36>>2]&255](_)|0)==-1){c[g>>2]=0;$=0;break}else{$=c[g>>2]|0;break}}}while(0);_=($|0)==0;aa=c[e>>2]|0;do{if((aa|0)==0){ba=15}else{if((c[aa+12>>2]|0)!=(c[aa+16>>2]|0)){if(_){ca=aa;break}else{da=p;ea=X;fa=Y;ga=Z;ba=310;break a}}if((Fc[c[(c[aa>>2]|0)+36>>2]&255](aa)|0)==-1){c[e>>2]=0;ba=15;break}else{if(_){ca=aa;break}else{da=p;ea=X;fa=Y;ga=Z;ba=310;break a}}}}while(0);if((ba|0)==15){ba=0;if(_){da=p;ea=X;fa=Y;ga=Z;ba=310;break}else{ca=0}}b:do{switch(a[f+r|0]|0){case 1:{if((r|0)==3){da=p;ea=X;fa=Y;ga=Z;ba=310;break a}aa=c[g>>2]|0;ha=c[aa+12>>2]|0;if((ha|0)==(c[aa+16>>2]|0)){ia=(Fc[c[(c[aa>>2]|0)+36>>2]&255](aa)|0)&255}else{ia=a[ha]|0}if(!(ia<<24>>24>-1)){ba=41;break a}if((b[(c[s>>2]|0)+(ia<<24>>24<<1)>>1]&8192)==0){ba=41;break a}ha=c[g>>2]|0;aa=ha+12|0;ja=c[aa>>2]|0;if((ja|0)==(c[ha+16>>2]|0)){ka=(Fc[c[(c[ha>>2]|0)+40>>2]&255](ha)|0)&255}else{c[aa>>2]=ja+1;ka=a[ja]|0}wm(z,ka);ba=42;break};case 0:{ba=42;break};case 3:{ja=a[F]|0;aa=(ja&1)==0;if(aa){la=(ja&255)>>>1}else{la=c[L>>2]|0}ha=a[G]|0;ma=(ha&1)==0;if(ma){na=(ha&255)>>>1}else{na=c[I>>2]|0}if((la|0)==(-na|0)){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}if(aa){ua=(ja&255)>>>1}else{ua=c[L>>2]|0}do{if((ua|0)!=0){if(ma){va=(ha&255)>>>1}else{va=c[I>>2]|0}if((va|0)==0){break}wa=c[g>>2]|0;xa=c[wa+12>>2]|0;ya=c[wa+16>>2]|0;if((xa|0)==(ya|0)){za=(Fc[c[(c[wa>>2]|0)+36>>2]&255](wa)|0)&255;Aa=c[g>>2]|0;Ba=za;Ca=a[F]|0;Da=Aa;Ea=c[Aa+12>>2]|0;Fa=c[Aa+16>>2]|0}else{Ba=a[xa]|0;Ca=ja;Da=wa;Ea=xa;Fa=ya}ya=Da+12|0;xa=(Ea|0)==(Fa|0);if(Ba<<24>>24==(a[(Ca&1)==0?K:c[M>>2]|0]|0)){if(xa){Fc[c[(c[Da>>2]|0)+40>>2]&255](Da)|0}else{c[ya>>2]=Ea+1}ya=a[F]|0;if((ya&1)==0){Ga=(ya&255)>>>1}else{Ga=c[L>>2]|0}oa=Ga>>>0>1>>>0?x:Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}if(xa){Ha=(Fc[c[(c[Da>>2]|0)+36>>2]&255](Da)|0)&255}else{Ha=a[Ea]|0}if(!(Ha<<24>>24==(a[(a[G]&1)==0?m:c[J>>2]|0]|0))){ba=136;break a}xa=c[g>>2]|0;ya=xa+12|0;wa=c[ya>>2]|0;if((wa|0)==(c[xa+16>>2]|0)){Fc[c[(c[xa>>2]|0)+40>>2]&255](xa)|0}else{c[ya>>2]=wa+1}a[l]=1;wa=a[G]|0;if((wa&1)==0){Ia=(wa&255)>>>1}else{Ia=c[I>>2]|0}oa=Ia>>>0>1>>>0?y:Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}}while(0);if(aa){Ja=(ja&255)>>>1}else{Ja=c[L>>2]|0}ma=c[g>>2]|0;wa=c[ma+12>>2]|0;ya=(wa|0)==(c[ma+16>>2]|0);if((Ja|0)==0){if(ya){xa=(Fc[c[(c[ma>>2]|0)+36>>2]&255](ma)|0)&255;Ka=xa;La=a[G]|0}else{Ka=a[wa]|0;La=ha}if(!(Ka<<24>>24==(a[(La&1)==0?m:c[J>>2]|0]|0))){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}xa=c[g>>2]|0;Aa=xa+12|0;za=c[Aa>>2]|0;if((za|0)==(c[xa+16>>2]|0)){Fc[c[(c[xa>>2]|0)+40>>2]&255](xa)|0}else{c[Aa>>2]=za+1}a[l]=1;za=a[G]|0;if((za&1)==0){Ma=(za&255)>>>1}else{Ma=c[I>>2]|0}oa=Ma>>>0>1>>>0?y:Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}if(ya){ya=(Fc[c[(c[ma>>2]|0)+36>>2]&255](ma)|0)&255;Na=ya;Oa=a[F]|0}else{Na=a[wa]|0;Oa=ja}if(!(Na<<24>>24==(a[(Oa&1)==0?K:c[M>>2]|0]|0))){a[l]=1;oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}wa=c[g>>2]|0;ya=wa+12|0;ma=c[ya>>2]|0;if((ma|0)==(c[wa+16>>2]|0)){Fc[c[(c[wa>>2]|0)+40>>2]&255](wa)|0}else{c[ya>>2]=ma+1}ma=a[F]|0;if((ma&1)==0){Pa=(ma&255)>>>1}else{Pa=c[L>>2]|0}oa=Pa>>>0>1>>>0?x:Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break};case 2:{if(!((Z|0)!=0|r>>>0<2>>>0)){if((r|0)==2){Qa=(a[U]|0)!=0}else{Qa=0}if(!(N|Qa)){oa=0;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}}ma=a[E]|0;ya=(ma&1)==0;wa=ya?j:c[O>>2]|0;c:do{if((r|0)==0){Ra=wa;Sa=ma;Ta=ca;Ua=ca}else{if(!((d[f+(r-1)|0]|0)>>>0<2>>>0)){Ra=wa;Sa=ma;Ta=ca;Ua=ca;break}za=wa+(ya?(ma&255)>>>1:c[P>>2]|0)|0;Aa=wa;while(1){if((Aa|0)==(za|0)){Va=za;break}xa=a[Aa]|0;if(!(xa<<24>>24>-1)){Va=Aa;break}if((b[(c[s>>2]|0)+(xa<<24>>24<<1)>>1]&8192)==0){Va=Aa;break}else{Aa=Aa+1|0}}Aa=Va-wa|0;za=a[H]|0;xa=(za&1)==0;if(xa){Wa=(za&255)>>>1}else{Wa=c[T>>2]|0}if(Aa>>>0>Wa>>>0){Ra=wa;Sa=ma;Ta=ca;Ua=ca;break}if(xa){xa=(za&255)>>>1;Xa=xa;Ya=R;Za=xa-Aa+(Q+1)|0}else{xa=c[S>>2]|0;za=c[T>>2]|0;Xa=za;Ya=xa;Za=xa+(za-Aa)|0}Aa=Ya+Xa|0;if((Za|0)==(Aa|0)){Ra=Va;Sa=ma;Ta=ca;Ua=ca;break}else{_a=Za;$a=wa}while(1){if((a[_a]|0)!=(a[$a]|0)){Ra=wa;Sa=ma;Ta=ca;Ua=ca;break c}za=_a+1|0;if((za|0)==(Aa|0)){Ra=Va;Sa=ma;Ta=ca;Ua=ca;break}else{_a=za;$a=$a+1|0}}}}while(0);d:while(1){if((Sa&1)==0){ab=(Sa&255)>>>1;bb=j}else{ab=c[P>>2]|0;bb=c[O>>2]|0}if((Ra|0)==(bb+ab|0)){break}ma=c[g>>2]|0;do{if((ma|0)==0){cb=0}else{if((c[ma+12>>2]|0)!=(c[ma+16>>2]|0)){cb=ma;break}if((Fc[c[(c[ma>>2]|0)+36>>2]&255](ma)|0)==-1){c[g>>2]=0;cb=0;break}else{cb=c[g>>2]|0;break}}}while(0);ma=(cb|0)==0;do{if((Ta|0)==0){db=Ua;ba=173}else{if((c[Ta+12>>2]|0)!=(c[Ta+16>>2]|0)){if(ma){eb=Ta;fb=Ua;break}else{break d}}if((Fc[c[(c[Ta>>2]|0)+36>>2]&255](Ta)|0)==-1){c[e>>2]=0;db=0;ba=173;break}else{if(ma^(Ua|0)==0){eb=Ua;fb=Ua;break}else{break d}}}}while(0);if((ba|0)==173){ba=0;if(ma){break}else{eb=0;fb=db}}wa=c[g>>2]|0;ya=c[wa+12>>2]|0;if((ya|0)==(c[wa+16>>2]|0)){gb=(Fc[c[(c[wa>>2]|0)+36>>2]&255](wa)|0)&255}else{gb=a[ya]|0}if(!(gb<<24>>24==(a[Ra]|0))){break}ya=c[g>>2]|0;wa=ya+12|0;ja=c[wa>>2]|0;if((ja|0)==(c[ya+16>>2]|0)){Fc[c[(c[ya>>2]|0)+40>>2]&255](ya)|0}else{c[wa>>2]=ja+1}Ra=Ra+1|0;Sa=a[E]|0;Ta=eb;Ua=fb}if(!N){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break b}ja=a[E]|0;if((ja&1)==0){hb=(ja&255)>>>1;ib=j}else{hb=c[P>>2]|0;ib=c[O>>2]|0}if((Ra|0)==(ib+hb|0)){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W}else{ba=189;break a}break};case 4:{ja=0;wa=C;ya=Y;ha=X;aa=p;Aa=W;e:while(1){za=c[g>>2]|0;do{if((za|0)==0){jb=0}else{if((c[za+12>>2]|0)!=(c[za+16>>2]|0)){jb=za;break}if((Fc[c[(c[za>>2]|0)+36>>2]&255](za)|0)==-1){c[g>>2]=0;jb=0;break}else{jb=c[g>>2]|0;break}}}while(0);za=(jb|0)==0;ma=c[e>>2]|0;do{if((ma|0)==0){ba=202}else{if((c[ma+12>>2]|0)!=(c[ma+16>>2]|0)){if(za){break}else{break e}}if((Fc[c[(c[ma>>2]|0)+36>>2]&255](ma)|0)==-1){c[e>>2]=0;ba=202;break}else{if(za){break}else{break e}}}}while(0);if((ba|0)==202){ba=0;if(za){break}}ma=c[g>>2]|0;xa=c[ma+12>>2]|0;if((xa|0)==(c[ma+16>>2]|0)){kb=(Fc[c[(c[ma>>2]|0)+36>>2]&255](ma)|0)&255}else{kb=a[xa]|0}do{if(kb<<24>>24>-1){if((b[(c[s>>2]|0)+(kb<<24>>24<<1)>>1]&2048)==0){ba=221;break}xa=c[o>>2]|0;if((xa|0)==(Aa|0)){ma=(c[V>>2]|0)!=194;lb=c[h>>2]|0;mb=Aa-lb|0;nb=mb>>>0<2147483647>>>0?mb<<1:-1;ob=Iu(ma?lb:0,nb)|0;if((ob|0)==0){Uu()}do{if(ma){c[h>>2]=ob;pb=ob}else{lb=c[h>>2]|0;c[h>>2]=ob;if((lb|0)==0){pb=ob;break}Dc[c[V>>2]&511](lb);pb=c[h>>2]|0}}while(0);c[V>>2]=88;ob=pb+mb|0;c[o>>2]=ob;qb=(c[h>>2]|0)+nb|0;rb=ob}else{qb=Aa;rb=xa}c[o>>2]=rb+1;a[rb]=kb;sb=ja+1|0;tb=wa;ub=ya;vb=ha;wb=aa;xb=qb}else{ba=221}}while(0);if((ba|0)==221){ba=0;za=a[D]|0;if((za&1)==0){yb=(za&255)>>>1}else{yb=c[n>>2]|0}if((yb|0)==0|(ja|0)==0){break}if(!(kb<<24>>24==(a[u]|0))){break}if((ya|0)==(wa|0)){za=ya-ha|0;ob=za>>>0<2147483647>>>0?za<<1:-1;if((aa|0)==194){zb=0}else{zb=ha}ma=Iu(zb,ob)|0;lb=ma;if((ma|0)==0){Uu()}Ab=lb+(ob>>>2<<2)|0;Bb=lb+(za>>2<<2)|0;Cb=lb;Db=88}else{Ab=wa;Bb=ya;Cb=ha;Db=aa}c[Bb>>2]=ja;sb=0;tb=Ab;ub=Bb+4|0;vb=Cb;wb=Db;xb=Aa}lb=c[g>>2]|0;za=lb+12|0;ob=c[za>>2]|0;if((ob|0)==(c[lb+16>>2]|0)){Fc[c[(c[lb>>2]|0)+40>>2]&255](lb)|0;ja=sb;wa=tb;ya=ub;ha=vb;aa=wb;Aa=xb;continue}else{c[za>>2]=ob+1;ja=sb;wa=tb;ya=ub;ha=vb;aa=wb;Aa=xb;continue}}if((ha|0)==(ya|0)|(ja|0)==0){Eb=wa;Fb=ya;Gb=ha;Hb=aa}else{if((ya|0)==(wa|0)){ob=ya-ha|0;za=ob>>>0<2147483647>>>0?ob<<1:-1;if((aa|0)==194){Ib=0}else{Ib=ha}lb=Iu(Ib,za)|0;ma=lb;if((lb|0)==0){Uu()}Jb=ma+(za>>>2<<2)|0;Kb=ma+(ob>>2<<2)|0;Lb=ma;Mb=88}else{Jb=wa;Kb=ya;Lb=ha;Mb=aa}c[Kb>>2]=ja;Eb=Jb;Fb=Kb+4|0;Gb=Lb;Hb=Mb}if((c[A>>2]|0)>0){ma=c[g>>2]|0;do{if((ma|0)==0){Nb=0}else{if((c[ma+12>>2]|0)!=(c[ma+16>>2]|0)){Nb=ma;break}if((Fc[c[(c[ma>>2]|0)+36>>2]&255](ma)|0)==-1){c[g>>2]=0;Nb=0;break}else{Nb=c[g>>2]|0;break}}}while(0);ma=(Nb|0)==0;ja=c[e>>2]|0;do{if((ja|0)==0){ba=257}else{if((c[ja+12>>2]|0)!=(c[ja+16>>2]|0)){if(ma){Ob=ja;break}else{ba=264;break a}}if((Fc[c[(c[ja>>2]|0)+36>>2]&255](ja)|0)==-1){c[e>>2]=0;ba=257;break}else{if(ma){Ob=ja;break}else{ba=264;break a}}}}while(0);if((ba|0)==257){ba=0;if(ma){ba=264;break a}else{Ob=0}}ja=c[g>>2]|0;aa=c[ja+12>>2]|0;if((aa|0)==(c[ja+16>>2]|0)){Pb=(Fc[c[(c[ja>>2]|0)+36>>2]&255](ja)|0)&255}else{Pb=a[aa]|0}if(!(Pb<<24>>24==(a[t]|0))){ba=264;break a}aa=c[g>>2]|0;ja=aa+12|0;ha=c[ja>>2]|0;if((ha|0)==(c[aa+16>>2]|0)){Fc[c[(c[aa>>2]|0)+40>>2]&255](aa)|0;Qb=Aa;Rb=Ob;Sb=Ob}else{c[ja>>2]=ha+1;Qb=Aa;Rb=Ob;Sb=Ob}while(1){ha=c[g>>2]|0;do{if((ha|0)==0){Tb=0}else{if((c[ha+12>>2]|0)!=(c[ha+16>>2]|0)){Tb=ha;break}if((Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0)==-1){c[g>>2]=0;Tb=0;break}else{Tb=c[g>>2]|0;break}}}while(0);ha=(Tb|0)==0;do{if((Rb|0)==0){Ub=Sb;ba=280}else{if((c[Rb+12>>2]|0)!=(c[Rb+16>>2]|0)){if(ha){Vb=Sb;Wb=Rb;break}else{ba=288;break a}}if((Fc[c[(c[Rb>>2]|0)+36>>2]&255](Rb)|0)==-1){c[e>>2]=0;Ub=0;ba=280;break}else{if(ha^(Sb|0)==0){Vb=Sb;Wb=Sb;break}else{ba=288;break a}}}}while(0);if((ba|0)==280){ba=0;if(ha){ba=288;break a}else{Vb=Ub;Wb=0}}ja=c[g>>2]|0;aa=c[ja+12>>2]|0;if((aa|0)==(c[ja+16>>2]|0)){Xb=(Fc[c[(c[ja>>2]|0)+36>>2]&255](ja)|0)&255}else{Xb=a[aa]|0}if(!(Xb<<24>>24>-1)){ba=288;break a}if((b[(c[s>>2]|0)+(Xb<<24>>24<<1)>>1]&2048)==0){ba=288;break a}aa=c[o>>2]|0;if((aa|0)==(Qb|0)){ja=(c[V>>2]|0)!=194;ya=c[h>>2]|0;wa=Qb-ya|0;ob=wa>>>0<2147483647>>>0?wa<<1:-1;za=Iu(ja?ya:0,ob)|0;if((za|0)==0){Uu()}do{if(ja){c[h>>2]=za;Yb=za}else{ya=c[h>>2]|0;c[h>>2]=za;if((ya|0)==0){Yb=za;break}Dc[c[V>>2]&511](ya);Yb=c[h>>2]|0}}while(0);c[V>>2]=88;za=Yb+wa|0;c[o>>2]=za;Zb=(c[h>>2]|0)+ob|0;_b=za}else{Zb=Qb;_b=aa}za=c[g>>2]|0;ja=c[za+12>>2]|0;if((ja|0)==(c[za+16>>2]|0)){ha=(Fc[c[(c[za>>2]|0)+36>>2]&255](za)|0)&255;$b=ha;ac=c[o>>2]|0}else{$b=a[ja]|0;ac=_b}c[o>>2]=ac+1;a[ac]=$b;ja=(c[A>>2]|0)-1|0;c[A>>2]=ja;ha=c[g>>2]|0;za=ha+12|0;ya=c[za>>2]|0;if((ya|0)==(c[ha+16>>2]|0)){Fc[c[(c[ha>>2]|0)+40>>2]&255](ha)|0}else{c[za>>2]=ya+1}if((ja|0)>0){Qb=Zb;Rb=Wb;Sb=Vb}else{bc=Zb;break}}}else{bc=Aa}if((c[o>>2]|0)==(c[h>>2]|0)){ba=308;break a}else{oa=Z;pa=Eb;qa=Fb;ra=Gb;sa=Hb;ta=bc}break};default:{oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W}}}while(0);f:do{if((ba|0)==42){ba=0;if((r|0)==3){da=p;ea=X;fa=Y;ga=Z;ba=310;break a}else{cc=ca;dc=ca}while(1){_=c[g>>2]|0;do{if((_|0)==0){ec=0}else{if((c[_+12>>2]|0)!=(c[_+16>>2]|0)){ec=_;break}if((Fc[c[(c[_>>2]|0)+36>>2]&255](_)|0)==-1){c[g>>2]=0;ec=0;break}else{ec=c[g>>2]|0;break}}}while(0);_=(ec|0)==0;do{if((cc|0)==0){fc=dc;ba=55}else{if((c[cc+12>>2]|0)!=(c[cc+16>>2]|0)){if(_){gc=cc;hc=dc;break}else{oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break f}}if((Fc[c[(c[cc>>2]|0)+36>>2]&255](cc)|0)==-1){c[e>>2]=0;fc=0;ba=55;break}else{if(_^(dc|0)==0){gc=dc;hc=dc;break}else{oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break f}}}}while(0);if((ba|0)==55){ba=0;if(_){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break f}else{gc=0;hc=fc}}aa=c[g>>2]|0;ob=c[aa+12>>2]|0;if((ob|0)==(c[aa+16>>2]|0)){ic=(Fc[c[(c[aa>>2]|0)+36>>2]&255](aa)|0)&255}else{ic=a[ob]|0}if(!(ic<<24>>24>-1)){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break f}if((b[(c[s>>2]|0)+(ic<<24>>24<<1)>>1]&8192)==0){oa=Z;pa=C;qa=Y;ra=X;sa=p;ta=W;break f}ob=c[g>>2]|0;aa=ob+12|0;wa=c[aa>>2]|0;if((wa|0)==(c[ob+16>>2]|0)){jc=(Fc[c[(c[ob>>2]|0)+40>>2]&255](ob)|0)&255}else{c[aa>>2]=wa+1;jc=a[wa]|0}wm(z,jc);cc=gc;dc=hc}}}while(0);Aa=r+1|0;if(Aa>>>0<4>>>0){W=ta;p=sa;X=ra;Y=qa;C=pa;r=Aa;Z=oa}else{da=sa;ea=ra;fa=qa;ga=oa;ba=310;break}}g:do{if((ba|0)==41){c[k>>2]=c[k>>2]|4;kc=0;lc=X;mc=p}else if((ba|0)==136){c[k>>2]=c[k>>2]|4;kc=0;lc=X;mc=p}else if((ba|0)==189){c[k>>2]=c[k>>2]|4;kc=0;lc=X;mc=p}else if((ba|0)==264){c[k>>2]=c[k>>2]|4;kc=0;lc=Gb;mc=Hb}else if((ba|0)==288){c[k>>2]=c[k>>2]|4;kc=0;lc=Gb;mc=Hb}else if((ba|0)==308){c[k>>2]=c[k>>2]|4;kc=0;lc=Gb;mc=Hb}else if((ba|0)==310){h:do{if((ga|0)!=0){oa=ga;qa=ga+1|0;ra=ga+8|0;sa=ga+4|0;Z=1;i:while(1){r=a[oa]|0;if((r&1)==0){nc=(r&255)>>>1}else{nc=c[sa>>2]|0}if(!(Z>>>0<nc>>>0)){break h}r=c[g>>2]|0;do{if((r|0)==0){oc=0}else{if((c[r+12>>2]|0)!=(c[r+16>>2]|0)){oc=r;break}if((Fc[c[(c[r>>2]|0)+36>>2]&255](r)|0)==-1){c[g>>2]=0;oc=0;break}else{oc=c[g>>2]|0;break}}}while(0);r=(oc|0)==0;_=c[e>>2]|0;do{if((_|0)==0){ba=328}else{if((c[_+12>>2]|0)!=(c[_+16>>2]|0)){if(r){break}else{break i}}if((Fc[c[(c[_>>2]|0)+36>>2]&255](_)|0)==-1){c[e>>2]=0;ba=328;break}else{if(r){break}else{break i}}}}while(0);if((ba|0)==328){ba=0;if(r){break}}_=c[g>>2]|0;pa=c[_+12>>2]|0;if((pa|0)==(c[_+16>>2]|0)){pc=(Fc[c[(c[_>>2]|0)+36>>2]&255](_)|0)&255}else{pc=a[pa]|0}if((a[oa]&1)==0){qc=qa}else{qc=c[ra>>2]|0}if(!(pc<<24>>24==(a[qc+Z|0]|0))){break}pa=Z+1|0;_=c[g>>2]|0;C=_+12|0;Y=c[C>>2]|0;if((Y|0)==(c[_+16>>2]|0)){Fc[c[(c[_>>2]|0)+40>>2]&255](_)|0;Z=pa;continue}else{c[C>>2]=Y+1;Z=pa;continue}}c[k>>2]=c[k>>2]|4;kc=0;lc=ea;mc=da;break g}}while(0);if((ea|0)==(fa|0)){kc=1;lc=fa;mc=da;break}c[B>>2]=0;hr(v,ea,fa,B);if((c[B>>2]|0)==0){kc=1;lc=ea;mc=da;break}c[k>>2]=c[k>>2]|4;kc=0;lc=ea;mc=da}}while(0);rm(z);rm(y);rm(x);rm(w);rm(v);if((lc|0)==0){rc=400;sc=0;i=q;return kc|0}Dc[mc&511](lc);rc=400;sc=0;i=q;return kc|0}function dr(a){a=a|0;var b=0;b=pc(8)|0;_l(b,a);Fb(b|0,25560,30)}function er(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=i;i=i+160|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d|0;m=d+16|0;n=d+120|0;o=d+128|0;p=d+136|0;q=d+144|0;r=d+152|0;s=n|0;c[s>>2]=m;t=n+4|0;c[t>>2]=194;u=m+100|0;Lm(p,h);m=p|0;v=c[m>>2]|0;if(!((c[8716]|0)==-1)){c[l>>2]=34864;c[l+4>>2]=16;c[l+8>>2]=0;mm(34864,l,114)}l=(c[8717]|0)-1|0;w=c[v+8>>2]|0;do{if((c[v+12>>2]|0)-w>>2>>>0>l>>>0){x=c[w+(l<<2)>>2]|0;if((x|0)==0){break}y=x;a[q]=0;z=f|0;A=c[z>>2]|0;c[r>>2]=A;if(cr(e,r,g,p,c[h+4>>2]|0,j,q,y,n,o,u)|0){B=k;if((a[B]&1)==0){a[k+1|0]=0;a[B]=0}else{a[c[k+8>>2]|0]=0;c[k+4>>2]=0}B=x;if((a[q]|0)!=0){wm(k,Qc[c[(c[B>>2]|0)+28>>2]&63](y,45)|0)}x=Qc[c[(c[B>>2]|0)+28>>2]&63](y,48)|0;y=c[s>>2]|0;B=c[o>>2]|0;C=B-1|0;a:do{if(y>>>0<C>>>0){D=y;while(1){E=D+1|0;if(!((a[D]|0)==x<<24>>24)){F=D;break a}if(E>>>0<C>>>0){D=E}else{F=E;break}}}else{F=y}}while(0);fr(k,F,B)|0}y=e|0;C=c[y>>2]|0;do{if((C|0)==0){G=0}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){G=C;break}if(!((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1)){G=C;break}c[y>>2]=0;G=0}}while(0);y=(G|0)==0;do{if((A|0)==0){H=33}else{if((c[A+12>>2]|0)!=(c[A+16>>2]|0)){if(y){break}else{H=35;break}}if((Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0)==-1){c[z>>2]=0;H=33;break}else{if(y^(A|0)==0){break}else{H=35;break}}}}while(0);if((H|0)==33){if(y){H=35}}if((H|0)==35){c[j>>2]=c[j>>2]|2}c[b>>2]=G;Ul(c[m>>2]|0)|0;A=c[s>>2]|0;c[s>>2]=0;if((A|0)==0){I=100;J=0;i=d;return}Dc[c[t>>2]&511](A);I=100;J=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function fr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=b;g=d;h=a[f]|0;if((h&1)==0){i=10;j=h;k=(h&255)>>>1}else{h=c[b>>2]|0;i=(h&-2)-1|0;j=h&255;k=c[b+4>>2]|0}h=e-g|0;if((e|0)==(d|0)){return b|0}if((i-k|0)>>>0<h>>>0){zm(b,i,k+h-i|0,k,k,0,0);l=a[f]|0}else{l=j}if((l&1)==0){m=b+1|0}else{m=c[b+8>>2]|0}l=e+(k-g)|0;g=d;d=m+k|0;while(1){a[d]=a[g]|0;j=g+1|0;if((j|0)==(e|0)){break}else{g=j;d=d+1|0}}a[m+l|0]=0;l=k+h|0;if((a[f]&1)==0){a[f]=l<<1;return b|0}else{c[b+4>>2]=l;return b|0}return 0}function gr(b,d,e,f,g,h,j,k,l,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0;n=i;i=i+176|0;o=n|0;p=n+16|0;q=n+32|0;r=n+40|0;s=n+56|0;t=n+72|0;u=n+88|0;v=n+104|0;w=n+112|0;x=n+128|0;y=n+144|0;z=n+160|0;if(b){b=c[d>>2]|0;if(!((c[8834]|0)==-1)){c[p>>2]=35336;c[p+4>>2]=16;c[p+8>>2]=0;mm(35336,p,114)}p=(c[8835]|0)-1|0;A=c[b+8>>2]|0;if(!((c[b+12>>2]|0)-A>>2>>>0>p>>>0)){B=pc(4)|0;D=B;lu(D);Fb(B|0,25544,156)}b=c[A+(p<<2)>>2]|0;if((b|0)==0){B=pc(4)|0;D=B;lu(D);Fb(B|0,25544,156)}B=b;Ec[c[(c[b>>2]|0)+44>>2]&127](q,B);D=e;C=c[q>>2]|0;a[D]=C;C=C>>8;a[D+1|0]=C;C=C>>8;a[D+2|0]=C;C=C>>8;a[D+3|0]=C;D=b;Ec[c[(c[D>>2]|0)+32>>2]&127](r,B);q=l;if((a[q]&1)==0){a[l+1|0]=0;a[q]=0}else{a[c[l+8>>2]|0]=0;c[l+4>>2]=0}vm(l,0);p=r;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[q+8>>2]=c[p+8>>2];dv(p|0,0,12)|0;rm(r);Ec[c[(c[D>>2]|0)+28>>2]&127](s,B);r=k;if((a[r]&1)==0){a[k+1|0]=0;a[r]=0}else{a[c[k+8>>2]|0]=0;c[k+4>>2]=0}vm(k,0);p=s;c[r>>2]=c[p>>2];c[r+4>>2]=c[p+4>>2];c[r+8>>2]=c[p+8>>2];dv(p|0,0,12)|0;rm(s);s=b;p=Fc[c[(c[s>>2]|0)+12>>2]&255](B)|0;a[f]=p;p=Fc[c[(c[s>>2]|0)+16>>2]&255](B)|0;a[g]=p;Ec[c[(c[D>>2]|0)+20>>2]&127](t,B);p=h;if((a[p]&1)==0){a[h+1|0]=0;a[p]=0}else{a[c[h+8>>2]|0]=0;c[h+4>>2]=0}vm(h,0);s=t;c[p>>2]=c[s>>2];c[p+4>>2]=c[s+4>>2];c[p+8>>2]=c[s+8>>2];dv(s|0,0,12)|0;rm(t);Ec[c[(c[D>>2]|0)+24>>2]&127](u,B);D=j;if((a[D]&1)==0){a[j+1|0]=0;a[D]=0}else{a[c[j+8>>2]|0]=0;c[j+4>>2]=0}vm(j,0);t=u;c[D>>2]=c[t>>2];c[D+4>>2]=c[t+4>>2];c[D+8>>2]=c[t+8>>2];dv(t|0,0,12)|0;rm(u);E=Fc[c[(c[b>>2]|0)+36>>2]&255](B)|0;c[m>>2]=E;i=n;return}else{B=c[d>>2]|0;if(!((c[8836]|0)==-1)){c[o>>2]=35344;c[o+4>>2]=16;c[o+8>>2]=0;mm(35344,o,114)}o=(c[8837]|0)-1|0;d=c[B+8>>2]|0;if(!((c[B+12>>2]|0)-d>>2>>>0>o>>>0)){F=pc(4)|0;G=F;lu(G);Fb(F|0,25544,156)}B=c[d+(o<<2)>>2]|0;if((B|0)==0){F=pc(4)|0;G=F;lu(G);Fb(F|0,25544,156)}F=B;Ec[c[(c[B>>2]|0)+44>>2]&127](v,F);G=e;C=c[v>>2]|0;a[G]=C;C=C>>8;a[G+1|0]=C;C=C>>8;a[G+2|0]=C;C=C>>8;a[G+3|0]=C;G=B;Ec[c[(c[G>>2]|0)+32>>2]&127](w,F);v=l;if((a[v]&1)==0){a[l+1|0]=0;a[v]=0}else{a[c[l+8>>2]|0]=0;c[l+4>>2]=0}vm(l,0);l=w;c[v>>2]=c[l>>2];c[v+4>>2]=c[l+4>>2];c[v+8>>2]=c[l+8>>2];dv(l|0,0,12)|0;rm(w);Ec[c[(c[G>>2]|0)+28>>2]&127](x,F);w=k;if((a[w]&1)==0){a[k+1|0]=0;a[w]=0}else{a[c[k+8>>2]|0]=0;c[k+4>>2]=0}vm(k,0);k=x;c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];c[w+8>>2]=c[k+8>>2];dv(k|0,0,12)|0;rm(x);x=B;k=Fc[c[(c[x>>2]|0)+12>>2]&255](F)|0;a[f]=k;k=Fc[c[(c[x>>2]|0)+16>>2]&255](F)|0;a[g]=k;Ec[c[(c[G>>2]|0)+20>>2]&127](y,F);k=h;if((a[k]&1)==0){a[h+1|0]=0;a[k]=0}else{a[c[h+8>>2]|0]=0;c[h+4>>2]=0}vm(h,0);h=y;c[k>>2]=c[h>>2];c[k+4>>2]=c[h+4>>2];c[k+8>>2]=c[h+8>>2];dv(h|0,0,12)|0;rm(y);Ec[c[(c[G>>2]|0)+24>>2]&127](z,F);G=j;if((a[G]&1)==0){a[j+1|0]=0;a[G]=0}else{a[c[j+8>>2]|0]=0;c[j+4>>2]=0}vm(j,0);j=z;c[G>>2]=c[j>>2];c[G+4>>2]=c[j+4>>2];c[G+8>>2]=c[j+8>>2];dv(j|0,0,12)|0;rm(z);E=Fc[c[(c[B>>2]|0)+36>>2]&255](F)|0;c[m>>2]=E;i=n;return}}function hr(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=b;h=a[g]|0;if((h&1)==0){i=(h&255)>>>1}else{i=c[b+4>>2]|0}if((i|0)==0){return}do{if((d|0)==(e|0)){j=h}else{i=e-4|0;if(i>>>0>d>>>0){k=d;l=i}else{j=h;break}do{i=c[k>>2]|0;c[k>>2]=c[l>>2];c[l>>2]=i;k=k+4|0;l=l-4|0;}while(k>>>0<l>>>0);j=a[g]|0}}while(0);if((j&1)==0){m=(j&255)>>>1;n=b+1|0}else{m=c[b+4>>2]|0;n=c[b+8>>2]|0}b=e-4|0;e=a[n]|0;j=e<<24>>24<1|e<<24>>24==127;a:do{if(b>>>0>d>>>0){g=n+m|0;l=n;k=d;h=e;i=j;while(1){if(!i){if((h<<24>>24|0)!=(c[k>>2]|0)){break}}o=(g-l|0)>1?l+1|0:l;p=k+4|0;q=a[o]|0;r=q<<24>>24<1|q<<24>>24==127;if(p>>>0<b>>>0){l=o;k=p;h=q;i=r}else{s=q;t=r;break a}}c[f>>2]=4;return}else{s=e;t=j}}while(0);if(t){return}t=c[b>>2]|0;if(!(s<<24>>24>>>0<t>>>0|(t|0)==0)){return}c[f>>2]=4;return}function ir(a){a=a|0;Sl(a|0);Pu(a);return}function jr(a){a=a|0;Sl(a|0);return}function kr(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;d=i;i=i+600|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d|0;m=d+16|0;n=d+416|0;o=d+424|0;p=d+432|0;q=d+440|0;r=d+448|0;s=d+456|0;t=d+496|0;u=n|0;c[u>>2]=m;v=n+4|0;c[v>>2]=194;w=m+400|0;Lm(p,h);m=p|0;x=c[m>>2]|0;if(!((c[8714]|0)==-1)){c[l>>2]=34856;c[l+4>>2]=16;c[l+8>>2]=0;mm(34856,l,114)}l=(c[8715]|0)-1|0;y=c[x+8>>2]|0;do{if((c[x+12>>2]|0)-y>>2>>>0>l>>>0){z=c[y+(l<<2)>>2]|0;if((z|0)==0){break}A=z;a[q]=0;B=f|0;c[r>>2]=c[B>>2];do{if(lr(e,r,g,p,c[h+4>>2]|0,j,q,A,n,o,w)|0){C=s|0;Sc[c[(c[z>>2]|0)+48>>2]&15](A,19144,19154,C)|0;D=t|0;E=c[o>>2]|0;F=c[u>>2]|0;G=E-F|0;do{if((G|0)>392){H=Gu((G>>2)+2|0)|0;if((H|0)!=0){I=H;J=H;break}Uu();I=0;J=0}else{I=D;J=0}}while(0);if((a[q]|0)==0){K=I}else{a[I]=45;K=I+1|0}if(F>>>0<E>>>0){G=s+40|0;H=s;L=K;M=F;while(1){N=c[M>>2]|0;O=C;while(1){P=O+4|0;if((c[O>>2]|0)==(N|0)){Q=O;break}if((P|0)==(G|0)){Q=G;break}else{O=P}}a[L]=a[19144+(Q-H>>2)|0]|0;O=M+4|0;N=L+1|0;if(O>>>0<(c[o>>2]|0)>>>0){L=N;M=O}else{R=N;break}}}else{R=K}a[R]=0;M=dc(D|0,15784,(L=i,i=i+8|0,c[L>>2]=k,L)|0)|0;i=L;if((M|0)==1){if((J|0)==0){break}Hu(J);break}M=pc(8)|0;_l(M,15400);Fb(M|0,25560,30)}}while(0);A=e|0;z=c[A>>2]|0;do{if((z|0)==0){S=1}else{M=c[z+12>>2]|0;if((M|0)==(c[z+16>>2]|0)){T=Fc[c[(c[z>>2]|0)+36>>2]&255](z)|0}else{T=c[M>>2]|0}if((T|0)==-1){c[A>>2]=0;S=1;break}else{S=(c[A>>2]|0)==0;break}}}while(0);z=c[B>>2]|0;do{if((z|0)==0){U=47}else{M=c[z+12>>2]|0;if((M|0)==(c[z+16>>2]|0)){V=Fc[c[(c[z>>2]|0)+36>>2]&255](z)|0}else{V=c[M>>2]|0}if((V|0)==-1){c[B>>2]=0;U=47;break}else{if(S){break}else{U=49;break}}}}while(0);if((U|0)==47){if(S){U=49}}if((U|0)==49){c[j>>2]=c[j>>2]|2}c[b>>2]=c[A>>2];Ul(c[m>>2]|0)|0;B=c[u>>2]|0;c[u>>2]=0;if((B|0)==0){W=400;X=0;i=d;return}Dc[c[v>>2]&511](B);W=400;X=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function lr(b,e,f,g,h,j,k,l,m,n,o){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0;p=i;i=i+416|0;q=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[q>>2];q=p|0;r=p+8|0;s=p+408|0;t=i;i=i+4|0;i=i+7&-8;u=i;i=i+4|0;i=i+7&-8;v=i;i=i+12|0;i=i+7&-8;w=i;i=i+12|0;i=i+7&-8;x=i;i=i+12|0;i=i+7&-8;y=i;i=i+12|0;i=i+7&-8;z=i;i=i+12|0;i=i+7&-8;A=i;i=i+4|0;i=i+7&-8;B=i;i=i+4|0;i=i+7&-8;c[q>>2]=o;o=r|0;c[s>>2]=0;C=v;dv(C|0,0,12)|0;D=w;dv(D|0,0,12)|0;E=x;dv(E|0,0,12)|0;F=y;dv(F|0,0,12)|0;G=z;dv(G|0,0,12)|0;or(f,g,s,t,u,v,w,x,y,A);g=m|0;c[n>>2]=c[g>>2];f=b|0;b=e|0;e=s;s=l;H=y+4|0;I=y+8|0;J=x+4|0;K=x+8|0;L=(h&512|0)!=0;h=w+4|0;M=w+8|0;N=z+4|0;O=z+8|0;P=e+3|0;Q=v+4|0;R=194;S=o;T=o;o=r+400|0;r=0;U=0;a:while(1){V=c[f>>2]|0;do{if((V|0)==0){W=1}else{X=c[V+12>>2]|0;if((X|0)==(c[V+16>>2]|0)){Y=Fc[c[(c[V>>2]|0)+36>>2]&255](V)|0}else{Y=c[X>>2]|0}if((Y|0)==-1){c[f>>2]=0;W=1;break}else{W=(c[f>>2]|0)==0;break}}}while(0);V=c[b>>2]|0;do{if((V|0)==0){Z=16}else{X=c[V+12>>2]|0;if((X|0)==(c[V+16>>2]|0)){_=Fc[c[(c[V>>2]|0)+36>>2]&255](V)|0}else{_=c[X>>2]|0}if((_|0)==-1){c[b>>2]=0;Z=16;break}else{if(W){$=V;break}else{aa=R;ba=S;ca=T;da=U;Z=302;break a}}}}while(0);if((Z|0)==16){Z=0;if(W){aa=R;ba=S;ca=T;da=U;Z=302;break}else{$=0}}b:do{switch(a[e+r|0]|0){case 4:{V=0;X=o;ea=T;fa=S;ga=R;c:while(1){ha=c[f>>2]|0;do{if((ha|0)==0){ia=1}else{ja=c[ha+12>>2]|0;if((ja|0)==(c[ha+16>>2]|0)){ka=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{ka=c[ja>>2]|0}if((ka|0)==-1){c[f>>2]=0;ia=1;break}else{ia=(c[f>>2]|0)==0;break}}}while(0);ha=c[b>>2]|0;do{if((ha|0)==0){Z=207}else{ja=c[ha+12>>2]|0;if((ja|0)==(c[ha+16>>2]|0)){la=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{la=c[ja>>2]|0}if((la|0)==-1){c[b>>2]=0;Z=207;break}else{if(ia){break}else{break c}}}}while(0);if((Z|0)==207){Z=0;if(ia){break}}ha=c[f>>2]|0;ja=c[ha+12>>2]|0;if((ja|0)==(c[ha+16>>2]|0)){ma=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{ma=c[ja>>2]|0}if(Hc[c[(c[s>>2]|0)+12>>2]&63](l,2048,ma)|0){ja=c[n>>2]|0;if((ja|0)==(c[q>>2]|0)){pr(m,n,q);na=c[n>>2]|0}else{na=ja}c[n>>2]=na+4;c[na>>2]=ma;oa=V+1|0;pa=X;qa=ea;ra=fa;sa=ga}else{ja=a[C]|0;if((ja&1)==0){ta=(ja&255)>>>1}else{ta=c[Q>>2]|0}if((ta|0)==0|(V|0)==0){break}if((ma|0)!=(c[u>>2]|0)){break}if((ea|0)==(X|0)){ja=(ga|0)!=194;ha=ea-fa|0;ua=ha>>>0<2147483647>>>0?ha<<1:-1;if(ja){va=fa}else{va=0}ja=Iu(va,ua)|0;wa=ja;if((ja|0)==0){Uu()}xa=wa+(ua>>>2<<2)|0;ya=wa+(ha>>2<<2)|0;za=wa;Aa=88}else{xa=X;ya=ea;za=fa;Aa=ga}c[ya>>2]=V;oa=0;pa=xa;qa=ya+4|0;ra=za;sa=Aa}wa=c[f>>2]|0;ha=wa+12|0;ua=c[ha>>2]|0;if((ua|0)==(c[wa+16>>2]|0)){Fc[c[(c[wa>>2]|0)+40>>2]&255](wa)|0;V=oa;X=pa;ea=qa;fa=ra;ga=sa;continue}else{c[ha>>2]=ua+4;V=oa;X=pa;ea=qa;fa=ra;ga=sa;continue}}if((fa|0)==(ea|0)|(V|0)==0){Ba=X;Ca=ea;Da=fa;Ea=ga}else{if((ea|0)==(X|0)){ua=(ga|0)!=194;ha=ea-fa|0;wa=ha>>>0<2147483647>>>0?ha<<1:-1;if(ua){Fa=fa}else{Fa=0}ua=Iu(Fa,wa)|0;ja=ua;if((ua|0)==0){Uu()}Ga=ja+(wa>>>2<<2)|0;Ha=ja+(ha>>2<<2)|0;Ia=ja;Ja=88}else{Ga=X;Ha=ea;Ia=fa;Ja=ga}c[Ha>>2]=V;Ba=Ga;Ca=Ha+4|0;Da=Ia;Ea=Ja}ja=c[A>>2]|0;if((ja|0)>0){ha=c[f>>2]|0;do{if((ha|0)==0){Ka=1}else{wa=c[ha+12>>2]|0;if((wa|0)==(c[ha+16>>2]|0)){La=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{La=c[wa>>2]|0}if((La|0)==-1){c[f>>2]=0;Ka=1;break}else{Ka=(c[f>>2]|0)==0;break}}}while(0);ha=c[b>>2]|0;do{if((ha|0)==0){Z=259}else{V=c[ha+12>>2]|0;if((V|0)==(c[ha+16>>2]|0)){Ma=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{Ma=c[V>>2]|0}if((Ma|0)==-1){c[b>>2]=0;Z=259;break}else{if(Ka){Na=ha;break}else{Z=265;break a}}}}while(0);if((Z|0)==259){Z=0;if(Ka){Z=265;break a}else{Na=0}}ha=c[f>>2]|0;V=c[ha+12>>2]|0;if((V|0)==(c[ha+16>>2]|0)){Oa=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{Oa=c[V>>2]|0}if((Oa|0)!=(c[t>>2]|0)){Z=265;break a}V=c[f>>2]|0;ha=V+12|0;ga=c[ha>>2]|0;if((ga|0)==(c[V+16>>2]|0)){Fc[c[(c[V>>2]|0)+40>>2]&255](V)|0;Pa=Na;Qa=ja;Ra=Na}else{c[ha>>2]=ga+4;Pa=Na;Qa=ja;Ra=Na}while(1){ga=c[f>>2]|0;do{if((ga|0)==0){Sa=1}else{ha=c[ga+12>>2]|0;if((ha|0)==(c[ga+16>>2]|0)){Ta=Fc[c[(c[ga>>2]|0)+36>>2]&255](ga)|0}else{Ta=c[ha>>2]|0}if((Ta|0)==-1){c[f>>2]=0;Sa=1;break}else{Sa=(c[f>>2]|0)==0;break}}}while(0);do{if((Pa|0)==0){Ua=Ra;Z=282}else{ga=c[Pa+12>>2]|0;if((ga|0)==(c[Pa+16>>2]|0)){Va=Fc[c[(c[Pa>>2]|0)+36>>2]&255](Pa)|0}else{Va=c[ga>>2]|0}if((Va|0)==-1){c[b>>2]=0;Ua=0;Z=282;break}else{if(Sa^(Ra|0)==0){Wa=Ra;Xa=Ra;break}else{Z=289;break a}}}}while(0);if((Z|0)==282){Z=0;if(Sa){Z=289;break a}else{Wa=Ua;Xa=0}}ga=c[f>>2]|0;ha=c[ga+12>>2]|0;if((ha|0)==(c[ga+16>>2]|0)){Ya=Fc[c[(c[ga>>2]|0)+36>>2]&255](ga)|0}else{Ya=c[ha>>2]|0}if(!(Hc[c[(c[s>>2]|0)+12>>2]&63](l,2048,Ya)|0)){Z=289;break a}if((c[n>>2]|0)==(c[q>>2]|0)){pr(m,n,q)}ha=c[f>>2]|0;ga=c[ha+12>>2]|0;if((ga|0)==(c[ha+16>>2]|0)){Za=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{Za=c[ga>>2]|0}ga=c[n>>2]|0;c[n>>2]=ga+4;c[ga>>2]=Za;ga=Qa-1|0;c[A>>2]=ga;ha=c[f>>2]|0;V=ha+12|0;fa=c[V>>2]|0;if((fa|0)==(c[ha+16>>2]|0)){Fc[c[(c[ha>>2]|0)+40>>2]&255](ha)|0}else{c[V>>2]=fa+4}if((ga|0)>0){Pa=Xa;Qa=ga;Ra=Wa}else{break}}}if((c[n>>2]|0)==(c[g>>2]|0)){Z=300;break a}else{_a=U;$a=Ba;ab=Ca;bb=Da;cb=Ea}break};case 1:{if((r|0)==3){aa=R;ba=S;ca=T;da=U;Z=302;break a}ja=c[f>>2]|0;ga=c[ja+12>>2]|0;if((ga|0)==(c[ja+16>>2]|0)){db=Fc[c[(c[ja>>2]|0)+36>>2]&255](ja)|0}else{db=c[ga>>2]|0}if(!(Hc[c[(c[s>>2]|0)+12>>2]&63](l,8192,db)|0)){Z=41;break a}ga=c[f>>2]|0;ja=ga+12|0;fa=c[ja>>2]|0;if((fa|0)==(c[ga+16>>2]|0)){eb=Fc[c[(c[ga>>2]|0)+40>>2]&255](ga)|0}else{c[ja>>2]=fa+4;eb=c[fa>>2]|0}Gm(z,eb);Z=42;break};case 0:{Z=42;break};case 3:{fa=a[E]|0;ja=(fa&1)==0;if(ja){fb=(fa&255)>>>1}else{fb=c[J>>2]|0}ga=a[F]|0;V=(ga&1)==0;if(V){gb=(ga&255)>>>1}else{gb=c[H>>2]|0}if((fb|0)==(-gb|0)){_a=U;$a=o;ab=T;bb=S;cb=R;break b}if(ja){hb=(fa&255)>>>1}else{hb=c[J>>2]|0}do{if((hb|0)!=0){if(V){ib=(ga&255)>>>1}else{ib=c[H>>2]|0}if((ib|0)==0){break}ha=c[f>>2]|0;ea=c[ha+12>>2]|0;if((ea|0)==(c[ha+16>>2]|0)){X=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0;jb=X;kb=a[E]|0}else{jb=c[ea>>2]|0;kb=fa}ea=c[f>>2]|0;X=ea+12|0;ha=c[X>>2]|0;wa=(ha|0)==(c[ea+16>>2]|0);if((jb|0)==(c[((kb&1)==0?J:c[K>>2]|0)>>2]|0)){if(wa){Fc[c[(c[ea>>2]|0)+40>>2]&255](ea)|0}else{c[X>>2]=ha+4}X=a[E]|0;if((X&1)==0){lb=(X&255)>>>1}else{lb=c[J>>2]|0}_a=lb>>>0>1>>>0?x:U;$a=o;ab=T;bb=S;cb=R;break b}if(wa){mb=Fc[c[(c[ea>>2]|0)+36>>2]&255](ea)|0}else{mb=c[ha>>2]|0}if((mb|0)!=(c[((a[F]&1)==0?H:c[I>>2]|0)>>2]|0)){Z=134;break a}ha=c[f>>2]|0;ea=ha+12|0;wa=c[ea>>2]|0;if((wa|0)==(c[ha+16>>2]|0)){Fc[c[(c[ha>>2]|0)+40>>2]&255](ha)|0}else{c[ea>>2]=wa+4}a[k]=1;wa=a[F]|0;if((wa&1)==0){nb=(wa&255)>>>1}else{nb=c[H>>2]|0}_a=nb>>>0>1>>>0?y:U;$a=o;ab=T;bb=S;cb=R;break b}}while(0);if(ja){ob=(fa&255)>>>1}else{ob=c[J>>2]|0}V=c[f>>2]|0;wa=c[V+12>>2]|0;ea=(wa|0)==(c[V+16>>2]|0);if((ob|0)==0){if(ea){ha=Fc[c[(c[V>>2]|0)+36>>2]&255](V)|0;pb=ha;qb=a[F]|0}else{pb=c[wa>>2]|0;qb=ga}if((pb|0)!=(c[((qb&1)==0?H:c[I>>2]|0)>>2]|0)){_a=U;$a=o;ab=T;bb=S;cb=R;break b}ha=c[f>>2]|0;X=ha+12|0;ua=c[X>>2]|0;if((ua|0)==(c[ha+16>>2]|0)){Fc[c[(c[ha>>2]|0)+40>>2]&255](ha)|0}else{c[X>>2]=ua+4}a[k]=1;ua=a[F]|0;if((ua&1)==0){rb=(ua&255)>>>1}else{rb=c[H>>2]|0}_a=rb>>>0>1>>>0?y:U;$a=o;ab=T;bb=S;cb=R;break b}if(ea){ea=Fc[c[(c[V>>2]|0)+36>>2]&255](V)|0;sb=ea;tb=a[E]|0}else{sb=c[wa>>2]|0;tb=fa}if((sb|0)!=(c[((tb&1)==0?J:c[K>>2]|0)>>2]|0)){a[k]=1;_a=U;$a=o;ab=T;bb=S;cb=R;break b}wa=c[f>>2]|0;ea=wa+12|0;V=c[ea>>2]|0;if((V|0)==(c[wa+16>>2]|0)){Fc[c[(c[wa>>2]|0)+40>>2]&255](wa)|0}else{c[ea>>2]=V+4}V=a[E]|0;if((V&1)==0){ub=(V&255)>>>1}else{ub=c[J>>2]|0}_a=ub>>>0>1>>>0?x:U;$a=o;ab=T;bb=S;cb=R;break};case 2:{if(!((U|0)!=0|r>>>0<2>>>0)){if((r|0)==2){vb=(a[P]|0)!=0}else{vb=0}if(!(L|vb)){_a=0;$a=o;ab=T;bb=S;cb=R;break b}}V=a[D]|0;ea=(V&1)==0?h:c[M>>2]|0;d:do{if((r|0)==0){wb=ea;xb=V;yb=$;zb=$}else{if((d[e+(r-1)|0]|0)>>>0<2>>>0){Ab=ea;Bb=V}else{wb=ea;xb=V;yb=$;zb=$;break}while(1){if((Bb&1)==0){Cb=(Bb&255)>>>1;Db=h}else{Cb=c[h>>2]|0;Db=c[M>>2]|0}if((Ab|0)==(Db+(Cb<<2)|0)){Eb=Bb;break}if(!(Hc[c[(c[s>>2]|0)+12>>2]&63](l,8192,c[Ab>>2]|0)|0)){Z=148;break}Ab=Ab+4|0;Bb=a[D]|0}if((Z|0)==148){Z=0;Eb=a[D]|0}wa=(Eb&1)==0;ua=Ab-(wa?h:c[M>>2]|0)>>2;X=a[G]|0;ha=(X&1)==0;if(ha){Fb=(X&255)>>>1}else{Fb=c[N>>2]|0}e:do{if(!(ua>>>0>Fb>>>0)){if(ha){Gb=(X&255)>>>1;Hb=N;Ib=N+(((X&255)>>>1)-ua<<2)|0}else{Jb=c[O>>2]|0;Kb=c[N>>2]|0;Gb=Kb;Hb=Jb;Ib=Jb+(Kb-ua<<2)|0}Kb=Hb+(Gb<<2)|0;if((Ib|0)==(Kb|0)){wb=Ab;xb=Eb;yb=$;zb=$;break d}else{Lb=Ib;Mb=wa?h:c[M>>2]|0}while(1){if((c[Lb>>2]|0)!=(c[Mb>>2]|0)){break e}Jb=Lb+4|0;if((Jb|0)==(Kb|0)){wb=Ab;xb=Eb;yb=$;zb=$;break d}Lb=Jb;Mb=Mb+4|0}}}while(0);wb=wa?h:c[M>>2]|0;xb=Eb;yb=$;zb=$}}while(0);f:while(1){if((xb&1)==0){Nb=(xb&255)>>>1;Ob=h}else{Nb=c[h>>2]|0;Ob=c[M>>2]|0}if((wb|0)==(Ob+(Nb<<2)|0)){break}V=c[f>>2]|0;do{if((V|0)==0){Pb=1}else{ea=c[V+12>>2]|0;if((ea|0)==(c[V+16>>2]|0)){Qb=Fc[c[(c[V>>2]|0)+36>>2]&255](V)|0}else{Qb=c[ea>>2]|0}if((Qb|0)==-1){c[f>>2]=0;Pb=1;break}else{Pb=(c[f>>2]|0)==0;break}}}while(0);do{if((yb|0)==0){Rb=zb;Z=178}else{V=c[yb+12>>2]|0;if((V|0)==(c[yb+16>>2]|0)){Sb=Fc[c[(c[yb>>2]|0)+36>>2]&255](yb)|0}else{Sb=c[V>>2]|0}if((Sb|0)==-1){c[b>>2]=0;Rb=0;Z=178;break}else{if(Pb^(zb|0)==0){Tb=zb;Ub=zb;break}else{break f}}}}while(0);if((Z|0)==178){Z=0;if(Pb){break}else{Tb=0;Ub=Rb}}V=c[f>>2]|0;wa=c[V+12>>2]|0;if((wa|0)==(c[V+16>>2]|0)){Vb=Fc[c[(c[V>>2]|0)+36>>2]&255](V)|0}else{Vb=c[wa>>2]|0}if((Vb|0)!=(c[wb>>2]|0)){break}wa=c[f>>2]|0;V=wa+12|0;ea=c[V>>2]|0;if((ea|0)==(c[wa+16>>2]|0)){Fc[c[(c[wa>>2]|0)+40>>2]&255](wa)|0}else{c[V>>2]=ea+4}wb=wb+4|0;xb=a[D]|0;yb=Tb;zb=Ub}if(!L){_a=U;$a=o;ab=T;bb=S;cb=R;break b}ea=a[D]|0;if((ea&1)==0){Wb=(ea&255)>>>1;Xb=h}else{Wb=c[h>>2]|0;Xb=c[M>>2]|0}if((wb|0)==(Xb+(Wb<<2)|0)){_a=U;$a=o;ab=T;bb=S;cb=R}else{Z=193;break a}break};default:{_a=U;$a=o;ab=T;bb=S;cb=R}}}while(0);g:do{if((Z|0)==42){Z=0;if((r|0)==3){aa=R;ba=S;ca=T;da=U;Z=302;break a}else{Yb=$;Zb=$}while(1){ea=c[f>>2]|0;do{if((ea|0)==0){_b=1}else{V=c[ea+12>>2]|0;if((V|0)==(c[ea+16>>2]|0)){$b=Fc[c[(c[ea>>2]|0)+36>>2]&255](ea)|0}else{$b=c[V>>2]|0}if(($b|0)==-1){c[f>>2]=0;_b=1;break}else{_b=(c[f>>2]|0)==0;break}}}while(0);do{if((Yb|0)==0){ac=Zb;Z=56}else{ea=c[Yb+12>>2]|0;if((ea|0)==(c[Yb+16>>2]|0)){bc=Fc[c[(c[Yb>>2]|0)+36>>2]&255](Yb)|0}else{bc=c[ea>>2]|0}if((bc|0)==-1){c[b>>2]=0;ac=0;Z=56;break}else{if(_b^(Zb|0)==0){cc=Zb;dc=Zb;break}else{_a=U;$a=o;ab=T;bb=S;cb=R;break g}}}}while(0);if((Z|0)==56){Z=0;if(_b){_a=U;$a=o;ab=T;bb=S;cb=R;break g}else{cc=0;dc=ac}}ea=c[f>>2]|0;V=c[ea+12>>2]|0;if((V|0)==(c[ea+16>>2]|0)){ec=Fc[c[(c[ea>>2]|0)+36>>2]&255](ea)|0}else{ec=c[V>>2]|0}if(!(Hc[c[(c[s>>2]|0)+12>>2]&63](l,8192,ec)|0)){_a=U;$a=o;ab=T;bb=S;cb=R;break g}V=c[f>>2]|0;ea=V+12|0;wa=c[ea>>2]|0;if((wa|0)==(c[V+16>>2]|0)){fc=Fc[c[(c[V>>2]|0)+40>>2]&255](V)|0}else{c[ea>>2]=wa+4;fc=c[wa>>2]|0}Gm(z,fc);Yb=cc;Zb=dc}}}while(0);wa=r+1|0;if(wa>>>0<4>>>0){R=cb;S=bb;T=ab;o=$a;r=wa;U=_a}else{aa=cb;ba=bb;ca=ab;da=_a;Z=302;break}}h:do{if((Z|0)==41){c[j>>2]=c[j>>2]|4;gc=0;hc=S;ic=R}else if((Z|0)==134){c[j>>2]=c[j>>2]|4;gc=0;hc=S;ic=R}else if((Z|0)==193){c[j>>2]=c[j>>2]|4;gc=0;hc=S;ic=R}else if((Z|0)==265){c[j>>2]=c[j>>2]|4;gc=0;hc=Da;ic=Ea}else if((Z|0)==289){c[j>>2]=c[j>>2]|4;gc=0;hc=Da;ic=Ea}else if((Z|0)==300){c[j>>2]=c[j>>2]|4;gc=0;hc=Da;ic=Ea}else if((Z|0)==302){i:do{if((da|0)!=0){_a=da;ab=da+4|0;bb=da+8|0;cb=1;j:while(1){U=a[_a]|0;if((U&1)==0){jc=(U&255)>>>1}else{jc=c[ab>>2]|0}if(!(cb>>>0<jc>>>0)){break i}U=c[f>>2]|0;do{if((U|0)==0){kc=1}else{r=c[U+12>>2]|0;if((r|0)==(c[U+16>>2]|0)){lc=Fc[c[(c[U>>2]|0)+36>>2]&255](U)|0}else{lc=c[r>>2]|0}if((lc|0)==-1){c[f>>2]=0;kc=1;break}else{kc=(c[f>>2]|0)==0;break}}}while(0);U=c[b>>2]|0;do{if((U|0)==0){Z=321}else{r=c[U+12>>2]|0;if((r|0)==(c[U+16>>2]|0)){mc=Fc[c[(c[U>>2]|0)+36>>2]&255](U)|0}else{mc=c[r>>2]|0}if((mc|0)==-1){c[b>>2]=0;Z=321;break}else{if(kc){break}else{break j}}}}while(0);if((Z|0)==321){Z=0;if(kc){break}}U=c[f>>2]|0;r=c[U+12>>2]|0;if((r|0)==(c[U+16>>2]|0)){nc=Fc[c[(c[U>>2]|0)+36>>2]&255](U)|0}else{nc=c[r>>2]|0}if((a[_a]&1)==0){oc=ab}else{oc=c[bb>>2]|0}if((nc|0)!=(c[oc+(cb<<2)>>2]|0)){break}r=cb+1|0;U=c[f>>2]|0;$a=U+12|0;o=c[$a>>2]|0;if((o|0)==(c[U+16>>2]|0)){Fc[c[(c[U>>2]|0)+40>>2]&255](U)|0;cb=r;continue}else{c[$a>>2]=o+4;cb=r;continue}}c[j>>2]=c[j>>2]|4;gc=0;hc=ba;ic=aa;break h}}while(0);if((ba|0)==(ca|0)){gc=1;hc=ca;ic=aa;break}c[B>>2]=0;hr(v,ba,ca,B);if((c[B>>2]|0)==0){gc=1;hc=ba;ic=aa;break}c[j>>2]=c[j>>2]|4;gc=0;hc=ba;ic=aa}}while(0);Cm(z);Cm(y);Cm(x);Cm(w);rm(v);if((hc|0)==0){pc=400;qc=0;i=p;return gc|0}Dc[ic&511](hc);pc=400;qc=0;i=p;return gc|0}function mr(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;d=i;i=i+456|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d|0;m=d+16|0;n=d+416|0;o=d+424|0;p=d+432|0;q=d+440|0;r=d+448|0;s=n|0;c[s>>2]=m;t=n+4|0;c[t>>2]=194;u=m+400|0;Lm(p,h);m=p|0;v=c[m>>2]|0;if(!((c[8714]|0)==-1)){c[l>>2]=34856;c[l+4>>2]=16;c[l+8>>2]=0;mm(34856,l,114)}l=(c[8715]|0)-1|0;w=c[v+8>>2]|0;do{if((c[v+12>>2]|0)-w>>2>>>0>l>>>0){x=c[w+(l<<2)>>2]|0;if((x|0)==0){break}y=x;a[q]=0;z=f|0;A=c[z>>2]|0;c[r>>2]=A;if(lr(e,r,g,p,c[h+4>>2]|0,j,q,y,n,o,u)|0){B=k;if((a[B]&1)==0){c[k+4>>2]=0;a[B]=0}else{c[c[k+8>>2]>>2]=0;c[k+4>>2]=0}B=x;if((a[q]|0)!=0){Gm(k,Qc[c[(c[B>>2]|0)+44>>2]&63](y,45)|0)}x=Qc[c[(c[B>>2]|0)+44>>2]&63](y,48)|0;y=c[s>>2]|0;B=c[o>>2]|0;C=B-4|0;a:do{if(y>>>0<C>>>0){D=y;while(1){E=D+4|0;if((c[D>>2]|0)!=(x|0)){F=D;break a}if(E>>>0<C>>>0){D=E}else{F=E;break}}}else{F=y}}while(0);nr(k,F,B)|0}y=e|0;C=c[y>>2]|0;do{if((C|0)==0){G=1}else{x=c[C+12>>2]|0;if((x|0)==(c[C+16>>2]|0)){H=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{H=c[x>>2]|0}if((H|0)==-1){c[y>>2]=0;G=1;break}else{G=(c[y>>2]|0)==0;break}}}while(0);do{if((A|0)==0){I=35}else{C=c[A+12>>2]|0;if((C|0)==(c[A+16>>2]|0)){J=Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0}else{J=c[C>>2]|0}if((J|0)==-1){c[z>>2]=0;I=35;break}else{if(G){break}else{I=37;break}}}}while(0);if((I|0)==35){if(G){I=37}}if((I|0)==37){c[j>>2]=c[j>>2]|2}c[b>>2]=c[y>>2];Ul(c[m>>2]|0)|0;z=c[s>>2]|0;c[s>>2]=0;if((z|0)==0){K=400;L=0;i=d;return}Dc[c[t>>2]&511](z);K=400;L=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function nr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=b;g=d;h=a[f]|0;if((h&1)==0){i=1;j=h;k=(h&255)>>>1}else{h=c[b>>2]|0;i=(h&-2)-1|0;j=h&255;k=c[b+4>>2]|0}h=e-g>>2;if((h|0)==0){return b|0}if((i-k|0)>>>0<h>>>0){Im(b,i,k+h-i|0,k,k,0,0);l=a[f]|0}else{l=j}if((l&1)==0){m=b+4|0}else{m=c[b+8>>2]|0}l=m+(k<<2)|0;if((d|0)==(e|0)){n=l}else{j=k+((e-4+(-g|0)|0)>>>2)+1|0;g=d;d=l;while(1){c[d>>2]=c[g>>2];l=g+4|0;if((l|0)==(e|0)){break}else{g=l;d=d+4|0}}n=m+(j<<2)|0}c[n>>2]=0;n=k+h|0;if((a[f]&1)==0){a[f]=n<<1;return b|0}else{c[b+4>>2]=n;return b|0}return 0}function or(b,d,e,f,g,h,j,k,l,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0;n=i;i=i+176|0;o=n|0;p=n+16|0;q=n+32|0;r=n+40|0;s=n+56|0;t=n+72|0;u=n+88|0;v=n+104|0;w=n+112|0;x=n+128|0;y=n+144|0;z=n+160|0;if(b){b=c[d>>2]|0;if(!((c[8830]|0)==-1)){c[p>>2]=35320;c[p+4>>2]=16;c[p+8>>2]=0;mm(35320,p,114)}p=(c[8831]|0)-1|0;A=c[b+8>>2]|0;if(!((c[b+12>>2]|0)-A>>2>>>0>p>>>0)){B=pc(4)|0;D=B;lu(D);Fb(B|0,25544,156)}b=c[A+(p<<2)>>2]|0;if((b|0)==0){B=pc(4)|0;D=B;lu(D);Fb(B|0,25544,156)}B=b;Ec[c[(c[b>>2]|0)+44>>2]&127](q,B);D=e;C=c[q>>2]|0;a[D]=C;C=C>>8;a[D+1|0]=C;C=C>>8;a[D+2|0]=C;C=C>>8;a[D+3|0]=C;D=b;Ec[c[(c[D>>2]|0)+32>>2]&127](r,B);q=l;if((a[q]&1)==0){c[l+4>>2]=0;a[q]=0}else{c[c[l+8>>2]>>2]=0;c[l+4>>2]=0}Fm(l,0);p=r;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[q+8>>2]=c[p+8>>2];dv(p|0,0,12)|0;Cm(r);Ec[c[(c[D>>2]|0)+28>>2]&127](s,B);r=k;if((a[r]&1)==0){c[k+4>>2]=0;a[r]=0}else{c[c[k+8>>2]>>2]=0;c[k+4>>2]=0}Fm(k,0);p=s;c[r>>2]=c[p>>2];c[r+4>>2]=c[p+4>>2];c[r+8>>2]=c[p+8>>2];dv(p|0,0,12)|0;Cm(s);s=b;p=Fc[c[(c[s>>2]|0)+12>>2]&255](B)|0;c[f>>2]=p;p=Fc[c[(c[s>>2]|0)+16>>2]&255](B)|0;c[g>>2]=p;Ec[c[(c[b>>2]|0)+20>>2]&127](t,B);b=h;if((a[b]&1)==0){a[h+1|0]=0;a[b]=0}else{a[c[h+8>>2]|0]=0;c[h+4>>2]=0}vm(h,0);p=t;c[b>>2]=c[p>>2];c[b+4>>2]=c[p+4>>2];c[b+8>>2]=c[p+8>>2];dv(p|0,0,12)|0;rm(t);Ec[c[(c[D>>2]|0)+24>>2]&127](u,B);D=j;if((a[D]&1)==0){c[j+4>>2]=0;a[D]=0}else{c[c[j+8>>2]>>2]=0;c[j+4>>2]=0}Fm(j,0);t=u;c[D>>2]=c[t>>2];c[D+4>>2]=c[t+4>>2];c[D+8>>2]=c[t+8>>2];dv(t|0,0,12)|0;Cm(u);E=Fc[c[(c[s>>2]|0)+36>>2]&255](B)|0;c[m>>2]=E;i=n;return}else{B=c[d>>2]|0;if(!((c[8832]|0)==-1)){c[o>>2]=35328;c[o+4>>2]=16;c[o+8>>2]=0;mm(35328,o,114)}o=(c[8833]|0)-1|0;d=c[B+8>>2]|0;if(!((c[B+12>>2]|0)-d>>2>>>0>o>>>0)){F=pc(4)|0;G=F;lu(G);Fb(F|0,25544,156)}B=c[d+(o<<2)>>2]|0;if((B|0)==0){F=pc(4)|0;G=F;lu(G);Fb(F|0,25544,156)}F=B;Ec[c[(c[B>>2]|0)+44>>2]&127](v,F);G=e;C=c[v>>2]|0;a[G]=C;C=C>>8;a[G+1|0]=C;C=C>>8;a[G+2|0]=C;C=C>>8;a[G+3|0]=C;G=B;Ec[c[(c[G>>2]|0)+32>>2]&127](w,F);v=l;if((a[v]&1)==0){c[l+4>>2]=0;a[v]=0}else{c[c[l+8>>2]>>2]=0;c[l+4>>2]=0}Fm(l,0);l=w;c[v>>2]=c[l>>2];c[v+4>>2]=c[l+4>>2];c[v+8>>2]=c[l+8>>2];dv(l|0,0,12)|0;Cm(w);Ec[c[(c[G>>2]|0)+28>>2]&127](x,F);w=k;if((a[w]&1)==0){c[k+4>>2]=0;a[w]=0}else{c[c[k+8>>2]>>2]=0;c[k+4>>2]=0}Fm(k,0);k=x;c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];c[w+8>>2]=c[k+8>>2];dv(k|0,0,12)|0;Cm(x);x=B;k=Fc[c[(c[x>>2]|0)+12>>2]&255](F)|0;c[f>>2]=k;k=Fc[c[(c[x>>2]|0)+16>>2]&255](F)|0;c[g>>2]=k;Ec[c[(c[B>>2]|0)+20>>2]&127](y,F);B=h;if((a[B]&1)==0){a[h+1|0]=0;a[B]=0}else{a[c[h+8>>2]|0]=0;c[h+4>>2]=0}vm(h,0);h=y;c[B>>2]=c[h>>2];c[B+4>>2]=c[h+4>>2];c[B+8>>2]=c[h+8>>2];dv(h|0,0,12)|0;rm(y);Ec[c[(c[G>>2]|0)+24>>2]&127](z,F);G=j;if((a[G]&1)==0){c[j+4>>2]=0;a[G]=0}else{c[c[j+8>>2]>>2]=0;c[j+4>>2]=0}Fm(j,0);j=z;c[G>>2]=c[j>>2];c[G+4>>2]=c[j+4>>2];c[G+8>>2]=c[j+8>>2];dv(j|0,0,12)|0;Cm(z);E=Fc[c[(c[x>>2]|0)+36>>2]&255](F)|0;c[m>>2]=E;i=n;return}}function pr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=a+4|0;f=(c[e>>2]|0)!=194;g=a|0;a=c[g>>2]|0;h=a;i=(c[d>>2]|0)-h|0;j=i>>>0<2147483647>>>0?i<<1:-1;i=(c[b>>2]|0)-h>>2;if(f){k=a}else{k=0}a=Iu(k,j)|0;k=a;if((a|0)==0){Uu()}do{if(f){c[g>>2]=k;l=k}else{a=c[g>>2]|0;c[g>>2]=k;if((a|0)==0){l=k;break}Dc[c[e>>2]&511](a);l=c[g>>2]|0}}while(0);c[e>>2]=88;c[b>>2]=l+(i<<2);c[d>>2]=(c[g>>2]|0)+(j>>>2<<2);return}function qr(a){a=a|0;Sl(a|0);Pu(a);return}function rr(a){a=a|0;Sl(a|0);return}function sr(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=+k;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;d=i;i=i+248|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=d|0;m=d+120|0;n=d+232|0;o=d+240|0;p=o;q=i;i=i+1|0;i=i+7&-8;r=i;i=i+1|0;i=i+7&-8;s=i;i=i+12|0;i=i+7&-8;t=i;i=i+12|0;i=i+7&-8;u=i;i=i+12|0;i=i+7&-8;v=i;i=i+4|0;i=i+7&-8;w=i;i=i+100|0;i=i+7&-8;x=i;i=i+4|0;i=i+7&-8;y=i;i=i+4|0;i=i+7&-8;z=i;i=i+4|0;i=i+7&-8;A=d+16|0;c[m>>2]=A;B=d+128|0;C=db(A|0,100,15056,(A=i,i=i+8|0,h[A>>3]=k,A)|0)|0;i=A;do{if(C>>>0>99>>>0){do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}D=Xa(2147483647,14472,0)|0;c[8330]=D}}while(0);D=kp(m,c[8330]|0,15056,(A=i,i=i+8|0,h[A>>3]=k,A)|0)|0;i=A;E=c[m>>2]|0;if((E|0)==0){Uu();F=c[m>>2]|0}else{F=E}E=Gu(D)|0;if((E|0)!=0){G=E;H=D;I=E;J=F;break}Uu();G=0;H=D;I=0;J=F}else{G=B;H=C;I=0;J=0}}while(0);Lm(n,g);C=n|0;B=c[C>>2]|0;if(!((c[8716]|0)==-1)){c[l>>2]=34864;c[l+4>>2]=16;c[l+8>>2]=0;mm(34864,l,114)}l=(c[8717]|0)-1|0;F=c[B+8>>2]|0;do{if((c[B+12>>2]|0)-F>>2>>>0>l>>>0){A=c[F+(l<<2)>>2]|0;if((A|0)==0){break}D=A;E=c[m>>2]|0;Sc[c[(c[A>>2]|0)+32>>2]&15](D,E,E+H|0,G)|0;if((H|0)==0){K=0}else{K=(a[c[m>>2]|0]|0)==45}c[o>>2]=0;dv(s|0,0,12)|0;E=t;dv(E|0,0,12)|0;A=u;dv(A|0,0,12)|0;tr(f,K,n,p,q,r,s,t,u,v);L=w|0;M=c[v>>2]|0;if((H|0)>(M|0)){N=a[A]|0;if((N&1)==0){O=(N&255)>>>1}else{O=c[u+4>>2]|0}N=a[E]|0;if((N&1)==0){P=(N&255)>>>1}else{P=c[t+4>>2]|0}Q=O+(H-M<<1|1)+P|0}else{N=a[A]|0;if((N&1)==0){R=(N&255)>>>1}else{R=c[u+4>>2]|0}N=a[E]|0;if((N&1)==0){S=(N&255)>>>1}else{S=c[t+4>>2]|0}Q=R+2+S|0}N=Q+M|0;do{if(N>>>0>100>>>0){E=Gu(N)|0;if((E|0)!=0){T=E;U=E;break}Uu();T=0;U=0}else{T=L;U=0}}while(0);ur(T,x,y,c[g+4>>2]|0,G,G+H|0,D,K,p,a[q]|0,a[r]|0,s,t,u,M);c[z>>2]=c[e>>2];Bd(b,z,T,c[x>>2]|0,c[y>>2]|0,g,j);if((U|0)!=0){Hu(U)}rm(u);rm(t);rm(s);Ul(c[C>>2]|0)|0;if((I|0)!=0){Hu(I)}if((J|0)==0){V=100;W=0;X=100;Y=0;i=d;return}Hu(J);V=100;W=0;X=100;Y=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function tr(b,d,e,f,g,h,j,k,l,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;n=i;i=i+40|0;o=n|0;p=n+16|0;q=n+32|0;r=q;s=i;i=i+12|0;i=i+7&-8;t=i;i=i+4|0;i=i+7&-8;u=t;v=i;i=i+12|0;i=i+7&-8;w=i;i=i+12|0;i=i+7&-8;x=i;i=i+12|0;i=i+7&-8;y=i;i=i+4|0;i=i+7&-8;z=y;A=i;i=i+12|0;i=i+7&-8;B=i;i=i+4|0;i=i+7&-8;D=B;E=i;i=i+12|0;i=i+7&-8;F=i;i=i+12|0;i=i+7&-8;G=i;i=i+12|0;i=i+7&-8;H=c[e>>2]|0;if(b){if(!((c[8834]|0)==-1)){c[p>>2]=35336;c[p+4>>2]=16;c[p+8>>2]=0;mm(35336,p,114)}p=(c[8835]|0)-1|0;b=c[H+8>>2]|0;if(!((c[H+12>>2]|0)-b>>2>>>0>p>>>0)){I=pc(4)|0;J=I;lu(J);Fb(I|0,25544,156)}e=c[b+(p<<2)>>2]|0;if((e|0)==0){I=pc(4)|0;J=I;lu(J);Fb(I|0,25544,156)}I=e;J=c[e>>2]|0;if(d){Ec[c[J+44>>2]&127](r,I);r=f;C=c[q>>2]|0;a[r]=C;C=C>>8;a[r+1|0]=C;C=C>>8;a[r+2|0]=C;C=C>>8;a[r+3|0]=C;Ec[c[(c[e>>2]|0)+32>>2]&127](s,I);r=l;if((a[r]&1)==0){a[l+1|0]=0;a[r]=0}else{a[c[l+8>>2]|0]=0;c[l+4>>2]=0}vm(l,0);q=s;c[r>>2]=c[q>>2];c[r+4>>2]=c[q+4>>2];c[r+8>>2]=c[q+8>>2];dv(q|0,0,12)|0;rm(s)}else{Ec[c[J+40>>2]&127](u,I);u=f;C=c[t>>2]|0;a[u]=C;C=C>>8;a[u+1|0]=C;C=C>>8;a[u+2|0]=C;C=C>>8;a[u+3|0]=C;Ec[c[(c[e>>2]|0)+28>>2]&127](v,I);u=l;if((a[u]&1)==0){a[l+1|0]=0;a[u]=0}else{a[c[l+8>>2]|0]=0;c[l+4>>2]=0}vm(l,0);t=v;c[u>>2]=c[t>>2];c[u+4>>2]=c[t+4>>2];c[u+8>>2]=c[t+8>>2];dv(t|0,0,12)|0;rm(v)}v=e;t=Fc[c[(c[v>>2]|0)+12>>2]&255](I)|0;a[g]=t;t=Fc[c[(c[v>>2]|0)+16>>2]&255](I)|0;a[h]=t;t=e;Ec[c[(c[t>>2]|0)+20>>2]&127](w,I);v=j;if((a[v]&1)==0){a[j+1|0]=0;a[v]=0}else{a[c[j+8>>2]|0]=0;c[j+4>>2]=0}vm(j,0);u=w;c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];dv(u|0,0,12)|0;rm(w);Ec[c[(c[t>>2]|0)+24>>2]&127](x,I);t=k;if((a[t]&1)==0){a[k+1|0]=0;a[t]=0}else{a[c[k+8>>2]|0]=0;c[k+4>>2]=0}vm(k,0);w=x;c[t>>2]=c[w>>2];c[t+4>>2]=c[w+4>>2];c[t+8>>2]=c[w+8>>2];dv(w|0,0,12)|0;rm(x);K=Fc[c[(c[e>>2]|0)+36>>2]&255](I)|0;c[m>>2]=K;i=n;return}else{if(!((c[8836]|0)==-1)){c[o>>2]=35344;c[o+4>>2]=16;c[o+8>>2]=0;mm(35344,o,114)}o=(c[8837]|0)-1|0;I=c[H+8>>2]|0;if(!((c[H+12>>2]|0)-I>>2>>>0>o>>>0)){L=pc(4)|0;M=L;lu(M);Fb(L|0,25544,156)}H=c[I+(o<<2)>>2]|0;if((H|0)==0){L=pc(4)|0;M=L;lu(M);Fb(L|0,25544,156)}L=H;M=c[H>>2]|0;if(d){Ec[c[M+44>>2]&127](z,L);z=f;C=c[y>>2]|0;a[z]=C;C=C>>8;a[z+1|0]=C;C=C>>8;a[z+2|0]=C;C=C>>8;a[z+3|0]=C;Ec[c[(c[H>>2]|0)+32>>2]&127](A,L);z=l;if((a[z]&1)==0){a[l+1|0]=0;a[z]=0}else{a[c[l+8>>2]|0]=0;c[l+4>>2]=0}vm(l,0);y=A;c[z>>2]=c[y>>2];c[z+4>>2]=c[y+4>>2];c[z+8>>2]=c[y+8>>2];dv(y|0,0,12)|0;rm(A)}else{Ec[c[M+40>>2]&127](D,L);D=f;C=c[B>>2]|0;a[D]=C;C=C>>8;a[D+1|0]=C;C=C>>8;a[D+2|0]=C;C=C>>8;a[D+3|0]=C;Ec[c[(c[H>>2]|0)+28>>2]&127](E,L);D=l;if((a[D]&1)==0){a[l+1|0]=0;a[D]=0}else{a[c[l+8>>2]|0]=0;c[l+4>>2]=0}vm(l,0);l=E;c[D>>2]=c[l>>2];c[D+4>>2]=c[l+4>>2];c[D+8>>2]=c[l+8>>2];dv(l|0,0,12)|0;rm(E)}E=H;l=Fc[c[(c[E>>2]|0)+12>>2]&255](L)|0;a[g]=l;l=Fc[c[(c[E>>2]|0)+16>>2]&255](L)|0;a[h]=l;l=H;Ec[c[(c[l>>2]|0)+20>>2]&127](F,L);h=j;if((a[h]&1)==0){a[j+1|0]=0;a[h]=0}else{a[c[j+8>>2]|0]=0;c[j+4>>2]=0}vm(j,0);j=F;c[h>>2]=c[j>>2];c[h+4>>2]=c[j+4>>2];c[h+8>>2]=c[j+8>>2];dv(j|0,0,12)|0;rm(F);Ec[c[(c[l>>2]|0)+24>>2]&127](G,L);l=k;if((a[l]&1)==0){a[k+1|0]=0;a[l]=0}else{a[c[k+8>>2]|0]=0;c[k+4>>2]=0}vm(k,0);k=G;c[l>>2]=c[k>>2];c[l+4>>2]=c[k+4>>2];c[l+8>>2]=c[k+8>>2];dv(k|0,0,12)|0;rm(G);K=Fc[c[(c[H>>2]|0)+36>>2]&255](L)|0;c[m>>2]=K;i=n;return}}function ur(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){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;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,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0;c[f>>2]=d;s=j;t=q;u=q+1|0;v=q+8|0;w=q+4|0;q=p;x=(g&512|0)==0;y=p+1|0;z=p+8|0;A=p+4|0;p=(r|0)>0;B=o;C=o+1|0;D=o+8|0;E=o+4|0;o=j+8|0;F=-r|0;G=0;H=h;while(1){a:do{switch(a[l+G|0]|0){case 0:{c[e>>2]=c[f>>2];I=H;break};case 1:{c[e>>2]=c[f>>2];h=Qc[c[(c[s>>2]|0)+28>>2]&63](j,32)|0;J=c[f>>2]|0;c[f>>2]=J+1;a[J]=h;I=H;break};case 3:{h=a[t]|0;J=(h&1)==0;if(J){K=(h&255)>>>1}else{K=c[w>>2]|0}if((K|0)==0){I=H;break a}if(J){L=u}else{L=c[v>>2]|0}J=a[L]|0;h=c[f>>2]|0;c[f>>2]=h+1;a[h]=J;I=H;break};case 2:{J=a[q]|0;h=(J&1)==0;if(h){M=(J&255)>>>1}else{M=c[A>>2]|0}if((M|0)==0|x){I=H;break a}if(h){N=(J&255)>>>1;O=y;P=y}else{J=c[z>>2]|0;N=c[A>>2]|0;O=J;P=J}J=O+N|0;h=c[f>>2]|0;if((P|0)==(J|0)){Q=h}else{R=h;h=P;while(1){a[R]=a[h]|0;S=h+1|0;T=R+1|0;if((S|0)==(J|0)){Q=T;break}else{R=T;h=S}}}c[f>>2]=Q;I=H;break};case 4:{h=c[f>>2]|0;R=k?H+1|0:H;b:do{if(R>>>0<i>>>0){J=R;while(1){S=a[J]|0;if(!(S<<24>>24>-1)){U=J;break b}T=J+1|0;if((b[(c[o>>2]|0)+(S<<24>>24<<1)>>1]&2048)==0){U=J;break b}if(T>>>0<i>>>0){J=T}else{U=T;break}}}else{U=R}}while(0);J=U;if(p){if(U>>>0>R>>>0){T=R+(-J|0)|0;J=T>>>0<F>>>0?F:T;T=J+r|0;S=U;V=r;W=h;while(1){X=S-1|0;Y=a[X]|0;c[f>>2]=W+1;a[W]=Y;Y=V-1|0;Z=(Y|0)>0;if(!(X>>>0>R>>>0&Z)){break}S=X;V=Y;W=c[f>>2]|0}W=U+J|0;if(Z){_=T;$=W;aa=32}else{ba=0;ca=T;da=W}}else{_=r;$=U;aa=32}if((aa|0)==32){aa=0;ba=Qc[c[(c[s>>2]|0)+28>>2]&63](j,48)|0;ca=_;da=$}W=c[f>>2]|0;c[f>>2]=W+1;if((ca|0)>0){V=ca;S=W;while(1){a[S]=ba;Y=V-1|0;X=c[f>>2]|0;c[f>>2]=X+1;if((Y|0)>0){V=Y;S=X}else{ea=X;break}}}else{ea=W}a[ea]=m;fa=da}else{fa=U}if((fa|0)==(R|0)){S=Qc[c[(c[s>>2]|0)+28>>2]&63](j,48)|0;V=c[f>>2]|0;c[f>>2]=V+1;a[V]=S}else{S=a[B]|0;V=(S&1)==0;if(V){ga=(S&255)>>>1}else{ga=c[E>>2]|0}if((ga|0)==0){ha=fa;ia=0;ja=0;ka=-1}else{if(V){la=C}else{la=c[D>>2]|0}ha=fa;ia=0;ja=0;ka=a[la]|0}while(1){do{if((ia|0)==(ka|0)){V=c[f>>2]|0;c[f>>2]=V+1;a[V]=n;V=ja+1|0;S=a[B]|0;T=(S&1)==0;if(T){ma=(S&255)>>>1}else{ma=c[E>>2]|0}if(!(V>>>0<ma>>>0)){na=ka;oa=V;pa=0;break}if(T){qa=C}else{qa=c[D>>2]|0}if((a[qa+V|0]|0)==127){na=-1;oa=V;pa=0;break}if(T){ra=C}else{ra=c[D>>2]|0}na=a[ra+V|0]|0;oa=V;pa=0}else{na=ka;oa=ja;pa=ia}}while(0);V=ha-1|0;T=a[V]|0;S=c[f>>2]|0;c[f>>2]=S+1;a[S]=T;if((V|0)==(R|0)){break}else{ha=V;ia=pa+1|0;ja=oa;ka=na}}}W=c[f>>2]|0;if((h|0)==(W|0)){I=R;break a}V=W-1|0;if(V>>>0>h>>>0){sa=h;ta=V}else{I=R;break a}while(1){V=a[sa]|0;a[sa]=a[ta]|0;a[ta]=V;V=sa+1|0;W=ta-1|0;if(V>>>0<W>>>0){sa=V;ta=W}else{I=R;break}}break};default:{I=H}}}while(0);R=G+1|0;if(R>>>0<4>>>0){G=R;H=I}else{break}}I=a[t]|0;t=(I&1)==0;if(t){ua=(I&255)>>>1}else{ua=c[w>>2]|0}if(ua>>>0>1>>>0){if(t){va=(I&255)>>>1;wa=u;xa=u}else{u=c[v>>2]|0;va=c[w>>2]|0;wa=u;xa=u}u=xa+1|0;xa=wa+va|0;va=c[f>>2]|0;if((u|0)==(xa|0)){ya=va}else{wa=va;va=u;while(1){a[wa]=a[va]|0;u=va+1|0;w=wa+1|0;if((u|0)==(xa|0)){ya=w;break}else{wa=w;va=u}}}c[f>>2]=ya}ya=g&176;if((ya|0)==32){c[e>>2]=c[f>>2];return}else if((ya|0)==16){return}else{c[e>>2]=d;return}}function vr(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;d=i;i=i+32|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+16|0;m=d+24|0;n=m;o=i;i=i+1|0;i=i+7&-8;p=i;i=i+1|0;i=i+7&-8;q=i;i=i+12|0;i=i+7&-8;r=i;i=i+12|0;i=i+7&-8;s=i;i=i+12|0;i=i+7&-8;t=i;i=i+4|0;i=i+7&-8;u=i;i=i+100|0;i=i+7&-8;v=i;i=i+4|0;i=i+7&-8;w=i;i=i+4|0;i=i+7&-8;x=i;i=i+4|0;i=i+7&-8;Lm(l,g);y=l|0;z=c[y>>2]|0;if(!((c[8716]|0)==-1)){c[k>>2]=34864;c[k+4>>2]=16;c[k+8>>2]=0;mm(34864,k,114)}k=(c[8717]|0)-1|0;A=c[z+8>>2]|0;do{if((c[z+12>>2]|0)-A>>2>>>0>k>>>0){B=c[A+(k<<2)>>2]|0;if((B|0)==0){break}C=B;D=j;E=a[D]|0;F=(E&1)==0;if(F){G=(E&255)>>>1}else{G=c[j+4>>2]|0}if((G|0)==0){H=0}else{if(F){I=j+1|0}else{I=c[j+8>>2]|0}F=a[I]|0;H=F<<24>>24==(Qc[c[(c[B>>2]|0)+28>>2]&63](C,45)|0)<<24>>24}c[m>>2]=0;dv(q|0,0,12)|0;B=r;dv(B|0,0,12)|0;F=s;dv(F|0,0,12)|0;tr(f,H,l,n,o,p,q,r,s,t);E=u|0;J=a[D]|0;K=(J&1)==0;if(K){L=(J&255)>>>1}else{L=c[j+4>>2]|0}M=c[t>>2]|0;if((L|0)>(M|0)){if(K){N=(J&255)>>>1}else{N=c[j+4>>2]|0}K=a[F]|0;if((K&1)==0){O=(K&255)>>>1}else{O=c[s+4>>2]|0}K=a[B]|0;if((K&1)==0){P=(K&255)>>>1}else{P=c[r+4>>2]|0}Q=O+(N-M<<1|1)+P|0}else{K=a[F]|0;if((K&1)==0){R=(K&255)>>>1}else{R=c[s+4>>2]|0}K=a[B]|0;if((K&1)==0){S=(K&255)>>>1}else{S=c[r+4>>2]|0}Q=R+2+S|0}K=Q+M|0;do{if(K>>>0>100>>>0){B=Gu(K)|0;if((B|0)!=0){T=B;U=B;V=J;break}Uu();T=0;U=0;V=a[D]|0}else{T=E;U=0;V=J}}while(0);if((V&1)==0){W=(V&255)>>>1;X=j+1|0}else{W=c[j+4>>2]|0;X=c[j+8>>2]|0}ur(T,v,w,c[g+4>>2]|0,X,X+W|0,C,H,n,a[o]|0,a[p]|0,q,r,s,M);c[x>>2]=c[e>>2];Bd(b,x,T,c[v>>2]|0,c[w>>2]|0,g,h);if((U|0)==0){Y=100;Z=0;rm(s);rm(r);rm(q);_=c[y>>2]|0;$=_|0;aa=Ul($)|0;i=d;return}Hu(U);Y=100;Z=0;rm(s);rm(r);rm(q);_=c[y>>2]|0;$=_|0;aa=Ul($)|0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function wr(a){a=a|0;Sl(a|0);Pu(a);return}function xr(a){a=a|0;Sl(a|0);return}function yr(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=+k;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;d=i;i=i+544|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=d|0;m=d+120|0;n=d+528|0;o=d+536|0;p=o;q=i;i=i+4|0;i=i+7&-8;r=i;i=i+4|0;i=i+7&-8;s=i;i=i+12|0;i=i+7&-8;t=i;i=i+12|0;i=i+7&-8;u=i;i=i+12|0;i=i+7&-8;v=i;i=i+4|0;i=i+7&-8;w=i;i=i+400|0;x=i;i=i+4|0;i=i+7&-8;y=i;i=i+4|0;i=i+7&-8;z=i;i=i+4|0;i=i+7&-8;A=d+16|0;c[m>>2]=A;B=d+128|0;C=db(A|0,100,15056,(A=i,i=i+8|0,h[A>>3]=k,A)|0)|0;i=A;do{if(C>>>0>99>>>0){do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}D=Xa(2147483647,14472,0)|0;c[8330]=D}}while(0);D=kp(m,c[8330]|0,15056,(A=i,i=i+8|0,h[A>>3]=k,A)|0)|0;i=A;E=c[m>>2]|0;if((E|0)==0){Uu();F=c[m>>2]|0}else{F=E}E=Gu(D<<2)|0;G=E;if((E|0)!=0){H=G;I=D;J=G;K=F;break}Uu();H=0;I=D;J=0;K=F}else{H=B;I=C;J=0;K=0}}while(0);Lm(n,g);C=n|0;B=c[C>>2]|0;if(!((c[8714]|0)==-1)){c[l>>2]=34856;c[l+4>>2]=16;c[l+8>>2]=0;mm(34856,l,114)}l=(c[8715]|0)-1|0;F=c[B+8>>2]|0;do{if((c[B+12>>2]|0)-F>>2>>>0>l>>>0){A=c[F+(l<<2)>>2]|0;if((A|0)==0){break}D=A;G=c[m>>2]|0;Sc[c[(c[A>>2]|0)+48>>2]&15](D,G,G+I|0,H)|0;if((I|0)==0){L=0}else{L=(a[c[m>>2]|0]|0)==45}c[o>>2]=0;dv(s|0,0,12)|0;G=t;dv(G|0,0,12)|0;A=u;dv(A|0,0,12)|0;zr(f,L,n,p,q,r,s,t,u,v);E=w|0;M=c[v>>2]|0;if((I|0)>(M|0)){N=a[A]|0;if((N&1)==0){O=(N&255)>>>1}else{O=c[u+4>>2]|0}N=a[G]|0;if((N&1)==0){P=(N&255)>>>1}else{P=c[t+4>>2]|0}Q=O+(I-M<<1|1)+P|0}else{N=a[A]|0;if((N&1)==0){R=(N&255)>>>1}else{R=c[u+4>>2]|0}N=a[G]|0;if((N&1)==0){S=(N&255)>>>1}else{S=c[t+4>>2]|0}Q=R+2+S|0}N=Q+M|0;do{if(N>>>0>100>>>0){G=Gu(N<<2)|0;A=G;if((G|0)!=0){T=A;U=A;break}Uu();T=0;U=0}else{T=E;U=0}}while(0);Ar(T,x,y,c[g+4>>2]|0,H,H+(I<<2)|0,D,L,p,c[q>>2]|0,c[r>>2]|0,s,t,u,M);c[z>>2]=c[e>>2];tp(b,z,T,c[x>>2]|0,c[y>>2]|0,g,j);if((U|0)!=0){Hu(U)}Cm(u);Cm(t);rm(s);Ul(c[C>>2]|0)|0;if((J|0)!=0){Hu(J)}if((K|0)==0){V=400;W=0;X=100;Y=0;i=d;return}Hu(K);V=400;W=0;X=100;Y=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function zr(b,d,e,f,g,h,j,k,l,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;n=i;i=i+40|0;o=n|0;p=n+16|0;q=n+32|0;r=q;s=i;i=i+12|0;i=i+7&-8;t=i;i=i+4|0;i=i+7&-8;u=t;v=i;i=i+12|0;i=i+7&-8;w=i;i=i+12|0;i=i+7&-8;x=i;i=i+12|0;i=i+7&-8;y=i;i=i+4|0;i=i+7&-8;z=y;A=i;i=i+12|0;i=i+7&-8;B=i;i=i+4|0;i=i+7&-8;D=B;E=i;i=i+12|0;i=i+7&-8;F=i;i=i+12|0;i=i+7&-8;G=i;i=i+12|0;i=i+7&-8;H=c[e>>2]|0;if(b){if(!((c[8830]|0)==-1)){c[p>>2]=35320;c[p+4>>2]=16;c[p+8>>2]=0;mm(35320,p,114)}p=(c[8831]|0)-1|0;b=c[H+8>>2]|0;if(!((c[H+12>>2]|0)-b>>2>>>0>p>>>0)){I=pc(4)|0;J=I;lu(J);Fb(I|0,25544,156)}e=c[b+(p<<2)>>2]|0;if((e|0)==0){I=pc(4)|0;J=I;lu(J);Fb(I|0,25544,156)}I=e;J=c[e>>2]|0;if(d){Ec[c[J+44>>2]&127](r,I);r=f;C=c[q>>2]|0;a[r]=C;C=C>>8;a[r+1|0]=C;C=C>>8;a[r+2|0]=C;C=C>>8;a[r+3|0]=C;Ec[c[(c[e>>2]|0)+32>>2]&127](s,I);r=l;if((a[r]&1)==0){c[l+4>>2]=0;a[r]=0}else{c[c[l+8>>2]>>2]=0;c[l+4>>2]=0}Fm(l,0);q=s;c[r>>2]=c[q>>2];c[r+4>>2]=c[q+4>>2];c[r+8>>2]=c[q+8>>2];dv(q|0,0,12)|0;Cm(s)}else{Ec[c[J+40>>2]&127](u,I);u=f;C=c[t>>2]|0;a[u]=C;C=C>>8;a[u+1|0]=C;C=C>>8;a[u+2|0]=C;C=C>>8;a[u+3|0]=C;Ec[c[(c[e>>2]|0)+28>>2]&127](v,I);u=l;if((a[u]&1)==0){c[l+4>>2]=0;a[u]=0}else{c[c[l+8>>2]>>2]=0;c[l+4>>2]=0}Fm(l,0);t=v;c[u>>2]=c[t>>2];c[u+4>>2]=c[t+4>>2];c[u+8>>2]=c[t+8>>2];dv(t|0,0,12)|0;Cm(v)}v=e;t=Fc[c[(c[v>>2]|0)+12>>2]&255](I)|0;c[g>>2]=t;t=Fc[c[(c[v>>2]|0)+16>>2]&255](I)|0;c[h>>2]=t;Ec[c[(c[e>>2]|0)+20>>2]&127](w,I);t=j;if((a[t]&1)==0){a[j+1|0]=0;a[t]=0}else{a[c[j+8>>2]|0]=0;c[j+4>>2]=0}vm(j,0);u=w;c[t>>2]=c[u>>2];c[t+4>>2]=c[u+4>>2];c[t+8>>2]=c[u+8>>2];dv(u|0,0,12)|0;rm(w);Ec[c[(c[e>>2]|0)+24>>2]&127](x,I);e=k;if((a[e]&1)==0){c[k+4>>2]=0;a[e]=0}else{c[c[k+8>>2]>>2]=0;c[k+4>>2]=0}Fm(k,0);w=x;c[e>>2]=c[w>>2];c[e+4>>2]=c[w+4>>2];c[e+8>>2]=c[w+8>>2];dv(w|0,0,12)|0;Cm(x);K=Fc[c[(c[v>>2]|0)+36>>2]&255](I)|0;c[m>>2]=K;i=n;return}else{if(!((c[8832]|0)==-1)){c[o>>2]=35328;c[o+4>>2]=16;c[o+8>>2]=0;mm(35328,o,114)}o=(c[8833]|0)-1|0;I=c[H+8>>2]|0;if(!((c[H+12>>2]|0)-I>>2>>>0>o>>>0)){L=pc(4)|0;M=L;lu(M);Fb(L|0,25544,156)}H=c[I+(o<<2)>>2]|0;if((H|0)==0){L=pc(4)|0;M=L;lu(M);Fb(L|0,25544,156)}L=H;M=c[H>>2]|0;if(d){Ec[c[M+44>>2]&127](z,L);z=f;C=c[y>>2]|0;a[z]=C;C=C>>8;a[z+1|0]=C;C=C>>8;a[z+2|0]=C;C=C>>8;a[z+3|0]=C;Ec[c[(c[H>>2]|0)+32>>2]&127](A,L);z=l;if((a[z]&1)==0){c[l+4>>2]=0;a[z]=0}else{c[c[l+8>>2]>>2]=0;c[l+4>>2]=0}Fm(l,0);y=A;c[z>>2]=c[y>>2];c[z+4>>2]=c[y+4>>2];c[z+8>>2]=c[y+8>>2];dv(y|0,0,12)|0;Cm(A)}else{Ec[c[M+40>>2]&127](D,L);D=f;C=c[B>>2]|0;a[D]=C;C=C>>8;a[D+1|0]=C;C=C>>8;a[D+2|0]=C;C=C>>8;a[D+3|0]=C;Ec[c[(c[H>>2]|0)+28>>2]&127](E,L);D=l;if((a[D]&1)==0){c[l+4>>2]=0;a[D]=0}else{c[c[l+8>>2]>>2]=0;c[l+4>>2]=0}Fm(l,0);l=E;c[D>>2]=c[l>>2];c[D+4>>2]=c[l+4>>2];c[D+8>>2]=c[l+8>>2];dv(l|0,0,12)|0;Cm(E)}E=H;l=Fc[c[(c[E>>2]|0)+12>>2]&255](L)|0;c[g>>2]=l;l=Fc[c[(c[E>>2]|0)+16>>2]&255](L)|0;c[h>>2]=l;Ec[c[(c[H>>2]|0)+20>>2]&127](F,L);l=j;if((a[l]&1)==0){a[j+1|0]=0;a[l]=0}else{a[c[j+8>>2]|0]=0;c[j+4>>2]=0}vm(j,0);j=F;c[l>>2]=c[j>>2];c[l+4>>2]=c[j+4>>2];c[l+8>>2]=c[j+8>>2];dv(j|0,0,12)|0;rm(F);Ec[c[(c[H>>2]|0)+24>>2]&127](G,L);H=k;if((a[H]&1)==0){c[k+4>>2]=0;a[H]=0}else{c[c[k+8>>2]>>2]=0;c[k+4>>2]=0}Fm(k,0);k=G;c[H>>2]=c[k>>2];c[H+4>>2]=c[k+4>>2];c[H+8>>2]=c[k+8>>2];dv(k|0,0,12)|0;Cm(G);K=Fc[c[(c[E>>2]|0)+36>>2]&255](L)|0;c[m>>2]=K;i=n;return}}function Ar(b,d,e,f,g,h,i,j,k,l,m,n,o,p,q){b=b|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;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,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;c[e>>2]=b;r=i;s=p;t=p+4|0;u=p+8|0;p=o;v=(f&512|0)==0;w=o+4|0;x=o+8|0;o=(q|0)>0;y=n;z=n+1|0;A=n+8|0;B=n+4|0;n=i;C=0;D=g;while(1){a:do{switch(a[k+C|0]|0){case 0:{c[d>>2]=c[e>>2];E=D;break};case 1:{c[d>>2]=c[e>>2];g=Qc[c[(c[r>>2]|0)+44>>2]&63](i,32)|0;F=c[e>>2]|0;c[e>>2]=F+4;c[F>>2]=g;E=D;break};case 3:{g=a[s]|0;F=(g&1)==0;if(F){G=(g&255)>>>1}else{G=c[t>>2]|0}if((G|0)==0){E=D;break a}if(F){H=t}else{H=c[u>>2]|0}F=c[H>>2]|0;g=c[e>>2]|0;c[e>>2]=g+4;c[g>>2]=F;E=D;break};case 2:{F=a[p]|0;g=(F&1)==0;if(g){I=(F&255)>>>1}else{I=c[w>>2]|0}if((I|0)==0|v){E=D;break a}if(g){J=(F&255)>>>1;K=w;L=w}else{F=c[x>>2]|0;J=c[w>>2]|0;K=F;L=F}F=K+(J<<2)|0;g=c[e>>2]|0;if((L|0)==(F|0)){M=g}else{N=(K+(J-1<<2)+(-L|0)|0)>>>2;O=g;P=L;while(1){c[O>>2]=c[P>>2];Q=P+4|0;if((Q|0)==(F|0)){break}O=O+4|0;P=Q}M=g+(N+1<<2)|0}c[e>>2]=M;E=D;break};case 4:{P=c[e>>2]|0;O=j?D+4|0:D;b:do{if(O>>>0<h>>>0){F=O;while(1){Q=F+4|0;if(!(Hc[c[(c[n>>2]|0)+12>>2]&63](i,2048,c[F>>2]|0)|0)){R=F;break b}if(Q>>>0<h>>>0){F=Q}else{R=Q;break}}}else{R=O}}while(0);if(o){do{if(R>>>0>O>>>0){N=R;g=q;F=c[e>>2]|0;while(1){S=N-4|0;T=F+4|0;c[F>>2]=c[S>>2];U=g-1|0;V=(U|0)>0;if(S>>>0>O>>>0&V){N=S;g=U;F=T}else{break}}c[e>>2]=T;if(V){W=U;X=S;Y=34;break}F=c[e>>2]|0;c[e>>2]=F+4;Z=F;_=S}else{W=q;X=R;Y=34}}while(0);do{if((Y|0)==34){Y=0;F=Qc[c[(c[r>>2]|0)+44>>2]&63](i,48)|0;g=c[e>>2]|0;N=g+4|0;c[e>>2]=N;if((W|0)>0){$=W;aa=g;ba=N}else{Z=g;_=X;break}while(1){c[aa>>2]=F;N=$-1|0;if((N|0)>0){$=N;aa=ba;ba=ba+4|0}else{break}}c[e>>2]=g+(W+1<<2);Z=g+(W<<2)|0;_=X}}while(0);c[Z>>2]=l;ca=_}else{ca=R}if((ca|0)==(O|0)){F=Qc[c[(c[r>>2]|0)+44>>2]&63](i,48)|0;N=c[e>>2]|0;Q=N+4|0;c[e>>2]=Q;c[N>>2]=F;da=Q}else{Q=a[y]|0;F=(Q&1)==0;if(F){ea=(Q&255)>>>1}else{ea=c[B>>2]|0}if((ea|0)==0){fa=ca;ga=0;ha=0;ia=-1}else{if(F){ja=z}else{ja=c[A>>2]|0}fa=ca;ga=0;ha=0;ia=a[ja]|0}while(1){F=c[e>>2]|0;do{if((ga|0)==(ia|0)){Q=F+4|0;c[e>>2]=Q;c[F>>2]=m;N=ha+1|0;ka=a[y]|0;la=(ka&1)==0;if(la){ma=(ka&255)>>>1}else{ma=c[B>>2]|0}if(!(N>>>0<ma>>>0)){na=ia;oa=N;pa=0;qa=Q;break}if(la){ra=z}else{ra=c[A>>2]|0}if((a[ra+N|0]|0)==127){na=-1;oa=N;pa=0;qa=Q;break}if(la){sa=z}else{sa=c[A>>2]|0}na=a[sa+N|0]|0;oa=N;pa=0;qa=Q}else{na=ia;oa=ha;pa=ga;qa=F}}while(0);F=fa-4|0;g=c[F>>2]|0;Q=qa+4|0;c[e>>2]=Q;c[qa>>2]=g;if((F|0)==(O|0)){da=Q;break}else{fa=F;ga=pa+1|0;ha=oa;ia=na}}}if((P|0)==(da|0)){E=O;break a}F=da-4|0;if(F>>>0>P>>>0){ta=P;ua=F}else{E=O;break a}while(1){F=c[ta>>2]|0;c[ta>>2]=c[ua>>2];c[ua>>2]=F;F=ta+4|0;Q=ua-4|0;if(F>>>0<Q>>>0){ta=F;ua=Q}else{E=O;break}}break};default:{E=D}}}while(0);O=C+1|0;if(O>>>0<4>>>0){C=O;D=E}else{break}}E=a[s]|0;s=(E&1)==0;if(s){va=(E&255)>>>1}else{va=c[t>>2]|0}if(va>>>0>1>>>0){if(s){wa=(E&255)>>>1;xa=t;ya=t}else{E=c[u>>2]|0;wa=c[t>>2]|0;xa=E;ya=E}E=ya+4|0;ya=xa+(wa<<2)|0;t=c[e>>2]|0;if((E|0)==(ya|0)){za=t}else{u=(xa+(wa-1<<2)+(-E|0)|0)>>>2;wa=t;xa=E;while(1){c[wa>>2]=c[xa>>2];E=xa+4|0;if((E|0)==(ya|0)){break}else{wa=wa+4|0;xa=E}}za=t+(u+1<<2)|0}c[e>>2]=za}za=f&176;if((za|0)==32){c[d>>2]=c[e>>2];return}else if((za|0)==16){return}else{c[d>>2]=b;return}}function Br(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;d=i;i=i+32|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+16|0;m=d+24|0;n=m;o=i;i=i+4|0;i=i+7&-8;p=i;i=i+4|0;i=i+7&-8;q=i;i=i+12|0;i=i+7&-8;r=i;i=i+12|0;i=i+7&-8;s=i;i=i+12|0;i=i+7&-8;t=i;i=i+4|0;i=i+7&-8;u=i;i=i+400|0;v=i;i=i+4|0;i=i+7&-8;w=i;i=i+4|0;i=i+7&-8;x=i;i=i+4|0;i=i+7&-8;Lm(l,g);y=l|0;z=c[y>>2]|0;if(!((c[8714]|0)==-1)){c[k>>2]=34856;c[k+4>>2]=16;c[k+8>>2]=0;mm(34856,k,114)}k=(c[8715]|0)-1|0;A=c[z+8>>2]|0;do{if((c[z+12>>2]|0)-A>>2>>>0>k>>>0){B=c[A+(k<<2)>>2]|0;if((B|0)==0){break}C=B;D=j;E=a[D]|0;F=(E&1)==0;if(F){G=(E&255)>>>1}else{G=c[j+4>>2]|0}if((G|0)==0){H=0}else{if(F){I=j+4|0}else{I=c[j+8>>2]|0}F=c[I>>2]|0;H=(F|0)==(Qc[c[(c[B>>2]|0)+44>>2]&63](C,45)|0)}c[m>>2]=0;dv(q|0,0,12)|0;B=r;dv(B|0,0,12)|0;F=s;dv(F|0,0,12)|0;zr(f,H,l,n,o,p,q,r,s,t);E=u|0;J=a[D]|0;K=(J&1)==0;if(K){L=(J&255)>>>1}else{L=c[j+4>>2]|0}M=c[t>>2]|0;if((L|0)>(M|0)){if(K){N=(J&255)>>>1}else{N=c[j+4>>2]|0}K=a[F]|0;if((K&1)==0){O=(K&255)>>>1}else{O=c[s+4>>2]|0}K=a[B]|0;if((K&1)==0){P=(K&255)>>>1}else{P=c[r+4>>2]|0}Q=O+(N-M<<1|1)+P|0}else{K=a[F]|0;if((K&1)==0){R=(K&255)>>>1}else{R=c[s+4>>2]|0}K=a[B]|0;if((K&1)==0){S=(K&255)>>>1}else{S=c[r+4>>2]|0}Q=R+2+S|0}K=Q+M|0;do{if(K>>>0>100>>>0){B=Gu(K<<2)|0;F=B;if((B|0)!=0){T=F;U=F;V=J;break}Uu();T=0;U=0;V=a[D]|0}else{T=E;U=0;V=J}}while(0);if((V&1)==0){W=(V&255)>>>1;X=j+4|0}else{W=c[j+4>>2]|0;X=c[j+8>>2]|0}Ar(T,v,w,c[g+4>>2]|0,X,X+(W<<2)|0,C,H,n,c[o>>2]|0,c[p>>2]|0,q,r,s,M);c[x>>2]=c[e>>2];tp(b,x,T,c[v>>2]|0,c[w>>2]|0,g,h);if((U|0)==0){Y=400;Z=0;Cm(s);Cm(r);rm(q);_=c[y>>2]|0;$=_|0;aa=Ul($)|0;i=d;return}Hu(U);Y=400;Z=0;Cm(s);Cm(r);rm(q);_=c[y>>2]|0;$=_|0;aa=Ul($)|0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function Cr(a){a=a|0;Sl(a|0);Pu(a);return}function Dr(a){a=a|0;Sl(a|0);return}function Er(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((a[d]&1)==0){f=d+1|0}else{f=c[d+8>>2]|0}d=sc(f|0,1)|0;return d>>>(((d|0)!=-1|0)>>>0)|0}function Fr(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+16|0;j=d|0;k=j;dv(k|0,0,12)|0;l=a[h]|0;if((l&1)==0){m=(l&255)>>>1;n=h+1|0;o=h+1|0}else{l=c[h+8>>2]|0;m=c[h+4>>2]|0;n=l;o=l}l=o+m|0;do{if(n>>>0<l>>>0){m=n;do{wm(j,a[m]|0);m=m+1|0;}while(m>>>0<l>>>0);m=(e|0)==-1?-1:e<<1;if((a[k]&1)==0){p=m;q=10;break}r=c[j+8>>2]|0;s=m}else{p=(e|0)==-1?-1:e<<1;q=10}}while(0);if((q|0)==10){r=j+1|0;s=p}p=qb(s|0,f|0,g|0,r|0)|0;dv(b|0,0,12)|0;r=ev(p|0)|0;g=p+r|0;if((r|0)>0){t=p}else{rm(j);i=d;return}do{wm(b,a[t]|0);t=t+1|0;}while(t>>>0<g>>>0);rm(j);i=d;return}function Gr(a,b){a=a|0;b=b|0;Yb(((b|0)==-1?-1:b<<1)|0)|0;return}function Hr(a){a=a|0;Sl(a|0);Pu(a);return}function Ir(a){a=a|0;Sl(a|0);return}function Jr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((a[d]&1)==0){f=d+1|0}else{f=c[d+8>>2]|0}d=sc(f|0,1)|0;return d>>>(((d|0)!=-1|0)>>>0)|0}function Kr(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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;d=i;i=i+240|0;j=d|0;k=d+8|0;l=d+40|0;m=d+48|0;n=d+56|0;o=d+64|0;p=d+192|0;q=d+200|0;r=d+208|0;s=d+224|0;t=d+232|0;u=r;dv(u|0,0,12)|0;c[s+4>>2]=0;c[s>>2]=21168;v=a[h]|0;if((v&1)==0){w=(v&255)>>>1;x=h+4|0;y=h+4|0}else{v=c[h+8>>2]|0;w=c[h+4>>2]|0;x=v;y=v}v=y+(w<<2)|0;w=k|0;y=j;c[j>>2]=0;c[j+4>>2]=0;a:do{if(x>>>0<v>>>0){j=s|0;h=s;z=k+32|0;A=x;B=21168;while(1){c[m>>2]=A;C=(Vc[c[B+12>>2]&31](j,y,A,v,m,w,z,l)|0)==2;D=c[m>>2]|0;if(C|(D|0)==(A|0)){break}if(w>>>0<(c[l>>2]|0)>>>0){C=w;do{wm(r,a[C]|0);C=C+1|0;}while(C>>>0<(c[l>>2]|0)>>>0);E=c[m>>2]|0}else{E=D}if(!(E>>>0<v>>>0)){break a}A=E;B=c[h>>2]|0}dr(8296)}}while(0);Sl(s|0);if((a[u]&1)==0){F=r+1|0}else{F=c[r+8>>2]|0}u=qb(((e|0)==-1?-1:e<<1)|0,f|0,g|0,F|0)|0;dv(b|0,0,12)|0;c[t+4>>2]=0;c[t>>2]=21112;F=ev(u|0)|0;g=u+F|0;f=n;c[n>>2]=0;c[n+4>>2]=0;if((F|0)<=0){G=8;H=0;I=4;J=0;K=4;L=0;M=t|0;Sl(M);rm(r);i=d;return}F=t|0;n=t;e=g;s=o|0;E=o+128|0;o=u;u=21112;while(1){c[q>>2]=o;v=(Vc[c[u+16>>2]&31](F,f,o,(e-o|0)>32?o+32|0:g,q,s,E,p)|0)==2;m=c[q>>2]|0;if(v|(m|0)==(o|0)){break}if(s>>>0<(c[p>>2]|0)>>>0){v=s;do{Gm(b,c[v>>2]|0);v=v+4|0;}while(v>>>0<(c[p>>2]|0)>>>0);N=c[q>>2]|0}else{N=m}if(!(N>>>0<g>>>0)){O=37;break}o=N;u=c[n>>2]|0}if((O|0)==37){G=8;H=0;I=4;J=0;K=4;L=0;M=t|0;Sl(M);rm(r);i=d;return}dr(8296)}function Lr(a,b){a=a|0;b=b|0;Yb(((b|0)==-1?-1:b<<1)|0)|0;return}function Mr(b){b=b|0;var d=0,e=0,f=0,g=0;c[b>>2]=20632;d=b+8|0;e=c[d>>2]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}f=Xa(2147483647,14472,0)|0;c[8330]=f}}while(0);if((e|0)==(c[8330]|0)){g=b|0;Sl(g);return}pb(c[d>>2]|0);g=b|0;Sl(g);return}function Nr(a){a=a|0;a=pc(8)|0;Vl(a,14768);c[a>>2]=19568;Fb(a|0,25576,40)}function Or(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,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;e=i;i=i+448|0;f=e|0;g=e+16|0;h=e+32|0;j=e+48|0;k=e+64|0;l=e+80|0;m=e+96|0;n=e+112|0;o=e+128|0;p=e+144|0;q=e+160|0;r=e+176|0;s=e+192|0;t=e+208|0;u=e+224|0;v=e+240|0;w=e+256|0;x=e+272|0;y=e+288|0;z=e+304|0;A=e+320|0;B=e+336|0;C=e+352|0;D=e+368|0;E=e+384|0;F=e+400|0;G=e+416|0;H=e+432|0;c[b+4>>2]=d-1;c[b>>2]=20888;d=b+8|0;I=b+12|0;J=b+136|0;a[J]=1;K=b+24|0;c[I>>2]=K;c[d>>2]=K;c[b+16>>2]=J;J=28;L=K;do{if((L|0)==0){M=0}else{c[L>>2]=0;M=c[I>>2]|0}L=M+4|0;c[I>>2]=L;J=J-1|0;}while((J|0)!=0);pm(b+144|0,14472,1);J=c[d>>2]|0;d=c[I>>2]|0;if((d|0)!=(J|0)){c[I>>2]=d+(~((d-4+(-J|0)|0)>>>2)<<2)}c[8387]=0;c[8386]=20592;if(!((c[8636]|0)==-1)){c[G>>2]=34544;c[G+4>>2]=16;c[G+8>>2]=0;mm(34544,G,114)}Pr(b,33544,(c[8637]|0)-1|0);c[8385]=0;c[8384]=20552;if(!((c[8634]|0)==-1)){c[F>>2]=34536;c[F+4>>2]=16;c[F+8>>2]=0;mm(34536,F,114)}Pr(b,33536,(c[8635]|0)-1|0);c[8441]=0;c[8440]=21e3;c[8442]=0;a[33772]=0;F=ob()|0;c[8442]=c[F>>2];if(!((c[8716]|0)==-1)){c[E>>2]=34864;c[E+4>>2]=16;c[E+8>>2]=0;mm(34864,E,114)}Pr(b,33760,(c[8717]|0)-1|0);c[8439]=0;c[8438]=20920;if(!((c[8714]|0)==-1)){c[D>>2]=34856;c[D+4>>2]=16;c[D+8>>2]=0;mm(34856,D,114)}Pr(b,33752,(c[8715]|0)-1|0);c[8393]=0;c[8392]=20688;if(!((c[8640]|0)==-1)){c[C>>2]=34560;c[C+4>>2]=16;c[C+8>>2]=0;mm(34560,C,114)}Pr(b,33568,(c[8641]|0)-1|0);c[8389]=0;c[8388]=20632;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}C=Xa(2147483647,14472,0)|0;c[8330]=C}}while(0);c[8390]=c[8330];if(!((c[8638]|0)==-1)){c[B>>2]=34552;c[B+4>>2]=16;c[B+8>>2]=0;mm(34552,B,114)}Pr(b,33552,(c[8639]|0)-1|0);c[8395]=0;c[8394]=20744;if(!((c[8642]|0)==-1)){c[A>>2]=34568;c[A+4>>2]=16;c[A+8>>2]=0;mm(34568,A,114)}Pr(b,33576,(c[8643]|0)-1|0);c[8397]=0;c[8396]=20800;if(!((c[8644]|0)==-1)){c[z>>2]=34576;c[z+4>>2]=16;c[z+8>>2]=0;mm(34576,z,114)}Pr(b,33584,(c[8645]|0)-1|0);c[8367]=0;c[8366]=20096;a[33472]=46;a[33473]=44;dv(33476,0,12)|0;if(!((c[8620]|0)==-1)){c[y>>2]=34480;c[y+4>>2]=16;c[y+8>>2]=0;mm(34480,y,114)}Pr(b,33464,(c[8621]|0)-1|0);c[8359]=0;c[8358]=20048;c[8360]=46;c[8361]=44;dv(33448,0,12)|0;if(!((c[8618]|0)==-1)){c[x>>2]=34472;c[x+4>>2]=16;c[x+8>>2]=0;mm(34472,x,114)}Pr(b,33432,(c[8619]|0)-1|0);c[8383]=0;c[8382]=20480;if(!((c[8632]|0)==-1)){c[w>>2]=34528;c[w+4>>2]=16;c[w+8>>2]=0;mm(34528,w,114)}Pr(b,33528,(c[8633]|0)-1|0);c[8381]=0;c[8380]=20408;if(!((c[8630]|0)==-1)){c[v>>2]=34520;c[v+4>>2]=16;c[v+8>>2]=0;mm(34520,v,114)}Pr(b,33520,(c[8631]|0)-1|0);c[8379]=0;c[8378]=20344;if(!((c[8628]|0)==-1)){c[u>>2]=34512;c[u+4>>2]=16;c[u+8>>2]=0;mm(34512,u,114)}Pr(b,33512,(c[8629]|0)-1|0);c[8377]=0;c[8376]=20280;if(!((c[8626]|0)==-1)){c[t>>2]=34504;c[t+4>>2]=16;c[t+8>>2]=0;mm(34504,t,114)}Pr(b,33504,(c[8627]|0)-1|0);c[8451]=0;c[8450]=21928;if(!((c[8836]|0)==-1)){c[s>>2]=35344;c[s+4>>2]=16;c[s+8>>2]=0;mm(35344,s,114)}Pr(b,33800,(c[8837]|0)-1|0);c[8449]=0;c[8448]=21864;if(!((c[8834]|0)==-1)){c[r>>2]=35336;c[r+4>>2]=16;c[r+8>>2]=0;mm(35336,r,114)}Pr(b,33792,(c[8835]|0)-1|0);c[8447]=0;c[8446]=21800;if(!((c[8832]|0)==-1)){c[q>>2]=35328;c[q+4>>2]=16;c[q+8>>2]=0;mm(35328,q,114)}Pr(b,33784,(c[8833]|0)-1|0);c[8445]=0;c[8444]=21736;if(!((c[8830]|0)==-1)){c[p>>2]=35320;c[p+4>>2]=16;c[p+8>>2]=0;mm(35320,p,114)}Pr(b,33776,(c[8831]|0)-1|0);c[8341]=0;c[8340]=19752;if(!((c[8608]|0)==-1)){c[o>>2]=34432;c[o+4>>2]=16;c[o+8>>2]=0;mm(34432,o,114)}Pr(b,33360,(c[8609]|0)-1|0);c[8339]=0;c[8338]=19712;if(!((c[8606]|0)==-1)){c[n>>2]=34424;c[n+4>>2]=16;c[n+8>>2]=0;mm(34424,n,114)}Pr(b,33352,(c[8607]|0)-1|0);c[8337]=0;c[8336]=19672;if(!((c[8604]|0)==-1)){c[m>>2]=34416;c[m+4>>2]=16;c[m+8>>2]=0;mm(34416,m,114)}Pr(b,33344,(c[8605]|0)-1|0);c[8335]=0;c[8334]=19632;if(!((c[8602]|0)==-1)){c[l>>2]=34408;c[l+4>>2]=16;c[l+8>>2]=0;mm(34408,l,114)}Pr(b,33336,(c[8603]|0)-1|0);c[8355]=0;c[8354]=19952;c[8356]=2e4;if(!((c[8616]|0)==-1)){c[k>>2]=34464;c[k+4>>2]=16;c[k+8>>2]=0;mm(34464,k,114)}Pr(b,33416,(c[8617]|0)-1|0);c[8351]=0;c[8350]=19856;c[8352]=19904;if(!((c[8614]|0)==-1)){c[j>>2]=34456;c[j+4>>2]=16;c[j+8>>2]=0;mm(34456,j,114)}Pr(b,33400,(c[8615]|0)-1|0);c[8347]=0;c[8346]=20856;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}j=Xa(2147483647,14472,0)|0;c[8330]=j}}while(0);c[8348]=c[8330];c[8346]=19824;if(!((c[8612]|0)==-1)){c[h>>2]=34448;c[h+4>>2]=16;c[h+8>>2]=0;mm(34448,h,114)}Pr(b,33384,(c[8613]|0)-1|0);c[8343]=0;c[8342]=20856;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}h=Xa(2147483647,14472,0)|0;c[8330]=h}}while(0);c[8344]=c[8330];c[8342]=19792;if(!((c[8610]|0)==-1)){c[g>>2]=34440;c[g+4>>2]=16;c[g+8>>2]=0;mm(34440,g,114)}Pr(b,33368,(c[8611]|0)-1|0);c[8375]=0;c[8374]=20184;if(!((c[8624]|0)==-1)){c[f>>2]=34496;c[f+4>>2]=16;c[f+8>>2]=0;mm(34496,f,114)}Pr(b,33496,(c[8625]|0)-1|0);c[8373]=0;c[8372]=20144;if(!((c[8622]|0)==-1)){c[H>>2]=34488;c[H+4>>2]=16;c[H+8>>2]=0;mm(34488,H,114)}Pr(b,33488,(c[8623]|0)-1|0);i=e;return}function Pr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;Tl(b|0);e=a+8|0;f=a+12|0;a=c[f>>2]|0;g=e|0;h=c[g>>2]|0;i=a-h>>2;do{if(i>>>0>d>>>0){j=h}else{k=d+1|0;if(i>>>0<k>>>0){Tt(e,k-i|0);j=c[g>>2]|0;break}if(!(i>>>0>k>>>0)){j=h;break}l=h+(k<<2)|0;if((a|0)==(l|0)){j=h;break}c[f>>2]=a+(~((a-4+(-l|0)|0)>>>2)<<2);j=h}}while(0);h=c[j+(d<<2)>>2]|0;if((h|0)==0){m=j;n=m+(d<<2)|0;c[n>>2]=b;return}Ul(h|0)|0;m=c[g>>2]|0;n=m+(d<<2)|0;c[n>>2]=b;return}function Qr(a){a=a|0;Rr(a);Pu(a);return}function Rr(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c[b>>2]=20888;d=b+12|0;e=c[d>>2]|0;f=b+8|0;g=c[f>>2]|0;if((e|0)!=(g|0)){h=0;i=g;g=e;while(1){e=c[i+(h<<2)>>2]|0;if((e|0)==0){j=g;k=i}else{Ul(e|0)|0;j=c[d>>2]|0;k=c[f>>2]|0}e=h+1|0;if(e>>>0<j-k>>2>>>0){h=e;i=k;g=j}else{break}}}rm(b+144|0);j=c[f>>2]|0;if((j|0)==0){l=b|0;Sl(l);return}f=c[d>>2]|0;if((f|0)!=(j|0)){c[d>>2]=f+(~((f-4+(-j|0)|0)>>>2)<<2)}if((b+24|0)==(j|0)){a[b+136|0]=0;l=b|0;Sl(l);return}else{Pu(j);l=b|0;Sl(l);return}}function Sr(){var b=0,d=0;if((a[51792]|0)!=0){b=c[8322]|0;return b|0}if((ub(51792)|0)==0){b=c[8322]|0;return b|0}do{if((a[51800]|0)==0){if((ub(51800)|0)==0){break}Or(33592,1);c[8326]=33592;c[8324]=33304}}while(0);d=c[c[8324]>>2]|0;c[8328]=d;Tl(d|0);c[8322]=33312;b=c[8322]|0;return b|0}function Tr(a){a=a|0;var b=0,d=0;b=Sr()|0;d=c[b>>2]|0;c[a>>2]=d;Tl(d|0);return}function Ur(a,b){a=a|0;b=b|0;var d=0;d=c[b>>2]|0;c[a>>2]=d;Tl(d|0);return}function Vr(a){a=a|0;Ul(c[a>>2]|0)|0;return}function Wr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d|0;f=c[a>>2]|0;a=b|0;if(!((c[a>>2]|0)==-1)){c[e>>2]=b;c[e+4>>2]=16;c[e+8>>2]=0;mm(a,e,114)}e=(c[b+4>>2]|0)-1|0;b=c[f+8>>2]|0;if(!((c[f+12>>2]|0)-b>>2>>>0>e>>>0)){g=pc(4)|0;h=g;lu(h);Fb(g|0,25544,156);return 0}f=c[b+(e<<2)>>2]|0;if((f|0)==0){g=pc(4)|0;h=g;lu(h);Fb(g|0,25544,156);return 0}else{i=d;return f|0}return 0}function Xr(a){a=a|0;Sl(a|0);Pu(a);return}function Yr(a){a=a|0;if((a|0)==0){return}Dc[c[(c[a>>2]|0)+4>>2]&511](a);return}function Zr(a){a=a|0;c[a+4>>2]=(I=c[8646]|0,c[8646]=I+1,I)+1;return}function _r(a){a=a|0;Sl(a|0);Pu(a);return}function $r(a,d,e){a=a|0;d=d|0;e=e|0;var f=0;if(!(e>>>0<128>>>0)){f=0;return f|0}a=ob()|0;f=(b[(c[a>>2]|0)+(e<<1)>>1]&d)<<16>>16!=0;return f|0}function as(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;if((d|0)==(e|0)){g=d;return g|0}else{h=d;i=f}while(1){f=c[h>>2]|0;if(f>>>0<128>>>0){d=ob()|0;j=b[(c[d>>2]|0)+(f<<1)>>1]|0}else{j=0}b[i>>1]=j;f=h+4|0;if((f|0)==(e|0)){g=e;break}else{h=f;i=i+2|0}}return g|0}function bs(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((e|0)==(f|0)){g=e;return g|0}else{h=e}while(1){e=c[h>>2]|0;if(e>>>0<128>>>0){a=ob()|0;if(!((b[(c[a>>2]|0)+(e<<1)>>1]&d)<<16>>16==0)){g=h;i=7;break}}e=h+4|0;if((e|0)==(f|0)){g=f;i=7;break}else{h=e}}if((i|0)==7){return g|0}return 0}function cs(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;a:do{if((e|0)==(f|0)){g=e}else{a=e;while(1){h=c[a>>2]|0;if(!(h>>>0<128>>>0)){g=a;break a}i=ob()|0;j=a+4|0;if((b[(c[i>>2]|0)+(h<<1)>>1]&d)<<16>>16==0){g=a;break a}if((j|0)==(f|0)){g=f;break}else{a=j}}}}while(0);return g|0}function ds(a,b){a=a|0;b=b|0;var d=0;if(!(b>>>0<128>>>0)){d=b;return d|0}a=tc()|0;d=c[(c[a>>2]|0)+(b<<2)>>2]|0;return d|0}function es(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((b|0)==(d|0)){e=b;return e|0}else{f=b}while(1){b=c[f>>2]|0;if(b>>>0<128>>>0){a=tc()|0;g=c[(c[a>>2]|0)+(b<<2)>>2]|0}else{g=b}c[f>>2]=g;b=f+4|0;if((b|0)==(d|0)){e=d;break}else{f=b}}return e|0}function fs(a,b){a=a|0;b=b|0;var d=0;if(!(b>>>0<128>>>0)){d=b;return d|0}a=uc()|0;d=c[(c[a>>2]|0)+(b<<2)>>2]|0;return d|0}function gs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((b|0)==(d|0)){e=b;return e|0}else{f=b}while(1){b=c[f>>2]|0;if(b>>>0<128>>>0){a=uc()|0;g=c[(c[a>>2]|0)+(b<<2)>>2]|0}else{g=b}c[f>>2]=g;b=f+4|0;if((b|0)==(d|0)){e=d;break}else{f=b}}return e|0}function hs(a,b){a=a|0;b=b|0;return b<<24>>24|0}function is(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((d|0)==(e|0)){g=d;return g|0}else{h=d;i=f}while(1){c[i>>2]=a[h]|0;f=h+1|0;if((f|0)==(e|0)){g=e;break}else{h=f;i=i+4|0}}return g|0}function js(a,b,c){a=a|0;b=b|0;c=c|0;return(b>>>0<128>>>0?b&255:c)|0}function ks(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if((d|0)==(e|0)){h=d;return h|0}b=((e-4+(-d|0)|0)>>>2)+1|0;i=d;j=g;while(1){g=c[i>>2]|0;a[j]=g>>>0<128>>>0?g&255:f;g=i+4|0;if((g|0)==(e|0)){break}else{i=g;j=j+1|0}}h=d+(b<<2)|0;return h|0}function ls(b){b=b|0;var d=0;c[b>>2]=21e3;d=c[b+8>>2]|0;do{if((d|0)!=0){if((a[b+12|0]|0)==0){break}Qu(d)}}while(0);Sl(b|0);Pu(b);return}function ms(b){b=b|0;var d=0;c[b>>2]=21e3;d=c[b+8>>2]|0;do{if((d|0)!=0){if((a[b+12|0]|0)==0){break}Qu(d)}}while(0);Sl(b|0);return}function ns(a,b){a=a|0;b=b|0;var d=0;if(!(b<<24>>24>-1)){d=b;return d|0}a=tc()|0;d=c[(c[a>>2]|0)+((b&255)<<2)>>2]&255;return d|0}function os(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)==(e|0)){f=d;return f|0}else{g=d}while(1){d=a[g]|0;if(d<<24>>24>-1){b=tc()|0;h=c[(c[b>>2]|0)+(d<<24>>24<<2)>>2]&255}else{h=d}a[g]=h;d=g+1|0;if((d|0)==(e|0)){f=e;break}else{g=d}}return f|0}function ps(a,b){a=a|0;b=b|0;var d=0;if(!(b<<24>>24>-1)){d=b;return d|0}a=uc()|0;d=c[(c[a>>2]|0)+(b<<24>>24<<2)>>2]&255;return d|0}function qs(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((d|0)==(e|0)){f=d;return f|0}else{g=d}while(1){d=a[g]|0;if(d<<24>>24>-1){b=uc()|0;h=c[(c[b>>2]|0)+(d<<24>>24<<2)>>2]&255}else{h=d}a[g]=h;d=g+1|0;if((d|0)==(e|0)){f=e;break}else{g=d}}return f|0}function rs(a,b){a=a|0;b=b|0;return b|0}function ss(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((c|0)==(d|0)){f=c;return f|0}else{g=c;h=e}while(1){a[h]=a[g]|0;e=g+1|0;if((e|0)==(d|0)){f=d;break}else{g=e;h=h+1|0}}return f|0}function ts(a,b,c){a=a|0;b=b|0;c=c|0;return(b<<24>>24>-1?b:c)|0}function us(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((c|0)==(d|0)){g=c;return g|0}else{h=c;i=f}while(1){f=a[h]|0;a[i]=f<<24>>24>-1?f:e;f=h+1|0;if((f|0)==(d|0)){g=d;break}else{h=f;i=i+1|0}}return g|0}function vs(a){a=a|0;Sl(a|0);Pu(a);return}function ws(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;c[f>>2]=d;c[i>>2]=g;return 3}function xs(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;c[f>>2]=d;c[i>>2]=g;return 3}function ys(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[f>>2]=d;return 3}function zs(a){a=a|0;return 1}function As(a){a=a|0;return 1}function Bs(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;b=d-c|0;return(b>>>0<e>>>0?b:e)|0}function Cs(a){a=a|0;return 1}function Ds(a){a=a|0;Mr(a);Pu(a);return}function Es(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;l=i;i=i+8|0;m=l|0;n=m;o=i;i=i+4|0;i=i+7&-8;p=(e|0)==(f|0);a:do{if(p){c[k>>2]=h;c[g>>2]=e;q=e}else{r=e;while(1){s=r+4|0;if((c[r>>2]|0)==0){t=r;break}if((s|0)==(f|0)){t=f;break}else{r=s}}c[k>>2]=h;c[g>>2]=e;if(p|(h|0)==(j|0)){q=e;break}r=d;s=j;u=b+8|0;v=o|0;w=h;x=e;y=t;while(1){z=c[r+4>>2]|0;c[m>>2]=c[r>>2];c[m+4>>2]=z;z=bc(c[u>>2]|0)|0;A=eu(w,g,y-x>>2,s-w|0,d)|0;if((z|0)!=0){bc(z|0)|0}if((A|0)==(-1|0)){B=16;break}else if((A|0)==0){C=1;B=51;break}z=(c[k>>2]|0)+A|0;c[k>>2]=z;if((z|0)==(j|0)){B=49;break}if((y|0)==(f|0)){D=f;E=z;F=c[g>>2]|0}else{z=bc(c[u>>2]|0)|0;A=du(v,0,d)|0;if((z|0)!=0){bc(z|0)|0}if((A|0)==-1){C=2;B=51;break}z=c[k>>2]|0;if(A>>>0>(s-z|0)>>>0){C=1;B=51;break}b:do{if((A|0)!=0){G=A;H=v;I=z;while(1){J=a[H]|0;c[k>>2]=I+1;a[I]=J;J=G-1|0;if((J|0)==0){break b}G=J;H=H+1|0;I=c[k>>2]|0}}}while(0);z=(c[g>>2]|0)+4|0;c[g>>2]=z;c:do{if((z|0)==(f|0)){K=f}else{A=z;while(1){I=A+4|0;if((c[A>>2]|0)==0){K=A;break c}if((I|0)==(f|0)){K=f;break}else{A=I}}}}while(0);D=K;E=c[k>>2]|0;F=z}if((F|0)==(f|0)|(E|0)==(j|0)){q=F;break a}else{w=E;x=F;y=D}}if((B|0)==16){c[k>>2]=w;d:do{if((x|0)==(c[g>>2]|0)){L=x}else{y=x;v=w;while(1){s=c[y>>2]|0;r=bc(c[u>>2]|0)|0;A=du(v,s,n)|0;if((r|0)!=0){bc(r|0)|0}if((A|0)==-1){L=y;break d}r=(c[k>>2]|0)+A|0;c[k>>2]=r;A=y+4|0;if((A|0)==(c[g>>2]|0)){L=A;break}else{y=A;v=r}}}}while(0);c[g>>2]=L;C=2;i=l;return C|0}else if((B|0)==49){q=c[g>>2]|0;break}else if((B|0)==51){i=l;return C|0}}}while(0);C=(q|0)!=(f|0)|0;i=l;return C|0}function Fs(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;l=i;i=i+8|0;m=l|0;n=m;o=(e|0)==(f|0);a:do{if(o){c[k>>2]=h;c[g>>2]=e;p=e}else{q=e;while(1){r=q+1|0;if((a[q]|0)==0){s=q;break}if((r|0)==(f|0)){s=f;break}else{q=r}}c[k>>2]=h;c[g>>2]=e;if(o|(h|0)==(j|0)){p=e;break}q=d;r=j;t=b+8|0;u=h;v=e;w=s;while(1){x=c[q+4>>2]|0;c[m>>2]=c[q>>2];c[m+4>>2]=x;y=w;x=bc(c[t>>2]|0)|0;z=au(u,g,y-v|0,r-u>>2,d)|0;if((x|0)!=0){bc(x|0)|0}if((z|0)==(-1|0)){A=16;break}else if((z|0)==0){B=2;A=50;break}x=(c[k>>2]|0)+(z<<2)|0;c[k>>2]=x;if((x|0)==(j|0)){A=48;break}z=c[g>>2]|0;if((w|0)==(f|0)){C=f;D=x;E=z}else{F=bc(c[t>>2]|0)|0;G=$t(x,z,1,d)|0;if((F|0)!=0){bc(F|0)|0}if((G|0)!=0){B=2;A=50;break}c[k>>2]=(c[k>>2]|0)+4;G=(c[g>>2]|0)+1|0;c[g>>2]=G;b:do{if((G|0)==(f|0)){H=f}else{F=G;while(1){z=F+1|0;if((a[F]|0)==0){H=F;break b}if((z|0)==(f|0)){H=f;break}else{F=z}}}}while(0);C=H;D=c[k>>2]|0;E=G}if((E|0)==(f|0)|(D|0)==(j|0)){p=E;break a}else{u=D;v=E;w=C}}if((A|0)==16){c[k>>2]=u;c:do{if((v|0)==(c[g>>2]|0)){I=v}else{w=u;r=v;while(1){q=bc(c[t>>2]|0)|0;F=$t(w,r,y-r|0,n)|0;if((q|0)!=0){bc(q|0)|0}if((F|0)==0){J=r+1|0}else if((F|0)==(-1|0)){A=27;break}else if((F|0)==(-2|0)){A=28;break}else{J=r+F|0}F=(c[k>>2]|0)+4|0;c[k>>2]=F;if((J|0)==(c[g>>2]|0)){I=J;break c}else{w=F;r=J}}if((A|0)==27){c[g>>2]=r;B=2;i=l;return B|0}else if((A|0)==28){c[g>>2]=r;B=1;i=l;return B|0}}}while(0);c[g>>2]=I;B=(I|0)!=(f|0)|0;i=l;return B|0}else if((A|0)==48){p=c[g>>2]|0;break}else if((A|0)==50){i=l;return B|0}}}while(0);B=(p|0)!=(f|0)|0;i=l;return B|0}function Gs(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;h=i;i=i+8|0;c[g>>2]=e;e=h|0;j=bc(c[b+8>>2]|0)|0;b=du(e,0,d)|0;if((j|0)!=0){bc(j|0)|0}if((b|0)==(-1|0)|(b|0)==0){k=2;i=h;return k|0}j=b-1|0;b=c[g>>2]|0;if(j>>>0>(f-b|0)>>>0){k=1;i=h;return k|0}if((j|0)==0){k=0;i=h;return k|0}else{l=j;m=e;n=b}while(1){b=a[m]|0;c[g>>2]=n+1;a[n]=b;b=l-1|0;if((b|0)==0){k=0;break}l=b;m=m+1|0;n=c[g>>2]|0}i=h;return k|0}function Hs(a){a=a|0;var b=0,d=0,e=0;b=a+8|0;a=bc(c[b>>2]|0)|0;d=cu(0,0,4)|0;if((a|0)!=0){bc(a|0)|0}if((d|0)!=0){e=-1;return e|0}d=c[b>>2]|0;if((d|0)==0){e=1;return e|0}b=bc(d|0)|0;if((b|0)==0){e=0;return e|0}bc(b|0)|0;e=0;return e|0}function Is(a){a=a|0;return 0}function Js(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((f|0)==0|(d|0)==(e|0)){g=0;return g|0}h=e;i=a+8|0;a=d;d=0;j=0;while(1){k=bc(c[i>>2]|0)|0;l=_t(a,h-a|0,b)|0;if((k|0)!=0){bc(k|0)|0}if((l|0)==(-1|0)|(l|0)==(-2|0)){g=d;m=15;break}else if((l|0)==0){n=1;o=a+1|0}else{n=l;o=a+l|0}l=n+d|0;k=j+1|0;if(k>>>0>=f>>>0|(o|0)==(e|0)){g=l;m=15;break}else{a=o;d=l;j=k}}if((m|0)==15){return g|0}return 0}function Ks(a){a=a|0;var b=0,d=0;b=c[a+8>>2]|0;do{if((b|0)==0){d=1}else{a=bc(b|0)|0;if((a|0)==0){d=4;break}bc(a|0)|0;d=4}}while(0);return d|0}function Ls(a){a=a|0;Sl(a|0);Pu(a);return}function Ms(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0;b=i;i=i+16|0;a=b|0;k=b+8|0;c[a>>2]=d;c[k>>2]=g;l=Ns(d,e,a,g,h,k,1114111,0)|0;c[f>>2]=d+((c[a>>2]|0)-d>>1<<1);c[j>>2]=g+((c[k>>2]|0)-g);i=b;return l|0}function Ns(d,f,g,h,i,j,k,l){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0;c[g>>2]=d;c[j>>2]=h;do{if((l&2|0)!=0){if((i-h|0)<3){m=1;return m|0}else{c[j>>2]=h+1;a[h]=-17;d=c[j>>2]|0;c[j>>2]=d+1;a[d]=-69;d=c[j>>2]|0;c[j>>2]=d+1;a[d]=-65;break}}}while(0);h=f;l=c[g>>2]|0;if(!(l>>>0<f>>>0)){m=0;return m|0}d=i;i=l;a:while(1){l=b[i>>1]|0;n=l&65535;if(n>>>0>k>>>0){m=2;o=26;break}do{if((l&65535)>>>0<128>>>0){p=c[j>>2]|0;if((d-p|0)<1){m=1;o=26;break a}c[j>>2]=p+1;a[p]=l}else{if((l&65535)>>>0<2048>>>0){p=c[j>>2]|0;if((d-p|0)<2){m=1;o=26;break a}c[j>>2]=p+1;a[p]=n>>>6|192;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=n&63|128;break}if((l&65535)>>>0<55296>>>0){p=c[j>>2]|0;if((d-p|0)<3){m=1;o=26;break a}c[j>>2]=p+1;a[p]=n>>>12|224;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=n>>>6&63|128;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=n&63|128;break}if(!((l&65535)>>>0<56320>>>0)){if((l&65535)>>>0<57344>>>0){m=2;o=26;break a}p=c[j>>2]|0;if((d-p|0)<3){m=1;o=26;break a}c[j>>2]=p+1;a[p]=n>>>12|224;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=n>>>6&63|128;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=n&63|128;break}if((h-i|0)<4){m=1;o=26;break a}p=i+2|0;q=e[p>>1]|0;if((q&64512|0)!=56320){m=2;o=26;break a}if((d-(c[j>>2]|0)|0)<4){m=1;o=26;break a}r=n&960;if(((r<<10)+65536|n<<10&64512|q&1023)>>>0>k>>>0){m=2;o=26;break a}c[g>>2]=p;p=(r>>>6)+1|0;r=c[j>>2]|0;c[j>>2]=r+1;a[r]=p>>>2|240;r=c[j>>2]|0;c[j>>2]=r+1;a[r]=n>>>2&15|p<<4&48|128;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=n<<4&48|q>>>6&15|128;p=c[j>>2]|0;c[j>>2]=p+1;a[p]=q&63|128}}while(0);n=(c[g>>2]|0)+2|0;c[g>>2]=n;if(n>>>0<f>>>0){i=n}else{m=0;o=26;break}}if((o|0)==26){return m|0}return 0}function Os(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0;b=i;i=i+16|0;a=b|0;k=b+8|0;c[a>>2]=d;c[k>>2]=g;l=Ps(d,e,a,g,h,k,1114111,0)|0;c[f>>2]=d+((c[a>>2]|0)-d);c[j>>2]=g+((c[k>>2]|0)-g>>1<<1);i=b;return l|0}function Ps(e,f,g,h,i,j,k,l){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;c[g>>2]=e;c[j>>2]=h;h=c[g>>2]|0;do{if((l&4|0)==0){m=h}else{if((f-h|0)<=2){m=h;break}if(!((a[h]|0)==-17)){m=h;break}if(!((a[h+1|0]|0)==-69)){m=h;break}if(!((a[h+2|0]|0)==-65)){m=h;break}e=h+3|0;c[g>>2]=e;m=e}}while(0);a:do{if(m>>>0<f>>>0){h=f;l=i;e=c[j>>2]|0;n=m;b:while(1){if(!(e>>>0<i>>>0)){o=n;break a}p=a[n]|0;q=p&255;if(q>>>0>k>>>0){r=2;s=41;break}do{if(p<<24>>24>-1){b[e>>1]=p&255;c[g>>2]=n+1}else{if((p&255)>>>0<194>>>0){r=2;s=41;break b}if((p&255)>>>0<224>>>0){if((h-n|0)<2){r=1;s=41;break b}t=d[n+1|0]|0;if((t&192|0)!=128){r=2;s=41;break b}u=t&63|q<<6&1984;if(u>>>0>k>>>0){r=2;s=41;break b}b[e>>1]=u;c[g>>2]=n+2;break}if((p&255)>>>0<240>>>0){if((h-n|0)<3){r=1;s=41;break b}u=a[n+1|0]|0;t=a[n+2|0]|0;if((q|0)==224){if(!((u&-32)<<24>>24==-96)){r=2;s=41;break b}}else if((q|0)==237){if(!((u&-32)<<24>>24==-128)){r=2;s=41;break b}}else{if(!((u&-64)<<24>>24==-128)){r=2;s=41;break b}}v=t&255;if((v&192|0)!=128){r=2;s=41;break b}t=(u&255)<<6&4032|q<<12|v&63;if((t&65535)>>>0>k>>>0){r=2;s=41;break b}b[e>>1]=t;c[g>>2]=n+3;break}if(!((p&255)>>>0<245>>>0)){r=2;s=41;break b}if((h-n|0)<4){r=1;s=41;break b}t=a[n+1|0]|0;v=a[n+2|0]|0;u=a[n+3|0]|0;if((q|0)==240){if(!((t+112&255)>>>0<48>>>0)){r=2;s=41;break b}}else if((q|0)==244){if(!((t&-16)<<24>>24==-128)){r=2;s=41;break b}}else{if(!((t&-64)<<24>>24==-128)){r=2;s=41;break b}}w=v&255;if((w&192|0)!=128){r=2;s=41;break b}v=u&255;if((v&192|0)!=128){r=2;s=41;break b}if((l-e|0)<4){r=1;s=41;break b}u=q&7;x=t&255;t=w<<6;y=v&63;if((x<<12&258048|u<<18|t&4032|y)>>>0>k>>>0){r=2;s=41;break b}b[e>>1]=x<<2&60|w>>>4&3|((x>>>4&3|u<<2)<<6)+16320|55296;u=e+2|0;c[j>>2]=u;b[u>>1]=y|t&960|56320;c[g>>2]=(c[g>>2]|0)+4}}while(0);q=(c[j>>2]|0)+2|0;c[j>>2]=q;p=c[g>>2]|0;if(p>>>0<f>>>0){e=q;n=p}else{o=p;break a}}if((s|0)==41){return r|0}}else{o=m}}while(0);r=o>>>0<f>>>0|0;return r|0}function Qs(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[f>>2]=d;return 3}function Rs(a){a=a|0;return 0}function Ss(a){a=a|0;return 0}function Ts(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Us(c,d,e,1114111,0)|0}function Us(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;do{if((g&4|0)==0){h=b}else{if((c-b|0)<=2){h=b;break}if(!((a[b]|0)==-17)){h=b;break}if(!((a[b+1|0]|0)==-69)){h=b;break}h=(a[b+2|0]|0)==-65?b+3|0:b}}while(0);a:do{if(h>>>0<c>>>0&(e|0)!=0){g=c;i=0;j=h;b:while(1){k=a[j]|0;l=k&255;if(l>>>0>f>>>0){m=j;break a}do{if(k<<24>>24>-1){n=j+1|0;o=i}else{if((k&255)>>>0<194>>>0){m=j;break a}if((k&255)>>>0<224>>>0){if((g-j|0)<2){m=j;break a}p=d[j+1|0]|0;if((p&192|0)!=128){m=j;break a}if((p&63|l<<6&1984)>>>0>f>>>0){m=j;break a}n=j+2|0;o=i;break}if((k&255)>>>0<240>>>0){q=j;if((g-q|0)<3){m=j;break a}p=a[j+1|0]|0;r=a[j+2|0]|0;if((l|0)==224){if(!((p&-32)<<24>>24==-96)){s=21;break b}}else if((l|0)==237){if(!((p&-32)<<24>>24==-128)){s=23;break b}}else{if(!((p&-64)<<24>>24==-128)){s=25;break b}}t=r&255;if((t&192|0)!=128){m=j;break a}if(((p&255)<<6&4032|l<<12&61440|t&63)>>>0>f>>>0){m=j;break a}n=j+3|0;o=i;break}if(!((k&255)>>>0<245>>>0)){m=j;break a}u=j;if((g-u|0)<4){m=j;break a}if((e-i|0)>>>0<2>>>0){m=j;break a}t=a[j+1|0]|0;p=a[j+2|0]|0;r=a[j+3|0]|0;if((l|0)==244){if(!((t&-16)<<24>>24==-128)){s=36;break b}}else if((l|0)==240){if(!((t+112&255)>>>0<48>>>0)){s=34;break b}}else{if(!((t&-64)<<24>>24==-128)){s=38;break b}}v=p&255;if((v&192|0)!=128){m=j;break a}p=r&255;if((p&192|0)!=128){m=j;break a}if(((t&255)<<12&258048|l<<18&1835008|v<<6&4032|p&63)>>>0>f>>>0){m=j;break a}n=j+4|0;o=i+1|0}}while(0);l=o+1|0;if(n>>>0<c>>>0&l>>>0<e>>>0){i=l;j=n}else{m=n;break a}}if((s|0)==21){w=q-b|0;return w|0}else if((s|0)==23){w=q-b|0;return w|0}else if((s|0)==25){w=q-b|0;return w|0}else if((s|0)==34){w=u-b|0;return w|0}else if((s|0)==36){w=u-b|0;return w|0}else if((s|0)==38){w=u-b|0;return w|0}}else{m=h}}while(0);w=m-b|0;return w|0}function Vs(a){a=a|0;return 4}function Ws(a){a=a|0;Sl(a|0);Pu(a);return}function Xs(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0;b=i;i=i+16|0;a=b|0;k=b+8|0;c[a>>2]=d;c[k>>2]=g;l=Ys(d,e,a,g,h,k,1114111,0)|0;c[f>>2]=d+((c[a>>2]|0)-d>>2<<2);c[j>>2]=g+((c[k>>2]|0)-g);i=b;return l|0}function Ys(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0;c[e>>2]=b;c[h>>2]=f;do{if((j&2|0)!=0){if((g-f|0)<3){k=1;return k|0}else{c[h>>2]=f+1;a[f]=-17;b=c[h>>2]|0;c[h>>2]=b+1;a[b]=-69;b=c[h>>2]|0;c[h>>2]=b+1;a[b]=-65;break}}}while(0);f=c[e>>2]|0;if(!(f>>>0<d>>>0)){k=0;return k|0}j=g;g=f;a:while(1){f=c[g>>2]|0;if((f&-2048|0)==55296|f>>>0>i>>>0){k=2;l=19;break}do{if(f>>>0<128>>>0){b=c[h>>2]|0;if((j-b|0)<1){k=1;l=19;break a}c[h>>2]=b+1;a[b]=f}else{if(f>>>0<2048>>>0){b=c[h>>2]|0;if((j-b|0)<2){k=1;l=19;break a}c[h>>2]=b+1;a[b]=f>>>6|192;b=c[h>>2]|0;c[h>>2]=b+1;a[b]=f&63|128;break}b=c[h>>2]|0;m=j-b|0;if(f>>>0<65536>>>0){if((m|0)<3){k=1;l=19;break a}c[h>>2]=b+1;a[b]=f>>>12|224;n=c[h>>2]|0;c[h>>2]=n+1;a[n]=f>>>6&63|128;n=c[h>>2]|0;c[h>>2]=n+1;a[n]=f&63|128;break}else{if((m|0)<4){k=1;l=19;break a}c[h>>2]=b+1;a[b]=f>>>18|240;b=c[h>>2]|0;c[h>>2]=b+1;a[b]=f>>>12&63|128;b=c[h>>2]|0;c[h>>2]=b+1;a[b]=f>>>6&63|128;b=c[h>>2]|0;c[h>>2]=b+1;a[b]=f&63|128;break}}}while(0);f=(c[e>>2]|0)+4|0;c[e>>2]=f;if(f>>>0<d>>>0){g=f}else{k=0;l=19;break}}if((l|0)==19){return k|0}return 0}function Zs(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0;b=i;i=i+16|0;a=b|0;k=b+8|0;c[a>>2]=d;c[k>>2]=g;l=_s(d,e,a,g,h,k,1114111,0)|0;c[f>>2]=d+((c[a>>2]|0)-d);c[j>>2]=g+((c[k>>2]|0)-g>>2<<2);i=b;return l|0}function _s(b,e,f,g,h,i,j,k){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;c[f>>2]=b;c[i>>2]=g;g=c[f>>2]|0;do{if((k&4|0)==0){l=g}else{if((e-g|0)<=2){l=g;break}if(!((a[g]|0)==-17)){l=g;break}if(!((a[g+1|0]|0)==-69)){l=g;break}if(!((a[g+2|0]|0)==-65)){l=g;break}b=g+3|0;c[f>>2]=b;l=b}}while(0);a:do{if(l>>>0<e>>>0){g=e;k=c[i>>2]|0;b=l;b:while(1){if(!(k>>>0<h>>>0)){m=b;break a}n=a[b]|0;o=n&255;do{if(n<<24>>24>-1){if(o>>>0>j>>>0){p=2;q=40;break b}c[k>>2]=o;c[f>>2]=b+1}else{if((n&255)>>>0<194>>>0){p=2;q=40;break b}if((n&255)>>>0<224>>>0){if((g-b|0)<2){p=1;q=40;break b}r=d[b+1|0]|0;if((r&192|0)!=128){p=2;q=40;break b}s=r&63|o<<6&1984;if(s>>>0>j>>>0){p=2;q=40;break b}c[k>>2]=s;c[f>>2]=b+2;break}if((n&255)>>>0<240>>>0){if((g-b|0)<3){p=1;q=40;break b}s=a[b+1|0]|0;r=a[b+2|0]|0;if((o|0)==224){if(!((s&-32)<<24>>24==-96)){p=2;q=40;break b}}else if((o|0)==237){if(!((s&-32)<<24>>24==-128)){p=2;q=40;break b}}else{if(!((s&-64)<<24>>24==-128)){p=2;q=40;break b}}t=r&255;if((t&192|0)!=128){p=2;q=40;break b}r=(s&255)<<6&4032|o<<12&61440|t&63;if(r>>>0>j>>>0){p=2;q=40;break b}c[k>>2]=r;c[f>>2]=b+3;break}if(!((n&255)>>>0<245>>>0)){p=2;q=40;break b}if((g-b|0)<4){p=1;q=40;break b}r=a[b+1|0]|0;t=a[b+2|0]|0;s=a[b+3|0]|0;if((o|0)==240){if(!((r+112&255)>>>0<48>>>0)){p=2;q=40;break b}}else if((o|0)==244){if(!((r&-16)<<24>>24==-128)){p=2;q=40;break b}}else{if(!((r&-64)<<24>>24==-128)){p=2;q=40;break b}}u=t&255;if((u&192|0)!=128){p=2;q=40;break b}t=s&255;if((t&192|0)!=128){p=2;q=40;break b}s=(r&255)<<12&258048|o<<18&1835008|u<<6&4032|t&63;if(s>>>0>j>>>0){p=2;q=40;break b}c[k>>2]=s;c[f>>2]=b+4}}while(0);o=(c[i>>2]|0)+4|0;c[i>>2]=o;n=c[f>>2]|0;if(n>>>0<e>>>0){k=o;b=n}else{m=n;break a}}if((q|0)==40){return p|0}}else{m=l}}while(0);p=m>>>0<e>>>0|0;return p|0}function $s(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[f>>2]=d;return 3}function at(a){a=a|0;return 0}function bt(a){a=a|0;return 0}function ct(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return dt(c,d,e,1114111,0)|0}function dt(b,c,e,f,g){b=b|0;c=c|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;do{if((g&4|0)==0){h=b}else{if((c-b|0)<=2){h=b;break}if(!((a[b]|0)==-17)){h=b;break}if(!((a[b+1|0]|0)==-69)){h=b;break}h=(a[b+2|0]|0)==-65?b+3|0:b}}while(0);a:do{if(h>>>0<c>>>0&(e|0)!=0){g=c;i=1;j=h;b:while(1){k=a[j]|0;l=k&255;do{if(k<<24>>24>-1){if(l>>>0>f>>>0){m=j;break a}n=j+1|0}else{if((k&255)>>>0<194>>>0){m=j;break a}if((k&255)>>>0<224>>>0){if((g-j|0)<2){m=j;break a}o=d[j+1|0]|0;if((o&192|0)!=128){m=j;break a}if((o&63|l<<6&1984)>>>0>f>>>0){m=j;break a}n=j+2|0;break}if((k&255)>>>0<240>>>0){p=j;if((g-p|0)<3){m=j;break a}o=a[j+1|0]|0;q=a[j+2|0]|0;if((l|0)==224){if(!((o&-32)<<24>>24==-96)){r=21;break b}}else if((l|0)==237){if(!((o&-32)<<24>>24==-128)){r=23;break b}}else{if(!((o&-64)<<24>>24==-128)){r=25;break b}}s=q&255;if((s&192|0)!=128){m=j;break a}if(((o&255)<<6&4032|l<<12&61440|s&63)>>>0>f>>>0){m=j;break a}n=j+3|0;break}if(!((k&255)>>>0<245>>>0)){m=j;break a}t=j;if((g-t|0)<4){m=j;break a}s=a[j+1|0]|0;o=a[j+2|0]|0;q=a[j+3|0]|0;if((l|0)==240){if(!((s+112&255)>>>0<48>>>0)){r=33;break b}}else if((l|0)==244){if(!((s&-16)<<24>>24==-128)){r=35;break b}}else{if(!((s&-64)<<24>>24==-128)){r=37;break b}}u=o&255;if((u&192|0)!=128){m=j;break a}o=q&255;if((o&192|0)!=128){m=j;break a}if(((s&255)<<12&258048|l<<18&1835008|u<<6&4032|o&63)>>>0>f>>>0){m=j;break a}n=j+4|0}}while(0);if(!(n>>>0<c>>>0&i>>>0<e>>>0)){m=n;break a}i=i+1|0;j=n}if((r|0)==21){v=p-b|0;return v|0}else if((r|0)==23){v=p-b|0;return v|0}else if((r|0)==25){v=p-b|0;return v|0}else if((r|0)==33){v=t-b|0;return v|0}else if((r|0)==35){v=t-b|0;return v|0}else if((r|0)==37){v=t-b|0;return v|0}}else{m=h}}while(0);v=m-b|0;return v|0}function et(a){a=a|0;return 4}function ft(a){a=a|0;Sl(a|0);Pu(a);return}function gt(a){a=a|0;Sl(a|0);Pu(a);return}function ht(a){a=a|0;c[a>>2]=20096;rm(a+12|0);Sl(a|0);Pu(a);return}function it(a){a=a|0;c[a>>2]=20096;rm(a+12|0);Sl(a|0);return}function jt(a){a=a|0;c[a>>2]=20048;rm(a+16|0);Sl(a|0);Pu(a);return}function kt(a){a=a|0;c[a>>2]=20048;rm(a+16|0);Sl(a|0);return}function lt(b){b=b|0;return a[b+8|0]|0}function mt(a){a=a|0;return c[a+8>>2]|0}function nt(b){b=b|0;return a[b+9|0]|0}function ot(a){a=a|0;return c[a+12>>2]|0}function pt(a,b){a=a|0;b=b|0;om(a,b+12|0);return}function qt(a,b){a=a|0;b=b|0;om(a,b+16|0);return}function rt(a,b){a=a|0;b=b|0;pm(a,12536,4);return}function st(a,b){a=a|0;b=b|0;Am(a,12296,gu(12296)|0);return}function tt(a,b){a=a|0;b=b|0;pm(a,11952,5);return}function ut(a,b){a=a|0;b=b|0;Am(a,11608,gu(11608)|0);return}function vt(b){b=b|0;var d=0;if((a[51888]|0)!=0){d=c[8476]|0;return d|0}if((ub(51888)|0)==0){d=c[8476]|0;return d|0}do{if((a[51776]|0)==0){if((ub(51776)|0)==0){break}dv(32832,0,168)|0;Ub(322,0,u|0)|0}}while(0);sm(32832,16184)|0;sm(32844,16176)|0;sm(32856,16168)|0;sm(32868,16128)|0;sm(32880,16016)|0;sm(32892,16e3)|0;sm(32904,15984)|0;sm(32916,15960)|0;sm(32928,15904)|0;sm(32940,15824)|0;sm(32952,15816)|0;sm(32964,15808)|0;sm(32976,15776)|0;sm(32988,15712)|0;c[8476]=32832;d=c[8476]|0;return d|0}function wt(b){b=b|0;var d=0;if((a[51832]|0)!=0){d=c[8454]|0;return d|0}if((ub(51832)|0)==0){d=c[8454]|0;return d|0}do{if((a[51752]|0)==0){if((ub(51752)|0)==0){break}dv(32088,0,168)|0;Ub(176,0,u|0)|0}}while(0);Dm(32088,16912)|0;Dm(32100,16880)|0;Dm(32112,16840)|0;Dm(32124,16728)|0;Dm(32136,16648)|0;Dm(32148,16616)|0;Dm(32160,16576)|0;Dm(32172,16544)|0;Dm(32184,16448)|0;Dm(32196,16424)|0;Dm(32208,16360)|0;Dm(32220,16344)|0;Dm(32232,16320)|0;Dm(32244,16256)|0;c[8454]=32088;d=c[8454]|0;return d|0}function xt(b){b=b|0;var d=0;if((a[51880]|0)!=0){d=c[8474]|0;return d|0}if((ub(51880)|0)==0){d=c[8474]|0;return d|0}do{if((a[51768]|0)==0){if((ub(51768)|0)==0){break}dv(32544,0,288)|0;Ub(198,0,u|0)|0}}while(0);sm(32544,1360)|0;sm(32556,1272)|0;sm(32568,1208)|0;sm(32580,1096)|0;sm(32592,1088)|0;sm(32604,1064)|0;sm(32616,1016)|0;sm(32628,896)|0;sm(32640,800)|0;sm(32652,728)|0;sm(32664,688)|0;sm(32676,624)|0;sm(32688,528)|0;sm(32700,408)|0;sm(32712,400)|0;sm(32724,392)|0;sm(32736,1088)|0;sm(32748,376)|0;sm(32760,288)|0;sm(32772,17112)|0;sm(32784,17104)|0;sm(32796,17096)|0;sm(32808,17088)|0;sm(32820,17008)|0;c[8474]=32544;d=c[8474]|0;return d|0}function yt(b){b=b|0;var d=0;if((a[51824]|0)!=0){d=c[8452]|0;return d|0}if((ub(51824)|0)==0){d=c[8452]|0;return d|0}do{if((a[51744]|0)==0){if((ub(51744)|0)==0){break}dv(31800,0,288)|0;Ub(146,0,u|0)|0}}while(0);Dm(31800,4560)|0;Dm(31812,4352)|0;Dm(31824,4152)|0;Dm(31836,4048)|0;Dm(31848,2448)|0;Dm(31860,3856)|0;Dm(31872,3760)|0;Dm(31884,3592)|0;Dm(31896,3424)|0;Dm(31908,3312)|0;Dm(31920,3184)|0;Dm(31932,3040)|0;Dm(31944,2880)|0;Dm(31956,2800)|0;Dm(31968,2680)|0;Dm(31980,2584)|0;Dm(31992,2448)|0;Dm(32004,2304)|0;Dm(32016,2120)|0;Dm(32028,2032)|0;Dm(32040,1904)|0;Dm(32052,1712)|0;Dm(32064,1544)|0;Dm(32076,1408)|0;c[8452]=31800;d=c[8452]|0;return d|0}function zt(b){b=b|0;var d=0;if((a[51896]|0)!=0){d=c[8478]|0;return d|0}if((ub(51896)|0)==0){d=c[8478]|0;return d|0}do{if((a[51784]|0)==0){if((ub(51784)|0)==0){break}dv(33e3,0,288)|0;Ub(144,0,u|0)|0}}while(0);sm(33e3,5080)|0;sm(33012,4872)|0;c[8478]=33e3;d=c[8478]|0;return d|0}function At(b){b=b|0;var d=0;if((a[51840]|0)!=0){d=c[8456]|0;return d|0}if((ub(51840)|0)==0){d=c[8456]|0;return d|0}do{if((a[51760]|0)==0){if((ub(51760)|0)==0){break}dv(32256,0,288)|0;Ub(208,0,u|0)|0}}while(0);Dm(32256,5568)|0;Dm(32268,5432)|0;c[8456]=32256;d=c[8456]|0;return d|0}function Bt(b){b=b|0;if((a[51904]|0)!=0){return 33920}if((ub(51904)|0)==0){return 33920}pm(33920,11072,8);Ub(314,33920,u|0)|0;return 33920}function Ct(b){b=b|0;if((a[51848]|0)!=0){return 33832}if((ub(51848)|0)==0){return 33832}Am(33832,10808,gu(10808)|0);Ub(230,33832,u|0)|0;return 33832}function Dt(b){b=b|0;if((a[51928]|0)!=0){return 33968}if((ub(51928)|0)==0){return 33968}pm(33968,10560,8);Ub(314,33968,u|0)|0;return 33968}function Et(b){b=b|0;if((a[51872]|0)!=0){return 33880}if((ub(51872)|0)==0){return 33880}Am(33880,10240,gu(10240)|0);Ub(230,33880,u|0)|0;return 33880}function Ft(b){b=b|0;if((a[51920]|0)!=0){return 33952}if((ub(51920)|0)==0){return 33952}pm(33952,9920,20);Ub(314,33952,u|0)|0;return 33952}function Gt(b){b=b|0;if((a[51864]|0)!=0){return 33864}if((ub(51864)|0)==0){return 33864}Am(33864,9512,gu(9512)|0);Ub(230,33864,u|0)|0;return 33864}function Ht(b){b=b|0;if((a[51912]|0)!=0){return 33936}if((ub(51912)|0)==0){return 33936}pm(33936,9144,11);Ub(314,33936,u|0)|0;return 33936}function It(b){b=b|0;if((a[51856]|0)!=0){return 33848}if((ub(51856)|0)==0){return 33848}Am(33848,8832,gu(8832)|0);Ub(230,33848,u|0)|0;return 33848}function Jt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0.0,j=0,k=0,l=0,m=0.0;f=i;i=i+8|0;g=f|0;if((b|0)==(d|0)){c[e>>2]=4;h=0.0;i=f;return+h}j=Vb()|0;k=c[j>>2]|0;c[j>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);m=+bv(b,g,c[8330]|0);b=c[j>>2]|0;if((b|0)==0){c[j>>2]=k}if((c[g>>2]|0)!=(d|0)){c[e>>2]=4;h=0.0;i=f;return+h}if((b|0)!=34){h=m;i=f;return+h}c[e>>2]=4;h=m;i=f;return+h}function Kt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0.0,j=0,k=0,l=0,m=0.0;f=i;i=i+8|0;g=f|0;if((b|0)==(d|0)){c[e>>2]=4;h=0.0;i=f;return+h}j=Vb()|0;k=c[j>>2]|0;c[j>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);m=+bv(b,g,c[8330]|0);b=c[j>>2]|0;if((b|0)==0){c[j>>2]=k}if((c[g>>2]|0)!=(d|0)){c[e>>2]=4;h=0.0;i=f;return+h}if((b|0)!=34){h=m;i=f;return+h}c[e>>2]=4;h=m;i=f;return+h}function Lt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0.0,j=0,k=0,l=0,m=0.0;f=i;i=i+8|0;g=f|0;if((b|0)==(d|0)){c[e>>2]=4;h=0.0;i=f;return+h}j=Vb()|0;k=c[j>>2]|0;c[j>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);m=+bv(b,g,c[8330]|0);b=c[j>>2]|0;if((b|0)==0){c[j>>2]=k}if((c[g>>2]|0)!=(d|0)){c[e>>2]=4;h=0.0;i=f;return+h}if((b|0)==34){c[e>>2]=4}h=m;i=f;return+h}function Mt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+8|0;h=g|0;do{if((b|0)==(d|0)){c[e>>2]=4;j=0;k=0}else{if((a[b]|0)==45){c[e>>2]=4;j=0;k=0;break}l=Vb()|0;m=c[l>>2]|0;c[l>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}n=Xa(2147483647,14472,0)|0;c[8330]=n}}while(0);n=Ib(b|0,h|0,f|0,c[8330]|0)|0;o=c[l>>2]|0;if((o|0)==0){c[l>>2]=m}if((c[h>>2]|0)!=(d|0)){c[e>>2]=4;j=0;k=0;break}if((o|0)!=34){j=K;k=n;break}c[e>>2]=4;j=-1;k=-1}}while(0);i=g;return(K=j,k)|0}function Nt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+8|0;h=g|0;if((b|0)==(d|0)){c[e>>2]=4;j=0;i=g;return j|0}if((a[b]|0)==45){c[e>>2]=4;j=0;i=g;return j|0}k=Vb()|0;l=c[k>>2]|0;c[k>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}m=Xa(2147483647,14472,0)|0;c[8330]=m}}while(0);m=Ib(b|0,h|0,f|0,c[8330]|0)|0;f=K;b=c[k>>2]|0;if((b|0)==0){c[k>>2]=l}if((c[h>>2]|0)!=(d|0)){c[e>>2]=4;j=0;i=g;return j|0}d=0;if((b|0)==34|(f>>>0>d>>>0|f>>>0==d>>>0&m>>>0>-1>>>0)){c[e>>2]=4;j=-1;i=g;return j|0}else{j=m;i=g;return j|0}return 0}function Ot(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+8|0;h=g|0;if((b|0)==(d|0)){c[e>>2]=4;j=0;i=g;return j|0}if((a[b]|0)==45){c[e>>2]=4;j=0;i=g;return j|0}k=Vb()|0;l=c[k>>2]|0;c[k>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}m=Xa(2147483647,14472,0)|0;c[8330]=m}}while(0);m=Ib(b|0,h|0,f|0,c[8330]|0)|0;f=K;b=c[k>>2]|0;if((b|0)==0){c[k>>2]=l}if((c[h>>2]|0)!=(d|0)){c[e>>2]=4;j=0;i=g;return j|0}d=0;if((b|0)==34|(f>>>0>d>>>0|f>>>0==d>>>0&m>>>0>-1>>>0)){c[e>>2]=4;j=-1;i=g;return j|0}else{j=m;i=g;return j|0}return 0}function Pt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+8|0;h=g|0;if((b|0)==(d|0)){c[e>>2]=4;j=0;i=g;return j|0}if((a[b]|0)==45){c[e>>2]=4;j=0;i=g;return j|0}k=Vb()|0;l=c[k>>2]|0;c[k>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}m=Xa(2147483647,14472,0)|0;c[8330]=m}}while(0);m=Ib(b|0,h|0,f|0,c[8330]|0)|0;f=K;b=c[k>>2]|0;if((b|0)==0){c[k>>2]=l}if((c[h>>2]|0)!=(d|0)){c[e>>2]=4;j=0;i=g;return j|0}d=0;if((b|0)==34|(f>>>0>d>>>0|f>>>0==d>>>0&m>>>0>65535>>>0)){c[e>>2]=4;j=-1;i=g;return j|0}else{j=m&65535;i=g;return j|0}return 0}function Qt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+8|0;h=g|0;if((b|0)==(d|0)){c[e>>2]=4;j=0;k=0;i=g;return(K=j,k)|0}l=Vb()|0;m=c[l>>2]|0;c[l>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}n=Xa(2147483647,14472,0)|0;c[8330]=n}}while(0);n=Lb(b|0,h|0,f|0,c[8330]|0)|0;f=K;b=c[l>>2]|0;if((b|0)==0){c[l>>2]=m}if((c[h>>2]|0)!=(d|0)){c[e>>2]=4;j=0;k=0;i=g;return(K=j,k)|0}if((b|0)==34){c[e>>2]=4;e=0;b=(f|0)>(e|0)|(f|0)==(e|0)&n>>>0>0>>>0;i=g;return(K=b?2147483647:-2147483648,b?-1:0)|0}else{j=f;k=n;i=g;return(K=j,k)|0}return 0}function Rt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+8|0;h=g|0;if((b|0)==(d|0)){c[e>>2]=4;j=0;i=g;return j|0}k=Vb()|0;l=c[k>>2]|0;c[k>>2]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}m=Xa(2147483647,14472,0)|0;c[8330]=m}}while(0);m=Lb(b|0,h|0,f|0,c[8330]|0)|0;f=K;b=c[k>>2]|0;if((b|0)==0){c[k>>2]=l}if((c[h>>2]|0)!=(d|0)){c[e>>2]=4;j=0;i=g;return j|0}do{if((b|0)==34){c[e>>2]=4;d=0;if((f|0)>(d|0)|(f|0)==(d|0)&m>>>0>0>>>0){j=2147483647}else{break}i=g;return j|0}else{d=-1;if((f|0)<(d|0)|(f|0)==(d|0)&m>>>0<-2147483648>>>0){c[e>>2]=4;break}d=0;if((f|0)>(d|0)|(f|0)==(d|0)&m>>>0>2147483647>>>0){c[e>>2]=4;j=2147483647;i=g;return j|0}else{j=m;i=g;return j|0}}}while(0);j=-2147483648;i=g;return j|0}function St(a){a=a|0;var b=0,d=0,e=0,f=0;b=a+4|0;d=(c[a>>2]|0)+(c[b+4>>2]|0)|0;a=d;e=c[b>>2]|0;if((e&1|0)==0){f=e;Dc[f&511](a);return}else{f=c[(c[d>>2]|0)+(e-1)>>2]|0;Dc[f&511](a);return}}function Tt(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=b+8|0;f=b+4|0;g=c[f>>2]|0;h=c[e>>2]|0;i=g;if(!(h-i>>2>>>0<d>>>0)){j=d;k=g;do{if((k|0)==0){l=0}else{c[k>>2]=0;l=c[f>>2]|0}k=l+4|0;c[f>>2]=k;j=j-1|0;}while((j|0)!=0);return}j=b+16|0;k=b|0;l=c[k>>2]|0;g=i-l>>2;i=g+d|0;if(i>>>0>1073741823>>>0){Nr(0)}m=h-l|0;do{if(m>>2>>>0<536870911>>>0){l=m>>1;h=l>>>0<i>>>0?i:l;if((h|0)==0){n=0;o=0;break}l=b+128|0;if(!((a[l]|0)==0&h>>>0<29>>>0)){p=h;q=11;break}a[l]=1;n=j;o=h}else{p=1073741823;q=11}}while(0);if((q|0)==11){n=Nu(p<<2)|0;o=p}p=d;d=n+(g<<2)|0;do{if((d|0)==0){r=0}else{c[d>>2]=0;r=d}d=r+4|0;p=p-1|0;}while((p|0)!=0);p=c[k>>2]|0;r=(c[f>>2]|0)-p|0;q=n+(g-(r>>2)<<2)|0;g=p;cv(q|0,g|0,r)|0;c[k>>2]=q;c[f>>2]=d;c[e>>2]=n+(o<<2);if((p|0)==0){return}if((j|0)==(p|0)){a[b+128|0]=0;return}else{Pu(g);return}}function Ut(a){a=a|0;Cm(32532);Cm(32520);Cm(32508);Cm(32496);Cm(32484);Cm(32472);Cm(32460);Cm(32448);Cm(32436);Cm(32424);Cm(32412);Cm(32400);Cm(32388);Cm(32376);Cm(32364);Cm(32352);Cm(32340);Cm(32328);Cm(32316);Cm(32304);Cm(32292);Cm(32280);Cm(32268);Cm(32256);return}function Vt(a){a=a|0;rm(33276);rm(33264);rm(33252);rm(33240);rm(33228);rm(33216);rm(33204);rm(33192);rm(33180);rm(33168);rm(33156);rm(33144);rm(33132);rm(33120);rm(33108);rm(33096);rm(33084);rm(33072);rm(33060);rm(33048);rm(33036);rm(33024);rm(33012);rm(33e3);return}function Wt(a){a=a|0;Cm(32076);Cm(32064);Cm(32052);Cm(32040);Cm(32028);Cm(32016);Cm(32004);Cm(31992);Cm(31980);Cm(31968);Cm(31956);Cm(31944);Cm(31932);Cm(31920);Cm(31908);Cm(31896);Cm(31884);Cm(31872);Cm(31860);Cm(31848);Cm(31836);Cm(31824);Cm(31812);Cm(31800);return}function Xt(a){a=a|0;rm(32820);rm(32808);rm(32796);rm(32784);rm(32772);rm(32760);rm(32748);rm(32736);rm(32724);rm(32712);rm(32700);rm(32688);rm(32676);rm(32664);rm(32652);rm(32640);rm(32628);rm(32616);rm(32604);rm(32592);rm(32580);rm(32568);rm(32556);rm(32544);return}function Yt(a){a=a|0;Cm(32244);Cm(32232);Cm(32220);Cm(32208);Cm(32196);Cm(32184);Cm(32172);Cm(32160);Cm(32148);Cm(32136);Cm(32124);Cm(32112);Cm(32100);Cm(32088);return}function Zt(a){a=a|0;rm(32988);rm(32976);rm(32964);rm(32952);rm(32940);rm(32928);rm(32916);rm(32904);rm(32892);rm(32880);rm(32868);rm(32856);rm(32844);rm(32832);return}function _t(a,b,c){a=a|0;b=b|0;c=c|0;return $t(0,a,b,(c|0)!=0?c:31056)|0}function $t(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;g=i;i=i+8|0;h=g|0;c[h>>2]=b;j=((f|0)==0?31048:f)|0;f=c[j>>2]|0;a:do{if((d|0)==0){if((f|0)==0){k=0}else{break}i=g;return k|0}else{if((b|0)==0){l=h;c[h>>2]=l;m=l}else{m=b}if((e|0)==0){k=-2;i=g;return k|0}do{if((f|0)==0){l=a[d]|0;n=l&255;if(l<<24>>24>-1){c[m>>2]=n;k=l<<24>>24!=0|0;i=g;return k|0}else{l=n-194|0;if(l>>>0>50>>>0){break a}o=d+1|0;p=c[18936+(l<<2)>>2]|0;q=e-1|0;break}}else{o=d;p=f;q=e}}while(0);b:do{if((q|0)==0){r=p}else{l=a[o]|0;n=(l&255)>>>3;if((n-16|n+(p>>26))>>>0>7>>>0){break a}else{s=o;t=p;u=q;v=l}while(1){s=s+1|0;t=(v&255)-128|t<<6;u=u-1|0;if((t|0)>=0){break}if((u|0)==0){r=t;break b}v=a[s]|0;if(((v&255)-128|0)>>>0>63>>>0){break a}}c[j>>2]=0;c[m>>2]=t;k=e-u|0;i=g;return k|0}}while(0);c[j>>2]=r;k=-2;i=g;return k|0}}while(0);c[j>>2]=0;j=Vb()|0;c[j>>2]=84;k=-1;i=g;return k|0}function au(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=i;i=i+1032|0;h=g+1024|0;j=c[b>>2]|0;c[h>>2]=j;k=(a|0)!=0;l=g|0;m=k?e:256;e=k?a:l;a:do{if((j|0)==0|(m|0)==0){n=d;o=0;p=m;q=e;r=j}else{a=m;s=0;t=e;u=d;v=j;while(1){w=u>>>2;x=w>>>0>=a>>>0;if(!(x|u>>>0>131>>>0)){n=u;o=s;p=a;q=t;r=v;break a}y=x?a:w;z=u-y|0;w=bu(t,h,y,f)|0;if((w|0)==-1){break}if((t|0)==(l|0)){A=l;B=a}else{A=t+(w<<2)|0;B=a-w|0}y=w+s|0;w=c[h>>2]|0;if((w|0)==0|(B|0)==0){n=z;o=y;p=B;q=A;r=w;break a}else{a=B;s=y;t=A;u=z;v=w}}n=z;o=-1;p=0;q=t;r=c[h>>2]|0}}while(0);b:do{if((r|0)==0){C=o}else{if((p|0)==0|(n|0)==0){C=o;break}else{D=p;E=o;F=q;G=n;H=r}while(1){I=$t(F,H,G,f)|0;if((I+2|0)>>>0<3>>>0){break}z=(c[h>>2]|0)+I|0;c[h>>2]=z;A=D-1|0;B=E+1|0;if((A|0)==0|(G|0)==(I|0)){C=B;break b}else{D=A;E=B;F=F+4|0;G=G-I|0;H=z}}if((I|0)==0){c[h>>2]=0;C=E;break}else if((I|0)==(-1|0)){C=-1;break}else{c[f>>2]=0;C=E;break}}}while(0);if(!k){J=1024;K=0;i=g;return C|0}c[b>>2]=c[h>>2];J=1024;K=0;i=g;return C|0}function bu(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0;h=c[e>>2]|0;do{if((g|0)==0){i=5}else{j=g|0;k=c[j>>2]|0;if((k|0)==0){i=5;break}if((b|0)==0){l=k;m=h;n=f;i=16;break}c[j>>2]=0;o=k;p=h;q=b;r=f;i=36}}while(0);if((i|0)==5){if((b|0)==0){s=h;t=f;i=7}else{u=h;v=b;w=f;i=6}}a:while(1){if((i|0)==6){i=0;if((w|0)==0){x=f;i=53;break}else{y=w;z=v;A=u}while(1){h=a[A]|0;do{if(((h&255)-1|0)>>>0<127>>>0){if((A&3|0)==0&y>>>0>3>>>0){B=y;C=z;D=A}else{E=A;F=z;G=y;H=h;break}while(1){I=c[D>>2]|0;if(((I-16843009|I)&-2139062144|0)!=0){i=30;break}c[C>>2]=I&255;c[C+4>>2]=d[D+1|0]|0;c[C+8>>2]=d[D+2|0]|0;J=D+4|0;K=C+16|0;c[C+12>>2]=d[D+3|0]|0;L=B-4|0;if(L>>>0>3>>>0){B=L;C=K;D=J}else{i=31;break}}if((i|0)==30){i=0;E=D;F=C;G=B;H=I&255;break}else if((i|0)==31){i=0;E=J;F=K;G=L;H=a[J]|0;break}}else{E=A;F=z;G=y;H=h}}while(0);M=H&255;if(!((M-1|0)>>>0<127>>>0)){break}c[F>>2]=M;h=G-1|0;if((h|0)==0){x=f;i=53;break a}else{y=h;z=F+4|0;A=E+1|0}}h=M-194|0;if(h>>>0>50>>>0){N=G;O=F;P=E;i=47;break}o=c[18936+(h<<2)>>2]|0;p=E+1|0;q=F;r=G;i=36;continue}else if((i|0)==7){i=0;h=a[s]|0;do{if(((h&255)-1|0)>>>0<127>>>0){if((s&3|0)!=0){Q=s;R=t;S=h;break}g=c[s>>2]|0;if(((g-16843009|g)&-2139062144|0)==0){T=t;U=s}else{Q=s;R=t;S=g&255;break}do{U=U+4|0;T=T-4|0;V=c[U>>2]|0;}while(((V-16843009|V)&-2139062144|0)==0);Q=U;R=T;S=V&255}else{Q=s;R=t;S=h}}while(0);h=S&255;if((h-1|0)>>>0<127>>>0){s=Q+1|0;t=R-1|0;i=7;continue}g=h-194|0;if(g>>>0>50>>>0){N=R;O=b;P=Q;i=47;break}l=c[18936+(g<<2)>>2]|0;m=Q+1|0;n=R;i=16;continue}else if((i|0)==16){i=0;g=(d[m]|0)>>>3;if((g-16|g+(l>>26))>>>0>7>>>0){i=17;break}g=m+1|0;do{if((l&33554432|0)==0){W=g}else{if(((d[g]|0)-128|0)>>>0>63>>>0){i=20;break a}h=m+2|0;if((l&524288|0)==0){W=h;break}if(((d[h]|0)-128|0)>>>0>63>>>0){i=23;break a}W=m+3|0}}while(0);s=W;t=n-1|0;i=7;continue}else if((i|0)==36){i=0;g=d[p]|0;h=g>>>3;if((h-16|h+(o>>26))>>>0>7>>>0){i=37;break}h=p+1|0;X=g-128|o<<6;do{if((X|0)<0){g=(d[h]|0)-128|0;if(g>>>0>63>>>0){i=40;break a}k=p+2|0;Y=g|X<<6;if((Y|0)>=0){Z=Y;_=k;break}g=(d[k]|0)-128|0;if(g>>>0>63>>>0){i=43;break a}Z=g|Y<<6;_=p+3|0}else{Z=X;_=h}}while(0);c[q>>2]=Z;u=_;v=q+4|0;w=r-1|0;i=6;continue}}if((i|0)==17){$=l;aa=m-1|0;ba=b;ca=n;i=46}else if((i|0)==20){$=l;aa=m-1|0;ba=b;ca=n;i=46}else if((i|0)==23){$=l;aa=m-1|0;ba=b;ca=n;i=46}else if((i|0)==37){$=o;aa=p-1|0;ba=q;ca=r;i=46}else if((i|0)==40){$=X;aa=p-1|0;ba=q;ca=r;i=46}else if((i|0)==43){$=Y;aa=p-1|0;ba=q;ca=r;i=46}else if((i|0)==53){return x|0}if((i|0)==46){if(($|0)==0){N=ca;O=ba;P=aa;i=47}else{da=ba;ea=aa}}do{if((i|0)==47){if((a[P]|0)!=0){da=O;ea=P;break}if((O|0)!=0){c[O>>2]=0;c[e>>2]=0}x=f-N|0;return x|0}}while(0);N=Vb()|0;c[N>>2]=84;if((da|0)==0){x=-1;return x|0}c[e>>2]=ea;x=-1;return x|0}function cu(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+8|0;h=g|0;c[h>>2]=b;if((e|0)==0){j=0;i=g;return j|0}do{if((f|0)!=0){if((b|0)==0){k=h;c[h>>2]=k;l=k}else{l=b}k=a[e]|0;m=k&255;if(k<<24>>24>-1){c[l>>2]=m;j=k<<24>>24!=0|0;i=g;return j|0}k=m-194|0;if(k>>>0>50>>>0){break}m=e+1|0;n=c[18936+(k<<2)>>2]|0;if(f>>>0<4>>>0){if((n&-2147483648>>>(((f*6|0)-6|0)>>>0)|0)!=0){break}}k=d[m]|0;m=k>>>3;if((m-16|m+(n>>26))>>>0>7>>>0){break}m=k-128|n<<6;if((m|0)>=0){c[l>>2]=m;j=2;i=g;return j|0}n=(d[e+2|0]|0)-128|0;if(n>>>0>63>>>0){break}k=n|m<<6;if((k|0)>=0){c[l>>2]=k;j=3;i=g;return j|0}m=(d[e+3|0]|0)-128|0;if(m>>>0>63>>>0){break}c[l>>2]=m|k<<6;j=4;i=g;return j|0}}while(0);l=Vb()|0;c[l>>2]=84;j=-1;i=g;return j|0}function du(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((b|0)==0){f=1;return f|0}if(d>>>0<128>>>0){a[b]=d;f=1;return f|0}if(d>>>0<2048>>>0){a[b]=d>>>6|192;a[b+1|0]=d&63|128;f=2;return f|0}if(d>>>0<55296>>>0|(d-57344|0)>>>0<8192>>>0){a[b]=d>>>12|224;a[b+1|0]=d>>>6&63|128;a[b+2|0]=d&63|128;f=3;return f|0}if((d-65536|0)>>>0<1048576>>>0){a[b]=d>>>18|240;a[b+1|0]=d>>>12&63|128;a[b+2|0]=d>>>6&63|128;a[b+3|0]=d&63|128;f=4;return f|0}else{d=Vb()|0;c[d>>2]=84;f=-1;return f|0}return 0}function eu(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;f=i;i=i+264|0;g=f+256|0;h=f|0;j=c[b>>2]|0;c[g>>2]=j;k=(a|0)!=0;l=k?e:256;e=k?a:h;a:do{if((j|0)==0|(l|0)==0){m=d;n=0;o=l;p=e;q=j}else{a=l;r=0;s=e;t=d;u=j;while(1){v=t>>>0>=a>>>0;if(!(v|t>>>0>32>>>0)){m=t;n=r;o=a;p=s;q=u;break a}w=v?a:t;x=t-w|0;v=fu(s,g,w,0)|0;if((v|0)==-1){break}if((s|0)==(h|0)){y=h;z=a}else{y=s+v|0;z=a-v|0}w=v+r|0;v=c[g>>2]|0;if((v|0)==0|(z|0)==0){m=x;n=w;o=z;p=y;q=v;break a}else{a=z;r=w;s=y;t=x;u=v}}m=x;n=-1;o=0;p=s;q=c[g>>2]|0}}while(0);b:do{if((q|0)==0){A=n}else{if((o|0)==0|(m|0)==0){A=n;break}else{B=o;C=n;D=p;E=m;F=q}while(1){G=du(D,c[F>>2]|0,0)|0;if((G+1|0)>>>0<2>>>0){break}x=(c[g>>2]|0)+4|0;c[g>>2]=x;y=E-1|0;z=C+1|0;if((B|0)==(G|0)|(y|0)==0){A=z;break b}else{B=B-G|0;C=z;D=D+G|0;E=y;F=x}}if((G|0)!=0){A=-1;break}c[g>>2]=0;A=C}}while(0);if(!k){H=256;I=0;i=f;return A|0}c[b>>2]=c[g>>2];H=256;I=0;i=f;return A|0}function fu(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;f=i;i=i+8|0;g=f|0;if((b|0)==0){h=c[d>>2]|0;j=g|0;k=c[h>>2]|0;if((k|0)==0){l=0;i=f;return l|0}else{m=0;n=h;o=k}while(1){if(o>>>0>127>>>0){k=du(j,o,0)|0;if((k|0)==-1){l=-1;p=26;break}else{q=k}}else{q=1}k=q+m|0;h=n+4|0;r=c[h>>2]|0;if((r|0)==0){l=k;p=26;break}else{m=k;n=h;o=r}}if((p|0)==26){i=f;return l|0}}a:do{if(e>>>0>3>>>0){o=e;n=b;m=c[d>>2]|0;while(1){q=c[m>>2]|0;if((q|0)==0){s=o;t=n;break a}if(q>>>0>127>>>0){j=du(n,q,0)|0;if((j|0)==-1){l=-1;break}u=n+j|0;v=o-j|0;w=m}else{a[n]=q;u=n+1|0;v=o-1|0;w=c[d>>2]|0}q=w+4|0;c[d>>2]=q;if(v>>>0>3>>>0){o=v;n=u;m=q}else{s=v;t=u;break a}}i=f;return l|0}else{s=e;t=b}}while(0);b:do{if((s|0)==0){x=0}else{b=g|0;u=s;v=t;w=c[d>>2]|0;while(1){m=c[w>>2]|0;if((m|0)==0){p=24;break}if(m>>>0>127>>>0){n=du(b,m,0)|0;if((n|0)==-1){l=-1;p=26;break}if(n>>>0>u>>>0){p=20;break}du(v,c[w>>2]|0,0)|0;y=v+n|0;z=u-n|0;A=w}else{a[v]=m;y=v+1|0;z=u-1|0;A=c[d>>2]|0}m=A+4|0;c[d>>2]=m;if((z|0)==0){x=0;break b}else{u=z;v=y;w=m}}if((p|0)==20){l=e-u|0;i=f;return l|0}else if((p|0)==24){a[v]=0;x=u;break}else if((p|0)==26){i=f;return l|0}}}while(0);c[d>>2]=0;l=e-x|0;i=f;return l|0}function gu(a){a=a|0;var b=0;b=a;while(1){if((c[b>>2]|0)==0){break}else{b=b+4|0}}return b-a>>2|0}function hu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((d|0)==0){return a|0}else{e=b;f=d;g=a}while(1){d=f-1|0;c[g>>2]=c[e>>2];if((d|0)==0){break}else{e=e+4|0;f=d;g=g+4|0}}return a|0}function iu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=(d|0)==0;if(a-b>>2>>>0<d>>>0){if(e){return a|0}else{f=d}do{f=f-1|0;c[a+(f<<2)>>2]=c[b+(f<<2)>>2];}while((f|0)!=0);return a|0}else{if(e){return a|0}else{g=b;h=d;i=a}while(1){d=h-1|0;c[i>>2]=c[g>>2];if((d|0)==0){break}else{g=g+4|0;h=d;i=i+4|0}}return a|0}return 0}function ju(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;if((d|0)==0){return a|0}else{e=d;f=a}while(1){d=e-1|0;c[f>>2]=b;if((d|0)==0){break}else{e=d;f=f+4|0}}return a|0}function ku(a){a=a|0;return}function lu(a){a=a|0;c[a>>2]=19504;return}function mu(a){a=a|0;Pu(a);return}function nu(a){a=a|0;return}function ou(a){a=a|0;return 7128}function pu(a){a=a|0;ku(a|0);return}function qu(a){a=a|0;return}function ru(a){a=a|0;return}function su(a){a=a|0;ku(a|0);Pu(a);return}function tu(a){a=a|0;ku(a|0);Pu(a);return}function uu(a){a=a|0;ku(a|0);Pu(a);return}function vu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+56|0;f=e|0;if((a|0)==(b|0)){g=1;i=e;return g|0}if((b|0)==0){g=0;i=e;return g|0}h=zu(b,27072,27056,0)|0;b=h;if((h|0)==0){g=0;i=e;return g|0}dv(f|0,0,56)|0;c[f>>2]=b;c[f+8>>2]=a;c[f+12>>2]=-1;c[f+48>>2]=1;Wc[c[(c[h>>2]|0)+28>>2]&63](b,f,c[d>>2]|0,1);if((c[f+24>>2]|0)!=1){g=0;i=e;return g|0}c[d>>2]=c[f+16>>2];g=1;i=e;return g|0}function wu(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((c[d+8>>2]|0)!=(b|0)){return}b=d+16|0;g=c[b>>2]|0;if((g|0)==0){c[b>>2]=e;c[d+24>>2]=f;c[d+36>>2]=1;return}if((g|0)!=(e|0)){e=d+36|0;c[e>>2]=(c[e>>2]|0)+1;c[d+24>>2]=2;a[d+54|0]=1;return}e=d+24|0;if((c[e>>2]|0)!=2){return}c[e>>2]=f;return}function xu(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)!=(c[d+8>>2]|0)){g=c[b+8>>2]|0;Wc[c[(c[g>>2]|0)+28>>2]&63](g,d,e,f);return}g=d+16|0;b=c[g>>2]|0;if((b|0)==0){c[g>>2]=e;c[d+24>>2]=f;c[d+36>>2]=1;return}if((b|0)!=(e|0)){e=d+36|0;c[e>>2]=(c[e>>2]|0)+1;c[d+24>>2]=2;a[d+54|0]=1;return}e=d+24|0;if((c[e>>2]|0)!=2){return}c[e>>2]=f;return}function yu(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;if((b|0)==(c[d+8>>2]|0)){g=d+16|0;h=c[g>>2]|0;if((h|0)==0){c[g>>2]=e;c[d+24>>2]=f;c[d+36>>2]=1;return}if((h|0)!=(e|0)){h=d+36|0;c[h>>2]=(c[h>>2]|0)+1;c[d+24>>2]=2;a[d+54|0]=1;return}h=d+24|0;if((c[h>>2]|0)!=2){return}c[h>>2]=f;return}h=c[b+12>>2]|0;g=b+16+(h<<3)|0;i=c[b+20>>2]|0;j=i>>8;if((i&1|0)==0){k=j}else{k=c[(c[e>>2]|0)+j>>2]|0}j=c[b+16>>2]|0;Wc[c[(c[j>>2]|0)+28>>2]&63](j,d,e+k|0,(i&2|0)!=0?f:2);if((h|0)<=1){return}h=d+54|0;i=e;k=b+24|0;while(1){b=c[k+4>>2]|0;j=b>>8;if((b&1|0)==0){l=j}else{l=c[(c[i>>2]|0)+j>>2]|0}j=c[k>>2]|0;Wc[c[(c[j>>2]|0)+28>>2]&63](j,d,e+l|0,(b&2|0)!=0?f:2);if((a[h]|0)!=0){m=16;break}b=k+8|0;if(b>>>0<g>>>0){k=b}else{m=16;break}}if((m|0)==16){return}}function zu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+56|0;g=f|0;h=c[a>>2]|0;j=a+(c[h-8>>2]|0)|0;k=c[h-4>>2]|0;h=k;c[g>>2]=d;c[g+4>>2]=a;c[g+8>>2]=b;c[g+12>>2]=e;e=g+16|0;b=g+20|0;a=g+24|0;l=g+28|0;m=g+32|0;n=g+40|0;dv(e|0,0,39)|0;do{if((k|0)==(d|0)){c[g+48>>2]=1;Kc[c[(c[k>>2]|0)+20>>2]&63](h,g,j,j,1,0);o=(c[a>>2]|0)==1?j:0}else{Cc[c[(c[k>>2]|0)+24>>2]&31](h,g,j,1,0);p=c[g+36>>2]|0;if((p|0)==0){if((c[n>>2]|0)!=1){o=0;break}if((c[l>>2]|0)!=1){o=0;break}o=(c[m>>2]|0)==1?c[b>>2]|0:0;break}else if((p|0)!=1){o=0;break}if((c[a>>2]|0)!=1){if((c[n>>2]|0)!=0){o=0;break}if((c[l>>2]|0)!=1){o=0;break}if((c[m>>2]|0)!=1){o=0;break}}o=c[e>>2]|0}}while(0);i=f;return o|0}function Au(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=b|0;if((h|0)==(c[d+8>>2]|0)){if((c[d+4>>2]|0)!=(e|0)){return}i=d+28|0;if((c[i>>2]|0)==1){return}c[i>>2]=f;return}if((h|0)==(c[d>>2]|0)){do{if((c[d+16>>2]|0)!=(e|0)){h=d+20|0;if((c[h>>2]|0)==(e|0)){break}c[d+32>>2]=f;i=d+44|0;if((c[i>>2]|0)==4){return}j=c[b+12>>2]|0;k=b+16+(j<<3)|0;a:do{if((j|0)>0){l=d+52|0;m=d+53|0;n=d+54|0;o=b+8|0;p=d+24|0;q=e;r=0;s=b+16|0;t=0;b:while(1){a[l]=0;a[m]=0;u=c[s+4>>2]|0;v=u>>8;if((u&1|0)==0){w=v}else{w=c[(c[q>>2]|0)+v>>2]|0}v=c[s>>2]|0;Kc[c[(c[v>>2]|0)+20>>2]&63](v,d,e,e+w|0,2-(u>>>1&1)|0,g);if((a[n]|0)!=0){x=t;y=r;break}do{if((a[m]|0)==0){z=t;A=r}else{if((a[l]|0)==0){if((c[o>>2]&1|0)==0){x=1;y=r;break b}else{z=1;A=r;break}}if((c[p>>2]|0)==1){B=27;break a}if((c[o>>2]&2|0)==0){B=27;break a}else{z=1;A=1}}}while(0);u=s+8|0;if(u>>>0<k>>>0){r=A;s=u;t=z}else{x=z;y=A;break}}if(y){C=x;B=26}else{D=x;B=23}}else{D=0;B=23}}while(0);do{if((B|0)==23){c[h>>2]=e;k=d+40|0;c[k>>2]=(c[k>>2]|0)+1;if((c[d+36>>2]|0)!=1){C=D;B=26;break}if((c[d+24>>2]|0)!=2){C=D;B=26;break}a[d+54|0]=1;if(D){B=27}else{B=28}}}while(0);if((B|0)==26){if(C){B=27}else{B=28}}if((B|0)==27){c[i>>2]=3;return}else if((B|0)==28){c[i>>2]=4;return}}}while(0);if((f|0)!=1){return}c[d+32>>2]=1;return}C=c[b+12>>2]|0;D=b+16+(C<<3)|0;x=c[b+20>>2]|0;y=x>>8;if((x&1|0)==0){E=y}else{E=c[(c[e>>2]|0)+y>>2]|0}y=c[b+16>>2]|0;Cc[c[(c[y>>2]|0)+24>>2]&31](y,d,e+E|0,(x&2|0)!=0?f:2,g);x=b+24|0;if((C|0)<=1){return}C=c[b+8>>2]|0;do{if((C&2|0)==0){b=d+36|0;if((c[b>>2]|0)==1){break}if((C&1|0)==0){E=d+54|0;y=e;A=x;while(1){if((a[E]|0)!=0){B=53;break}if((c[b>>2]|0)==1){B=53;break}z=c[A+4>>2]|0;w=z>>8;if((z&1|0)==0){F=w}else{F=c[(c[y>>2]|0)+w>>2]|0}w=c[A>>2]|0;Cc[c[(c[w>>2]|0)+24>>2]&31](w,d,e+F|0,(z&2|0)!=0?f:2,g);z=A+8|0;if(z>>>0<D>>>0){A=z}else{B=53;break}}if((B|0)==53){return}}A=d+24|0;y=d+54|0;E=e;i=x;while(1){if((a[y]|0)!=0){B=53;break}if((c[b>>2]|0)==1){if((c[A>>2]|0)==1){B=53;break}}z=c[i+4>>2]|0;w=z>>8;if((z&1|0)==0){G=w}else{G=c[(c[E>>2]|0)+w>>2]|0}w=c[i>>2]|0;Cc[c[(c[w>>2]|0)+24>>2]&31](w,d,e+G|0,(z&2|0)!=0?f:2,g);z=i+8|0;if(z>>>0<D>>>0){i=z}else{B=53;break}}if((B|0)==53){return}}}while(0);G=d+54|0;F=e;C=x;while(1){if((a[G]|0)!=0){B=53;break}x=c[C+4>>2]|0;i=x>>8;if((x&1|0)==0){H=i}else{H=c[(c[F>>2]|0)+i>>2]|0}i=c[C>>2]|0;Cc[c[(c[i>>2]|0)+24>>2]&31](i,d,e+H|0,(x&2|0)!=0?f:2,g);x=C+8|0;if(x>>>0<D>>>0){C=x}else{B=53;break}}if((B|0)==53){return}}function Bu(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=b|0;if((h|0)==(c[d+8>>2]|0)){if((c[d+4>>2]|0)!=(e|0)){return}i=d+28|0;if((c[i>>2]|0)==1){return}c[i>>2]=f;return}if((h|0)!=(c[d>>2]|0)){h=c[b+8>>2]|0;Cc[c[(c[h>>2]|0)+24>>2]&31](h,d,e,f,g);return}do{if((c[d+16>>2]|0)!=(e|0)){h=d+20|0;if((c[h>>2]|0)==(e|0)){break}c[d+32>>2]=f;i=d+44|0;if((c[i>>2]|0)==4){return}j=d+52|0;a[j]=0;k=d+53|0;a[k]=0;l=c[b+8>>2]|0;Kc[c[(c[l>>2]|0)+20>>2]&63](l,d,e,e,1,g);if((a[k]|0)==0){m=0;n=13}else{if((a[j]|0)==0){m=1;n=13}}a:do{if((n|0)==13){c[h>>2]=e;j=d+40|0;c[j>>2]=(c[j>>2]|0)+1;do{if((c[d+36>>2]|0)==1){if((c[d+24>>2]|0)!=2){n=16;break}a[d+54|0]=1;if(m){break a}}else{n=16}}while(0);if((n|0)==16){if(m){break}}c[i>>2]=4;return}}while(0);c[i>>2]=3;return}}while(0);if((f|0)!=1){return}c[d+32>>2]=1;return}function Cu(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;if((c[d+8>>2]|0)==(b|0)){if((c[d+4>>2]|0)!=(e|0)){return}g=d+28|0;if((c[g>>2]|0)==1){return}c[g>>2]=f;return}if((c[d>>2]|0)!=(b|0)){return}do{if((c[d+16>>2]|0)!=(e|0)){b=d+20|0;if((c[b>>2]|0)==(e|0)){break}c[d+32>>2]=f;c[b>>2]=e;b=d+40|0;c[b>>2]=(c[b>>2]|0)+1;do{if((c[d+36>>2]|0)==1){if((c[d+24>>2]|0)!=2){break}a[d+54|0]=1}}while(0);c[d+44>>2]=4;return}}while(0);if((f|0)!=1){return}c[d+32>>2]=1;return}function Du(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var 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;if((b|0)!=(c[d+8>>2]|0)){i=d+52|0;j=a[i]|0;k=d+53|0;l=a[k]|0;m=c[b+12>>2]|0;n=b+16+(m<<3)|0;a[i]=0;a[k]=0;o=c[b+20>>2]|0;p=o>>8;if((o&1|0)==0){q=p}else{q=c[(c[f>>2]|0)+p>>2]|0}p=c[b+16>>2]|0;Kc[c[(c[p>>2]|0)+20>>2]&63](p,d,e,f+q|0,(o&2|0)!=0?g:2,h);a:do{if((m|0)>1){o=d+24|0;q=b+8|0;p=d+54|0;r=f;s=b+24|0;do{if((a[p]|0)!=0){break a}do{if((a[i]|0)==0){if((a[k]|0)==0){break}if((c[q>>2]&1|0)==0){break a}}else{if((c[o>>2]|0)==1){break a}if((c[q>>2]&2|0)==0){break a}}}while(0);a[i]=0;a[k]=0;t=c[s+4>>2]|0;u=t>>8;if((t&1|0)==0){v=u}else{v=c[(c[r>>2]|0)+u>>2]|0}u=c[s>>2]|0;Kc[c[(c[u>>2]|0)+20>>2]&63](u,d,e,f+v|0,(t&2|0)!=0?g:2,h);s=s+8|0;}while(s>>>0<n>>>0)}}while(0);a[i]=j;a[k]=l;return}a[d+53|0]=1;if((c[d+4>>2]|0)!=(f|0)){return}a[d+52|0]=1;f=d+16|0;l=c[f>>2]|0;if((l|0)==0){c[f>>2]=e;c[d+24>>2]=g;c[d+36>>2]=1;if(!((c[d+48>>2]|0)==1&(g|0)==1)){return}a[d+54|0]=1;return}if((l|0)!=(e|0)){e=d+36|0;c[e>>2]=(c[e>>2]|0)+1;a[d+54|0]=1;return}e=d+24|0;l=c[e>>2]|0;if((l|0)==2){c[e>>2]=g;w=g}else{w=l}if(!((c[d+48>>2]|0)==1&(w|0)==1)){return}a[d+54|0]=1;return}function Eu(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0;if((b|0)!=(c[d+8>>2]|0)){i=c[b+8>>2]|0;Kc[c[(c[i>>2]|0)+20>>2]&63](i,d,e,f,g,h);return}a[d+53|0]=1;if((c[d+4>>2]|0)!=(f|0)){return}a[d+52|0]=1;f=d+16|0;h=c[f>>2]|0;if((h|0)==0){c[f>>2]=e;c[d+24>>2]=g;c[d+36>>2]=1;if(!((c[d+48>>2]|0)==1&(g|0)==1)){return}a[d+54|0]=1;return}if((h|0)!=(e|0)){e=d+36|0;c[e>>2]=(c[e>>2]|0)+1;a[d+54|0]=1;return}e=d+24|0;h=c[e>>2]|0;if((h|0)==2){c[e>>2]=g;j=g}else{j=h}if(!((c[d+48>>2]|0)==1&(j|0)==1)){return}a[d+54|0]=1;return}function Fu(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;if((c[d+8>>2]|0)!=(b|0)){return}a[d+53|0]=1;if((c[d+4>>2]|0)!=(f|0)){return}a[d+52|0]=1;f=d+16|0;b=c[f>>2]|0;if((b|0)==0){c[f>>2]=e;c[d+24>>2]=g;c[d+36>>2]=1;if(!((c[d+48>>2]|0)==1&(g|0)==1)){return}a[d+54|0]=1;return}if((b|0)!=(e|0)){e=d+36|0;c[e>>2]=(c[e>>2]|0)+1;a[d+54|0]=1;return}e=d+24|0;b=c[e>>2]|0;if((b|0)==2){c[e>>2]=g;i=g}else{i=b}if(!((c[d+48>>2]|0)==1&(i|0)==1)){return}a[d+54|0]=1;return}
|
|
|
|
|
|
|
|
function mg(c,d,f,g,h){c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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;j=i;i=i+2048|0;k=j|0;l=20-h|0;m=1<<l-1;if((f|0)>1){n=f;o=0;while(1){p=o+1|0;q=n>>1;if((q|0)>1){n=q;o=p}else{r=p;break}}}else{r=0}o=5-r|0;r=(f|0)>0;if(r){s=0}else{t=2048;u=0;i=j;return}do{n=f;while(1){v=n-1|0;if((n|0)<=0){break}p=g+((ga(v,f)|0)+s<<1)|0;if((b[p>>1]|0)==0){n=v}else{break}}p=(n|0)<1;q=0;do{if(p){w=0;x=13}else{y=0;z=0;while(1){A=g+((ga(z,f)|0)+s<<1)|0;B=(ga(b[A>>1]|0,a[27616+(z<<o<<5)+q|0]|0)|0)+y|0;if((z|0)<(v|0)){y=B;z=z+1|0}else{break}}z=B+64>>7;if((z|0)<-32768){C=-32768}else{w=z;x=13}}if((x|0)==13){x=0;C=(w|0)>32767?32767:w&65535}z=k+((ga(q,f)|0)+s<<1)|0;b[z>>1]=C;q=q+1|0;}while((q|0)<(f|0));s=s+1|0;}while((s|0)<(f|0));if(!r){t=2048;u=0;i=j;return}r=(1<<h)-1|0;h=0;do{s=ga(h,f)|0;C=f;while(1){D=C-1|0;if((C|0)<=0){break}if((b[k+(D+s<<1)>>1]|0)==0){C=D}else{break}}w=(C|0)<1;x=ga(h,d)|0;B=0;do{if(w){E=0}else{v=0;g=0;while(1){q=(ga(b[k+(g+s<<1)>>1]|0,a[27616+(g<<o<<5)+B|0]|0)|0)+v|0;if((g|0)<(D|0)){v=q;g=g+1|0}else{E=q;break}}}g=c+(B+x<<1)|0;v=(e[g>>1]|0)+(E+m>>l)|0;if((v|0)<0){F=0}else{F=((v|0)>(r|0)?r:v)&65535}b[g>>1]=F;B=B+1|0;}while((B|0)<(f|0));h=h+1|0;}while((h|0)<(f|0));t=2048;u=0;i=j;return}function ng(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;mg(a,c,8,b,d);return}function og(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;mg(a,c,16,b,d);return}function pg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;mg(a,c,32,b,d);return}function qg(a,b,c){a=a|0;b=b|0;c=c|0;rg(a,4,b,c);return}function rg(c,d,e,f){c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=i;i=i+2048|0;h=g|0;if((d|0)>1){j=d;k=0;while(1){l=j>>1;if((l|0)>1){j=l;k=k+1|0}else{m=d;n=0;break}}while(1){j=m>>1;if((j|0)>1){m=j;n=n+1|0}else{break}}m=n+7|0;j=1<<k-1;l=1<<n+6;n=d;o=0;while(1){p=o+1|0;q=n>>1;if((q|0)>1){n=q;o=p}else{r=p;s=k;t=m;u=j;v=l;break}}}else{r=0;s=-1;t=6;u=0;v=32}l=5-r|0;r=(d|0)>0;if(r){w=0}else{x=2048;y=0;i=g;return}do{j=0;do{m=j<<l;k=0;o=0;do{n=e+((ga(o,f)|0)+w<<1)|0;k=(ga(b[n>>1]|0,a[27616+(m<<5)+o|0]|0)|0)+k|0;o=o+1|0;}while((o|0)<(d|0));o=h+((ga(j,d)|0)+w<<1)|0;b[o>>1]=k+u>>s;j=j+1|0;}while((j|0)<(d|0));w=w+1|0;}while((w|0)<(d|0));if(r){z=0}else{x=2048;y=0;i=g;return}do{r=ga(z,d)|0;w=0;do{s=w<<l;u=0;f=0;do{u=(ga(b[h+(f+r<<1)>>1]|0,a[27616+(s<<5)+f|0]|0)|0)+u|0;f=f+1|0;}while((f|0)<(d|0));b[c+(w+r<<1)>>1]=u+v>>t;w=w+1|0;}while((w|0)<(d|0));z=z+1|0;}while((z|0)<(d|0));x=2048;y=0;i=g;return}function sg(a,b,c){a=a|0;b=b|0;c=c|0;rg(a,8,b,c);return}function tg(a,b,c){a=a|0;b=b|0;c=c|0;rg(a,16,b,c);return}function ug(a,b,c){a=a|0;b=b|0;c=c|0;rg(a,32,b,c);return}function vg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;f=i;i=i+2176|0;g=f|0;h=(c|0)>0;if(!h){j=64;k=0;l=64;m=0;n=2048;o=0;i=f;return}p=c>>1;q=(p|0)>0;r=c>>2;s=(r|0)>1;t=f+2048|0;u=f+2112|0;v=0;while(1){w=ga(v,e)|0;if(q){x=0;do{y=d+(x+w<<1)|0;z=x+p|0;A=d+(z+w<<1)|0;b[t+(x<<1)>>1]=(b[A>>1]|0)+(b[y>>1]|0);b[t+(z<<1)>>1]=(b[y>>1]|0)-(b[A>>1]|0);x=x+1|0;}while((x|0)<(p|0))}if(s){x=t;w=u;A=p;y=r;while(1){z=(y|0)>0;B=0;do{if(z){C=0;do{D=C+B|0;E=b[x+(D<<1)>>1]|0;F=D+y|0;G=b[x+(F<<1)>>1]|0;b[w+(D<<1)>>1]=G+E;b[w+(F<<1)>>1]=E-G;C=C+1|0;}while((C|0)<(y|0))}B=B+A|0;}while((B|0)<(c|0));B=y>>1;if((B|0)>1){z=x;x=w;A=A>>1;y=B;w=z}else{H=w;I=x;break}}}else{H=t;I=u}x=ga(v,c)|0;w=0;do{y=H+(w<<1)|0;A=w|1;z=H+(A<<1)|0;b[g+(w+x<<1)>>1]=(b[z>>1]|0)+(b[y>>1]|0);b[g+(A+x<<1)>>1]=(b[y>>1]|0)-(b[z>>1]|0);w=w+2|0;}while((w|0)<(c|0));w=v+1|0;if((w|0)<(c|0)){t=H;u=I;v=w}else{break}}if(!h){j=64;k=0;l=64;m=0;n=2048;o=0;i=f;return}h=c>>1;v=(h|0)>0;u=c>>2;t=(u|0)>1;r=H;H=I;I=0;while(1){if(v){p=0;do{s=g+((ga(p,c)|0)+I<<1)|0;d=p+h|0;q=g+((ga(d,c)|0)+I<<1)|0;b[r+(p<<1)>>1]=(b[q>>1]|0)+(b[s>>1]|0);b[r+(d<<1)>>1]=(b[s>>1]|0)-(b[q>>1]|0);p=p+1|0;}while((p|0)<(h|0))}if(t){p=r;q=H;s=h;d=u;while(1){e=(d|0)>0;w=0;do{if(e){x=0;do{z=x+w|0;y=b[p+(z<<1)>>1]|0;A=z+d|0;B=b[p+(A<<1)>>1]|0;b[q+(z<<1)>>1]=B+y;b[q+(A<<1)>>1]=y-B;x=x+1|0;}while((x|0)<(d|0))}w=w+s|0;}while((w|0)<(c|0));w=d>>1;if((w|0)>1){e=p;p=q;s=s>>1;d=w;q=e}else{J=q;K=p;break}}}else{J=r;K=H}p=0;do{q=J+(p<<1)|0;d=p|1;s=J+(d<<1)|0;e=a+((ga(p,c)|0)+I<<1)|0;b[e>>1]=(b[s>>1]|0)+(b[q>>1]|0);e=a+((ga(d,c)|0)+I<<1)|0;b[e>>1]=(b[q>>1]|0)-(b[s>>1]|0);p=p+2|0;}while((p|0)<(c|0));p=I+1|0;if((p|0)<(c|0)){r=J;H=K;I=p}else{break}}j=64;k=0;l=64;m=0;n=2048;o=0;i=f;return}function wg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;e=i;i=i+32|0;f=e|0;g=b[c>>1]|0;h=b[c+4>>1]|0;j=h+g&65535;k=b[c+2>>1]|0;l=b[c+6>>1]|0;m=l+k&65535;n=g-h&65535;h=k-l&65535;l=f|0;b[l>>1]=m+j;k=f+2|0;b[k>>1]=j-m;m=f+4|0;b[m>>1]=h+n;j=f+6|0;b[j>>1]=n-h;h=b[c+(d<<1)>>1]|0;n=b[c+(d+2<<1)>>1]|0;g=n+h&65535;o=b[c+(d+1<<1)>>1]|0;p=b[c+(d+3<<1)>>1]|0;q=p+o&65535;r=h-n&65535;n=o-p&65535;p=q+g&65535;b[f+8>>1]=p;o=g-q&65535;b[f+10>>1]=o;q=f+12|0;b[q>>1]=n+r;g=f+14|0;b[g>>1]=r-n;n=d<<1;r=b[c+(n<<1)>>1]|0;h=b[c+(n+2<<1)>>1]|0;s=h+r&65535;t=b[c+((n|1)<<1)>>1]|0;u=b[c+(n+3<<1)>>1]|0;n=u+t&65535;v=r-h&65535;h=t-u&65535;u=n+s&65535;b[f+16>>1]=u;t=s-n&65535;b[f+18>>1]=t;n=h+v&65535;b[f+20>>1]=n;s=v-h&65535;b[f+22>>1]=s;h=d*3|0;d=b[c+(h<<1)>>1]|0;v=b[c+(h+2<<1)>>1]|0;r=v+d&65535;w=b[c+(h+1<<1)>>1]|0;x=b[c+(h+3<<1)>>1]|0;h=x+w&65535;c=d-v&65535;v=w-x&65535;x=h+r&65535;b[f+24>>1]=x;w=r-h&65535;b[f+26>>1]=w;h=v+c&65535;b[f+28>>1]=h;r=c-v&65535;b[f+30>>1]=r;f=b[l>>1]|0;l=u+f&65535;v=x+p&65535;c=f-u&65535;u=p-x&65535;b[a>>1]=v+l;b[a+8>>1]=l-v;b[a+16>>1]=u+c;b[a+24>>1]=c-u;u=b[k>>1]|0;k=t+u&65535;c=w+o&65535;v=u-t&65535;t=o-w&65535;b[a+2>>1]=c+k;b[a+10>>1]=k-c;b[a+18>>1]=t+v;b[a+26>>1]=v-t;t=b[m>>1]|0;m=n+t&65535;v=b[q>>1]|0;q=h+v&65535;c=t-n&65535;n=v-h&65535;b[a+4>>1]=q+m;b[a+12>>1]=m-q;b[a+20>>1]=n+c;b[a+28>>1]=c-n;n=b[j>>1]|0;j=s+n&65535;c=b[g>>1]|0;g=r+c&65535;q=n-s&65535;s=c-r&65535;b[a+6>>1]=g+j;b[a+14>>1]=j-g;b[a+22>>1]=s+q;b[a+30>>1]=q-s;i=e;return}function xg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;i=i+128|0;f=e|0;g=0;while(1){h=ga(g,d)|0;j=b[c+(h<<1)>>1]|0;k=b[c+(h+4<<1)>>1]|0;l=k+j&65535;m=b[c+(h+1<<1)>>1]|0;n=b[c+(h+5<<1)>>1]|0;o=n+m&65535;p=b[c+(h+2<<1)>>1]|0;q=b[c+(h+6<<1)>>1]|0;r=q+p&65535;s=b[c+(h+3<<1)>>1]|0;t=b[c+(h+7<<1)>>1]|0;h=t+s&65535;u=j-k&65535;k=m-n&65535;n=p-q&65535;q=s-t&65535;t=r+l&65535;s=h+o&65535;p=l-r&65535;r=o-h&65535;h=n+u&65535;o=q+k&65535;l=u-n&65535;n=k-q&65535;q=g<<3;b[f+(q<<1)>>1]=s+t;b[f+((q|1)<<1)>>1]=t-s;b[f+((q|2)<<1)>>1]=r+p;b[f+((q|3)<<1)>>1]=p-r;b[f+((q|4)<<1)>>1]=o+h;b[f+((q|5)<<1)>>1]=h-o;b[f+((q|6)<<1)>>1]=n+l;b[f+((q|7)<<1)>>1]=l-n;n=g+1|0;if((n|0)<8){g=n}else{v=0;break}}do{g=b[f+(v<<1)>>1]|0;c=v+32|0;d=b[f+(c<<1)>>1]|0;n=d+g&65535;l=v+8|0;q=b[f+(l<<1)>>1]|0;o=v+40|0;h=b[f+(o<<1)>>1]|0;r=h+q&65535;p=v+16|0;s=b[f+(p<<1)>>1]|0;t=v+48|0;k=b[f+(t<<1)>>1]|0;u=k+s&65535;m=v+24|0;j=b[f+(m<<1)>>1]|0;w=v+56|0;x=b[f+(w<<1)>>1]|0;y=x+j&65535;z=g-d&65535;d=q-h&65535;h=s-k&65535;k=j-x&65535;x=u+n&65535;j=y+r&65535;s=n-u&65535;u=r-y&65535;y=h+z&65535;r=k+d&65535;n=z-h&65535;h=d-k&65535;b[a+(v<<1)>>1]=j+x;b[a+(l<<1)>>1]=x-j;b[a+(p<<1)>>1]=u+s;b[a+(m<<1)>>1]=s-u;b[a+(c<<1)>>1]=r+y;b[a+(o<<1)>>1]=y-r;b[a+(t<<1)>>1]=h+n;b[a+(w<<1)>>1]=n-h;v=v+1|0;}while((v|0)<8);i=e;return}function yg(a,b,c){a=a|0;b=b|0;c=c|0;vg(a,16,b,c);return}function zg(a,b,c){a=a|0;b=b|0;c=c|0;vg(a,32,b,c);return}function Ag(c,d,e,f,g,h){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((g&1|0)!=0){ec(13704,16192,40,18488)}if((h|0)>0&(g|0)>0){i=0}else{return}do{j=e+((ga(i,f)|0)<<1)|0;k=c+(ga(i,d)|0)|0;l=0;while(1){m=(b[j>>1]|0)+32>>6;if((m|0)<0){n=0}else{n=(m|0)>255?-1:m&255}a[k]=n;m=(b[j+2>>1]|0)+32>>6;if((m|0)<0){o=0}else{o=(m|0)>255?-1:m&255}a[k+1|0]=o;m=l+2|0;if((m|0)<(g|0)){j=j+4|0;k=k+2|0;l=m}else{break}}i=i+1|0;}while((i|0)<(h|0));return}function Bg(c,d,e,f,g,h,i,j,k){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;var l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((k|0)<=0){ec(13312,16192,60,18552)}l=1<<k-1;if((h|0)>0&(g|0)>0){m=0}else{return}do{n=e+((ga(m,f)|0)<<1)|0;o=c+(ga(m,d)|0)|0;p=0;while(1){q=((ga(b[n>>1]|0,i)|0)+l>>k)+j|0;if((q|0)<0){r=0}else{r=(q|0)>255?-1:q&255}a[o]=r;q=p+1|0;if((q|0)<(g|0)){n=n+2|0;o=o+1|0;p=q}else{break}}m=m+1|0;}while((m|0)<(h|0));return}function Cg(c,d,e,f,g,h,i,j,k,l,m,n){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;var o=0,p=0,q=0,r=0,s=0,t=0,u=0;if((n|0)<=0){ec(13312,16192,80,18456)}o=k+1+m<<n;if((i|0)<=0){return}m=n+1|0;if((h|0)>0){p=0}else{return}do{n=ga(p,g)|0;k=e+(n<<1)|0;q=f+(n<<1)|0;n=c+(ga(p,d)|0)|0;r=0;while(1){s=ga(b[k>>1]|0,j)|0;t=s+o+(ga(b[q>>1]|0,l)|0)>>m;if((t|0)<0){u=0}else{u=(t|0)>255?-1:t&255}a[n]=u;t=r+1|0;if((t|0)<(h|0)){k=k+2|0;q=q+2|0;n=n+1|0;r=t}else{break}}p=p+1|0;}while((p|0)<(i|0));return}function Dg(c,d,e,f,g,h,i){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((h&1|0)!=0){ec(13704,16192,105,18312)}if((i|0)<=0){return}j=(h|0)>0;k=0;do{l=ga(k,g)|0;if(j){m=e+(l<<1)|0;n=f+(l<<1)|0;l=c+(ga(k,d)|0)|0;o=0;while(1){p=(b[m>>1]|0)+64+(b[n>>1]|0)>>7;if((p|0)<0){q=0}else{q=(p|0)>255?-1:p&255}a[l]=q;p=(b[m+2>>1]|0)+64+(b[n+2>>1]|0)>>7;if((p|0)<0){r=0}else{r=(p|0)>255?-1:p&255}a[l+1|0]=r;p=o+2|0;if((p|0)<(h|0)){m=m+4|0;n=n+4|0;l=l+2|0;o=p}else{break}}}k=k+1|0;}while((k|0)<(i|0));return}function Eg(a,c,d,e,f,g,h){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=14-h|0;if((i|0)>0){j=1<<i-1}else{j=0}if((f&1|0)!=0){ec(13704,16192,172,18424)}if((g|0)<=0){return}k=(f|0)>0;l=(1<<h)-1|0;h=l&65535;m=0;do{if(k){n=d+((ga(m,e)|0)<<1)|0;o=a+((ga(m,c)|0)<<1)|0;p=0;while(1){q=(b[n>>1]|0)+j>>i;if((q|0)<0){r=0}else{r=(q|0)>(l|0)?h:q&65535}b[o>>1]=r;q=(b[n+2>>1]|0)+j>>i;if((q|0)<0){s=0}else{s=(q|0)>(l|0)?h:q&65535}b[o+2>>1]=s;q=p+2|0;if((q|0)<(f|0)){n=n+4|0;o=o+4|0;p=q}else{break}}}m=m+1|0;}while((m|0)<(g|0));return}function Fg(a,c,d,e,f,g,h,i,j,k){a=a|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;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if((j|0)<=0){ec(13312,16192,193,18520)}l=1<<j-1;if((g|0)<=0){return}m=(f|0)>0;n=(1<<k)-1|0;k=0;do{if(m){o=d+((ga(k,e)|0)<<1)|0;p=a+((ga(k,c)|0)<<1)|0;q=0;while(1){r=((ga(b[o>>1]|0,h)|0)+l>>j)+i|0;if((r|0)<0){s=0}else{s=((r|0)>(n|0)?n:r)&65535}b[p>>1]=s;r=q+1|0;if((r|0)<(f|0)){o=o+2|0;p=p+2|0;q=r}else{break}}}k=k+1|0;}while((k|0)<(g|0));return}function Gg(a,c,d,e,f,g,h,i,j,k,l,m,n){a=a|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;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((m|0)<=0){ec(13312,16192,213,18392)}o=j+1+l<<m;if((h|0)<=0){return}l=(g|0)>0;j=m+1|0;m=(1<<n)-1|0;n=0;do{p=ga(n,f)|0;if(l){q=d+(p<<1)|0;r=e+(p<<1)|0;p=a+((ga(n,c)|0)<<1)|0;s=0;while(1){t=ga(b[q>>1]|0,i)|0;u=t+o+(ga(b[r>>1]|0,k)|0)>>j;if((u|0)<0){v=0}else{v=((u|0)>(m|0)?m:u)&65535}b[p>>1]=v;u=s+1|0;if((u|0)<(g|0)){q=q+2|0;r=r+2|0;p=p+2|0;s=u}else{break}}}n=n+1|0;}while((n|0)<(h|0));return}function Hg(a,c,d,e,f,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;j=15-i|0;k=1<<j-1;if((g&1|0)!=0){ec(13704,16192,238,18192)}if((h|0)<=0){return}l=(g|0)>0;m=(1<<i)-1|0;i=m&65535;n=0;do{o=ga(n,f)|0;if(l){p=d+(o<<1)|0;q=e+(o<<1)|0;o=a+((ga(n,c)|0)<<1)|0;r=0;while(1){s=(b[p>>1]|0)+k+(b[q>>1]|0)>>j;if((s|0)<0){t=0}else{t=(s|0)>(m|0)?i:s&65535}b[o>>1]=t;s=(b[p+2>>1]|0)+k+(b[q+2>>1]|0)>>j;if((s|0)<0){u=0}else{u=(s|0)>(m|0)?i:s&65535}b[o+2>>1]=u;s=r+2|0;if((s|0)<(g|0)){p=p+4|0;q=q+4|0;o=o+4|0;r=s}else{break}}}n=n+1|0;}while((n|0)<(h|0));return}function Ig(a,c,e,f,g,h,i,j,k){a=a|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0;if((h|0)<=0){return}k=(g|0)>0;j=0;do{if(k){i=a+((ga(j,c)|0)<<1)|0;l=e+(ga(j,f)|0)|0;m=0;while(1){b[i>>1]=(d[l]|0)<<6;n=m+1|0;if((n|0)<(g|0)){i=i+2|0;l=l+1|0;m=n}else{break}}}j=j+1|0;}while((j|0)<(h|0));return}function Jg(a,c,d,f,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;k=14-l|0;if((h|0)<=0){return}l=(g|0)>0;j=0;do{if(l){i=a+((ga(j,c)|0)<<1)|0;m=d+((ga(j,f)|0)<<1)|0;n=0;while(1){b[i>>1]=(e[m>>1]|0)<<k;o=n+1|0;if((o|0)<(g|0)){i=i+2|0;m=m+2|0;n=o}else{break}}}j=j+1|0;}while((j|0)<(h|0));return}function Kg(a,c,e,f,g,h,j,k,l,m){a=a|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;l=i;n=m-8|0;m=h+3|0;o=ga(g<<1,m)|0;p=i;i=i+o|0;i=i+7&-8;o=p;p=h+2|0;if((p|0)>-1){q=(g|0)>0;r=-1;while(1){a:do{if(q){s=r+1|0;t=e+((ga(r,f)|0)-1)|0;u=0;while(1){switch(j|0){case 5:{v=((d[t+1|0]|0)*28|0)+((d[t]|0)*-4|0)+((d[t+2|0]|0)*46|0)+((d[t+3|0]|0)*-6|0)>>n&65535;break};case 6:{v=(d[t+1|0]<<4)+((d[t]|0)*-2|0)+((d[t+2|0]|0)*54|0)-(d[t+3|0]<<2)>>n&65535;break};case 0:{v=d[t+1|0]|0;break};case 1:{v=((d[t+1|0]|0)*58|0)+((d[t]|0)*-2|0)+((d[t+2|0]|0)*10|0)-(d[t+3|0]<<1)>>n&65535;break};case 2:{v=((d[t+1|0]|0)*54|0)+((d[t]|0)*-4|0)+(d[t+2|0]<<4)-(d[t+3|0]<<1)>>n&65535;break};case 3:{v=((d[t+1|0]|0)*46|0)+((d[t]|0)*-6|0)+((d[t+2|0]|0)*28|0)-(d[t+3|0]<<2)>>n&65535;break};case 4:{v=((d[t]|0)*-4|0)-(d[t+3|0]<<2)+(((d[t+2|0]|0)+(d[t+1|0]|0)|0)*36|0)>>n&65535;break};default:{v=((d[t+1|0]|0)*10|0)+((d[t]|0)*-2|0)+((d[t+2|0]|0)*58|0)-(d[t+3|0]<<1)>>n&65535}}w=o+(s+(ga(u,m)|0)<<1)|0;b[w>>1]=v;w=u+1|0;if((w|0)<(g|0)){t=t+1|0;u=w}else{x=s;break a}}}else{x=r+1|0}}while(0);if((x|0)<(p|0)){r=x}else{break}}}x=(j|0)==0?n:6;if((g|0)<=0){i=l;return}n=(h|0)>0;j=0;do{b:do{if(n){r=o+((ga(j,m)|0)<<1)|0;p=0;while(1){switch(k|0){case 0:{y=b[r+2>>1]|0;break};case 1:{y=((b[r+2>>1]|0)*58|0)+((b[r>>1]|0)*-2|0)+((b[r+4>>1]|0)*10|0)-(b[r+6>>1]<<1)>>x&65535;break};case 2:{y=((b[r+2>>1]|0)*54|0)+((b[r>>1]|0)*-4|0)+(b[r+4>>1]<<4)-(b[r+6>>1]<<1)>>x&65535;break};case 3:{y=((b[r+2>>1]|0)*46|0)+((b[r>>1]|0)*-6|0)+((b[r+4>>1]|0)*28|0)-(b[r+6>>1]<<2)>>x&65535;break};case 4:{y=((b[r>>1]|0)*-4|0)-(b[r+6>>1]<<2)+(((b[r+4>>1]|0)+(b[r+2>>1]|0)|0)*36|0)>>x&65535;break};case 5:{y=((b[r+2>>1]|0)*28|0)+((b[r>>1]|0)*-4|0)+((b[r+4>>1]|0)*46|0)+((b[r+6>>1]|0)*-6|0)>>x&65535;break};case 6:{y=(b[r+2>>1]<<4)+((b[r>>1]|0)*-2|0)+((b[r+4>>1]|0)*54|0)-(b[r+6>>1]<<2)>>x&65535;break};default:{y=((b[r+2>>1]|0)*10|0)+((b[r>>1]|0)*-2|0)+((b[r+4>>1]|0)*58|0)-(b[r+6>>1]<<1)>>x&65535}}v=a+((ga(p,c)|0)+j<<1)|0;b[v>>1]=y;v=p+1|0;if((v|0)<(h|0)){r=r+2|0;p=v}else{break b}}}}while(0);j=j+1|0;}while((j|0)<(g|0));i=l;return}function Lg(a,c,d,f,g,h,j,k,l,m){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;l=i;n=m-8|0;m=h+3|0;o=ga(g<<1,m)|0;p=i;i=i+o|0;i=i+7&-8;o=p;p=h+2|0;if((p|0)>-1){q=(g|0)>0;r=-1;while(1){a:do{if(q){s=r+1|0;t=d+((ga(r,f)|0)-1<<1)|0;u=0;while(1){switch(j|0){case 6:{v=(e[t+2>>1]<<4)+((e[t>>1]|0)*-2|0)+((e[t+4>>1]|0)*54|0)-(e[t+6>>1]<<2)>>n&65535;break};case 0:{v=b[t+2>>1]|0;break};case 1:{v=((e[t+2>>1]|0)*58|0)+((e[t>>1]|0)*-2|0)+((e[t+4>>1]|0)*10|0)-(e[t+6>>1]<<1)>>n&65535;break};case 2:{v=((e[t+2>>1]|0)*54|0)+((e[t>>1]|0)*-4|0)+(e[t+4>>1]<<4)-(e[t+6>>1]<<1)>>n&65535;break};case 3:{v=((e[t+2>>1]|0)*46|0)+((e[t>>1]|0)*-6|0)+((e[t+4>>1]|0)*28|0)-(e[t+6>>1]<<2)>>n&65535;break};case 4:{v=((e[t>>1]|0)*-4|0)-(e[t+6>>1]<<2)+(((e[t+4>>1]|0)+(e[t+2>>1]|0)|0)*36|0)>>n&65535;break};case 5:{v=((e[t+2>>1]|0)*28|0)+((e[t>>1]|0)*-4|0)+((e[t+4>>1]|0)*46|0)+((e[t+6>>1]|0)*-6|0)>>n&65535;break};default:{v=((e[t+2>>1]|0)*10|0)+((e[t>>1]|0)*-2|0)+((e[t+4>>1]|0)*58|0)-(e[t+6>>1]<<1)>>n&65535}}w=o+(s+(ga(u,m)|0)<<1)|0;b[w>>1]=v;w=u+1|0;if((w|0)<(g|0)){t=t+2|0;u=w}else{x=s;break a}}}else{x=r+1|0}}while(0);if((x|0)<(p|0)){r=x}else{break}}}x=(j|0)==0?n:6;if((g|0)<=0){i=l;return}n=(h|0)>0;j=0;do{b:do{if(n){r=o+((ga(j,m)|0)<<1)|0;p=0;while(1){switch(k|0){case 0:{y=b[r+2>>1]|0;break};case 1:{y=((b[r+2>>1]|0)*58|0)+((b[r>>1]|0)*-2|0)+((b[r+4>>1]|0)*10|0)-(b[r+6>>1]<<1)>>x&65535;break};case 2:{y=((b[r+2>>1]|0)*54|0)+((b[r>>1]|0)*-4|0)+(b[r+4>>1]<<4)-(b[r+6>>1]<<1)>>x&65535;break};case 3:{y=((b[r+2>>1]|0)*46|0)+((b[r>>1]|0)*-6|0)+((b[r+4>>1]|0)*28|0)-(b[r+6>>1]<<2)>>x&65535;break};case 4:{y=((b[r>>1]|0)*-4|0)-(b[r+6>>1]<<2)+(((b[r+4>>1]|0)+(b[r+2>>1]|0)|0)*36|0)>>x&65535;break};case 5:{y=((b[r+2>>1]|0)*28|0)+((b[r>>1]|0)*-4|0)+((b[r+4>>1]|0)*46|0)+((b[r+6>>1]|0)*-6|0)>>x&65535;break};case 6:{y=(b[r+2>>1]<<4)+((b[r>>1]|0)*-2|0)+((b[r+4>>1]|0)*54|0)-(b[r+6>>1]<<2)>>x&65535;break};default:{y=((b[r+2>>1]|0)*10|0)+((b[r>>1]|0)*-2|0)+((b[r+4>>1]|0)*58|0)-(b[r+6>>1]<<1)>>x&65535}}v=a+((ga(p,c)|0)+j<<1)|0;b[v>>1]=y;v=p+1|0;if((v|0)<(h|0)){r=r+2|0;p=v}else{break b}}}}while(0);j=j+1|0;}while((j|0)<(g|0));i=l;return}function Mg(a,c,e,f,g,h,i){a=a|0;c=c|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((h|0)<=0){return}i=(g|0)>0;j=0;do{if(i){k=0;l=a+((ga(j,c)|0)<<1)|0;m=e+(ga(j,f)|0)|0;while(1){n=(d[m+1|0]|0)<<6;o=(d[m+2|0]|0)<<6;p=(d[m+3|0]|0)<<6;b[l>>1]=(d[m]|0)<<6;b[l+2>>1]=n;b[l+4>>1]=o;b[l+6>>1]=p;p=k+4|0;if((p|0)<(g|0)){k=p;l=l+8|0;m=m+4|0}else{break}}}j=j+1|0;}while((j|0)<(h|0));return}function Ng(a,c,d,f,g,h,i,j){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;i=14-j|0;if((h|0)<=0){return}j=(g|0)>0;k=0;do{if(j){l=d+((ga(k,f)|0)<<1)|0;m=a+((ga(k,c)|0)<<1)|0;n=0;while(1){b[m>>1]=(e[l>>1]|0)<<i;o=n+1|0;if((o|0)<(g|0)){l=l+2|0;m=m+2|0;n=o}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}function Og(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;Pg(a,b,c,d,e,f,g,0,1,8);return}function Pg(a,e,f,g,h,i,j,k,l,m){a=a|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;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;n=c[30784+(k<<2)>>2]|0;o=c[30784+(l<<2)>>2]|0;p=c[30888+(l<<2)>>2]|0;q=o+i+p|0;r=m-8|0;do{if((k|0)==1){m=-o|0;s=p+i|0;if((s|0)<=(m|0)){break}t=(h|0)>0;u=m;do{if(t){m=f+((ga(u,g)|0)-n)|0;v=j+(u+o<<1)|0;w=0;while(1){x=m+1|0;b[v>>1]=(d[x]<<2)-(d[m]|0)+((d[m+2|0]|0)*-10|0)+((d[m+3|0]|0)*58|0)+((d[m+4|0]|0)*17|0)+((d[m+5|0]|0)*-5|0)+(d[m+6|0]|0)>>r;y=w+1|0;if((y|0)<(h|0)){m=x;v=v+(q<<1)|0;w=y}else{break}}}u=u+1|0;}while((u|0)<(s|0))}else if((k|0)==3){s=-o|0;u=p+i|0;if((u|0)<=(s|0)){break}t=(h|0)>0;w=s;do{if(t){s=f+((ga(w,g)|0)-n)|0;v=j+(w+o<<1)|0;m=0;while(1){y=s+1|0;b[v>>1]=((d[y]|0)*-5|0)+(d[s]|0)+((d[s+2|0]|0)*17|0)+((d[s+3|0]|0)*58|0)+((d[s+4|0]|0)*-10|0)+(d[s+5|0]<<2)-(d[s+6|0]|0)>>r;x=m+1|0;if((x|0)<(h|0)){s=y;v=v+(q<<1)|0;m=x}else{break}}}w=w+1|0;}while((w|0)<(u|0))}else if((k|0)==0){u=-o|0;w=p+i|0;if((w|0)<=(u|0)){break}t=(h|0)>0;m=u;do{if(t){u=f+((ga(m,g)|0)-n)|0;v=j+(m+o<<1)|0;s=0;while(1){b[v>>1]=d[u]|0;x=s+1|0;if((x|0)<(h|0)){u=u+1|0;v=v+(q<<1)|0;s=x}else{break}}}m=m+1|0;}while((m|0)<(w|0))}else if((k|0)==2){w=-o|0;m=p+i|0;if((m|0)<=(w|0)){break}t=(h|0)>0;s=w;do{if(t){w=f+((ga(s,g)|0)-n)|0;v=j+(s+o<<1)|0;u=0;while(1){x=w+1|0;b[v>>1]=(d[x]<<2)-(d[w]|0)+(d[w+6|0]<<2)-(d[w+7|0]|0)+(((d[w+4|0]|0)+(d[w+3|0]|0)|0)*40|0)+(((d[w+5|0]|0)+(d[w+2|0]|0)|0)*-11|0)>>r;y=u+1|0;if((y|0)<(h|0)){w=x;v=v+(q<<1)|0;u=y}else{break}}}s=s+1|0;}while((s|0)<(m|0))}}while(0);o=(k|0)==0?r:6;if((l|0)==3){if((h|0)<=0){return}r=(i|0)>0;k=0;do{if(r){n=j+((ga(k,q)|0)<<1)|0;g=a+(k<<1)|0;f=0;while(1){p=n+2|0;b[g>>1]=((b[p>>1]|0)*-5|0)+(b[n>>1]|0)+((b[n+4>>1]|0)*17|0)+((b[n+6>>1]|0)*58|0)+((b[n+8>>1]|0)*-10|0)+(b[n+10>>1]<<2)-(b[n+12>>1]|0)>>o;m=f+1|0;if((m|0)<(i|0)){n=p;g=g+(e<<1)|0;f=m}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}else if((l|0)==2){if((h|0)<=0){return}k=(i|0)>0;r=0;do{if(k){f=j+((ga(r,q)|0)<<1)|0;g=a+(r<<1)|0;n=0;while(1){m=f+2|0;b[g>>1]=(b[m>>1]<<2)-(b[f>>1]|0)+(b[f+12>>1]<<2)-(b[f+14>>1]|0)+(((b[f+8>>1]|0)+(b[f+6>>1]|0)|0)*40|0)+(((b[f+10>>1]|0)+(b[f+4>>1]|0)|0)*-11|0)>>o;p=n+1|0;if((p|0)<(i|0)){f=m;g=g+(e<<1)|0;n=p}else{break}}}r=r+1|0;}while((r|0)<(h|0));return}else if((l|0)==1){if((h|0)<=0){return}r=(i|0)>0;k=0;do{if(r){n=j+((ga(k,q)|0)<<1)|0;g=a+(k<<1)|0;f=0;while(1){p=n+2|0;b[g>>1]=(b[p>>1]<<2)-(b[n>>1]|0)+((b[n+4>>1]|0)*-10|0)+((b[n+6>>1]|0)*58|0)+((b[n+8>>1]|0)*17|0)+((b[n+10>>1]|0)*-5|0)+(b[n+12>>1]|0)>>o;m=f+1|0;if((m|0)<(i|0)){n=p;g=g+(e<<1)|0;f=m}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}else if((l|0)==0){if((h|0)<=0){return}l=(i|0)>0;k=0;do{if(l){o=j+((ga(k,q)|0)<<1)|0;r=a+(k<<1)|0;f=0;while(1){b[r>>1]=b[o>>1]|0;g=f+1|0;if((g|0)<(i|0)){o=o+2|0;r=r+(e<<1)|0;f=g}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}else{return}}function Qg(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;Pg(a,b,c,d,e,f,g,0,2,8);return}function Rg(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;Pg(a,b,c,d,e,f,g,0,3,8);return}function Sg(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;Pg(a,b,c,d,e,f,g,1,0,8);return}function Tg(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;Pg(a,b,c,d,e,f,g,1,1,8);return}function Ug(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;Pg(a,b,c,d,e,f,g,1,2,8);return}function Vg(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;Pg(a,b,c,d,e,f,g,1,3,8);return}function Wg(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;Pg(a,b,c,d,e,f,g,2,0,8);return}function Xg(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;Pg(a,b,c,d,e,f,g,2,1,8);return}function Yg(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;Pg(a,b,c,d,e,f,g,2,2,8);return}function Zg(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;Pg(a,b,c,d,e,f,g,2,3,8);return}function _g(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;Pg(a,b,c,d,e,f,g,3,0,8);return}function $g(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;Pg(a,b,c,d,e,f,g,3,1,8);return}function ah(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;Pg(a,b,c,d,e,f,g,3,2,8);return}function bh(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;Pg(a,b,c,d,e,f,g,3,3,8);return}function ch(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;dh(a,b,c,d,e,f,g,0,1,h);return}function dh(a,d,f,g,h,i,j,k,l,m){a=a|0;d=d|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;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;n=c[30784+(k<<2)>>2]|0;o=c[30784+(l<<2)>>2]|0;p=c[30888+(l<<2)>>2]|0;q=o+i+p|0;r=m-8|0;do{if((k|0)==0){m=-o|0;s=p+i|0;if((s|0)<=(m|0)){break}t=(h|0)>0;u=m;do{if(t){m=f+((ga(u,g)|0)-n<<1)|0;v=j+(u+o<<1)|0;w=0;while(1){b[v>>1]=b[m>>1]|0;x=w+1|0;if((x|0)<(h|0)){m=m+2|0;v=v+(q<<1)|0;w=x}else{break}}}u=u+1|0;}while((u|0)<(s|0))}else if((k|0)==1){s=-o|0;u=p+i|0;if((u|0)<=(s|0)){break}t=(h|0)>0;w=s;do{if(t){s=f+((ga(w,g)|0)-n<<1)|0;v=j+(w+o<<1)|0;m=0;while(1){x=s+2|0;b[v>>1]=(e[x>>1]<<2)-(e[s>>1]|0)+((e[s+4>>1]|0)*-10|0)+((e[s+6>>1]|0)*58|0)+((e[s+8>>1]|0)*17|0)+((e[s+10>>1]|0)*-5|0)+(e[s+12>>1]|0)>>r;y=m+1|0;if((y|0)<(h|0)){s=x;v=v+(q<<1)|0;m=y}else{break}}}w=w+1|0;}while((w|0)<(u|0))}else if((k|0)==2){u=-o|0;w=p+i|0;if((w|0)<=(u|0)){break}t=(h|0)>0;m=u;do{if(t){u=f+((ga(m,g)|0)-n<<1)|0;v=j+(m+o<<1)|0;s=0;while(1){y=u+2|0;b[v>>1]=(e[y>>1]<<2)-(e[u>>1]|0)+(e[u+12>>1]<<2)-(e[u+14>>1]|0)+(((e[u+8>>1]|0)+(e[u+6>>1]|0)|0)*40|0)+(((e[u+10>>1]|0)+(e[u+4>>1]|0)|0)*-11|0)>>r;x=s+1|0;if((x|0)<(h|0)){u=y;v=v+(q<<1)|0;s=x}else{break}}}m=m+1|0;}while((m|0)<(w|0))}else if((k|0)==3){w=-o|0;m=p+i|0;if((m|0)<=(w|0)){break}t=(h|0)>0;s=w;do{if(t){w=f+((ga(s,g)|0)-n<<1)|0;v=j+(s+o<<1)|0;u=0;while(1){x=w+2|0;b[v>>1]=((e[x>>1]|0)*-5|0)+(e[w>>1]|0)+((e[w+4>>1]|0)*17|0)+((e[w+6>>1]|0)*58|0)+((e[w+8>>1]|0)*-10|0)+(e[w+10>>1]<<2)-(e[w+12>>1]|0)>>r;y=u+1|0;if((y|0)<(h|0)){w=x;v=v+(q<<1)|0;u=y}else{break}}}s=s+1|0;}while((s|0)<(m|0))}}while(0);o=(k|0)==0?r:6;if((l|0)==3){if((h|0)<=0){return}r=(i|0)>0;k=0;do{if(r){n=j+((ga(k,q)|0)<<1)|0;g=a+(k<<1)|0;f=0;while(1){p=n+2|0;b[g>>1]=((b[p>>1]|0)*-5|0)+(b[n>>1]|0)+((b[n+4>>1]|0)*17|0)+((b[n+6>>1]|0)*58|0)+((b[n+8>>1]|0)*-10|0)+(b[n+10>>1]<<2)-(b[n+12>>1]|0)>>o;m=f+1|0;if((m|0)<(i|0)){n=p;g=g+(d<<1)|0;f=m}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}else if((l|0)==0){if((h|0)<=0){return}k=(i|0)>0;r=0;do{if(k){f=j+((ga(r,q)|0)<<1)|0;g=a+(r<<1)|0;n=0;while(1){b[g>>1]=b[f>>1]|0;m=n+1|0;if((m|0)<(i|0)){f=f+2|0;g=g+(d<<1)|0;n=m}else{break}}}r=r+1|0;}while((r|0)<(h|0));return}else if((l|0)==1){if((h|0)<=0){return}r=(i|0)>0;k=0;do{if(r){n=j+((ga(k,q)|0)<<1)|0;g=a+(k<<1)|0;f=0;while(1){m=n+2|0;b[g>>1]=(b[m>>1]<<2)-(b[n>>1]|0)+((b[n+4>>1]|0)*-10|0)+((b[n+6>>1]|0)*58|0)+((b[n+8>>1]|0)*17|0)+((b[n+10>>1]|0)*-5|0)+(b[n+12>>1]|0)>>o;p=f+1|0;if((p|0)<(i|0)){n=m;g=g+(d<<1)|0;f=p}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}else if((l|0)==2){if((h|0)<=0){return}l=(i|0)>0;k=0;do{if(l){r=j+((ga(k,q)|0)<<1)|0;f=a+(k<<1)|0;g=0;while(1){n=r+2|0;b[f>>1]=(b[n>>1]<<2)-(b[r>>1]|0)+(b[r+12>>1]<<2)-(b[r+14>>1]|0)+(((b[r+8>>1]|0)+(b[r+6>>1]|0)|0)*40|0)+(((b[r+10>>1]|0)+(b[r+4>>1]|0)|0)*-11|0)>>o;p=g+1|0;if((p|0)<(i|0)){r=n;f=f+(d<<1)|0;g=p}else{break}}}k=k+1|0;}while((k|0)<(h|0));return}else{return}}function eh(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;dh(a,b,c,d,e,f,g,0,2,h);return}function fh(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;dh(a,b,c,d,e,f,g,0,3,h);return}function gh(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;dh(a,b,c,d,e,f,g,1,0,h);return}function hh(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;dh(a,b,c,d,e,f,g,1,1,h);return}function ih(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;dh(a,b,c,d,e,f,g,1,2,h);return}function jh(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;dh(a,b,c,d,e,f,g,1,3,h);return}function kh(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;dh(a,b,c,d,e,f,g,2,0,h);return}function lh(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;dh(a,b,c,d,e,f,g,2,1,h);return}function mh(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;dh(a,b,c,d,e,f,g,2,2,h);return}function nh(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;dh(a,b,c,d,e,f,g,2,3,h);return}function oh(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;dh(a,b,c,d,e,f,g,3,0,h);return}function ph(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;dh(a,b,c,d,e,f,g,3,1,h);return}function qh(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;dh(a,b,c,d,e,f,g,3,2,h);return}function rh(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;dh(a,b,c,d,e,f,g,3,3,h);return}function sh(a){a=a|0;dv(a+8|0,0,48)|0;c[a>>2]=30;c[a+4>>2]=30;return}function th(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=a+12|0;d=c[b>>2]|0;e=a+8|0;f=c[e>>2]|0;if((d|0)!=(f|0)){g=0;h=f;f=d;while(1){d=c[h+(g<<2)>>2]|0;if((d|0)==0){i=f;j=h}else{Rh(d);Pu(d);i=c[b>>2]|0;j=c[e>>2]|0}d=g+1|0;if(d>>>0<i-j>>2>>>0){g=d;h=j;f=i}else{break}}}i=a+32|0;Gh(i|0);f=a+36|0;j=c[f>>2]|0;h=a+40|0;g=c[h>>2]|0;do{if((j|0)!=(g|0)){d=j;do{Pu(c[d>>2]|0);d=d+4|0;}while((d|0)!=(g|0));d=c[f>>2]|0;k=c[h>>2]|0;if((k|0)==(d|0)){break}c[h>>2]=k+(~((k-4+(-d|0)|0)>>>2)<<2)}}while(0);h=c[i>>2]|0;if((h|0)!=0){Pu(h)}h=c[a+20>>2]|0;if((h|0)!=0){i=a+24|0;a=c[i>>2]|0;if((a|0)!=(h|0)){c[i>>2]=a+(~((a-4+(-h|0)|0)>>>2)<<2)}Pu(h)}h=c[e>>2]|0;if((h|0)==0){return}e=c[b>>2]|0;if((e|0)!=(h|0)){c[b>>2]=e+(~((e-4+(-h|0)|0)>>>2)<<2)}Pu(h);return}function uh(a){a=a|0;return}function vh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;if(d){e=1;return e|0}d=c[b+12>>2]|0;f=c[b+8>>2]|0;g=d-f>>2;if(g>>>0<(c[b>>2]|0)>>>0){e=1;return e|0}if((d|0)==(f|0)){e=0;return e|0}else{h=0}while(1){d=c[f+(h<<2)>>2]|0;if((a[d+100|0]|0)==0){if((c[d+96>>2]|0)==0){e=1;i=7;break}}d=h+1|0;if(d>>>0<g>>>0){h=d}else{e=0;i=7;break}}if((i|0)==7){return e|0}return 0}function wh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=c[a+12>>2]|0;g=c[a+8>>2]|0;a:do{if(!((f|0)==(g|0)|e^1)){a=0;b:while(1){h=c[g+(a<<2)>>2]|0;do{if((c[h+92>>2]|0)==(b|0)){if((c[h+104>>2]|0)<=(d|0)){break}if((c[h+96>>2]|0)==2){i=a;break b}}}while(0);a=a+1|0;if(!(a>>>0<f-g>>2>>>0)){break a}}return i|0}}while(0);if((f|0)==(g|0)){i=-1;return i|0}else{j=0}c:while(1){e=c[g+(j<<2)>>2]|0;do{if((c[e+92>>2]|0)==(b|0)){if((c[e+104>>2]|0)<=(d|0)){break}if((c[e+96>>2]|0)!=0){i=j;k=11;break c}}}while(0);e=j+1|0;if(e>>>0<f-g>>2>>>0){j=e}else{i=-1;k=11;break}}if((k|0)==11){return i|0}return 0}function xh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=c[a+12>>2]|0;g=c[a+8>>2]|0;a:do{if(!((f|0)==(g|0)|e^1)){a=0;b:while(1){h=c[g+(a<<2)>>2]|0;do{if((c[h+88>>2]|0)==(b|0)){if((c[h+104>>2]|0)<=(d|0)){break}if((c[h+96>>2]|0)==2){i=a;break b}}}while(0);a=a+1|0;if(!(a>>>0<f-g>>2>>>0)){break a}}return i|0}}while(0);if((f|0)==(g|0)){i=-1;return i|0}else{j=0}c:while(1){e=c[g+(j<<2)>>2]|0;do{if((c[e+88>>2]|0)==(b|0)){if((c[e+104>>2]|0)<=(d|0)){break}if((c[e+96>>2]|0)!=0){i=j;k=11;break c}}}while(0);e=j+1|0;if(e>>>0<f-g>>2>>>0){j=e}else{i=-1;k=11;break}}if((k|0)==11){return i|0}return 0}function yh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[a+12>>2]|0;e=c[a+8>>2]|0;if((d|0)==(e|0)){f=-1;return f|0}else{g=0}while(1){a=g+1|0;if((c[c[e+(g<<2)>>2]>>2]|0)==(b|0)){f=g;h=4;break}if(a>>>0<d-e>>2>>>0){g=a}else{f=-1;h=4;break}}if((h|0)==4){return f|0}return 0}function zh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;b=a+20|0;d=c[b>>2]|0;e=a+24|0;f=c[e>>2]|0;if((d|0)==(f|0)){ec(11328,15872,147,17376)}g=f-d>>2;if(g>>>0>1>>>0){f=c[(c[d>>2]|0)+92>>2]|0;h=0;i=1;while(1){j=c[(c[d+(i<<2)>>2]|0)+92>>2]|0;k=(j|0)<(f|0);l=k?i:h;m=i+1|0;if(m>>>0<g>>>0){f=k?j:f;h=l;i=m}else{n=l;break}}}else{n=0}i=d+(n<<2)|0;d=a+40|0;h=c[d>>2]|0;f=a+36|0;g=c[f>>2]|0;if((h|0)==(g|0)){o=0}else{o=(h-g<<8)-1|0}l=a+48|0;m=c[l>>2]|0;j=a+52|0;k=c[j>>2]|0;if((o-m|0)==(k|0)){Hh(a+32|0);p=c[j>>2]|0;q=c[l>>2]|0;r=c[f>>2]|0;s=c[d>>2]|0}else{p=k;q=m;r=g;s=h}h=p+q|0;do{if((s|0)!=(r|0)){q=(c[r+(h>>>10<<2)>>2]|0)+((h&1023)<<2)|0;if((q|0)==0){break}c[q>>2]=c[i>>2]}}while(0);c[j>>2]=p+1;c[(c[b>>2]|0)+(n<<2)>>2]=c[(c[e>>2]|0)-4>>2];n=c[e>>2]|0;b=n-4|0;c[e>>2]=n+(~((b+(-b|0)|0)>>>2)<<2);return}function Ah(a){a=a|0;var b=0,d=0,e=0;b=a+20|0;d=a+24|0;if((c[b>>2]|0)==(c[d>>2]|0)){e=0;return e|0}while(1){zh(a);if((c[b>>2]|0)==(c[d>>2]|0)){e=1;break}}return e|0}function Bh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=b+12|0;e=c[d>>2]|0;f=b+8|0;g=c[f>>2]|0;if((e|0)!=(g|0)){h=0;i=g;g=e;while(1){e=c[i+(h<<2)>>2]|0;j=e+100|0;k=e+96|0;if((a[j]|0)==0){if((c[k>>2]|0)==0){l=g;m=i}else{n=4}}else{n=4}if((n|0)==4){n=0;a[j]=0;c[k>>2]=0;Qh(e);l=c[d>>2]|0;m=c[f>>2]|0}e=h+1|0;if(e>>>0<l-m>>2>>>0){h=e;i=m;g=l}else{break}}}l=c[b+20>>2]|0;g=b+24|0;m=c[g>>2]|0;if((m|0)==(l|0)){o=b+32|0;Gh(o);return}c[g>>2]=m+(~((m-4+(-l|0)|0)>>>2)<<2);o=b+32|0;Gh(o);return}function Ch(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;k=i;i=i+8|0;l=k|0;m=b+8|0;n=b+12|0;o=c[n>>2]|0;p=m|0;q=c[p>>2]|0;a:do{if((o|0)==(q|0)){r=-1;s=o;t=o}else{u=0;while(1){v=c[q+(u<<2)>>2]|0;if((a[v+100|0]|0)==0){if((c[v+96>>2]|0)==0){break}}w=u+1|0;if(w>>>0<o-q>>2>>>0){u=w}else{r=-1;s=o;t=q;break a}}Qh(v);r=u;s=c[n>>2]|0;t=c[p>>2]|0}}while(0);v=s-t>>2;do{if(v>>>0<=(c[b+4>>2]|0)>>>0|(r|0)==(v-1|0)){x=s}else{t=c[s-4>>2]|0;if((a[t+100|0]|0)!=0){x=s;break}if((c[t+96>>2]|0)!=0){x=s;break}if((t|0)==0){y=s}else{Rh(t);Pu(t);y=c[n>>2]|0}t=y-4|0;q=y+(~((t+(-t|0)|0)>>>2)<<2)|0;c[n>>2]=q;x=q}}while(0);do{if((r|0)==-1){y=x-(c[p>>2]|0)>>2;s=Nu(10624)|0;Oh(s);c[l>>2]=s;v=c[n>>2]|0;if(!(v>>>0<(c[b+16>>2]|0)>>>0)){Fh(m,l);z=y;break}if((v|0)==0){A=0}else{c[v>>2]=s;A=c[n>>2]|0}c[n>>2]=A+4;z=y}else{z=r}}while(0);r=c[(c[p>>2]|0)+(z<<2)>>2]|0;p=c[d+476>>2]|0;if(p>>>0<4>>>0){Ph(r,c[d+484>>2]|0,c[d+488>>2]|0,p,d,1,e,0,f,g,h,j)|0;a[r+10516|0]=0;i=k;return z|0}else{ec(13160,15872,259,17360);return 0}return 0}function Dh(a){a=a|0;var b=0,d=0,e=0;b=a+36|0;d=a+48|0;e=a+52|0;c[e>>2]=(c[e>>2]|0)-1;e=(c[d>>2]|0)+1|0;c[d>>2]=e;if(!(e>>>0>2047>>>0)){return}Pu(c[c[b>>2]>>2]|0);c[b>>2]=(c[b>>2]|0)+4;c[d>>2]=(c[d>>2]|0)-1024;return}function Eh(a){a=a|0;return}function Fh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+4|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h>>2;j=i+1|0;if(j>>>0>1073741823>>>0){Nr(0)}k=a+8|0;a=(c[k>>2]|0)-g|0;if(a>>2>>>0<536870911>>>0){g=a>>1;a=g>>>0<j>>>0?j:g;if((a|0)==0){l=0;m=0}else{n=a;o=5}}else{n=1073741823;o=5}if((o|0)==5){l=Nu(n<<2)|0;m=n}n=l+(i<<2)|0;if((n|0)!=0){c[n>>2]=c[b>>2]}b=f;cv(l|0,b|0,h)|0;c[e>>2]=l;c[d>>2]=l+(j<<2);c[k>>2]=l+(m<<2);if((f|0)==0){return}Pu(b);return}function Gh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=a+4|0;d=c[b>>2]|0;e=a+16|0;f=c[e>>2]|0;g=d+(f>>>10<<2)|0;h=a+8|0;i=c[h>>2]|0;if((i|0)==(d|0)){j=0;k=0;l=a+20|0}else{m=a+20|0;a=f+(c[m>>2]|0)|0;j=(c[d+(a>>>10<<2)>>2]|0)+((a&1023)<<2)|0;k=(c[g>>2]|0)+((f&1023)<<2)|0;l=m}m=g;g=k;a:while(1){k=g;do{if((k|0)==(j|0)){break a}k=k+4|0;}while((k-(c[m>>2]|0)|0)!=4096);k=m+4|0;m=k;g=c[k>>2]|0}c[l>>2]=0;l=i-d>>2;if(l>>>0>2>>>0){i=d;while(1){Pu(c[i>>2]|0);d=(c[b>>2]|0)+4|0;c[b>>2]=d;g=(c[h>>2]|0)-d>>2;if(g>>>0>2>>>0){i=d}else{n=g;break}}}else{n=l}if((n|0)==2){c[e>>2]=1024;return}else if((n|0)==1){c[e>>2]=512;return}else{return}}function Hh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;i=i+48|0;d=b|0;e=b+8|0;f=b+16|0;g=b+40|0;h=a+16|0;j=c[h>>2]|0;if(j>>>0>1023>>>0){c[h>>2]=j-1024;j=a+4|0;h=c[j>>2]|0;k=c[h>>2]|0;l=h+4|0;c[j>>2]=l;m=a+8|0;n=c[m>>2]|0;o=a+12|0;do{if((n|0)==(c[o>>2]|0)){p=a|0;q=c[p>>2]|0;if(l>>>0>q>>>0){r=l;s=((r-q>>2)+1|0)/-2|0;t=n-r|0;fv(h+(s+1<<2)|0,l|0,t|0)|0;r=h+((t>>2)+1+s<<2)|0;c[m>>2]=r;c[j>>2]=(c[j>>2]|0)+(s<<2);u=r;v=13;break}r=n-q>>1;s=(r|0)==0?1:r;r=Nu(s<<2)|0;t=r+(s>>>2<<2)|0;w=r+(s<<2)|0;if((l|0)==(n|0)){x=t;y=q}else{q=l;s=t;do{if((s|0)==0){z=0}else{c[s>>2]=c[q>>2];z=s}s=z+4|0;q=q+4|0;}while((q|0)!=(n|0));x=s;y=c[p>>2]|0}c[p>>2]=r;c[j>>2]=t;c[m>>2]=x;c[o>>2]=w;if((y|0)==0){A=x;v=12;break}Pu(y);A=c[m>>2]|0;v=12}else{A=n;v=12}}while(0);if((v|0)==12){if((A|0)==0){B=0}else{u=A;v=13}}if((v|0)==13){c[u>>2]=k;B=c[m>>2]|0}c[m>>2]=B+4;i=b;return}B=a|0;m=a+8|0;k=c[m>>2]|0;u=a+4|0;A=k-(c[u>>2]|0)>>2;n=a+12|0;y=c[n>>2]|0;x=a|0;o=y-(c[x>>2]|0)|0;if(!(A>>>0<o>>2>>>0)){j=o>>1;o=(j|0)==0?1:j;j=f+12|0;c[f+16>>2]=a+12;a=Nu(o<<2)|0;z=f|0;c[z>>2]=a;l=a+(A<<2)|0;A=f+8|0;c[A>>2]=l;h=f+4|0;c[h>>2]=l;c[j>>2]=a+(o<<2);o=Nu(4096)|0;c[g>>2]=o;Kh(f,g);g=c[m>>2]|0;while(1){if((g|0)==(c[u>>2]|0)){break}o=g-4|0;Lh(f,o);g=o}f=c[x>>2]|0;c[x>>2]=c[z>>2];c[z>>2]=f;c[u>>2]=c[h>>2];c[h>>2]=g;h=c[m>>2]|0;c[m>>2]=c[A>>2];c[A>>2]=h;z=c[n>>2]|0;c[n>>2]=c[j>>2];c[j>>2]=z;if((h|0)!=(g|0)){c[A>>2]=h+(~((h-4+(-g|0)|0)>>>2)<<2)}if((f|0)==0){i=b;return}Pu(f);i=b;return}f=Nu(4096)|0;if((y|0)!=(k|0)){c[d>>2]=f;Ih(B,d);i=b;return}c[e>>2]=f;Jh(B,e);e=c[u>>2]|0;B=c[e>>2]|0;f=e+4|0;c[u>>2]=f;d=c[m>>2]|0;do{if((d|0)==(c[n>>2]|0)){k=c[x>>2]|0;if(f>>>0>k>>>0){y=f;g=((y-k>>2)+1|0)/-2|0;h=d-y|0;fv(e+(g+1<<2)|0,f|0,h|0)|0;y=e+((h>>2)+1+g<<2)|0;c[m>>2]=y;c[u>>2]=(c[u>>2]|0)+(g<<2);C=y;v=29;break}y=d-k>>1;g=(y|0)==0?1:y;y=Nu(g<<2)|0;h=y+(g>>>2<<2)|0;A=y+(g<<2)|0;if((f|0)==(d|0)){D=h;E=k}else{k=f;g=h;do{if((g|0)==0){F=0}else{c[g>>2]=c[k>>2];F=g}g=F+4|0;k=k+4|0;}while((k|0)!=(d|0));D=g;E=c[x>>2]|0}c[x>>2]=y;c[u>>2]=h;c[m>>2]=D;c[n>>2]=A;if((E|0)==0){G=D;v=28;break}Pu(E);G=c[m>>2]|0;v=28}else{G=d;v=28}}while(0);if((v|0)==28){if((G|0)==0){H=0}else{C=G;v=29}}if((v|0)==29){c[C>>2]=B;H=c[m>>2]|0}c[m>>2]=H+4;i=b;return}function Ih(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=c[d>>2]|0;f=a+12|0;do{if((e|0)==(c[f>>2]|0)){g=a+4|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;if(h>>>0>j>>>0){k=h;l=((k-j>>2)+1|0)/-2|0;m=e-k|0;fv(h+(l<<2)|0,h|0,m|0)|0;k=h+(l+(m>>2)<<2)|0;c[d>>2]=k;c[g>>2]=(c[g>>2]|0)+(l<<2);n=k;break}k=e-j>>1;l=(k|0)==0?1:k;k=Nu(l<<2)|0;m=k+(l>>>2<<2)|0;o=k+(l<<2)|0;if((h|0)==(e|0)){p=m;q=j}else{j=h;h=m;do{if((h|0)==0){r=0}else{c[h>>2]=c[j>>2];r=h}h=r+4|0;j=j+4|0;}while((j|0)!=(e|0));p=h;q=c[i>>2]|0}c[i>>2]=k;c[g>>2]=m;c[d>>2]=p;c[f>>2]=o;if((q|0)==0){n=p;break}Pu(q);n=c[d>>2]|0}else{n=e}}while(0);if((n|0)==0){s=0;t=s+4|0;c[d>>2]=t;return}c[n>>2]=c[b>>2];s=c[d>>2]|0;t=s+4|0;c[d>>2]=t;return}function Jh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=c[d>>2]|0;f=a|0;do{if((e|0)==(c[f>>2]|0)){g=a+8|0;h=c[g>>2]|0;i=a+12|0;j=c[i>>2]|0;k=j;if(h>>>0<j>>>0){j=h;l=((k-j>>2)+1|0)/2|0;m=j-e|0;j=h+(l-(m>>2)<<2)|0;fv(j|0,e|0,m|0)|0;c[d>>2]=j;c[g>>2]=(c[g>>2]|0)+(l<<2);n=j;break}j=k-e>>1;k=(j|0)==0?1:j;j=Nu(k<<2)|0;l=j+((k+3|0)>>>2<<2)|0;m=j+(k<<2)|0;if((e|0)==(h|0)){o=l;p=e}else{k=e;q=l;do{if((q|0)==0){r=0}else{c[q>>2]=c[k>>2];r=q}q=r+4|0;k=k+4|0;}while((k|0)!=(h|0));o=q;p=c[f>>2]|0}c[f>>2]=j;c[d>>2]=l;c[g>>2]=o;c[i>>2]=m;if((p|0)==0){n=l;break}Pu(p);n=c[d>>2]|0}else{n=e}}while(0);c[n-4>>2]=c[b>>2];c[d>>2]=(c[d>>2]|0)-4;return}function Kh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=a+8|0;e=c[d>>2]|0;f=a+12|0;do{if((e|0)==(c[f>>2]|0)){g=a+4|0;h=c[g>>2]|0;i=a|0;j=c[i>>2]|0;if(h>>>0>j>>>0){k=h;l=((k-j>>2)+1|0)/-2|0;m=e-k|0;fv(h+(l<<2)|0,h|0,m|0)|0;k=h+(l+(m>>2)<<2)|0;c[d>>2]=k;c[g>>2]=(c[g>>2]|0)+(l<<2);n=k;break}k=e-j>>1;l=(k|0)==0?1:k;k=Nu(l<<2)|0;m=k+(l>>>2<<2)|0;o=k+(l<<2)|0;if((h|0)==(e|0)){p=m;q=j}else{j=h;h=m;do{if((h|0)==0){r=0}else{c[h>>2]=c[j>>2];r=h}h=r+4|0;j=j+4|0;}while((j|0)!=(e|0));p=h;q=c[i>>2]|0}c[i>>2]=k;c[g>>2]=m;c[d>>2]=p;c[f>>2]=o;if((q|0)==0){n=p;break}Pu(q);n=c[d>>2]|0}else{n=e}}while(0);if((n|0)==0){s=0;t=s+4|0;c[d>>2]=t;return}c[n>>2]=c[b>>2];s=c[d>>2]|0;t=s+4|0;c[d>>2]=t;return}function Lh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;e=c[d>>2]|0;f=a|0;do{if((e|0)==(c[f>>2]|0)){g=a+8|0;h=c[g>>2]|0;i=a+12|0;j=c[i>>2]|0;k=j;if(h>>>0<j>>>0){j=h;l=((k-j>>2)+1|0)/2|0;m=j-e|0;j=h+(l-(m>>2)<<2)|0;fv(j|0,e|0,m|0)|0;c[d>>2]=j;c[g>>2]=(c[g>>2]|0)+(l<<2);n=j;break}j=k-e>>1;k=(j|0)==0?1:j;j=Nu(k<<2)|0;l=j+((k+3|0)>>>2<<2)|0;m=j+(k<<2)|0;if((e|0)==(h|0)){o=l;p=e}else{k=e;q=l;do{if((q|0)==0){r=0}else{c[q>>2]=c[k>>2];r=q}q=r+4|0;k=k+4|0;}while((k|0)!=(h|0));o=q;p=c[f>>2]|0}c[f>>2]=j;c[d>>2]=l;c[g>>2]=o;c[i>>2]=m;if((p|0)==0){n=l;break}Pu(p);n=c[d>>2]|0}else{n=e}}while(0);c[n-4>>2]=c[b>>2];c[d>>2]=(c[d>>2]|0)-4;return}function Mh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=c[b+4>>2]|0;a=c[b+8>>2]|0;f=(a|0)/(c[d+5784>>2]|0)|0;g=c[b+12>>2]|0;b=e-1+g|0;h=b-((b|0)%(g|0)|0)|0;b=((e|0)/(c[d+5780>>2]|0)|0)-1+g|0;e=b-((b|0)%(g|0)|0)|0;g=c[d+5760>>2]|0;if(!((g-8|0)>>>0<9>>>0)){ec(15720,15792,115,17912);return 0}b=c[d+5768>>2]|0;if(!((b-8|0)>>>0<9>>>0)){ec(15344,15792,116,17912);return 0}i=Ku(16,ga(ga(h,a)|0,(g+7|0)/8|0)|0)|0;g=(i|0)==0;do{if((c[d+20>>2]|0)==0){if(g){j=0}else{k=0;l=0;m=0;break}return j|0}else{a=ga(ga(e,f)|0,(b+7|0)/8|0)|0;n=Ku(16,a)|0;o=Ku(16,a)|0;if(!((n|0)==0|(o|0)==0|g)){k=e;l=n;m=o;break}if(!g){Hu(i)}if((n|0)!=0){Hu(n)}if((o|0)==0){j=0;return j|0}Hu(o);j=0;return j|0}}while(0);c[d+4>>2]=i;c[d+10492>>2]=0;c[d+40>>2]=h;c[d+8>>2]=l;c[d+10496>>2]=0;c[d+12>>2]=m;c[d+10500>>2]=0;c[d+44>>2]=k;j=1;return j|0}function Nh(a,b,d){a=a|0;b=b|0;d=d|0;d=c[b+4>>2]|0;if((d|0)!=0){Hu(d)}d=c[b+8>>2]|0;if((d|0)!=0){Hu(d)}d=c[b+12>>2]|0;if((d|0)==0){return}Hu(d);return}function Oh(b){b=b|0;c[b+48>>2]=0;c[b+52>>2]=0;c[b+56>>2]=0;c[b+700>>2]=0;c[b+704>>2]=0;c[b+708>>2]=0;dv(b+736|0,0,24)|0;ik(b+764|0);jj(b+5932|0);a[b+10518|0]=0;a[b+10519|0]=0;a[b+10520|0]=0;dv(b+10340|0,0,140)|0;c[b>>2]=-1;c[b+104>>2]=0;c[b+10332>>2]=0;c[b+10336>>2]=0;c[b+10512>>2]=0;c[b+4>>2]=0;c[b+60>>2]=0;c[b+8>>2]=0;c[b+64>>2]=0;c[b+12>>2]=0;c[b+68>>2]=0;c[b+28>>2]=0;c[b+24>>2]=0;c[b+10524>>2]=0;dv(b+10480|0,0,24)|0;a[b+10516|0]=2;c[b+88>>2]=-1;c[b+92>>2]=-1;c[b+96>>2]=0;a[b+100|0]=0;dv(b+10528|0,0,20)|0;tk(b+10548|0);xk(b+10572|0);return}function Ph(b,d,e,f,g,h,j,k,l,m,n,o){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;var 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,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;p=i;i=i+40|0;q=p|0;if((g|0)==0){ec(13112,15792,240,17792);return 0}r=b+764|0;cv(r|0,g|0,4717)|0;if((r|0)!=(g|0)){zf(b+5484|0,c[g+4720>>2]|0,c[g+4724>>2]|0)}cv(b+5496|0,g+4732|0,436)|0;Qh(b);r=c[8838]|0;c[8838]=r+1;c[b>>2]=r;c[b+104>>2]=2147483647;c[b+10332>>2]=j;c[b+10336>>2]=k;c[b+20>>2]=f;c[b+24>>2]=d;c[b+28>>2]=e;r=b+32|0;c[r>>2]=d;s=b+36|0;c[s>>2]=e;c[b+10488>>2]=n;n=b+10480|0;c[n>>2]=l;c[n+4>>2]=m;if((f|0)==2){t=1;u=8}else if((f|0)==0|(f|0)==3){v=1;w=1}else if((f|0)==1){t=2;u=8}else{ec(10232,15792,276,17792);return 0}if((u|0)==8){v=2;w=t}if((f|0)==0){c[q>>2]=1;c[r>>2]=0;c[s>>2]=0;x=0;y=0}else if((f|0)==1){c[q>>2]=2;t=(d+1|0)/2|0;c[r>>2]=t;m=(e+1|0)/2|0;c[s>>2]=m;x=t;y=m}else if((f|0)==2){c[q>>2]=3;m=(d+1|0)/2|0;c[r>>2]=m;x=m;y=e}else if((f|0)==3){c[q>>2]=4;x=d;y=e}else{ec(7192,15792,302,17792);return 0}c[q+4>>2]=d;c[q+8>>2]=e;c[q+12>>2]=16;f=c[g+496>>2]|0;m=c[g+500>>2]|0;r=c[g+504>>2]|0;t=c[g+508>>2]|0;s=m+f|0;n=d-(ga(s,v)|0)|0;c[b+72>>2]=n;d=t+r|0;l=e-(ga(d,w)|0)|0;c[b+76>>2]=l;c[b+80>>2]=x-s;c[b+84>>2]=y-d;d=ga(f,v)|0;c[q+16>>2]=d;y=ga(m,v)|0;c[q+20>>2]=y;y=ga(r,w)|0;c[q+24>>2]=y;v=ga(t,w)|0;c[q+28>>2]=v;c[q+32>>2]=n;c[q+36>>2]=l;a[b+16|0]=(c[g+4996>>2]|0)>8|0;l=(c[g+5004>>2]|0)>8|0;a[b+17|0]=l;a[b+18|0]=l;l=(j|0)==0;if(l){z=0}else{z=c[j+544>>2]|0}n=(k|0)==0;do{if(n){A=z;B=o^1;u=23}else{v=c[k+3060>>2]|0;w=o^1;if(n|w){A=v;B=w;u=23;break}w=c[k+3064>>2]|0;c[b+10512>>2]=w;t=b+10504|0;if((w|0)==0){w=t;m=27248;s=c[m>>2]|0;x=c[m+4>>2]|0;c[w>>2]=s;c[w+4>>2]=x;C=s;D=v;u=26;break}else{c[t>>2]=0;c[b+10508>>2]=0;break}}}while(0);do{if((u|0)==23){k=b+10504|0;if(l|B){n=k;o=27248;z=c[o>>2]|0;t=c[o+4>>2]|0;c[n>>2]=z;c[n+4>>2]=t;C=z;D=A;u=26;break}else{z=j+536|0;t=k;k=c[z>>2]|0;n=c[z+4>>2]|0;c[t>>2]=k;c[t+4>>2]=n;C=k;D=A;u=26;break}}}while(0);do{if((u|0)==26){if((C|0)==0){break}A=(Sc[C&15](j,q,b,D)|0)==0;B=(c[b+4>>2]|0)+((ga(c[b+40>>2]|0,y)|0)+d)|0;c[b+60>>2]=B;B=(ga(c[b+44>>2]|0,r)|0)+f|0;c[b+64>>2]=(c[b+8>>2]|0)+B;c[b+68>>2]=(c[b+12>>2]|0)+B;if(A){E=7}else{break}F=40;G=0;i=p;return E|0}}while(0);do{if(h){f=g+5112|0;r=c[f>>2]|0;d=g+5116|0;y=c[d>>2]|0;D=g+5108|0;q=c[D>>2]|0;j=ga(y,r)|0;C=b+10404|0;A=b+10400|0;B=c[A>>2]|0;do{if((j|0)==(c[C>>2]|0)){H=B;u=33}else{Hu(B);l=Gu(j)|0;c[A>>2]=l;if((l|0)==0){c[C>>2]=0;I=0;break}else{c[C>>2]=j;H=l;u=33;break}}}while(0);if((u|0)==33){c[b+10412>>2]=r;c[b+10416>>2]=y;c[b+10408>>2]=q;I=(H|0)!=0}j=c[f>>2]|0;C=c[d>>2]|0;A=c[D>>2]|0;B=ga(C,j)|0;l=b+10424|0;k=b+10420|0;n=c[k>>2]|0;do{if((B|0)==(c[l>>2]|0)){J=n;u=38}else{Hu(n);t=Gu(B)|0;c[k>>2]=t;if((t|0)==0){c[l>>2]=0;L=0;break}else{c[l>>2]=B;J=t;u=38;break}}}while(0);if((u|0)==38){c[b+10432>>2]=j;c[b+10436>>2]=C;c[b+10428>>2]=A;L=(J|0)!=0}B=I&L;l=g+5052|0;k=c[l>>2]|0;n=g+5060|0;D=c[n>>2]|0;d=g+5036|0;f=c[d>>2]|0;q=ga(D,k)|0;y=b+10364|0;r=b+10360|0;t=c[r>>2]|0;do{if((q|0)==(c[y>>2]|0)){M=t;u=43}else{Hu(t|0);z=Gu(q*3|0)|0;o=z;c[r>>2]=o;if((z|0)==0){c[y>>2]=0;N=0;break}else{c[y>>2]=q;M=o;u=43;break}}}while(0);if((u|0)==43){c[b+10372>>2]=k;c[b+10376>>2]=D;c[b+10368>>2]=f;N=(M|0)!=0}q=B&N;y=(c[d>>2]|0)-2|0;r=c[l>>2]<<y;t=c[n>>2]<<y;y=ga(t,r)|0;A=b+10384|0;C=b+10380|0;j=c[C>>2]|0;do{if((y|0)==(c[A>>2]|0)){O=j;u=48}else{Hu(j|0);o=Gu(y*12|0)|0;z=o;c[C>>2]=z;if((o|0)==0){c[A>>2]=0;P=0;break}else{c[A>>2]=y;O=z;u=48;break}}}while(0);if((u|0)==48){c[b+10392>>2]=r;c[b+10396>>2]=t;c[b+10388>>2]=2;P=(O|0)!=0}y=q&P;A=c[g+5088>>2]|0;C=c[g+5092>>2]|0;j=c[g+5100>>2]|0;n=ga(C,A)|0;l=b+10444|0;d=b+10440|0;B=c[d>>2]|0;do{if((n|0)==(c[l>>2]|0)){Q=B;u=53}else{Hu(B);f=Gu(n)|0;c[d>>2]=f;if((f|0)==0){c[l>>2]=0;R=0;break}else{c[l>>2]=n;Q=f;u=53;break}}}while(0);if((u|0)==53){c[b+10452>>2]=A;c[b+10456>>2]=C;c[b+10448>>2]=j;R=(Q|0)!=0}n=y&R;l=((c[g+484>>2]|0)+3|0)/4|0;d=((c[g+488>>2]|0)+3|0)/4|0;B=ga(d,l)|0;q=b+10464|0;t=b+10460|0;r=c[t>>2]|0;do{if((B|0)==(c[q>>2]|0)){S=r;u=58}else{Hu(r);f=Gu(B)|0;c[t>>2]=f;if((f|0)==0){c[q>>2]=0;T=0;break}else{c[q>>2]=B;S=f;u=58;break}}}while(0);if((u|0)==58){c[b+10472>>2]=l;c[b+10476>>2]=d;c[b+10468>>2]=2;T=(S|0)!=0}B=n&T;q=b+10344|0;t=c[q>>2]|0;if((t|0)==(c[g+5072>>2]|0)){if(B){break}else{E=7}F=40;G=0;i=p;return E|0}r=b+10524|0;y=c[r>>2]|0;if((y|0)==0){U=t}else{t=y-76+72|0;j=t;C=c[t>>2]|0;if((C|0)!=0){t=y+(C*76|0)|0;do{t=t-76|0;Ck(t);}while((t|0)!=(y|0))}Qu(j);U=c[q>>2]|0}y=c[g+5056>>2]|0;t=c[g+5064>>2]|0;n=c[g+5040>>2]|0;d=ga(t,y)|0;l=b+10340|0;C=c[l>>2]|0;do{if((d|0)==(U|0)){V=C;W=U;u=69}else{Hu(C);A=Gu(d*24|0)|0;f=A;c[l>>2]=f;if((A|0)==0){c[q>>2]=0;X=0;Y=0;break}else{c[q>>2]=d;V=f;W=d;u=69;break}}}while(0);if((u|0)==69){c[b+10352>>2]=y;c[b+10356>>2]=t;c[b+10348>>2]=n;X=(V|0)!=0;Y=W}d=B&X;q=Ra(Y|0,76)|0;l=K;C=sb(q|0,4)|0;q=Ou(l|K?-1:C)|0;c[q>>2]=Y;C=q+4|0;if((Y|0)!=0){q=C+(Y*76|0)|0;l=C;do{Bk(l);l=l+76|0;}while((l|0)!=(q|0))}c[r>>2]=C;if(d){break}else{E=7}F=40;G=0;i=p;return E|0}}while(0);E=0;F=40;G=0;i=p;return E|0}function Qh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+4|0;if((c[b>>2]|0)!=0){d=c[a+10512>>2]|0;if((d|0)==0){e=c[a+10332>>2]|0;if((e|0)==0){f=0}else{f=c[e+544>>2]|0}Tc[c[a+10508>>2]&63](e,a,f)}else{f=c[a+10336>>2]|0;Tc[d&63](f,a,c[f+3060>>2]|0)}c[b>>2]=0;c[a+60>>2]=0;c[a+8>>2]=0;c[a+64>>2]=0;c[a+12>>2]=0;c[a+68>>2]=0}b=a+52|0;f=c[b>>2]|0;d=a+48|0;a=c[d>>2]|0;if((f|0)==(a|0)){return}else{g=0;h=a;i=f}while(1){f=c[h+(g<<2)>>2]|0;if((f|0)==0){j=i;k=h}else{a=c[f+1344>>2]|0;if((a|0)!=0){e=f+1348|0;l=c[e>>2]|0;if((l|0)!=(a|0)){c[e>>2]=l+(~((l-4+(-a|0)|0)>>>2)<<2)}Pu(a)}Ed(f+1332|0);a=c[f+776>>2]|0;if((a|0)!=0){l=f+780|0;e=c[l>>2]|0;if((e|0)!=(a|0)){c[l>>2]=e+(~((e-4+(-a|0)|0)>>>2)<<2)}Pu(a)}Pu(f);j=c[b>>2]|0;k=c[d>>2]|0}f=g+1|0;m=k;if(f>>>0<j-m>>2>>>0){g=f;h=k;i=j}else{break}}if((j|0)==(k|0)){return}c[b>>2]=j+(~((j-4+(-m|0)|0)>>>2)<<2);return}function Rh(a){a=a|0;var b=0,d=0,e=0,f=0;Qh(a);b=c[a+10524>>2]|0;if((b|0)!=0){d=b-76+72|0;e=d;f=c[d>>2]|0;if((f|0)!=0){d=b+(f*76|0)|0;do{d=d-76|0;Ck(d);}while((d|0)!=(b|0))}Qu(e)}yk(a+10572|0);uk(a+10548|0);Hu(c[a+10460>>2]|0);Hu(c[a+10440>>2]|0);Hu(c[a+10420>>2]|0);Hu(c[a+10400>>2]|0);Hu(c[a+10380>>2]|0);Hu(c[a+10360>>2]|0);Hu(c[a+10340>>2]|0);kj(a+5932|0);jk(a+764|0);Jf(a+108|0);e=c[a+48>>2]|0;if((e|0)==0){return}b=a+52|0;a=c[b>>2]|0;if((a|0)!=(e|0)){c[b>>2]=a+(~((a-4+(-e|0)|0)>>>2)<<2)}Pu(e);return}function Sh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if((b|0)>-1){dv(c[a+4>>2]|0,b&255|0,ga(c[a+28>>2]|0,c[a+40>>2]|0)|0)|0}if((d|0)>-1){dv(c[a+8>>2]|0,d&255|0,ga(c[a+36>>2]|0,c[a+44>>2]|0)|0)|0}if(!((e|0)>-1)){return}dv(c[a+12>>2]|0,e&255|0,ga(c[a+36>>2]|0,c[a+44>>2]|0)|0)|0;return}function Th(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=c[b+28>>2]|0;g=(f|0)<(e|0)?f:e;if((d&1|0)!=0){ec(5264,15792,535,17776)}if((g&1|0)!=0){ec(3744,15792,536,17776)}e=((c[a+5760>>2]|0)+7|0)/8|0;f=((c[a+5768>>2]|0)+7|0)/8|0;h=b+40|0;i=c[h>>2]|0;j=a+40|0;k=c[j>>2]|0;a:do{if((i|0)==(k|0)){l=ga(ga(e,d)|0,i)|0;cv((c[a+4>>2]|0)+l|0,(c[b+4>>2]|0)+l|0,ga(ga(e,g-d|0)|0,i)|0)|0}else{if((g|0)<=(d|0)){break}l=a+4|0;m=b+4|0;n=b+24|0;o=d;p=k;q=i;while(1){r=ga(o,e)|0;s=(c[l>>2]|0)+(ga(r,p)|0)|0;t=(c[m>>2]|0)+(ga(r,q)|0)|0;cv(s|0,t|0,ga(c[n>>2]|0,e)|0)|0;t=o+1|0;if((t|0)>=(g|0)){break a}o=t;p=c[j>>2]|0;q=c[h>>2]|0}}}while(0);h=c[b+5784>>2]|0;j=(d|0)/(h|0)|0;d=(g|0)/(h|0)|0;if((c[b+20>>2]|0)==0){return}h=b+44|0;g=c[h>>2]|0;e=a+44|0;i=c[e>>2]|0;if((g|0)==(i|0)){k=ga(j,f)|0;q=ga(k,g)|0;p=ga(d-j|0,f)|0;cv((c[a+8>>2]|0)+q|0,(c[b+8>>2]|0)+q|0,ga(p,g)|0)|0;q=c[e>>2]|0;o=ga(k,q)|0;cv((c[a+12>>2]|0)+o|0,(c[b+12>>2]|0)+o|0,ga(p,q)|0)|0;return}if((j|0)>=(d|0)){return}q=a+8|0;p=b+8|0;o=b+32|0;k=a+12|0;a=b+12|0;b=j;j=i;i=g;while(1){g=ga(b,f)|0;n=(c[q>>2]|0)+(ga(g,j)|0)|0;m=(c[p>>2]|0)+(ga(g,i)|0)|0;cv(n|0,m|0,ga(c[o>>2]|0,f)|0)|0;m=(c[k>>2]|0)+(ga(g,c[e>>2]|0)|0)|0;n=(c[a>>2]|0)+(ga(g,c[h>>2]|0)|0)|0;cv(m|0,n|0,ga(c[o>>2]|0,f)|0)|0;n=b+1|0;if((n|0)>=(d|0)){break}b=n;j=c[e>>2]|0;i=c[h>>2]|0}return}function Uh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a+4|0;e=b+4|0;f=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=f;f=a+60|0;e=b+60|0;d=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=d;d=a+10492|0;e=b+10492|0;f=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=f;f=a+8|0;e=b+8|0;d=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=d;d=a+64|0;e=b+64|0;f=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=f;f=a+10496|0;e=b+10496|0;d=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=d;d=a+12|0;e=b+12|0;f=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=f;f=a+68|0;e=b+68|0;d=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=d;d=a+10500|0;e=b+10500|0;f=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=f;f=a+40|0;e=b+40|0;d=c[f>>2]|0;c[f>>2]=c[e>>2];c[e>>2]=d;d=a+44|0;e=b+44|0;f=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=f;f=a+10504|0;a=c[f>>2]|0;e=c[f+4>>2]|0;d=b+10504|0;b=c[d+4>>2]|0;c[f>>2]=c[d>>2];c[f+4>>2]=b;c[d>>2]=a;c[d+4>>2]=e;return}function Vh(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+10548|0;vk(d);e=a+10528|0;c[e>>2]=(c[e>>2]|0)+b;e=a+10544|0;c[e>>2]=(c[e>>2]|0)+b;wk(d);return}function Wh(a,b){a=a|0;b=b|0;var d=0;b=a+10548|0;vk(b);d=a+10528|0;c[d>>2]=(c[d>>2]|0)-1;d=a+10532|0;c[d>>2]=(c[d>>2]|0)+1;wk(b);return}function Xh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;b=a+10548|0;vk(b);d=a+10532|0;e=c[d>>2]|0;c[d>>2]=e-1;d=a+10540|0;f=(c[d>>2]|0)+1|0;c[d>>2]=f;if((e|0)<=0){ec(2424,15792,642,17760)}if((f|0)!=(c[a+10544>>2]|0)){wk(b);return}zk(a+10572|0,b);wk(b);return}function Yh(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;Zh(a,b,(ga(c[a+5820>>2]|0,e)|0)+d|0,f);return}function Zh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((b|0)==0){return}f=(c[a+10524>>2]|0)+(d*76|0)|0;if((Gk(f)|0)>=(e|0)){return}d=a+10548|0;vk(d);g=a+10532|0;c[g>>2]=(c[g>>2]|0)-1;h=a+10536|0;c[h>>2]=(c[h>>2]|0)+1;wk(d);a=b+4|0;c[a>>2]=2;Dk(f,e);c[a>>2]=1;vk(d);c[h>>2]=(c[h>>2]|0)-1;c[g>>2]=(c[g>>2]|0)+1;wk(d);return}function _h(a){a=a|0;var b=0,d=0,e=0,f=0;b=a+10548|0;vk(b);d=a+10540|0;e=a+10544|0;if((c[d>>2]|0)==(c[e>>2]|0)){wk(b);return}f=a+10572|0;do{Ak(f,b);}while((c[d>>2]|0)!=(c[e>>2]|0));wk(b);return}function $h(a){a=a|0;var b=0,d=0;b=c[a+10360>>2]|0;if((b|0)!=0){dv(b|0,0,(c[a+10364>>2]|0)*3|0|0)|0}b=c[a+10340>>2]|0;if((b|0)!=0){dv(b|0,0,(c[a+10344>>2]|0)*24|0|0)|0}b=c[a+10460>>2]|0;if((b|0)!=0){dv(b|0,0,c[a+10464>>2]|0)|0}b=a+10344|0;if((c[b>>2]|0)<=0){return}d=c[a+10524>>2]|0;a=0;do{c[d+(a*76|0)>>2]=0;a=a+1|0;}while((a|0)<(c[b>>2]|0));return}function ai(a,d,e,f,g,h){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;i=d>>2;d=e>>2;e=f>>2;f=g>>2;g=c[a+10392>>2]|0;if((f|0)<=0){return}j=a+10380|0;a=h|0;if((e|0)>0){k=0}else{return}do{h=(ga(k+d|0,g)|0)+i|0;l=0;do{m=(c[j>>2]|0)+((h+l|0)*12|0)|0;b[m>>1]=b[a>>1]|0;b[m+2>>1]=b[a+2>>1]|0;b[m+4>>1]=b[a+4>>1]|0;b[m+6>>1]=b[a+6>>1]|0;b[m+8>>1]=b[a+8>>1]|0;b[m+10>>1]=b[a+10>>1]|0;l=l+1|0;}while((l|0)<(e|0));k=k+1|0;}while((k|0)<(f|0));return}function bi(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;if((g|f|0)<0){h=0;return h|0}if((c[a+1248>>2]|0)<=(f|0)){h=0;return h|0}if((c[a+1252>>2]|0)<=(g|0)){h=0;return h|0}i=c[a+5864>>2]|0;j=c[a+5852>>2]|0;k=(ga(g>>i,j)|0)+(f>>i)|0;l=c[a+10320>>2]|0;m=l+((ga(e>>i,j)|0)+(d>>i)<<2)|0;if((c[l+(k<<2)>>2]|0)>(c[m>>2]|0)){h=0;return h|0}m=c[a+5804>>2]|0;k=d>>m;d=e>>m;e=f>>m;f=g>>m;m=c[a+10352>>2]|0;g=(ga(m,d)|0)+k|0;l=c[a+10340>>2]|0;i=l+(((ga(m,f)|0)+e|0)*24|0)|0;if((b[l+(g*24|0)>>1]|0)!=(b[i>>1]|0)){h=0;return h|0}i=c[a+5820>>2]|0;g=(ga(i,d)|0)+k|0;k=c[a+10308>>2]|0;a=k+((ga(i,f)|0)+e<<2)|0;h=(c[k+(g<<2)>>2]|0)==(c[a>>2]|0);return h|0}function ci(a,e,f,g,h,i,j,k,l,m,n){a=a|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;var o=0,p=0,q=0;do{if((e|0)>(m|0)){o=3}else{if(!((f|0)<=(n|0)&(g+e|0)>(m|0)&(g+f|0)>(n|0))){o=3;break}if((j<<1|0)!=(g|0)){break}if(!((k<<1|0)==(g|0)&(l|0)==1)){break}if((k+f|0)>(n|0)){break}if((j+e|0)<=(m|0)){break}return 0}}while(0);do{if((o|0)==3){if((n|m|0)<0){return 0}if((c[a+1248>>2]|0)<=(m|0)){return 0}if((c[a+1252>>2]|0)<=(n|0)){return 0}e=c[a+5864>>2]|0;j=c[a+5852>>2]|0;f=(ga(n>>e,j)|0)+(m>>e)|0;k=c[a+10320>>2]|0;l=k+((ga(i>>e,j)|0)+(h>>e)<<2)|0;if((c[k+(f<<2)>>2]|0)>(c[l>>2]|0)){return 0}l=c[a+5804>>2]|0;f=h>>l;k=i>>l;e=m>>l;j=n>>l;l=c[a+10352>>2]|0;g=(ga(l,k)|0)+f|0;p=c[a+10340>>2]|0;q=p+(((ga(l,j)|0)+e|0)*24|0)|0;if((b[p+(g*24|0)>>1]|0)!=(b[q>>1]|0)){return 0}q=c[a+5820>>2]|0;g=(ga(q,k)|0)+f|0;f=c[a+10308>>2]|0;k=f+((ga(q,j)|0)+e<<2)|0;if((c[f+(g<<2)>>2]|0)==(c[k>>2]|0)){break}return 0}}while(0);i=c[a+10368>>2]|0;h=m>>i;m=n>>i;if(!((h|0)>-1)){ec(568,17072,118,17344);return 0}i=c[a+10372>>2]|0;if((h|0)>=(i|0)){ec(568,17072,118,17344);return 0}if(!((m|0)>-1)){ec(16504,17072,119,17344);return 0}if((m|0)<(c[a+10376>>2]|0)){n=(ga(i,m)|0)+h|0;h=(c[a+10360>>2]|0)+(n*3|0)|0;return((d[h]|d[h+1|0]<<8)<<16>>16&768)!=0|0}else{ec(16504,17072,119,17344);return 0}return 0}function di(a,b,e,f,g,h,i){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0;do{if(g){j=c[i+10368>>2]|0;k=b-1>>j;l=e>>j;if(!((k|0)>-1)){ec(7e3,5152,118,17336)}j=c[i+10372>>2]|0;if((k|0)>=(j|0)){ec(7e3,5152,118,17336)}if(!((l|0)>-1)){ec(3672,5152,119,17336)}if((l|0)>=(c[i+10376>>2]|0)){ec(3672,5152,119,17336)}m=(ga(j,l)|0)+k|0;k=(c[i+10360>>2]|0)+(m*3|0)|0;if(!(((d[k]|d[k+1|0]<<8)<<16>>16&1792)==0)){n=1;break}n=d[(c[i+10400>>2]|0)+(f-1)|0]|0}else{n=1}}while(0);do{if(h){g=c[i+10368>>2]|0;k=b>>g;m=e-1>>g;if(!((k|0)>-1)){ec(7e3,5152,118,17336)}g=c[i+10372>>2]|0;if((k|0)>=(g|0)){ec(7e3,5152,118,17336)}if(!((m|0)>-1)){ec(3672,5152,119,17336)}if((m|0)>=(c[i+10376>>2]|0)){ec(3672,5152,119,17336)}l=(ga(g,m)|0)+k|0;k=(c[i+10360>>2]|0)+(l*3|0)|0;if(!(((d[k]|d[k+1|0]<<8)<<16>>16&1792)==0)){o=1;break}k=c[i+5804>>2]|0;if((e>>k<<k|0)>=(e|0)){o=1;break}o=d[(c[i+10400>>2]|0)+(f-(c[i+5876>>2]|0))|0]|0}else{o=1}}while(0);if((n|0)==(o|0)){if(n>>>0<2>>>0){c[a>>2]=0;c[a+4>>2]=1;c[a+8>>2]=26;return}else{c[a>>2]=n;c[a+4>>2]=(n+29&31)+2;c[a+8>>2]=((n-1|0)%32|0)+2;return}}c[a>>2]=n;c[a+4>>2]=o;if(!((n|0)==0|(o|0)==0)){c[a+8>>2]=0;return}i=a+8|0;if((n|0)==1|(o|0)==1){c[i>>2]=26;return}else{c[i>>2]=1;return}}function ei(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==3){f=2}else if((a|0)!=2){g=0;return g|0}do{if((f|0)==2){if((d|0)==0){break}if((c[e+5012>>2]|0)==3){break}else{g=0}return g|0}}while(0);if((b-6|0)>>>0<9>>>0){g=2;return g|0}g=(b-22|0)>>>0<9>>>0|0;return g|0}function fi(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;if((c[((g|0)==0?a+5760|0:a+5768|0)>>2]|0)>8){gi(a,b,d,e,f,g);return}else{hi(a,b,d,e,f,g);return}}function gi(d,f,g,h,j,k){d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;l=i;i=i+264|0;m=l|0;n=m+128|0;mi(d,f,g,j,k,n);do{if((a[d+5753|0]|0)==0){if((k|0)!=0){if((c[d+5776>>2]|0)!=3){break}}ni(d,n,j,k,h)}}while(0);if((h|0)==0){o=c[((k|0)==0?d+40|0:d+44|0)>>2]|0;p=(c[d+4+(k<<2)>>2]|0)+((ga(o,g)|0)+f<<1)|0;if((j|0)>1){q=j;r=0;while(1){s=q>>1;if((s|0)>1){q=s;r=r+1|0}else{break}}t=r+2|0}else{t=1}if((j|0)<=0){u=258;v=0;i=l;return}r=j-1|0;q=e[m+(j+65<<1)>>1]|0;s=e[m+(63-j<<1)>>1]|0;w=0;while(1){x=r-w|0;y=w+1|0;z=ga(w,o)|0;A=e[m+(63-w<<1)>>1]|0;B=ga(s,y)|0;C=0;while(1){D=ga(A,r-C|0)|0;E=C+1|0;F=ga(q,E)|0;G=D+j+F+(ga(e[m+(C+65<<1)>>1]|0,x)|0)+B>>t&65535;b[p+(C+z<<1)>>1]=G;if((E|0)<(j|0)){C=E}else{break}}if((y|0)<(j|0)){w=y}else{break}}u=258;v=0;i=l;return}else if((h|0)==1){oi(d,f,g,j,k,n);u=258;v=0;i=l;return}else{pi(d,f,g,h,j,k,n);u=258;v=0;i=l;return}}function hi(b,e,f,g,h,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;k=i;i=i+136|0;l=k|0;m=l+64|0;ii(b,e,f,h,j,m);do{if((a[b+5753|0]|0)==0){if((j|0)!=0){if((c[b+5776>>2]|0)!=3){break}}ji(b,m,h,j,g)}}while(0);if((g|0)==0){n=c[((j|0)==0?b+40|0:b+44|0)>>2]|0;o=c[b+4+(j<<2)>>2]|0;if((h|0)>1){p=h;q=0;while(1){r=p>>1;if((r|0)>1){p=r;q=q+1|0}else{break}}s=q+2|0}else{s=1}if((h|0)<=0){t=129;u=0;i=k;return}q=h-1|0;p=d[l+(h+65)|0]|0;r=d[l+(63-h)|0]|0;v=0;while(1){w=q-v|0;x=v+1|0;y=ga(v+f|0,n)|0;z=d[l+(63-v)|0]|0;A=ga(r,x)|0;B=y+e|0;y=0;while(1){C=ga(z,q-y|0)|0;D=y+1|0;E=ga(p,D)|0;F=C+h+E+(ga(d[l+(y+65)|0]|0,w)|0)+A>>s&255;a[o+(B+y)|0]=F;if((D|0)<(h|0)){y=D}else{break}}if((x|0)<(h|0)){v=x}else{break}}t=129;u=0;i=k;return}else if((g|0)==1){ki(b,e,f,h,j,m);t=129;u=0;i=k;return}else{li(b,e,f,g,h,j,m);t=129;u=0;i=k;return}}function ii(b,f,g,h,j,k){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;l=i;i=i+136|0;m=l|0;n=m+64|0;o=c[b+4+(j<<2)>>2]|0;p=(j|0)==0;j=c[(p?b+40|0:b+44|0)>>2]|0;if(p){q=1;r=1}else{q=c[b+5784>>2]|0;r=c[b+5780>>2]|0}s=c[(p?b+5760|0:b+5768|0)>>2]|0;p=ga(r,f)|0;t=ga(q,g)|0;u=c[b+5804>>2]|0;v=c[b+5820>>2]|0;w=(p|0)!=0;x=(t|0)==0;y=x^1;z=w&y;A=ga(r,h+f|0)|0;B=c[b+1248>>2]|0;D=(A|0)<(B|0)&y;E=p>>u;F=t>>u;G=p-1>>u;H=A>>u;A=t-1>>u;u=c[b+10352>>2]|0;I=ga(u,F)|0;J=c[b+10340>>2]|0;K=e[J+((I+E|0)*24|0)>>1]|0;if(w){L=e[J+((I+G|0)*24|0)>>1]|0}else{L=-1}if(x){M=-1}else{I=J+(((ga(u,A)|0)+E|0)*24|0)|0;M=e[I>>1]|0}if(D){I=J+(((ga(u,A)|0)+H|0)*24|0)|0;N=e[I>>1]|0}else{N=-1}if(z){I=J+(((ga(u,A)|0)+G|0)*24|0)|0;O=e[I>>1]|0}else{O=-1}I=ga(F,v)|0;F=c[b+10308>>2]|0;u=c[F+(I+E<<2)>>2]|0;if(w){P=c[F+(I+G<<2)>>2]|0}else{P=-1}if(x){Q=-1}else{x=F+((ga(A,v)|0)+E<<2)|0;Q=c[x>>2]|0}if(z){x=F+((ga(A,v)|0)+G<<2)|0;R=c[x>>2]|0}else{R=-1}if(D){x=F+((ga(A,v)|0)+H<<2)|0;S=c[x>>2]|0}else{S=-1}x=(L|0)==(K|0)&(P|0)==(u|0)&w;w=(M|0)==(K|0)&(Q|0)==(u|0)&y;y=(O|0)==(K|0)&(R|0)==(u|0)&z;z=(N|0)==(K|0)&(S|0)==(u|0)&D;D=b+5864|0;u=c[D>>2]|0;S=b+5852|0;K=(ga(t>>u,c[S>>2]|0)|0)+(p>>u)|0;u=b+10320|0;N=c[(c[u>>2]|0)+(K<<2)>>2]|0;K=(q-1-t+(c[b+1252>>2]|0)|0)/(q|0)|0;t=h<<1;R=(K|0)>(t|0)?t:K;O=(r-1-p+B|0)/(r|0)|0;B=(O|0)>(t|0)?t:O;O=-t|0;p=h<<2|1;dv(m+(64-t)|0,0,p|0)|0;a:do{if((R|0)>0){Q=f-1|0;M=ga(r,Q)|0;P=b+5944|0;L=b+10368|0;H=b+10372|0;v=b+10376|0;A=b+10360|0;F=~K;G=~(h<<1);E=((F|0)>(G|0)?F:G)+65|0;G=0;F=0;I=R-1|0;J=0;b:while(1){T=m+(E+(J<<2))|0;do{if(x){U=c[D>>2]|0;V=I+g|0;W=ga(V,q)|0;X=(ga(W>>U,c[S>>2]|0)|0)+(M>>U)|0;U=(c[(c[u>>2]|0)+(X<<2)>>2]|0)<=(N|0);if((a[P]|0)==0){if(!U){Y=F;Z=G;break}}else{X=c[L>>2]|0;_=M>>X;$=W>>X;if(!((_|0)>-1)){aa=25;break b}X=c[H>>2]|0;if((_|0)>=(X|0)){aa=25;break b}if(!(($|0)>-1)){aa=28;break b}if(($|0)>=(c[v>>2]|0)){aa=28;break b}W=(ga(X,$)|0)+_|0;_=(c[A>>2]|0)+(W*3|0)|0;if(!(((d[_]|d[_+1|0]<<8)<<16>>16&768)==0&U)){Y=F;Z=G;break}}U=o+((ga(V,j)|0)+Q)|0;if((G|0)==0){ba=a[U]|0}else{ba=F}_=T;C=16843009;a[_]=C;C=C>>8;a[_+1|0]=C;C=C>>8;a[_+2|0]=C;C=C>>8;a[_+3|0]=C;a[k+~I|0]=a[U]|0;U=o+((ga(V-1|0,j)|0)+Q)|0;a[k+(1-I-1)|0]=a[U]|0;U=o+((ga(V-2|0,j)|0)+Q)|0;a[k+(2-I-1)|0]=a[U]|0;U=o+((ga(V-3|0,j)|0)+Q)|0;a[k+(3-I-1)|0]=a[U]|0;Y=ba;Z=G+4|0}else{Y=F;Z=G}}while(0);T=I-4|0;if((T|0)>-1){G=Z;F=Y;I=T;J=J+1|0}else{ca=Z;da=Y;break a}}if((aa|0)==25){ec(7e3,5152,118,17336)}else if((aa|0)==28){ec(3672,5152,119,17336)}}else{ca=0;da=0}}while(0);c:do{if(y){Y=f-1|0;Z=ga(r,Y)|0;ba=c[D>>2]|0;x=g-1|0;R=ga(q,x)|0;K=(ga(R>>ba,c[S>>2]|0)|0)+(Z>>ba)|0;ba=(c[(c[u>>2]|0)+(K<<2)>>2]|0)<=(N|0);do{if((a[b+5944|0]|0)==0){if(!ba){ea=da;fa=ca;break c}}else{K=c[b+10368>>2]|0;J=Z>>K;I=R>>K;if(!((J|0)>-1)){ec(7e3,5152,118,17336)}K=c[b+10372>>2]|0;if((J|0)>=(K|0)){ec(7e3,5152,118,17336)}if(!((I|0)>-1)){ec(3672,5152,119,17336)}if((I|0)<(c[b+10376>>2]|0)){F=(ga(K,I)|0)+J|0;J=(c[b+10360>>2]|0)+(F*3|0)|0;if(((d[J]|d[J+1|0]<<8)<<16>>16&768)==0&ba){break}else{ea=da;fa=ca;break c}}else{ec(3672,5152,119,17336)}}}while(0);ba=o+((ga(j,x)|0)+Y)|0;if((ca|0)==0){ha=a[ba]|0}else{ha=da}a[k]=a[ba]|0;a[n]=1;ea=ha;fa=ca+1|0}else{ea=da;fa=ca}}while(0);d:do{if((B|0)>0){ca=g-1|0;da=ga(q,ca)|0;ha=b+5944|0;n=ga(j,ca)|0;ca=b+10368|0;y=b+10372|0;ba=b+10376|0;R=b+10360|0;Z=fa;J=ea;F=0;I=0;e:while(1){K=m+((I<<2)+65)|0;do{if((F|0)<(h|0)?w:z){G=F+f|0;Q=ga(G,r)|0;A=c[D>>2]|0;v=(ga(da>>A,c[S>>2]|0)|0)+(Q>>A)|0;A=(c[(c[u>>2]|0)+(v<<2)>>2]|0)<=(N|0);if((a[ha]|0)==0){if(!A){ia=J;ja=Z;break}}else{v=c[ca>>2]|0;H=Q>>v;Q=da>>v;if(!((H|0)>-1)){aa=54;break e}v=c[y>>2]|0;if((H|0)>=(v|0)){aa=54;break e}if(!((Q|0)>-1)){aa=57;break e}if((Q|0)>=(c[ba>>2]|0)){aa=57;break e}M=(ga(v,Q)|0)+H|0;H=(c[R>>2]|0)+(M*3|0)|0;if(!(((d[H]|d[H+1|0]<<8)<<16>>16&768)==0&A)){ia=J;ja=Z;break}}A=G+n|0;G=o+A|0;if((Z|0)==0){ka=a[G]|0}else{ka=J}H=K;C=16843009;a[H]=C;C=C>>8;a[H+1|0]=C;C=C>>8;a[H+2|0]=C;C=C>>8;a[H+3|0]=C;H=F|1;a[k+H|0]=a[G]|0;a[k+(H+1)|0]=a[o+(A+1)|0]|0;a[k+(F|3)|0]=a[o+(A+2)|0]|0;a[k+((F|3)+1)|0]=a[o+(A+3)|0]|0;ia=ka;ja=Z+4|0}else{ia=J;ja=Z}}while(0);K=F+4|0;if((K|0)<(B|0)){Z=ja;J=ia;F=K;I=I+1|0}else{la=ja;ma=ia;break d}}if((aa|0)==54){ec(7e3,5152,118,17336)}else if((aa|0)==57){ec(3672,5152,119,17336)}}else{la=fa;ma=ea}}while(0);if((la|0)==(p|0)){na=129;oa=0;i=l;return}if((la|0)==0){dv(k+O|0,1<<s-1&255|0,p|0)|0;na=129;oa=0;i=l;return}p=h*-2|0;if((a[m+(p+64)|0]|0)==0){a[k+p|0]=ma}ma=p|1;if((ma|0)>(t|0)){na=129;oa=0;i=l;return}else{pa=ma}while(1){if((a[m+(pa+64)|0]|0)==0){a[k+pa|0]=a[k+(pa-1)|0]|0}if((pa|0)<(t|0)){pa=pa+1|0}else{break}}na=129;oa=0;i=l;return}function ji(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0;j=i;i=i+136|0;k=j|0;if((h|0)==1|(f|0)==4){i=j;return}l=h-26|0;m=(l|0)<0?26-h|0:l;l=h-10|0;n=(l|0)<0?10-h|0:l;l=(m|0)<(n|0)?m:n;do{if((f|0)==32){if((l|0)>0){break}i=j;return}else if((f|0)==8){if((l|0)>7){break}i=j;return}else if((f|0)==16){if((l|0)>1){break}i=j;return}else{ec(8920,15552,518,18232)}}while(0);do{if((a[b+5665|0]|0)!=0&(g|0)==0&(f|0)==32){l=d[e]|0;n=(d[e+64|0]|0)+l-(d[e+32|0]<<1)|0;m=1<<(c[b+1276>>2]|0)-5;if((((n|0)<0?-n|0:n)|0)>=(m|0)){o=0;break}n=(d[e-64|0]|0)+l-(d[e-32|0]<<1)|0;o=(((n|0)<0?-n|0:n)|0)<(m|0)}else{o=0}}while(0);b=f*-2|0;a[k+(b+64)|0]=a[e+b|0]|0;b=f<<1;a[k+(b+64)|0]=a[e+b|0]|0;do{if(o){g=a[e]|0;a[k+64|0]=g;m=g&255;g=(d[e-64|0]|0)-m|0;n=(d[e+64|0]|0)-m|0;l=1;do{h=(((ga(g,l)|0)+32|0)>>>6)+m&255;a[k+(64-l)|0]=h;h=(((ga(n,l)|0)+32|0)>>>6)+m&255;a[k+(l+64)|0]=h;l=l+1|0;}while((l|0)<64)}else{l=b-1|0;m=1-b|0;if((m|0)>(l|0)){break}n=m;g=a[e+m|0]|0;while(1){m=n+1|0;h=a[e+m|0]|0;a[k+(n+64)|0]=((h&255)+2+((g&255)<<1)+(d[e+(n-1)|0]|0)|0)>>>2;if((n|0)<(l|0)){n=m;g=h}else{break}}}}while(0);cv(e+(-b|0)|0,k+(64-b)|0,f<<2|1)|0;i=j;return}function ki(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;j=(h|0)==0;k=c[(j?b+40|0:b+44|0)>>2]|0;l=c[b+4+(h<<2)>>2]|0;h=(ga(k,f)|0)+e|0;b=l+h|0;m=(g|0)>1;if(m){n=g;o=0;while(1){p=n>>1;if((p|0)>1){n=p;o=o+1|0}else{break}}q=o+2|0}else{q=1}o=(g|0)>0;if(o){n=0;p=0;while(1){r=p+1|0;s=(d[i+r|0]|0)+n+(d[i+~p|0]|0)|0;if((r|0)<(g|0)){n=s;p=r}else{t=s;break}}}else{t=0}p=t+g>>q;if(!(j&(g|0)<32)){if(!o){return}o=p&255;j=0;do{dv(l+(h+(ga(k,j)|0))|0,o|0,g|0)|0;j=j+1|0;}while((j|0)<(g|0));return}a[b]=((p<<1)+2+(d[i-1|0]|0)+(d[i+1|0]|0)|0)>>>2;if(!m){return}b=(p*3|0)+2|0;j=1;while(1){o=j+1|0;a[l+(j+h)|0]=(b+(d[i+o|0]|0)|0)>>>2;if((o|0)<(g|0)){j=o}else{break}}if(!m){return}j=(p*3|0)+2|0;b=1;do{o=l+((ga(b,k)|0)+h)|0;a[o]=(j+(d[i+~b|0]|0)|0)>>>2;b=b+1|0;}while((b|0)<(g|0));if(!m){return}m=p&255;p=(ga(k,f+1|0)|0)+e+1|0;e=g-1|0;f=1;b=0;while(1){dv(l+(p+(ga(k,b)|0))|0,m|0,e|0)|0;i=f+1|0;if((i|0)<(g|0)){f=i;b=b+1|0}else{break}}return}function li(b,e,f,g,h,j,k){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;l=i;i=i+136|0;m=l|0;n=(j|0)==0;o=c[(n?b+40|0:b+44|0)>>2]|0;p=c[b+4+(j<<2)>>2]|0;j=(ga(o,f)|0)+e|0;q=c[(n?b+5760|0:b+5768|0)>>2]|0;if((g|0)>=35){ec(12952,15552,596,18712)}if((g|0)<=1){ec(10072,15552,597,18712)}r=c[64+(g<<2)>>2]|0;do{if((a[b+5750|0]|0)==0){s=0}else{t=c[b+10368>>2]|0;u=e>>t;v=f>>t;if(!((u|0)>-1)){ec(7e3,5152,118,17336)}t=c[b+10372>>2]|0;if((u|0)>=(t|0)){ec(7e3,5152,118,17336)}if(!((v|0)>-1)){ec(3672,5152,119,17336)}if((v|0)<(c[b+10376>>2]|0)){w=(ga(t,v)|0)+u|0;u=(c[b+10360>>2]|0)+(w*3|0)|0;s=((d[u]|d[u+1|0]<<8)<<16>>16&2048)!=0;break}else{ec(3672,5152,119,17336)}}}while(0);b=(h|0)<0;if((g|0)>17){if(!b){cv(m+64|0,k|0,h+1|0)|0}f=g-11|0;do{if(f>>>0<15>>>0){e=c[30584+(f<<2)>>2]|0;u=(ga(r,h)|0)>>5;if((u|0)<-1){x=u}else{break}do{u=k+(-((ga(x,e)|0)+128>>8)|0)|0;a[m+(x+64)|0]=a[u]|0;x=x+1|0;}while((x|0)<0)}else{if((h<<1|0)<=(h|0)){break}cv(m+(h+65)|0,k+(h+1)|0,h)|0}}while(0);x=(h|0)>0;if(x){f=0;while(1){e=f+1|0;u=ga(e,r)|0;w=u>>5;v=u&31;u=(v|0)==0;t=w+65|0;y=(ga(f,o)|0)+j|0;z=32-v|0;A=0;do{if(u){a[p+(y+A)|0]=a[m+(t+A)|0]|0}else{B=A+w|0;C=ga(d[m+(B+65)|0]|0,z)|0;D=(C+16+(ga(d[m+(B+66)|0]|0,v)|0)|0)>>>5&255;a[p+(y+A)|0]=D}A=A+1|0;}while((A|0)<(h|0));if((e|0)<(h|0)){f=e}else{break}}}if(s|(g|0)==26&n&(h|0)<32^1|x^1){E=129;F=0;i=l;return}x=k+1|0;f=(1<<q)-1|0;A=0;do{y=((d[k+~A|0]|0)-(d[k]|0)>>1)+(d[x]|0)|0;if((y|0)<0){G=0}else{G=((y|0)>(f|0)?f:y)&255}y=p+((ga(A,o)|0)+j)|0;a[y]=G;A=A+1|0;}while((A|0)<(h|0));E=129;F=0;i=l;return}else{if(!b){b=0;while(1){a[m+(b+64)|0]=a[k+(-b|0)|0]|0;if((b|0)<(h|0)){b=b+1|0}else{break}}}b=g-11|0;do{if(b>>>0<15>>>0){A=c[30584+(b<<2)>>2]|0;G=(ga(r,h)|0)>>5;if((G|0)<-1){H=G}else{break}do{G=k+((ga(H,A)|0)+128>>8)|0;a[m+(H+64)|0]=a[G]|0;H=H+1|0;}while((H|0)<0)}else{A=h<<1;if((A|0)>(h|0)){I=h}else{break}while(1){e=I+1|0;a[m+(I+65)|0]=a[k+~I|0]|0;if((e|0)<(A|0)){I=e}else{break}}}}while(0);I=(h|0)>0;if(I){H=0;do{b=H+65|0;A=(ga(H,o)|0)+j|0;e=0;while(1){G=e+1|0;f=ga(G,r)|0;x=f>>5;y=f&31;if((y|0)==0){a[p+(A+e)|0]=a[m+(b+x)|0]|0}else{f=x+H|0;x=ga(d[m+(f+65)|0]|0,32-y|0)|0;v=(x+16+(ga(d[m+(f+66)|0]|0,y)|0)|0)>>>5&255;a[p+(A+e)|0]=v}if((G|0)<(h|0)){e=G}else{break}}H=H+1|0;}while((H|0)<(h|0))}if(s|(g|0)==10&n&(h|0)<32^1|I^1){E=129;F=0;i=l;return}I=k-1|0;n=(1<<q)-1|0;q=0;while(1){g=q+1|0;s=((d[k+g|0]|0)-(d[k]|0)>>1)+(d[I]|0)|0;if((s|0)<0){J=0}else{J=((s|0)>(n|0)?n:s)&255}a[p+(q+j)|0]=J;if((g|0)<(h|0)){q=g}else{break}}E=129;F=0;i=l;return}}function mi(f,g,h,j,k,l){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,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,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;m=i;i=i+136|0;n=m|0;o=n+64|0;p=c[f+4+(k<<2)>>2]|0;q=(k|0)==0;k=c[(q?f+40|0:f+44|0)>>2]|0;if(q){r=1;s=1}else{r=c[f+5784>>2]|0;s=c[f+5780>>2]|0}t=c[(q?f+5760|0:f+5768|0)>>2]|0;q=ga(s,g)|0;u=ga(r,h)|0;v=c[f+5804>>2]|0;w=c[f+5820>>2]|0;x=(q|0)!=0;y=(u|0)==0;z=y^1;A=x&z;B=ga(s,j+g|0)|0;D=c[f+1248>>2]|0;E=(B|0)<(D|0)&z;F=q>>v;G=u>>v;H=q-1>>v;I=B>>v;B=u-1>>v;v=c[f+10352>>2]|0;J=ga(v,G)|0;K=c[f+10340>>2]|0;L=e[K+((J+F|0)*24|0)>>1]|0;if(x){M=e[K+((J+H|0)*24|0)>>1]|0}else{M=-1}if(y){N=-1}else{J=K+(((ga(v,B)|0)+F|0)*24|0)|0;N=e[J>>1]|0}if(E){J=K+(((ga(v,B)|0)+I|0)*24|0)|0;O=e[J>>1]|0}else{O=-1}if(A){J=K+(((ga(v,B)|0)+H|0)*24|0)|0;P=e[J>>1]|0}else{P=-1}J=ga(G,w)|0;G=c[f+10308>>2]|0;v=c[G+(J+F<<2)>>2]|0;if(x){Q=c[G+(J+H<<2)>>2]|0}else{Q=-1}if(y){R=-1}else{y=G+((ga(B,w)|0)+F<<2)|0;R=c[y>>2]|0}if(A){y=G+((ga(B,w)|0)+H<<2)|0;S=c[y>>2]|0}else{S=-1}if(E){y=G+((ga(B,w)|0)+I<<2)|0;T=c[y>>2]|0}else{T=-1}y=(N|0)==(L|0)&(R|0)==(v|0)&z;z=(P|0)==(L|0)&(S|0)==(v|0)&A;A=(O|0)==(L|0)&(T|0)==(v|0)&E;E=c[f+5864>>2]|0;T=c[f+5852>>2]|0;O=(ga(u>>E,T)|0)+(q>>E)|0;S=c[f+10320>>2]|0;P=c[S+(O<<2)>>2]|0;O=(r-1-u+(c[f+1252>>2]|0)|0)/(r|0)|0;u=j<<1;R=(O|0)>(u|0)?u:O;N=(s-1-q+D|0)/(s|0)|0;D=(N|0)>(u|0)?u:N;N=j<<2|1;dv(n+(64-u)|0,0,N|0)|0;q=R-1|0;a:do{if((R|0)>0){I=g-1|0;w=ga(s,I)|0;B=f+5944|0;G=f+10368|0;H=f+10372|0;F=f+10376|0;J=f+10360|0;if(!((M|0)==(L|0)&(Q|0)==(v|0)&x)){K=q;while(1){U=K-4|0;if((U|0)>-1){K=U}else{V=0;W=0;break a}}}K=~O;U=~(j<<1);X=((K|0)>(U|0)?K:U)+65|0;U=0;K=0;Y=q;Z=0;while(1){_=n+(X+(Z<<2))|0;$=Y+h|0;aa=ga($,r)|0;ba=S+((ga(aa>>E,T)|0)+(w>>E)<<2)|0;ca=(c[ba>>2]|0)<=(P|0);if((a[B]|0)==0){if(ca){da=29}else{ea=K;fa=U}}else{ba=c[G>>2]|0;ha=w>>ba;ia=aa>>ba;if(!((ha|0)>-1)){da=33;break}ba=c[H>>2]|0;if((ha|0)>=(ba|0)){da=33;break}if(!((ia|0)>-1)){da=34;break}if((ia|0)>=(c[F>>2]|0)){da=34;break}aa=(ga(ba,ia)|0)+ha|0;ha=(c[J>>2]|0)+(aa*3|0)|0;if(((d[ha]|d[ha+1|0]<<8)<<16>>16&768)==0&ca){da=29}else{ea=K;fa=U}}if((da|0)==29){da=0;ca=p+((ga($,k)|0)+I<<1)|0;if((U|0)==0){ja=b[ca>>1]|0}else{ja=K}ha=_;C=16843009;a[ha]=C;C=C>>8;a[ha+1|0]=C;C=C>>8;a[ha+2|0]=C;C=C>>8;a[ha+3|0]=C;b[l+(~Y<<1)>>1]=b[ca>>1]|0;ca=p+((ga($-1|0,k)|0)+I<<1)|0;b[l+(1-Y-1<<1)>>1]=b[ca>>1]|0;ca=p+((ga($-2|0,k)|0)+I<<1)|0;b[l+(2-Y-1<<1)>>1]=b[ca>>1]|0;ca=p+((ga($-3|0,k)|0)+I<<1)|0;b[l+(3-Y-1<<1)>>1]=b[ca>>1]|0;ea=ja;fa=U+4|0}ca=Y-4|0;if((ca|0)>-1){U=fa;K=ea;Y=ca;Z=Z+1|0}else{V=fa;W=ea;break a}}if((da|0)==33){ec(7e3,5152,118,17336)}else if((da|0)==34){ec(3672,5152,119,17336)}}else{V=0;W=0}}while(0);b:do{if(z){ea=g-1|0;fa=ga(s,ea)|0;ja=h-1|0;q=ga(r,ja)|0;O=S+((ga(q>>E,T)|0)+(fa>>E)<<2)|0;x=(c[O>>2]|0)<=(P|0);do{if((a[f+5944|0]|0)==0){if(!x){ka=W;la=V;break b}}else{O=c[f+10368>>2]|0;v=fa>>O;Q=q>>O;if(!((v|0)>-1)){ec(7e3,5152,118,17336)}O=c[f+10372>>2]|0;if((v|0)>=(O|0)){ec(7e3,5152,118,17336)}if(!((Q|0)>-1)){ec(3672,5152,119,17336)}if((Q|0)<(c[f+10376>>2]|0)){L=(ga(O,Q)|0)+v|0;v=(c[f+10360>>2]|0)+(L*3|0)|0;if(((d[v]|d[v+1|0]<<8)<<16>>16&768)==0&x){break}else{ka=W;la=V;break b}}else{ec(3672,5152,119,17336)}}}while(0);x=p+((ga(k,ja)|0)+ea<<1)|0;if((V|0)==0){ma=b[x>>1]|0}else{ma=W}b[l>>1]=b[x>>1]|0;a[o]=1;ka=ma;la=V+1|0}else{ka=W;la=V}}while(0);c:do{if((D|0)>0){V=h-1|0;W=ga(r,V)|0;ma=f+5944|0;o=ga(k,V)|0;V=f+10368|0;z=f+10372|0;x=f+10376|0;q=f+10360|0;fa=la;v=ka;L=0;Q=0;d:while(1){O=n+((Q<<2)+65)|0;do{if((L|0)<(j|0)?y:A){M=L+g|0;R=ga(M,s)|0;Z=S+((ga(W>>E,T)|0)+(R>>E)<<2)|0;Y=(c[Z>>2]|0)<=(P|0);if((a[ma]|0)==0){if(!Y){na=v;oa=fa;break}}else{Z=c[V>>2]|0;K=R>>Z;R=W>>Z;if(!((K|0)>-1)){da=55;break d}Z=c[z>>2]|0;if((K|0)>=(Z|0)){da=55;break d}if(!((R|0)>-1)){da=58;break d}if((R|0)>=(c[x>>2]|0)){da=58;break d}U=(ga(Z,R)|0)+K|0;K=(c[q>>2]|0)+(U*3|0)|0;if(!(((d[K]|d[K+1|0]<<8)<<16>>16&768)==0&Y)){na=v;oa=fa;break}}Y=M+o|0;M=p+(Y<<1)|0;if((fa|0)==0){pa=b[M>>1]|0}else{pa=v}K=O;C=16843009;a[K]=C;C=C>>8;a[K+1|0]=C;C=C>>8;a[K+2|0]=C;C=C>>8;a[K+3|0]=C;K=L|1;b[l+(K<<1)>>1]=b[M>>1]|0;b[l+(K+1<<1)>>1]=b[p+(Y+1<<1)>>1]|0;b[l+((L|3)<<1)>>1]=b[p+(Y+2<<1)>>1]|0;b[l+((L|3)+1<<1)>>1]=b[p+(Y+3<<1)>>1]|0;na=pa;oa=fa+4|0}else{na=v;oa=fa}}while(0);O=L+4|0;if((O|0)<(D|0)){fa=oa;v=na;L=O;Q=Q+1|0}else{qa=oa;ra=na;break c}}if((da|0)==55){ec(7e3,5152,118,17336)}else if((da|0)==58){ec(3672,5152,119,17336)}}else{qa=la;ra=ka}}while(0);if((qa|0)==(N|0)){sa=129;ta=0;i=m;return}N=j*-2|0;if((qa|0)==0){if((N|0)>(u|0)){sa=129;ta=0;i=m;return}qa=1<<t-1&65535;t=N;while(1){b[l+(t<<1)>>1]=qa;if((t|0)<(u|0)){t=t+1|0}else{break}}sa=129;ta=0;i=m;return}if((a[n+(N+64)|0]|0)==0){b[l+(N<<1)>>1]=ra}ra=N|1;if((ra|0)>(u|0)){sa=129;ta=0;i=m;return}else{ua=ra}while(1){if((a[n+(ua+64)|0]|0)==0){b[l+(ua<<1)>>1]=b[l+(ua-1<<1)>>1]|0}if((ua|0)<(u|0)){ua=ua+1|0}else{break}}sa=129;ta=0;i=m;return}function ni(d,f,g,h,j){d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=i;i=i+264|0;l=k|0;if((j|0)==1|(g|0)==4){i=k;return}m=j-26|0;n=(m|0)<0?26-j|0:m;m=j-10|0;o=(m|0)<0?10-j|0:m;m=(n|0)<(o|0)?n:o;do{if((g|0)==16){if((m|0)>1){break}i=k;return}else if((g|0)==8){if((m|0)>7){break}i=k;return}else if((g|0)==32){if((m|0)>0){break}i=k;return}else{ec(8920,15552,518,18232)}}while(0);do{if((a[d+5665|0]|0)!=0&(h|0)==0&(g|0)==32){m=e[f>>1]|0;o=(e[f+128>>1]|0)+m-(e[f+64>>1]<<1)|0;n=1<<(c[d+1276>>2]|0)-5;if((((o|0)<0?-o|0:o)|0)>=(n|0)){p=0;break}o=(e[f-128>>1]|0)+m-(e[f-64>>1]<<1)|0;p=(((o|0)<0?-o|0:o)|0)<(n|0)}else{p=0}}while(0);d=g*-2|0;b[l+(d+64<<1)>>1]=b[f+(d<<1)>>1]|0;d=g<<1;b[l+(d+64<<1)>>1]=b[f+(d<<1)>>1]|0;do{if(p){h=b[f>>1]|0;b[l+128>>1]=h;n=h&65535;h=(e[f-128>>1]|0)-n|0;o=(e[f+128>>1]|0)-n|0;m=1;do{j=(((ga(h,m)|0)+32|0)>>>6)+n&65535;b[l+(64-m<<1)>>1]=j;j=(((ga(o,m)|0)+32|0)>>>6)+n&65535;b[l+(m+64<<1)>>1]=j;m=m+1|0;}while((m|0)<64)}else{m=d-1|0;n=1-d|0;if((n|0)>(m|0)){break}o=n;h=b[f+(n<<1)>>1]|0;while(1){n=o+1|0;j=b[f+(n<<1)>>1]|0;b[l+(o+64<<1)>>1]=((j&65535)+2+((h&65535)<<1)+(e[f+(o-1<<1)>>1]|0)|0)>>>2;if((o|0)<(m|0)){o=n;h=j}else{break}}}}while(0);cv(f+(-d<<1)|0,l+(64-d<<1)|0,g<<3|2)|0;i=k;return}function oi(a,d,f,g,h,i){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0;j=(h|0)==0;k=c[(j?a+40|0:a+44|0)>>2]|0;l=(c[a+4+(h<<2)>>2]|0)+((ga(k,f)|0)+d<<1)|0;d=(g|0)>1;if(d){f=g;h=0;while(1){a=f>>1;if((a|0)>1){f=a;h=h+1|0}else{break}}m=h+2|0}else{m=1}h=(g|0)>0;if(h){f=0;a=0;while(1){n=a+1|0;o=(e[i+(n<<1)>>1]|0)+f+(e[i+(~a<<1)>>1]|0)|0;if((n|0)<(g|0)){f=o;a=n}else{p=o;break}}}else{p=0}a=p+g>>m;if(!(j&(g|0)<32)){if(!h){return}h=a&65535;j=0;do{m=ga(j,k)|0;p=0;do{b[l+(p+m<<1)>>1]=h;p=p+1|0;}while((p|0)<(g|0));j=j+1|0;}while((j|0)<(g|0));return}b[l>>1]=((a<<1)+2+(e[i-2>>1]|0)+(e[i+2>>1]|0)|0)>>>2;if(!d){return}j=(a*3|0)+2|0;h=1;while(1){p=h+1|0;b[l+(h<<1)>>1]=(j+(e[i+(p<<1)>>1]|0)|0)>>>2;if((p|0)<(g|0)){h=p}else{break}}if(!d){return}h=(a*3|0)+2|0;j=1;do{p=l+((ga(j,k)|0)<<1)|0;b[p>>1]=(h+(e[i+(~j<<1)>>1]|0)|0)>>>2;j=j+1|0;}while((j|0)<(g|0));if(!d){return}d=a&65535;a=1;do{j=ga(a,k)|0;i=1;do{b[l+(i+j<<1)>>1]=d;i=i+1|0;}while((i|0)<(g|0));a=a+1|0;}while((a|0)<(g|0));return}function pi(f,g,h,j,k,l,m){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;n=i;o=m;p=i;i=i+258|0;i=i+7&-8;q=(l|0)==0;r=c[(q?f+40|0:f+44|0)>>2]|0;s=(c[f+4+(l<<2)>>2]|0)+((ga(r,h)|0)+g<<1)|0;l=c[(q?f+5760|0:f+5768|0)>>2]|0;if((j|0)>=35){ec(12952,15552,596,18712)}if((j|0)<=1){ec(10072,15552,597,18712)}t=c[64+(j<<2)>>2]|0;do{if((a[f+5750|0]|0)==0){u=0}else{v=c[f+10368>>2]|0;w=g>>v;x=h>>v;if(!((w|0)>-1)){ec(7e3,5152,118,17336)}v=c[f+10372>>2]|0;if((w|0)>=(v|0)){ec(7e3,5152,118,17336)}if(!((x|0)>-1)){ec(3672,5152,119,17336)}if((x|0)<(c[f+10376>>2]|0)){y=(ga(v,x)|0)+w|0;w=(c[f+10360>>2]|0)+(y*3|0)|0;u=((d[w]|d[w+1|0]<<8)<<16>>16&2048)!=0;break}else{ec(3672,5152,119,17336)}}}while(0);f=(k|0)<0;if((j|0)>17){if(!f){cv(p+128|0,o|0,(k<<1)+2|0)|0}o=j-11|0;do{if(o>>>0<15>>>0){h=c[30584+(o<<2)>>2]|0;g=(ga(t,k)|0)>>5;if((g|0)<-1){z=g}else{break}do{g=m+(-((ga(z,h)|0)+128>>8)<<1)|0;b[p+(z+64<<1)>>1]=b[g>>1]|0;z=z+1|0;}while((z|0)<0)}else{if((k<<1|0)<=(k|0)){break}cv(p+(k+65<<1)|0,m+(k+1<<1)|0,k<<1)|0}}while(0);z=(k|0)>0;if(z){o=0;while(1){h=o+1|0;g=ga(h,t)|0;w=g>>5;y=g&31;g=(y|0)==0;x=w+65|0;v=ga(o,r)|0;A=32-y|0;B=0;do{if(g){b[s+(B+v<<1)>>1]=b[p+(x+B<<1)>>1]|0}else{C=B+w|0;D=ga(e[p+(C+65<<1)>>1]|0,A)|0;E=(D+16+(ga(e[p+(C+66<<1)>>1]|0,y)|0)|0)>>>5&65535;b[s+(B+v<<1)>>1]=E}B=B+1|0;}while((B|0)<(k|0));if((h|0)<(k|0)){o=h}else{break}}}if(u|(j|0)==26&q&(k|0)<32^1|z^1){F=258;G=0;i=n;return}z=m+2|0;o=(1<<l)-1|0;B=0;do{v=((e[m+(~B<<1)>>1]|0)-(e[m>>1]|0)>>1)+(e[z>>1]|0)|0;if((v|0)<0){H=0}else{H=((v|0)>(o|0)?o:v)&65535}v=s+((ga(B,r)|0)<<1)|0;b[v>>1]=H;B=B+1|0;}while((B|0)<(k|0));F=258;G=0;i=n;return}else{if(!f){f=0;while(1){b[p+(f+64<<1)>>1]=b[m+(-f<<1)>>1]|0;if((f|0)<(k|0)){f=f+1|0}else{break}}}f=j-11|0;do{if(f>>>0<15>>>0){B=c[30584+(f<<2)>>2]|0;H=(ga(t,k)|0)>>5;if((H|0)<-1){I=H}else{break}do{H=m+((ga(I,B)|0)+128>>8<<1)|0;b[p+(I+64<<1)>>1]=b[H>>1]|0;I=I+1|0;}while((I|0)<0)}else{B=k<<1;if((B|0)>(k|0)){J=k}else{break}while(1){h=J+1|0;b[p+(J+65<<1)>>1]=b[m+(~J<<1)>>1]|0;if((h|0)<(B|0)){J=h}else{break}}}}while(0);J=(k|0)>0;if(J){I=0;do{f=I+65|0;B=ga(I,r)|0;h=0;while(1){H=h+1|0;o=ga(H,t)|0;z=o>>5;v=o&31;if((v|0)==0){b[s+(h+B<<1)>>1]=b[p+(f+z<<1)>>1]|0}else{o=z+I|0;z=ga(e[p+(o+65<<1)>>1]|0,32-v|0)|0;y=(z+16+(ga(e[p+(o+66<<1)>>1]|0,v)|0)|0)>>>5&65535;b[s+(h+B<<1)>>1]=y}if((H|0)<(k|0)){h=H}else{break}}I=I+1|0;}while((I|0)<(k|0))}if(u|(j|0)==10&q&(k|0)<32^1|J^1){F=258;G=0;i=n;return}J=m-2|0;q=(1<<l)-1|0;l=0;while(1){j=l+1|0;u=((e[m+(j<<1)>>1]|0)-(e[m>>1]|0)>>1)+(e[J>>1]|0)|0;if((u|0)<0){K=0}else{K=((u|0)>(q|0)?q:u)&65535}b[s+(l<<1)>>1]=K;if((j|0)<(k|0)){l=j}else{break}}F=258;G=0;i=n;return}}function qi(a){a=a|0;c[a+8>>2]=1732584193;c[a+12>>2]=-271733879;c[a+16>>2]=-1732584194;c[a+20>>2]=271733878;c[a>>2]=0;c[a+4>>2]=0;return}function ri(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=a|0;f=c[e>>2]|0;g=f+d&536870911;c[e>>2]=g;e=a+4|0;h=c[e>>2]|0;if(g>>>0<f>>>0){g=h+1|0;c[e>>2]=g;i=g}else{i=h}c[a+4>>2]=i+(d>>>29);i=f&63;do{if((i|0)==0){j=b;k=d}else{f=64-i|0;h=a+24+i|0;if(!(f>>>0>d>>>0)){cv(h|0,b|0,f)|0;si(a,a+24|0,64)|0;j=b+f|0;k=d-f|0;break}cv(h|0,b|0,d)|0;return}}while(0);if(k>>>0>63>>>0){l=si(a,j,k&-64)|0;m=k&63}else{l=j;m=k}cv(a+24|0,l|0,m)|0;return}function si(a,b,e){a=a|0;b=b|0;e=e|0;var 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,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;f=a+8|0;g=a+12|0;h=a+16|0;i=a+20|0;j=a+88|0;k=a+92|0;l=a+96|0;m=a+100|0;n=a+104|0;o=a+108|0;p=a+112|0;q=a+116|0;r=a+120|0;s=a+124|0;t=a+128|0;u=a+132|0;v=a+136|0;w=a+140|0;x=a+144|0;y=a+148|0;a=e;e=b;b=c[f>>2]|0;z=c[g>>2]|0;A=c[i>>2]|0;B=c[h>>2]|0;do{C=(d[e+1|0]|0)<<8|(d[e]|0)|(d[e+2|0]|0)<<16|(d[e+3|0]|0)<<24;c[j>>2]=C;D=b-680876936+(z&(A^B)^A)+C|0;C=(D<<7|D>>>25)+z|0;D=(d[e+5|0]|0)<<8|(d[e+4|0]|0)|(d[e+6|0]|0)<<16|(d[e+7|0]|0)<<24;c[k>>2]=D;E=A-389564586+D+(C&(z^B)^B)|0;D=(E<<12|E>>>20)+C|0;E=(d[e+9|0]|0)<<8|(d[e+8|0]|0)|(d[e+10|0]|0)<<16|(d[e+11|0]|0)<<24;c[l>>2]=E;F=B+606105819+E+(D&(C^z)^z)|0;E=(F<<17|F>>>15)+D|0;F=(d[e+13|0]|0)<<8|(d[e+12|0]|0)|(d[e+14|0]|0)<<16|(d[e+15|0]|0)<<24;c[m>>2]=F;G=z-1044525330+F+(E&(D^C)^C)|0;F=(G<<22|G>>>10)+E|0;G=(d[e+17|0]|0)<<8|(d[e+16|0]|0)|(d[e+18|0]|0)<<16|(d[e+19|0]|0)<<24;c[n>>2]=G;H=C-176418897+G+(F&(E^D)^D)|0;G=(H<<7|H>>>25)+F|0;H=(d[e+21|0]|0)<<8|(d[e+20|0]|0)|(d[e+22|0]|0)<<16|(d[e+23|0]|0)<<24;c[o>>2]=H;C=D+1200080426+H+(G&(F^E)^E)|0;H=(C<<12|C>>>20)+G|0;C=(d[e+25|0]|0)<<8|(d[e+24|0]|0)|(d[e+26|0]|0)<<16|(d[e+27|0]|0)<<24;c[p>>2]=C;D=E-1473231341+C+(H&(G^F)^F)|0;C=(D<<17|D>>>15)+H|0;D=(d[e+29|0]|0)<<8|(d[e+28|0]|0)|(d[e+30|0]|0)<<16|(d[e+31|0]|0)<<24;c[q>>2]=D;E=F-45705983+D+(C&(H^G)^G)|0;D=(E<<22|E>>>10)+C|0;E=(d[e+33|0]|0)<<8|(d[e+32|0]|0)|(d[e+34|0]|0)<<16|(d[e+35|0]|0)<<24;c[r>>2]=E;F=G+1770035416+E+(D&(C^H)^H)|0;E=(F<<7|F>>>25)+D|0;F=(d[e+37|0]|0)<<8|(d[e+36|0]|0)|(d[e+38|0]|0)<<16|(d[e+39|0]|0)<<24;c[s>>2]=F;G=H-1958414417+F+(E&(D^C)^C)|0;F=(G<<12|G>>>20)+E|0;G=(d[e+41|0]|0)<<8|(d[e+40|0]|0)|(d[e+42|0]|0)<<16|(d[e+43|0]|0)<<24;c[t>>2]=G;H=G-42063+C+(F&(E^D)^D)|0;C=(H<<17|H>>>15)+F|0;H=(d[e+45|0]|0)<<8|(d[e+44|0]|0)|(d[e+46|0]|0)<<16|(d[e+47|0]|0)<<24;c[u>>2]=H;G=H-1990404162+D+(C&(F^E)^E)|0;D=(G<<22|G>>>10)+C|0;G=(d[e+49|0]|0)<<8|(d[e+48|0]|0)|(d[e+50|0]|0)<<16|(d[e+51|0]|0)<<24;c[v>>2]=G;H=G+1804603682+E+(D&(C^F)^F)|0;E=(H<<7|H>>>25)+D|0;H=(d[e+53|0]|0)<<8|(d[e+52|0]|0)|(d[e+54|0]|0)<<16|(d[e+55|0]|0)<<24;c[w>>2]=H;G=H-40341101+F+(E&(D^C)^C)|0;F=(G<<12|G>>>20)+E|0;G=(d[e+57|0]|0)<<8|(d[e+56|0]|0)|(d[e+58|0]|0)<<16|(d[e+59|0]|0)<<24;c[x>>2]=G;H=G-1502002290+C+(F&(E^D)^D)|0;C=(H<<17|H>>>15)+F|0;H=(d[e+61|0]|0)<<8|(d[e+60|0]|0)|(d[e+62|0]|0)<<16|(d[e+63|0]|0)<<24;c[y>>2]=H;G=H+1236535329+D+(C&(F^E)^E)|0;D=(G<<22|G>>>10)+C|0;G=c[k>>2]|0;I=G-165796510+E+((D^C)&F^C)|0;E=(I<<5|I>>>27)+D|0;I=c[p>>2]|0;J=I-1069501632+F+((E^D)&C^D)|0;F=(J<<9|J>>>23)+E|0;J=c[u>>2]|0;K=J+643717713+C+((F^E)&D^E)|0;C=(K<<14|K>>>18)+F|0;K=c[j>>2]|0;L=K-373897302+D+((C^F)&E^F)|0;D=(L<<20|L>>>12)+C|0;L=c[o>>2]|0;M=L-701558691+E+((D^C)&F^C)|0;E=(M<<5|M>>>27)+D|0;M=c[t>>2]|0;N=M+38016083+F+((E^D)&C^D)|0;F=(N<<9|N>>>23)+E|0;N=H-660478335+C+((F^E)&D^E)|0;C=(N<<14|N>>>18)+F|0;N=c[n>>2]|0;O=N-405537848+D+((C^F)&E^F)|0;D=(O<<20|O>>>12)+C|0;O=c[s>>2]|0;P=O+568446438+E+((D^C)&F^C)|0;E=(P<<5|P>>>27)+D|0;P=c[x>>2]|0;Q=P-1019803690+F+((E^D)&C^D)|0;F=(Q<<9|Q>>>23)+E|0;Q=c[m>>2]|0;R=Q-187363961+C+((F^E)&D^E)|0;C=(R<<14|R>>>18)+F|0;R=c[r>>2]|0;S=R+1163531501+D+((C^F)&E^F)|0;D=(S<<20|S>>>12)+C|0;S=c[w>>2]|0;T=S-1444681467+E+((D^C)&F^C)|0;E=(T<<5|T>>>27)+D|0;T=c[l>>2]|0;U=T-51403784+F+((E^D)&C^D)|0;F=(U<<9|U>>>23)+E|0;U=c[q>>2]|0;V=U+1735328473+C+((F^E)&D^E)|0;C=(V<<14|V>>>18)+F|0;V=C^F;W=c[v>>2]|0;X=W-1926607734+D+(V&E^F)|0;D=(X<<20|X>>>12)+C|0;X=L-378558+E+(V^D)|0;V=(X<<4|X>>>28)+D|0;X=R-2022574463+F+(D^C^V)|0;F=(X<<11|X>>>21)+V|0;X=J+1839030562+C+(V^D^F)|0;C=(X<<16|X>>>16)+F|0;X=P-35309556+D+(F^V^C)|0;D=(X<<23|X>>>9)+C|0;X=G-1530992060+V+(C^F^D)|0;V=(X<<4|X>>>28)+D|0;X=N+1272893353+F+(D^C^V)|0;F=(X<<11|X>>>21)+V|0;X=U-155497632+C+(V^D^F)|0;C=(X<<16|X>>>16)+F|0;X=M-1094730640+D+(F^V^C)|0;D=(X<<23|X>>>9)+C|0;X=S+681279174+V+(C^F^D)|0;V=(X<<4|X>>>28)+D|0;X=K-358537222+F+(D^C^V)|0;F=(X<<11|X>>>21)+V|0;X=Q-722521979+C+(V^D^F)|0;C=(X<<16|X>>>16)+F|0;X=I+76029189+D+(F^V^C)|0;D=(X<<23|X>>>9)+C|0;X=O-640364487+V+(C^F^D)|0;V=(X<<4|X>>>28)+D|0;X=W-421815835+F+(D^C^V)|0;F=(X<<11|X>>>21)+V|0;X=H+530742520+C+(V^D^F)|0;C=(X<<16|X>>>16)+F|0;X=T-995338651+D+(F^V^C)|0;D=(X<<23|X>>>9)+C|0;X=K-198630844+V+((D|~F)^C)|0;V=(X<<6|X>>>26)+D|0;X=U+1126891415+F+((V|~C)^D)|0;F=(X<<10|X>>>22)+V|0;X=P-1416354905+C+((F|~D)^V)|0;C=(X<<15|X>>>17)+F|0;X=L-57434055+D+((C|~V)^F)|0;D=(X<<21|X>>>11)+C|0;X=W+1700485571+V+((D|~F)^C)|0;V=(X<<6|X>>>26)+D|0;X=Q-1894986606+F+((V|~C)^D)|0;F=(X<<10|X>>>22)+V|0;X=M-1051523+C+((F|~D)^V)|0;C=(X<<15|X>>>17)+F|0;X=G-2054922799+D+((C|~V)^F)|0;D=(X<<21|X>>>11)+C|0;X=R+1873313359+V+((D|~F)^C)|0;V=(X<<6|X>>>26)+D|0;X=H-30611744+F+((V|~C)^D)|0;F=(X<<10|X>>>22)+V|0;X=I-1560198380+C+((F|~D)^V)|0;C=(X<<15|X>>>17)+F|0;X=S+1309151649+D+((C|~V)^F)|0;D=(X<<21|X>>>11)+C|0;X=N-145523070+V+((D|~F)^C)|0;V=(X<<6|X>>>26)+D|0;X=J-1120210379+F+((V|~C)^D)|0;F=(X<<10|X>>>22)+V|0;X=T+718787259+C+((F|~D)^V)|0;C=(X<<15|X>>>17)+F|0;X=O-343485551+D+((C|~V)^F)|0;b=V+b|0;z=C+z+(X<<21|X>>>11)|0;B=C+B|0;A=F+A|0;e=e+64|0;a=a-64|0;}while((a|0)!=0);c[f>>2]=b;c[g>>2]=z;c[h>>2]=B;c[i>>2]=A;return e|0}function ti(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=d|0;f=c[e>>2]&63;g=f+1|0;h=d+24|0;a[d+24+f|0]=-128;i=f^63;if(i>>>0<8>>>0){dv(d+24+g|0,0,i|0)|0;f=h|0;si(d,f,64)|0;j=56;k=0;l=f}else{j=i-8|0;k=g;l=h|0}dv(d+24+k|0,0,j|0)|0;j=c[e>>2]|0;k=j<<3;c[e>>2]=k;a[d+80|0]=k;a[d+81|0]=j>>>5;a[d+82|0]=j>>>13;a[d+83|0]=j>>>21;j=c[d+4>>2]|0;a[d+84|0]=j;a[d+85|0]=j>>>8;a[d+86|0]=j>>>16;a[d+87|0]=j>>>24;si(d,l,64)|0;l=d+8|0;a[b]=c[l>>2];a[b+1|0]=(c[l>>2]|0)>>>8;a[b+2|0]=(c[l>>2]|0)>>>16;a[b+3|0]=(c[l>>2]|0)>>>24;l=d+12|0;a[b+4|0]=c[l>>2];a[b+5|0]=(c[l>>2]|0)>>>8;a[b+6|0]=(c[l>>2]|0)>>>16;a[b+7|0]=(c[l>>2]|0)>>>24;l=d+16|0;a[b+8|0]=c[l>>2];a[b+9|0]=(c[l>>2]|0)>>>8;a[b+10|0]=(c[l>>2]|0)>>>16;a[b+11|0]=(c[l>>2]|0)>>>24;l=d+20|0;a[b+12|0]=c[l>>2];a[b+13|0]=(c[l>>2]|0)>>>8;a[b+14|0]=(c[l>>2]|0)>>>16;a[b+15|0]=(c[l>>2]|0)>>>24;dv(d|0,0,152)|0;return}function ui(e,f,g,h,j,k,l,m,n,o,p){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;q=i;i=i+49160|0;r=q|0;s=q+16384|0;t=q+49152|0;u=k+h|0;h=l+j|0;j=g+764|0;l=c[g+5780>>2]|0;k=c[g+5784>>2]|0;v=c[g+40>>2]|0;w=(ga(v,h)|0)+u|0;x=(c[g+4>>2]|0)+(w<<d[g+16|0])|0;w=c[g+44>>2]|0;y=(ga(w,(h|0)/(k|0)|0)|0)+((u|0)/(l|0)|0)|0;z=(c[g+8>>2]|0)+(y<<d[g+17|0])|0;A=(c[g+12>>2]|0)+(y<<d[g+18|0])|0;y=a[p|0]|0;B=y&255;c[t>>2]=B;C=a[p+1|0]|0;D=C&255;E=t+4|0;c[E>>2]=D;F=g+5760|0;G=c[F>>2]|0;H=g+5768|0;I=c[H>>2]|0;J=g+5961|0;do{if((a[J]|0)==0){if(y<<24>>24==0|C<<24>>24==0){K=D;break}if((b[p+4>>1]|0)!=(b[p+8>>1]|0)){K=D;break}if((b[p+6>>1]|0)!=(b[p+10>>1]|0)){K=D;break}if((c[f+916+(a[p+2|0]<<2)>>2]|0)!=(c[f+980+(a[p+3|0]<<2)>>2]|0)){K=D;break}c[E>>2]=0;K=0}else{K=D}}while(0);D=e;E=g+10516|0;C=e+4|0;L=0;M=B;a:while(1){do{if((M|0)!=0){B=a[p+2+L|0]|0;if(B<<24>>24>15){N=10;break a}O=Qc[c[(c[D>>2]|0)+8>>2]&63](e,c[f+916+(L<<6)+(B<<24>>24<<2)>>2]|0)|0;if((c[O+96>>2]|0)==0){a[E]=3;Ue(C,1012,0);break}B=p+4+(L<<2)|0;P=b[B>>1]|0;Q=p+4+(L<<2)+2|0;R=b[Q>>1]|0;S=r+(L<<13)|0;T=c[O+4>>2]|0;if((c[F>>2]|0)>8){vi(e,j,P,R,u,h,S,m,T,c[O+40>>2]|0,n,o,G)}else{wi(e,j,P,R,u,h,S,m,T,c[O+40>>2]|0,n,o,G)}T=b[B>>1]|0;S=b[Q>>1]|0;R=s+(L<<13)|0;P=c[O+8>>2]|0;if((c[F>>2]|0)>8){U=O+44|0;V=(n|0)/(l|0)|0;W=(o|0)/(k|0)|0;xi(e,j,T,S,u,h,R,m,P,c[U>>2]|0,V,W,I);xi(e,j,b[B>>1]|0,b[Q>>1]|0,u,h,s+16384+(L<<13)|0,m,c[O+12>>2]|0,c[U>>2]|0,V,W,I);break}else{W=O+44|0;V=(n|0)/(l|0)|0;U=(o|0)/(k|0)|0;yi(e,j,T,S,u,h,R,m,P,c[W>>2]|0,V,U,I);yi(e,j,b[B>>1]|0,b[Q>>1]|0,u,h,s+16384+(L<<13)|0,m,c[O+12>>2]|0,c[W>>2]|0,V,U,I);break}}}while(0);U=L+1|0;if((U|0)>=2){break}L=U;M=c[t+(U<<2)>>2]|0}if((N|0)==10){a[E]=3;Ue(C,1012,0);X=32768;Y=0;Z=16384;_=0;i=q;return}N=14-(c[F>>2]|0)|0;F=(N|0)<2?2:N;N=d[g+5920|0]|0;t=14-(c[H>>2]|0)|0;H=(t|0)<2?2:t;t=d[g+5921|0]|0;M=c[f+20>>2]|0;if((M|0)==1){L=y<<24>>24==1&(K|0)==0;if((a[J]|0)==0){if(!L){Ue(C,1011,0);a[E]=3;X=32768;Y=0;Z=16384;_=0;i=q;return}J=r|0;if((G|0)<9){Kc[c[e+176>>2]&63](x,v,J,m,n,o)}else{Mc[c[e+192>>2]&127](x,v,J,m,n,o,G)}J=s|0;h=(n|0)/(l|0)|0;u=(o|0)/(k|0)|0;if((I|0)<9){j=e+176|0;Kc[c[j>>2]&63](z,w,J,m,h,u);Kc[c[j>>2]&63](A,w,s+16384|0,m,h,u);X=32768;Y=0;Z=16384;_=0;i=q;return}else{j=e+192|0;Mc[c[j>>2]&127](z,w,J,m,h,u,I);Mc[c[j>>2]&127](A,w,s+16384|0,m,h,u,I);X=32768;Y=0;Z=16384;_=0;i=q;return}}else{if(!L){Ue(C,1011,0);a[E]=3;X=32768;Y=0;Z=16384;_=0;i=q;return}L=a[p+2|0]|0;u=(d[f+380|0]|0)+F|0;h=(d[f+381|0]|0)+H|0;j=b[f+446+(L<<1)>>1]|0;J=a[f+510+L|0]<<N;D=b[f+542+(L<<2)>>1]|0;U=a[f+670+(L<<1)|0]<<t;V=b[f+542+(L<<2)+2>>1]|0;W=a[f+670+(L<<1)+1|0]<<t;L=r|0;if((G|0)<9){Oc[c[e+180>>2]&15](x,v,L,m,n,o,j,J,u)}else{Pc[c[e+196>>2]&15](x,v,L,m,n,o,j,J,u,G)}u=s|0;J=(n|0)/(l|0)|0;j=(o|0)/(k|0)|0;if((I|0)<9){L=e+180|0;Oc[c[L>>2]&15](z,w,u,m,J,j,D,U,h);Oc[c[L>>2]&15](A,w,s+16384|0,m,J,j,V,W,h);X=32768;Y=0;Z=16384;_=0;i=q;return}else{L=e+196|0;Pc[c[L>>2]&15](z,w,u,m,J,j,D,U,h,I);Pc[c[L>>2]&15](A,w,s+16384|0,m,J,j,V,W,h,I);X=32768;Y=0;Z=16384;_=0;i=q;return}}}else if((M|0)==0){M=(K|0)==1;do{if(y<<24>>24==1){if(!M){break}if((a[g+5962|0]|0)==0){K=r|0;h=r+8192|0;W=e+172|0;if((G|0)<9){Mc[c[W>>2]&127](x,v,K,h,m,n,o)}else{Jc[c[e+188>>2]&63](x,v,K,h,m,n,o,G)}h=s|0;K=s+8192|0;V=s+16384|0;j=s+24576|0;J=(n|0)/(l|0)|0;L=(o|0)/(k|0)|0;if((I|0)<9){U=W|0;Mc[c[U>>2]&127](z,w,h,K,m,J,L);Mc[c[U>>2]&127](A,w,V,j,m,J,L);X=32768;Y=0;Z=16384;_=0;i=q;return}else{U=e+188|0;Jc[c[U>>2]&63](z,w,h,K,m,J,L,I);Jc[c[U>>2]&63](A,w,V,j,m,J,L,I);X=32768;Y=0;Z=16384;_=0;i=q;return}}else{L=a[p+2|0]|0;J=a[p+3|0]|0;j=(d[f+380|0]|0)+F|0;V=(d[f+381|0]|0)+H|0;U=b[f+446+(L<<1)>>1]|0;K=a[f+510+L|0]<<N;h=b[f+478+(J<<1)>>1]|0;W=a[f+526+J|0]<<N;D=b[f+542+(L<<2)>>1]|0;u=a[f+670+(L<<1)|0]<<t;O=b[f+542+(L<<2)+2>>1]|0;Q=a[f+670+(L<<1)+1|0]<<t;L=b[f+606+(J<<2)>>1]|0;B=a[f+702+(J<<1)|0]<<t;P=b[f+606+(J<<2)+2>>1]|0;R=a[f+702+(J<<1)+1|0]<<t;J=r|0;S=r+8192|0;if((G|0)<9){Rc[c[e+184>>2]&3](x,v,J,S,m,n,o,U,K,h,W,j)}else{Lc[c[e+200>>2]&3](x,v,J,S,m,n,o,U,K,h,W,j,G)}j=s|0;W=s+8192|0;h=s+16384|0;K=s+24576|0;U=(n|0)/(l|0)|0;S=(o|0)/(k|0)|0;if((I|0)<9){J=e+184|0;Rc[c[J>>2]&3](z,w,j,W,m,U,S,D,u,L,B,V);Rc[c[J>>2]&3](A,w,h,K,m,U,S,O,Q,P,R,V);X=32768;Y=0;Z=16384;_=0;i=q;return}else{J=e+200|0;Lc[c[J>>2]&3](z,w,j,W,m,U,S,D,u,L,B,V,I);Lc[c[J>>2]&3](A,w,h,K,m,U,S,O,Q,P,R,V,I);X=32768;Y=0;Z=16384;_=0;i=q;return}}}else{if(M){break}Ue(C,1011,0);a[E]=3;X=32768;Y=0;Z=16384;_=0;i=q;return}}while(0);E=y<<24>>24==0|0;if((a[g+5962|0]|0)==0){g=r+(E<<13)|0;if((G|0)<9){Kc[c[e+176>>2]&63](x,v,g,m,n,o)}else{Mc[c[e+192>>2]&127](x,v,g,m,n,o,G)}g=s+(E<<13)|0;y=(n|0)/(l|0)|0;C=(o|0)/(k|0)|0;if((I|0)<9){M=e+176|0;Kc[c[M>>2]&63](z,w,g,m,y,C);Kc[c[M>>2]&63](A,w,s+16384+(E<<13)|0,m,y,C);X=32768;Y=0;Z=16384;_=0;i=q;return}else{M=e+192|0;Mc[c[M>>2]&127](z,w,g,m,y,C,I);Mc[c[M>>2]&127](A,w,s+16384+(E<<13)|0,m,y,C,I);X=32768;Y=0;Z=16384;_=0;i=q;return}}else{C=a[p+2+E|0]|0;p=(d[f+380|0]|0)+F|0;F=(d[f+381|0]|0)+H|0;H=b[f+446+(E<<5)+(C<<1)>>1]|0;y=a[f+510+(E<<4)+C|0]<<N;N=b[f+542+(E<<6)+(C<<2)>>1]|0;M=a[f+670+(E<<5)+(C<<1)|0]<<t;g=b[f+542+(E<<6)+(C<<2)+2>>1]|0;V=a[f+670+(E<<5)+(C<<1)+1|0]<<t;t=r+(E<<13)|0;if((G|0)<9){Oc[c[e+180>>2]&15](x,v,t,m,n,o,H,y,p)}else{Pc[c[e+196>>2]&15](x,v,t,m,n,o,H,y,p,G)}G=s+(E<<13)|0;p=(n|0)/(l|0)|0;l=(o|0)/(k|0)|0;if((I|0)<9){k=e+180|0;Oc[c[k>>2]&15](z,w,G,m,p,l,N,M,F);Oc[c[k>>2]&15](A,w,s+16384+(E<<13)|0,m,p,l,g,V,F);X=32768;Y=0;Z=16384;_=0;i=q;return}else{k=e+196|0;Pc[c[k>>2]&15](z,w,G,m,p,l,N,M,F,I);Pc[c[k>>2]&15](A,w,s+16384+(E<<13)|0,m,p,l,g,V,F,I);X=32768;Y=0;Z=16384;_=0;i=q;return}}}else{ec(8616,15536,489,18272)}}function vi(a,d,f,g,h,j,k,l,m,n,o,p,q){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|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,L=0;r=i;i=i+20448|0;s=r|0;t=r+9088|0;u=f&3;v=g&3;w=(f>>2)+h|0;h=(g>>2)+j|0;j=14-(c[d+4996>>2]|0)|0;x=c[d+484>>2]|0;y=c[d+488>>2]|0;if(((g|f)&3|0)==0){do{if((h|w|0)>-1){if((w+o|0)>(x|0)){break}if((h+p|0)>(y|0)){break}f=m+((ga(h,n)|0)+w<<1)|0;g=s|0;if((q|0)<9){Mc[c[a+220>>2]&127](k,l,f,n,o,p,g);z=9088;A=0;i=r;return}else{Jc[c[a+300>>2]&63](k,l,f,n,o,p,g,q);z=9088;A=0;i=r;return}}}while(0);if((p|0)<=0){z=9088;A=0;i=r;return}g=y-1|0;f=x-1|0;if((o|0)>0){B=0}else{z=9088;A=0;i=r;return}do{d=B+h|0;C=ga(B,l)|0;D=(d|0)>(g|0)?g:d;if((d|0)<0){d=0;do{E=d+w|0;if((E|0)<0){F=0}else{F=(E|0)>(f|0)?f:E}b[k+(d+C<<1)>>1]=(e[m+(F<<1)>>1]|0)<<j;d=d+1|0;}while((d|0)<(o|0))}else{d=0;do{E=d+w|0;if((E|0)<0){G=0}else{G=(E|0)>(f|0)?f:E}E=m+((ga(D,n)|0)+G<<1)|0;b[k+(d+C<<1)>>1]=(e[E>>1]|0)<<j;d=d+1|0;}while((d|0)<(o|0))}B=B+1|0;}while((B|0)<(p|0));z=9088;A=0;i=r;return}B=c[30768+(u<<2)>>2]|0;j=c[30872+(u<<2)>>2]|0;G=c[30768+(v<<2)>>2]|0;f=c[30872+(v<<2)>>2]|0;F=-B|0;do{if((w-B|0)>-1){if(!((h-G|0)>-1)){H=23;break}if((w+o+j|0)>=(x|0)){H=23;break}if((h+p+f|0)>=(y|0)){H=23;break}I=n;J=m+((ga(h,n)|0)+w<<1)|0}else{H=23}}while(0);if((H|0)==23){H=-G|0;g=f+p|0;if((g|0)>(H|0)){f=j+o|0;j=(f|0)>(F|0);d=y-1|0;y=x-1|0;x=H;do{if(j){H=x+h|0;C=((x+G|0)*80|0)+B|0;D=(H|0)>(d|0)?d:H;if((H|0)<0){H=F;do{E=H+w|0;if((E|0)<0){K=0}else{K=(E|0)>(y|0)?y:E}b[t+(C+H<<1)>>1]=b[m+(K<<1)>>1]|0;H=H+1|0;}while((H|0)<(f|0))}else{H=F;do{E=H+w|0;if((E|0)<0){L=0}else{L=(E|0)>(y|0)?y:E}E=m+((ga(D,n)|0)+L<<1)|0;b[t+(C+H<<1)>>1]=b[E>>1]|0;H=H+1|0;}while((H|0)<(f|0))}}x=x+1|0;}while((x|0)<(g|0))}I=80;J=t+((G*80|0)+B<<1)|0}B=s|0;if((q|0)<9){Mc[c[a+220+(u<<4)+(v<<2)>>2]&127](k,l,J,I,o,p,B);z=9088;A=0;i=r;return}else{Jc[c[a+300+(u<<4)+(v<<2)>>2]&63](k,l,J,I,o,p,B,q);z=9088;A=0;i=r;return}}function wi(e,f,g,h,j,k,l,m,n,o,p,q,r){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|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;s=i;i=i+14768|0;t=s|0;u=s+9088|0;v=g&3;w=h&3;x=(g>>2)+j|0;j=(h>>2)+k|0;k=14-(c[f+4996>>2]|0)|0;y=c[f+484>>2]|0;z=c[f+488>>2]|0;if(((h|g)&3|0)==0){do{if((j|x|0)>-1){if((x+p|0)>(y|0)){break}if((j+q|0)>(z|0)){break}g=n+((ga(j,o)|0)+x)|0;h=t|0;if((r|0)<9){Mc[c[e+220>>2]&127](l,m,g,o,p,q,h);A=9088;B=0;i=s;return}else{Jc[c[e+300>>2]&63](l,m,g,o,p,q,h,r);A=9088;B=0;i=s;return}}}while(0);if((q|0)<=0){A=9088;B=0;i=s;return}h=(p|0)>0;g=z-1|0;f=y-1|0;C=0;do{if(h){D=C+j|0;E=(D|0)<0;F=ga(C,m)|0;G=(D|0)>(g|0)?g:D;D=0;do{H=D+x|0;if((H|0)<0){I=0}else{I=(H|0)>(f|0)?f:H}H=n+((ga(E?0:G,o)|0)+I)|0;b[l+(D+F<<1)>>1]=(d[H]|0)<<k;D=D+1|0;}while((D|0)<(p|0))}C=C+1|0;}while((C|0)<(q|0));A=9088;B=0;i=s;return}C=c[30768+(v<<2)>>2]|0;k=c[30872+(v<<2)>>2]|0;I=c[30768+(w<<2)>>2]|0;f=c[30872+(w<<2)>>2]|0;g=-C|0;do{if((x-C|0)>-1){if(!((j-I|0)>-1)){J=21;break}if((x+p+k|0)>=(y|0)){J=21;break}if((j+q+f|0)>=(z|0)){J=21;break}K=o;L=n+((ga(j,o)|0)+x)|0}else{J=21}}while(0);if((J|0)==21){J=-I|0;h=f+q|0;if((h|0)>(J|0)){f=k+p|0;k=(f|0)>(g|0);D=z-1|0;z=y-1|0;y=J;do{if(k){J=y+j|0;F=(J|0)<0;G=((y+I|0)*80|0)+C|0;E=(J|0)>(D|0)?D:J;J=g;do{H=J+x|0;if((H|0)<0){M=0}else{M=(H|0)>(z|0)?z:H}H=n+((ga(F?0:E,o)|0)+M)|0;a[u+(G+J)|0]=a[H]|0;J=J+1|0;}while((J|0)<(f|0))}y=y+1|0;}while((y|0)<(h|0))}K=80;L=u+((I*80|0)+C)|0}C=t|0;if((r|0)<9){Mc[c[e+220+(v<<4)+(w<<2)>>2]&127](l,m,L,K,p,q,C);A=9088;B=0;i=s;return}else{Jc[c[e+300+(v<<4)+(w<<2)>>2]&63](l,m,L,K,p,q,C,r);A=9088;B=0;i=s;return}}function xi(a,d,f,g,h,j,k,l,m,n,o,p,q){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|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,L=0,M=0;r=i;i=i+19808|0;s=r|0;t=r+9088|0;u=14-(c[d+5004>>2]|0)|0;v=c[d+5016>>2]|0;w=(c[d+484>>2]|0)/(v|0)|0;x=c[d+5020>>2]|0;y=(c[d+488>>2]|0)/(x|0)|0;d=ga(2/(v|0)|0,f)|0;f=ga(2/(x|0)|0,g)|0;g=d&7;z=f&7;A=((h|0)/(v|0)|0)+(d>>3)|0;v=((j|0)/(x|0)|0)+(f>>3)|0;x=(z|0)==0;if(((f|d)&7|0)==0){do{if((A|0)>-1){if(!((A+o|0)<=(w|0)&(v|0)>-1)){break}if((v+p|0)>(y|0)){break}d=m+((ga(v,n)|0)+A<<1)|0;if((q|0)<9){Oc[c[a+204>>2]&15](k,l,d,n,o,p,0,0,0);B=9088;C=0;i=r;return}else{Pc[c[a+284>>2]&15](k,l,d,n,o,p,0,0,0,q);B=9088;C=0;i=r;return}}}while(0);if((p|0)<=0){B=9088;C=0;i=r;return}d=(o|0)>0;f=y-1|0;j=w-1|0;h=0;do{if(d){D=h+v|0;E=(D|0)<0;F=ga(h,l)|0;G=(D|0)>(f|0)?f:D;D=0;do{H=D+A|0;if((H|0)<0){I=0}else{I=(H|0)>(j|0)?j:H}H=m+((ga(E?0:G,n)|0)+I<<1)|0;b[k+(D+F<<1)>>1]=(e[H>>1]|0)<<u;D=D+1|0;}while((D|0)<(o|0))}h=h+1|0;}while((h|0)<(p|0));B=9088;C=0;i=r;return}do{if((A|0)>0){if(!((A+o|0)<=(w-2|0)&(v|0)>0)){J=17;break}if((v+p|0)>(y-2|0)){J=17;break}K=m+((ga(v,n)|0)+A<<1)|0;L=n}else{J=17}}while(0);if((J|0)==17){J=p+2|0;if((J|0)>-1){h=o+2|0;u=(h|0)>-1;I=y-1|0;y=w-1|0;w=-1;do{if(u){j=w+v|0;f=(j|0)<0;d=(w*80|0)+80|0;D=(j|0)>(I|0)?I:j;j=-1;do{F=j+A|0;if((F|0)<0){M=0}else{M=(F|0)>(y|0)?y:F}F=m+((ga(f?0:D,n)|0)+M<<1)|0;j=j+1|0;b[t+(d+j<<1)>>1]=b[F>>1]|0;}while((j|0)<(h|0))}w=w+1|0;}while((w|0)<(J|0))}K=t+162|0;L=80}t=(g|0)!=0;if(!(x|t^1)){J=s|0;if((q|0)<9){Pc[c[a+216>>2]&15](k,l,K,L,o,p,g,z,J,q);B=9088;C=0;i=r;return}else{Pc[c[a+296>>2]&15](k,l,K,L,o,p,g,z,J,q);B=9088;C=0;i=r;return}}if(t){t=s|0;if((q|0)<9){Pc[c[a+208>>2]&15](k,l,K,L,o,p,g,z,t,q);B=9088;C=0;i=r;return}else{Pc[c[a+288>>2]&15](k,l,K,L,o,p,g,z,t,q);B=9088;C=0;i=r;return}}if(x){ec(10064,15536,268,17976)}x=s|0;if((q|0)<9){Pc[c[a+212>>2]&15](k,l,K,L,o,p,0,z,x,q);B=9088;C=0;i=r;return}else{Pc[c[a+292>>2]&15](k,l,K,L,o,p,0,z,x,q);B=9088;C=0;i=r;return}}function yi(e,f,g,h,j,k,l,m,n,o,p,q,r){e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|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;s=i;i=i+14448|0;t=s|0;u=s+9088|0;v=14-(c[f+5004>>2]|0)|0;w=c[f+5016>>2]|0;x=(c[f+484>>2]|0)/(w|0)|0;y=c[f+5020>>2]|0;z=(c[f+488>>2]|0)/(y|0)|0;f=ga(2/(w|0)|0,g)|0;g=ga(2/(y|0)|0,h)|0;h=f&7;A=g&7;B=((j|0)/(w|0)|0)+(f>>3)|0;w=((k|0)/(y|0)|0)+(g>>3)|0;y=(A|0)==0;if(((g|f)&7|0)==0){do{if((B|0)>-1){if(!((B+p|0)<=(x|0)&(w|0)>-1)){break}if((w+q|0)>(z|0)){break}f=n+((ga(w,o)|0)+B)|0;if((r|0)<9){Oc[c[e+204>>2]&15](l,m,f,o,p,q,0,0,0);C=9088;D=0;i=s;return}else{Pc[c[e+284>>2]&15](l,m,f,o,p,q,0,0,0,r);C=9088;D=0;i=s;return}}}while(0);if((q|0)<=0){C=9088;D=0;i=s;return}f=(p|0)>0;g=z-1|0;k=x-1|0;j=0;do{if(f){E=j+w|0;F=(E|0)<0;G=ga(j,m)|0;H=(E|0)>(g|0)?g:E;E=0;do{I=E+B|0;if((I|0)<0){J=0}else{J=(I|0)>(k|0)?k:I}I=n+((ga(F?0:H,o)|0)+J)|0;b[l+(E+G<<1)>>1]=(d[I]|0)<<v;E=E+1|0;}while((E|0)<(p|0))}j=j+1|0;}while((j|0)<(q|0));C=9088;D=0;i=s;return}do{if((B|0)>0){if(!((B+p|0)<=(x-2|0)&(w|0)>0)){K=17;break}if((w+q|0)>(z-2|0)){K=17;break}L=n+((ga(w,o)|0)+B)|0;M=o}else{K=17}}while(0);if((K|0)==17){K=q+2|0;if((K|0)>-1){j=p+2|0;v=(j|0)>-1;J=z-1|0;z=x-1|0;x=-1;do{if(v){k=x+w|0;g=(k|0)<0;f=(x*80|0)+80|0;E=(k|0)>(J|0)?J:k;k=-1;do{G=k+B|0;if((G|0)<0){N=0}else{N=(G|0)>(z|0)?z:G}G=n+((ga(g?0:E,o)|0)+N)|0;k=k+1|0;a[u+(f+k)|0]=a[G]|0;}while((k|0)<(j|0))}x=x+1|0;}while((x|0)<(K|0))}L=u+81|0;M=80}u=(h|0)!=0;if(!(y|u^1)){K=t|0;if((r|0)<9){Pc[c[e+216>>2]&15](l,m,L,M,p,q,h,A,K,r);C=9088;D=0;i=s;return}else{Pc[c[e+296>>2]&15](l,m,L,M,p,q,h,A,K,r);C=9088;D=0;i=s;return}}if(u){u=t|0;if((r|0)<9){Pc[c[e+208>>2]&15](l,m,L,M,p,q,h,A,u,r);C=9088;D=0;i=s;return}else{Pc[c[e+288>>2]&15](l,m,L,M,p,q,h,A,u,r);C=9088;D=0;i=s;return}}if(y){ec(10064,15536,268,17976)}y=t|0;if((r|0)<9){Pc[c[e+212>>2]&15](l,m,L,M,p,q,0,A,y,r);C=9088;D=0;i=s;return}else{Pc[c[e+292>>2]&15](l,m,L,M,p,q,0,A,y,r);C=9088;D=0;i=s;return}}function zi(e,f,g,h,i,j,k,l,m,n,o,p){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;var 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;k=c[e+10060>>2]|0;q=c[e+10368>>2]|0;r=f>>q;s=g>>q;if(!((r|0)>-1)){ec(1232,544,118,17296);return 0}q=c[e+10372>>2]|0;if((r|0)>=(q|0)){ec(1232,544,118,17296);return 0}if(!((s|0)>-1)){ec(17016,544,119,17296);return 0}if((s|0)>=(c[e+10376>>2]|0)){ec(17016,544,119,17296);return 0}t=(ga(q,s)|0)+r|0;r=(c[e+10360>>2]|0)+(t*3|0)|0;t=((d[r]|d[r+1|0]<<8)<<16>>16&65535)>>>3&7;r=t&255;s=i-1|0;q=m+j|0;u=q-1|0;v=i>>k;w=(v|0)==(s>>k|0);if(w){if((j>>k|0)==(u>>k|0)){x=0;y=0}else{z=9}}else{z=9}do{if((z|0)==9){if((n|0)==1){if((r&3|0)==2|t<<24>>24==7){x=0;y=0;break}}if(!(ci(e,f,g,h,i,j,l,m,n,s,u)|0)){x=0;y=0;break}A=c[e+10388>>2]|0;B=s>>A;C=u>>A;if(!((B|0)>-1)){ec(1232,544,118,17296);return 0}A=c[e+10392>>2]|0;if((B|0)>=(A|0)){ec(1232,544,118,17296);return 0}if(!((C|0)>-1)){ec(17016,544,119,17296);return 0}if((C|0)<(c[e+10396>>2]|0)){D=(ga(A,C)|0)+B|0;B=o|0;C=(c[e+10380>>2]|0)+(D*12|0)|0;b[B>>1]=b[C>>1]|0;b[B+2>>1]=b[C+2>>1]|0;b[B+4>>1]=b[C+4>>1]|0;b[B+6>>1]=b[C+6>>1]|0;b[B+8>>1]=b[C+8>>1]|0;b[B+10>>1]=b[C+10>>1]|0;x=1;y=1;break}else{ec(17016,544,119,17296);return 0}}}while(0);if((x|0)>=(p|0)){E=x;return E|0}u=l+i|0;t=u-1|0;C=j-1|0;if((v|0)==(t>>k|0)){if((j>>k|0)==(C>>k|0)){F=x;G=0;H=0}else{z=22}}else{z=22}a:do{if((z|0)==22){if((n|0)==1){if((r|0)==5|(r|0)==4|(r|0)==1){F=x;G=0;H=0;break}}if(!(ci(e,f,g,h,i,j,l,m,n,t,C)|0)){F=x;G=0;H=0;break}B=c[e+10388>>2]|0;D=t>>B;A=C>>B;if(!((D|0)>-1)){ec(1232,544,118,17296);return 0}B=c[e+10392>>2]|0;if((D|0)>=(B|0)){ec(1232,544,118,17296);return 0}if(!((A|0)>-1)){ec(17016,544,119,17296);return 0}if((A|0)>=(c[e+10396>>2]|0)){ec(17016,544,119,17296);return 0}I=(ga(B,A)|0)+D|0;D=c[e+10380>>2]|0;b:do{if(y){A=0;while(1){B=a[o+A|0]|0;if(!(B<<24>>24==(a[D+(I*12|0)+A|0]|0))){break b}if(!(B<<24>>24==0)){if((b[o+4+(A<<2)>>1]|0)!=(b[D+(I*12|0)+4+(A<<2)>>1]|0)){break b}if((b[o+4+(A<<2)+2>>1]|0)!=(b[D+(I*12|0)+4+(A<<2)+2>>1]|0)){break b}if((a[o+2+A|0]|0)!=(a[D+(I*12|0)+2+A|0]|0)){break b}}B=A+1|0;if((B|0)<2){A=B}else{F=x;G=0;H=1;break a}}}}while(0);A=o+(x*12|0)|0;B=D+(I*12|0)|0;b[A>>1]=b[B>>1]|0;b[A+2>>1]=b[B+2>>1]|0;b[A+4>>1]=b[B+4>>1]|0;b[A+6>>1]=b[B+6>>1]|0;b[A+8>>1]=b[B+8>>1]|0;b[A+10>>1]=b[B+10>>1]|0;F=x+1|0;G=x;H=1}}while(0);if((F|0)>=(p|0)){E=F;return E|0}if((v|0)==(u>>k|0)){if((j>>k|0)==(C>>k|0)){J=F}else{z=42}}else{z=42}c:do{if((z|0)==42){if(!(ci(e,f,g,h,i,j,l,m,n,u,C)|0)){J=F;break}v=c[e+10388>>2]|0;x=u>>v;t=C>>v;if(!((x|0)>-1)){ec(1232,544,118,17296);return 0}v=c[e+10392>>2]|0;if((x|0)>=(v|0)){ec(1232,544,118,17296);return 0}if(!((t|0)>-1)){ec(17016,544,119,17296);return 0}if((t|0)>=(c[e+10396>>2]|0)){ec(17016,544,119,17296);return 0}r=(ga(v,t)|0)+x|0;x=c[e+10380>>2]|0;d:do{if(H){t=0;while(1){v=a[o+(G*12|0)+t|0]|0;if(!(v<<24>>24==(a[x+(r*12|0)+t|0]|0))){break d}if(!(v<<24>>24==0)){if((b[o+(G*12|0)+4+(t<<2)>>1]|0)!=(b[x+(r*12|0)+4+(t<<2)>>1]|0)){break d}if((b[o+(G*12|0)+4+(t<<2)+2>>1]|0)!=(b[x+(r*12|0)+4+(t<<2)+2>>1]|0)){break d}if((a[o+(G*12|0)+2+t|0]|0)!=(a[x+(r*12|0)+2+t|0]|0)){break d}}v=t+1|0;if((v|0)<2){t=v}else{J=F;break c}}}}while(0);I=o+(F*12|0)|0;D=x+(r*12|0)|0;b[I>>1]=b[D>>1]|0;b[I+2>>1]=b[D+2>>1]|0;b[I+4>>1]=b[D+4>>1]|0;b[I+6>>1]=b[D+6>>1]|0;b[I+8>>1]=b[D+8>>1]|0;b[I+10>>1]=b[D+10>>1]|0;J=F+1|0}}while(0);if((J|0)>=(p|0)){E=J;return E|0}if(w){if((j>>k|0)==(q>>k|0)){K=J}else{z=60}}else{z=60}e:do{if((z|0)==60){if(!(ci(e,f,g,h,i,j,l,m,n,s,q)|0)){K=J;break}F=c[e+10388>>2]|0;u=s>>F;D=q>>F;if(!((u|0)>-1)){ec(1232,544,118,17296);return 0}F=c[e+10392>>2]|0;if((u|0)>=(F|0)){ec(1232,544,118,17296);return 0}if(!((D|0)>-1)){ec(17016,544,119,17296);return 0}if((D|0)>=(c[e+10396>>2]|0)){ec(17016,544,119,17296);return 0}I=(ga(F,D)|0)+u|0;u=c[e+10380>>2]|0;f:do{if(y){D=0;while(1){F=a[o+D|0]|0;if(!(F<<24>>24==(a[u+(I*12|0)+D|0]|0))){break f}if(!(F<<24>>24==0)){if((b[o+4+(D<<2)>>1]|0)!=(b[u+(I*12|0)+4+(D<<2)>>1]|0)){break f}if((b[o+4+(D<<2)+2>>1]|0)!=(b[u+(I*12|0)+4+(D<<2)+2>>1]|0)){break f}if((a[o+2+D|0]|0)!=(a[u+(I*12|0)+2+D|0]|0)){break f}}F=D+1|0;if((F|0)<2){D=F}else{K=J;break e}}}}while(0);r=o+(J*12|0)|0;x=u+(I*12|0)|0;b[r>>1]=b[x>>1]|0;b[r+2>>1]=b[x+2>>1]|0;b[r+4>>1]=b[x+4>>1]|0;b[r+6>>1]=b[x+6>>1]|0;b[r+8>>1]=b[x+8>>1]|0;b[r+10>>1]=b[x+10>>1]|0;K=J+1|0}}while(0);if((K|0)>=(p|0)|(K|0)==4){E=K;return E|0}do{if(w){if((j>>k|0)==(C>>k|0)){E=K}else{break}return E|0}}while(0);if(!(ci(e,f,g,h,i,j,l,m,n,s,C)|0)){E=K;return E|0}n=c[e+10388>>2]|0;m=s>>n;s=C>>n;if(!((m|0)>-1)){ec(1232,544,118,17296);return 0}n=c[e+10392>>2]|0;if((m|0)>=(n|0)){ec(1232,544,118,17296);return 0}if(!((s|0)>-1)){ec(17016,544,119,17296);return 0}if((s|0)>=(c[e+10396>>2]|0)){ec(17016,544,119,17296);return 0}C=(ga(n,s)|0)+m|0;m=c[e+10380>>2]|0;g:do{if(H){e=0;while(1){s=a[o+(G*12|0)+e|0]|0;if(!(s<<24>>24==(a[m+(C*12|0)+e|0]|0))){break g}if(!(s<<24>>24==0)){if((b[o+(G*12|0)+4+(e<<2)>>1]|0)!=(b[m+(C*12|0)+4+(e<<2)>>1]|0)){break g}if((b[o+(G*12|0)+4+(e<<2)+2>>1]|0)!=(b[m+(C*12|0)+4+(e<<2)+2>>1]|0)){break g}if((a[o+(G*12|0)+2+e|0]|0)!=(a[m+(C*12|0)+2+e|0]|0)){break g}}s=e+1|0;if((s|0)<2){e=s}else{E=K;break}}return E|0}}while(0);h:do{if(y){G=0;while(1){H=a[o+G|0]|0;if(!(H<<24>>24==(a[m+(C*12|0)+G|0]|0))){break h}if(!(H<<24>>24==0)){if((b[o+4+(G<<2)>>1]|0)!=(b[m+(C*12|0)+4+(G<<2)>>1]|0)){break h}if((b[o+4+(G<<2)+2>>1]|0)!=(b[m+(C*12|0)+4+(G<<2)+2>>1]|0)){break h}if((a[o+2+G|0]|0)!=(a[m+(C*12|0)+2+G|0]|0)){break h}}H=G+1|0;if((H|0)<2){G=H}else{E=K;break}}return E|0}}while(0);y=o+(K*12|0)|0;o=m+(C*12|0)|0;b[y>>1]=b[o>>1]|0;b[y+2>>1]=b[o+2>>1]|0;b[y+4>>1]=b[o+4>>1]|0;b[y+6>>1]=b[o+6>>1]|0;b[y+8>>1]=b[o+8>>1]|0;b[y+10>>1]=b[o+10>>1]|0;E=K+1|0;return E|0}function Ai(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;h=i;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];if((f|0)<-128){k=-128}else{k=(f|0)>127?127:f}if((g|0)<-128){l=-128}else{l=(g|0)>127?127:g}if((k|0)==0){g=d;f=a;C=e[g>>1]|e[g+2>>1]<<16;b[f>>1]=C;b[f+2>>1]=C>>16;m=0;i=h;return m|0}f=(ga(((((k|0)<0?-k|0:k)>>1)+16384|0)/(k|0)|0,l)|0)+32>>6;if((f|0)<-4096){n=-4096}else{n=(f|0)>4095?4095:f}f=ga(b[d>>1]|0,n)|0;l=(f|0)<0;if(l){o=-1}else{o=(f|0)>0|0}k=(l?-f|0:f)+127>>8;do{if((ga(k,o)|0)<-32768){p=-32768}else{if(l){q=-1}else{q=(f|0)>0|0}if((ga(k,q)|0)>32767){p=32767;break}if(l){r=-1}else{r=(f|0)>0|0}p=(ga(k,r)|0)&65535}}while(0);b[a>>1]=p;p=ga(b[d+2>>1]|0,n)|0;n=(p|0)<0;if(n){s=-1}else{s=(p|0)>0|0}d=(n?-p|0:p)+127>>8;do{if((ga(d,s)|0)<-32768){t=-32768}else{if(n){u=-1}else{u=(p|0)>0|0}if((ga(d,u)|0)>32767){t=32767;break}if(n){v=-1}else{v=(p|0)>0|0}t=(ga(d,v)|0)&65535}}while(0);b[a+2>>1]=t;m=1;i=h;return m|0}function Bi(f,g,h,j,k,l,m,n,o,p,q,r){f=f|0;g=g|0;h=h|0;j=j|0;k=k|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,D=0,E=0,F=0,G=0,H=0;k=i;i=i+8|0;j=k|0;s=j;if(!(Qc[c[(c[f>>2]|0)+12>>2]&63](f,l)|0)){ec(12928,15536,1074,18352)}t=f;u=Qc[c[(c[t>>2]|0)+8>>2]&63](f,l)|0;do{if((c[u+24>>2]|0)>(m|0)){if((c[u+28>>2]|0)<=(n|0)){break}l=c[u+10368>>2]|0;v=m>>l;w=n>>l;if(!((v|0)>-1)){ec(1232,544,118,17296)}l=c[u+10372>>2]|0;if((v|0)>=(l|0)){ec(1232,544,118,17296)}if(!((w|0)>-1)){ec(17016,544,119,17296)}if((w|0)>=(c[u+10376>>2]|0)){ec(17016,544,119,17296)}x=(ga(l,w)|0)+v|0;v=(c[u+10360>>2]|0)+(x*3|0)|0;if(((d[v]|d[v+1|0]<<8)<<16>>16&768)==0){b[q>>1]=0;b[q+2>>1]=0;a[r]=0;i=k;return}if((a[u+10516|0]|0)==1){b[q>>1]=0;b[q+2>>1]=0;a[r]=0;i=k;return}v=c[u+10388>>2]|0;x=m>>v;w=n>>v;if(!((x|0)>-1)){ec(1232,544,118,17296)}v=c[u+10392>>2]|0;if((x|0)>=(v|0)){ec(1232,544,118,17296)}if(!((w|0)>-1)){ec(17016,544,119,17296)}if((w|0)>=(c[u+10396>>2]|0)){ec(17016,544,119,17296)}l=(ga(v,w)|0)+x|0;x=c[u+10380>>2]|0;do{if((a[x+(l*12|0)|0]|0)==0){y=1;z=x+(l*12|0)+3|0;A=x+(l*12|0)+8|0}else{if((a[x+(l*12|0)+1|0]|0)==0){y=0;z=x+(l*12|0)+2|0;A=x+(l*12|0)+4|0;break}w=c[g+92>>2]|0;v=h+332|0;if((c[v>>2]|0)<1){B=1}else{D=0;E=1;while(1){F=(Qc[c[(c[t>>2]|0)+8>>2]&63](f,c[h+980+(D<<2)>>2]|0)|0)+92|0;G=E&(c[F>>2]|0)<=(w|0);F=D+1|0;if((F|0)>=(c[v>>2]|0)|G^1){B=G;break}else{D=F;E=G}}}E=h+328|0;if((c[E>>2]|0)<1|B^1){H=B}else{D=0;v=B;while(1){G=(Qc[c[(c[t>>2]|0)+8>>2]&63](f,c[h+916+(D<<2)>>2]|0)|0)+92|0;F=v&(c[G>>2]|0)<=(w|0);G=D+1|0;if((G|0)>=(c[E>>2]|0)|F^1){H=F;break}else{D=G;v=F}}}if(H){y=p;z=x+(l*12|0)+2+p|0;A=x+(l*12|0)+4+(p<<2)|0;break}else{v=a[h+372|0]|0;y=v;z=x+(l*12|0)+2+v|0;A=x+(l*12|0)+4+(v<<2)|0;break}}}while(0);l=A;x=e[l>>1]|e[l+2>>1]<<16;l=a[z]|0;v=c[u+10348>>2]|0;D=m>>v;E=n>>v;if(!((D|0)>-1)){ec(1232,544,118,17296)}v=c[u+10352>>2]|0;if((D|0)>=(v|0)){ec(1232,544,118,17296)}if(!((E|0)>-1)){ec(17016,544,119,17296)}if((E|0)>=(c[u+10356>>2]|0)){ec(17016,544,119,17296)}w=(ga(v,E)|0)+D|0;D=c[(c[u+48>>2]|0)+(e[(c[u+10340>>2]|0)+(w*24|0)+2>>1]<<2)>>2]|0;w=h+1300+(p<<4)+o|0;if((a[w]|0)!=(a[D+1300+(y<<4)+l|0]|0)){a[r]=0;b[q>>1]=0;b[q+2>>1]=0;i=k;return}a[r]=1;E=(c[u+92>>2]|0)-(c[D+1044+(y<<6)+(l<<2)>>2]|0)|0;l=(c[g+92>>2]|0)-(c[h+1044+(p<<6)+(o<<2)>>2]|0)|0;if((a[w]|0)!=0|(E|0)==(l|0)){w=q;C=x;b[w>>1]=C;b[w+2>>1]=C>>16;i=k;return}c[j>>2]=x;if(Ai(q,s,E,l)|0){i=k;return}Ue(f+4|0,1008,0);a[g+10516|0]=3;i=k;return}}while(0);Ue(f+4|0,1026,0);a[r]=0;i=k;return}function Ci(d,e,f,g,h,i,j,k,l,m,n){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;var o=0,p=0,q=0,r=0,s=0;if((a[f+324|0]|0)==0){b[m>>1]=0;b[m+2>>1]=0;a[n]=0;return}o=c[e+5804>>2]|0;do{if((c[f+20>>2]|0)==0){if((a[f+372|0]|0)!=0){p=6;break}q=f+980+(c[f+376>>2]<<2)|0}else{p=6}}while(0);if((p|0)==6){q=f+916+(c[f+376>>2]<<2)|0}r=c[q>>2]|0;if(!(Qc[c[(c[d>>2]|0)+12>>2]&63](d,r)|0)){b[m>>1]=0;b[m+2>>1]=0;a[n]=0;Ue(d+4|0,1012,0);return}q=j+h|0;s=i+g|0;do{if((h>>o|0)==(q>>o|0)){if((s|0)>=(c[e+1248>>2]|0)){p=12;break}if((q|0)>=(c[e+1252>>2]|0)){p=12;break}Bi(d,e,f,0,0,r,s&-16,q&-16,k,l,m,n);if((a[n]|0)==0){break}return}else{p=12}}while(0);if((p|0)==12){b[m>>1]=0;b[m+2>>1]=0;a[n]=0}Bi(d,e,f,0,0,r,(i>>1)+g&-16,(j>>1)+h&-16,k,l,m,n);return}function Di(d,f,g,h,i){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;j=c[h>>2]|0;if(!((j|0)>1&(j|0)<(i|0))){return}k=ga(j-1|0,j)|0;l=d;m=0;n=1;a:while(1){o=m;while(1){if(!n){p=20;break a}q=c[30904+(o<<2)>>2]|0;r=c[30952+(o<<2)>>2]|0;if(!((q|0)<(j|0)&(r|0)<(j|0))){p=6;break a}s=g+(q*12|0)|0;if((a[s]|0)==0){t=0}else{t=Qc[c[(c[l>>2]|0)+8>>2]&63](d,c[f+916+(a[g+(q*12|0)+2|0]<<2)>>2]|0)|0}u=g+(r*12|0)+1|0;if((a[u]|0)==0){v=0}else{v=Qc[c[(c[l>>2]|0)+8>>2]&63](d,c[f+980+(a[g+(r*12|0)+3|0]<<2)>>2]|0)|0}w=a[s]|0;if(w<<24>>24!=0&(t|0)==0){p=20;break a}s=a[u]|0;if(s<<24>>24!=0&(v|0)==0){p=20;break a}b:do{if(!(w<<24>>24==0|s<<24>>24==0)){do{if((c[t+92>>2]|0)==(c[v+92>>2]|0)){if((b[g+(q*12|0)+4>>1]|0)!=(b[g+(r*12|0)+8>>1]|0)){break}if((b[g+(q*12|0)+6>>1]|0)==(b[g+(r*12|0)+10>>1]|0)){break b}}}while(0);u=c[h>>2]|0;a[g+(u*12|0)+2|0]=a[g+(q*12|0)+2|0]|0;a[g+(u*12|0)+3|0]=a[g+(r*12|0)+3|0]|0;a[g+(u*12|0)|0]=w;a[g+(u*12|0)+1|0]=s;x=g+(q*12|0)+4|0;y=g+(u*12|0)+4|0;C=e[x>>1]|e[x+2>>1]<<16;b[y>>1]=C;b[y+2>>1]=C>>16;y=g+(r*12|0)+8|0;x=g+(u*12|0)+8|0;C=e[y>>1]|e[y+2>>1]<<16;b[x>>1]=C;b[x+2>>1]=C>>16;c[h>>2]=(c[h>>2]|0)+1}}while(0);r=o+1|0;if((r|0)==(k|0)){m=k;n=0;continue a}if((c[h>>2]|0)==(i|0)){m=r;n=0;continue a}else{o=r}}}if((p|0)==6){ec(10064,15536,1360,18064)}else if((p|0)==20){return}}function Ei(d,e,f,g,h,j,k,l,m,n,o,p,q){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|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,D=0,E=0,F=0,G=0;r=i;i=i+24|0;s=r|0;t=r+8|0;u=r+16|0;v=(c[f+10060>>2]|0)>2&(l|0)==8;w=v?l:n;n=v?l:m;m=v?h:k;k=v?g:j;j=p+1|0;p=zi(f,g,h,l,k,m,0,n,w,v?0:o,q,j)|0;c[s>>2]=p;do{if((p|0)<(j|0)){o=u|0;Ci(d,f,e,k,m,n,w,0,0,t|0,o);v=a[o]|0;l=u+1|0;a[l]=0;h=e+20|0;if((c[h>>2]|0)==0){Ci(d,f,e,k,m,n,w,0,1,t+4|0,l);g=a[l]|0;x=g|v;y=g}else{x=v;y=0}if(x<<24>>24==0){z=h;break}c[s>>2]=p+1;v=q+(p*12|0)+4|0;C=c[t>>2]|0;b[v>>1]=C;b[v+2>>1]=C>>16;v=q+(p*12|0)+8|0;C=c[t+4>>2]|0;b[v>>1]=C;b[v+2>>1]=C>>16;a[q+(p*12|0)|0]=a[o]|0;a[q+(p*12|0)+1|0]=y;a[q+(p*12|0)+2|0]=0;a[q+(p*12|0)+3|0]=0;z=h}else{z=e+20|0}}while(0);p=c[z>>2]|0;if((p|0)==0){Di(d,e,q,s,j);A=c[z>>2]|0}else{A=p}p=c[e+328>>2]|0;if((A|0)==1){B=p}else{d=c[e+332>>2]|0;B=(p|0)<(d|0)?p:d}d=c[s>>2]|0;if((d|0)<(j|0)){D=0;E=A;F=d}else{i=r;return}while(1){d=q+(F*12|0)|0;A=(D|0)<(B|0)?D&255:0;a[q+(F*12|0)+2|0]=A;p=q+(F*12|0)+3|0;if((E|0)==1){a[p]=-1;a[d|0]=1;a[q+(F*12|0)+1|0]=0}else{a[p]=A;a[d|0]=1;a[q+(F*12|0)+1|0]=1}d=q+(F*12|0)+4|0;A=d|0;C=0;b[A>>1]=C;b[A+2>>1]=C>>16;A=d+4|0;C=0;b[A>>1]=C;b[A+2>>1]=C>>16;G=F+1|0;if((G|0)>=(j|0)){break}D=D+1|0;E=c[z>>2]|0;F=G}c[s>>2]=G;i=r;return}function Fi(f,g,h,j,k,l,m,n,o,p,q,r,s,t,u){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;t=t|0;u=u|0;var v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,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,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0;v=i;i=i+32|0;w=v|0;x=v+8|0;y=v+16|0;z=v+24|0;A=z;B=i;i=i+12|0;i=i+7&-8;D=i;i=i+12|0;i=i+7&-8;E=i;i=i+3|0;i=i+7&-8;F=i;i=i+4|0;i=i+7&-8;G=F;H=t+1|0;a[H]=0;I=m-1|0;c[w>>2]=I;J=p+n|0;c[x>>2]=J;c[w+4>>2]=I;K=J-1|0;c[x+4>>2]=K;a[t]=0;b[u>>1]=0;b[u+2>>1]=0;L=ci(g,j,k,l,m,n,o,p,s,I,J)|0;J=L&1;a[y|0]=J;M=ci(g,j,k,l,m,n,o,p,s,I,K)|0;a[y+1|0]=M&1;K=L|M;M=f;L=h+916+(q<<6)+(r<<2)|0;N=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[L>>2]|0)|0;if((N|0)==0){i=v;return}O=c[N+92>>2]|0;N=g+10368|0;P=g+10372|0;Q=g+10376|0;R=g+10360|0;S=1-q|0;T=g+10388|0;U=g+10392|0;V=g+10396|0;W=g+10380|0;X=u;Y=0;Z=-1;_=J;a:while(1){b:do{if(_<<24>>24==0){$=Z}else{if((a[t]|0)!=0){$=Z;break}J=c[w+(Y<<2)>>2]|0;aa=c[x+(Y<<2)>>2]|0;ba=c[N>>2]|0;ca=J>>ba;da=aa>>ba;if(!((ca|0)>-1)){ea=8;break a}ba=c[P>>2]|0;if((ca|0)>=(ba|0)){ea=8;break a}if(!((da|0)>-1)){ea=11;break a}if((da|0)>=(c[Q>>2]|0)){ea=11;break a}fa=(ga(ba,da)|0)+ca|0;ca=(c[R>>2]|0)+(fa*3|0)|0;if(((d[ca]|d[ca+1|0]<<8)<<16>>16&768)==0){$=Z;break}ca=c[T>>2]|0;fa=J>>ca;J=aa>>ca;if(!((fa|0)>-1)){ea=15;break a}ca=c[U>>2]|0;if((fa|0)>=(ca|0)){ea=15;break a}if(!((J|0)>-1)){ea=18;break a}if((J|0)>=(c[V>>2]|0)){ea=18;break a}aa=(ga(ca,J)|0)+fa|0;fa=c[W>>2]|0;J=fa+(aa*12|0)+q|0;if((a[J]|0)==0){ha=0}else{ha=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[h+916+(q<<6)+(a[fa+(aa*12|0)+2+q|0]<<2)>>2]|0)|0}ca=fa+(aa*12|0)+S|0;if((a[ca]|0)==0){ia=0}else{ia=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[h+916+(S<<6)+(a[fa+(aa*12|0)+2+S|0]<<2)>>2]|0)|0}do{if(!((a[J]|0)==0|(ha|0)==0)){if((c[ha+92>>2]|0)!=(O|0)){break}a[t]=1;da=fa+(aa*12|0)+4+(q<<2)|0;C=e[da>>1]|e[da+2>>1]<<16;b[X>>1]=C;b[X+2>>1]=C>>16;$=a[fa+(aa*12|0)+2+q|0]|0;break b}}while(0);if((a[ca]|0)==0|(ia|0)==0){$=Z;break}if((c[ia+92>>2]|0)!=(O|0)){$=Z;break}a[t]=1;J=fa+(aa*12|0)+4+(S<<2)|0;C=e[J>>1]|e[J+2>>1]<<16;b[X>>1]=C;b[X+2>>1]=C>>16;$=a[fa+(aa*12|0)+2+S|0]|0}}while(0);J=Y+1|0;if((J|0)>=2){ea=3;break}Y=J;Z=$;_=a[y+J|0]|0}if((ea|0)==3){_=h+1300+(q<<4)+r|0;r=g+92|0;Z=f+4|0;Y=g+10516|0;ia=0;ha=$;c:while(1){if((a[t]|0)!=0){ea=62;break}d:do{if((a[y+ia|0]|0)==0){ja=ha;ka=-1}else{$=c[w+(ia<<2)>>2]|0;J=c[x+(ia<<2)>>2]|0;da=c[N>>2]|0;ba=$>>da;la=J>>da;if(!((ba|0)>-1)){ea=35;break c}da=c[P>>2]|0;if((ba|0)>=(da|0)){ea=35;break c}if(!((la|0)>-1)){ea=38;break c}if((la|0)>=(c[Q>>2]|0)){ea=38;break c}ma=(ga(da,la)|0)+ba|0;ba=(c[R>>2]|0)+(ma*3|0)|0;if(((d[ba]|d[ba+1|0]<<8)<<16>>16&768)==0){ja=ha;ka=-1;break}ba=c[T>>2]|0;ma=$>>ba;$=J>>ba;if(!((ma|0)>-1)){ea=42;break c}ba=c[U>>2]|0;if((ma|0)>=(ba|0)){ea=42;break c}if(!(($|0)>-1)){ea=45;break c}if(($|0)>=(c[V>>2]|0)){ea=45;break c}J=(ga(ba,$)|0)+ma|0;ma=c[W>>2]|0;do{if((a[ma+(J*12|0)+q|0]|0)==1){$=ma+(J*12|0)+2+q|0;if((a[_]|0)!=(a[(a[$]|0)+(h+1300+(q<<4))|0]|0)){break}a[t]=1;ba=ma+(J*12|0)+4+(q<<2)|0;C=e[ba>>1]|e[ba+2>>1]<<16;b[X>>1]=C;b[X+2>>1]=C>>16;ja=a[$]|0;ka=q;break d}}while(0);if((a[ma+(J*12|0)+S|0]|0)!=1){ja=ha;ka=-1;break}aa=ma+(J*12|0)+2+S|0;if((a[_]|0)!=(a[(a[aa]|0)+(h+1300+(S<<4))|0]|0)){ja=ha;ka=-1;break}a[t]=1;fa=ma+(J*12|0)+4+(S<<2)|0;C=e[fa>>1]|e[fa+2>>1]<<16;b[X>>1]=C;b[X+2>>1]=C>>16;ja=a[aa]|0;ka=S}}while(0);do{if((a[t]|0)==1){if((ja|0)<0){ea=54;break c}if(!((ka|0)>-1)){ea=56;break c}aa=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[h+916+(ka<<6)+(ja<<2)>>2]|0)|0;Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[L>>2]|0)|0;if((a[h+1300+(ka<<4)+ja|0]|0)!=0){break}if((a[_]|0)!=0){break}fa=c[r>>2]|0;ca=fa-(c[aa+92>>2]|0)|0;c[z>>2]=e[X>>1]|e[X+2>>1]<<16;if(Ai(u,A,ca,fa-O|0)|0){break}Ue(Z,1008,0);a[Y]=3}}while(0);fa=ia+1|0;if((fa|0)<2){ia=fa;ha=ja}else{ea=62;break}}if((ea|0)==35){ec(1232,544,118,17296)}else if((ea|0)==38){ec(17016,544,119,17296)}else if((ea|0)==42){ec(1232,544,118,17296)}else if((ea|0)==45){ec(17016,544,119,17296)}else if((ea|0)==54){a[H]=0;a[t]=0;i=v;return}else if((ea|0)==56){ec(5136,15536,1698,18112)}else if((ea|0)==62){ja=o+m|0;c[B>>2]=ja;ha=n-1|0;c[D>>2]=ha;c[B+4>>2]=ja-1;c[D+4>>2]=ha;c[B+8>>2]=I;c[D+8>>2]=ha;a[H]=0;I=u+4|0;b[I>>1]=0;b[u+6>>1]=0;u=I;ia=0;A=-1;z=ja;ja=ha;e:while(1){ha=ci(g,j,k,l,m,n,o,p,s,z,ja)|0;a[E+ia|0]=ha&1;f:do{if(ha){if((a[H]|0)!=0){na=A;break}ka=c[T>>2]|0;R=z>>ka;Q=ja>>ka;if(!((R|0)>-1)){ea=67;break e}ka=c[U>>2]|0;if((R|0)>=(ka|0)){ea=67;break e}if(!((Q|0)>-1)){ea=70;break e}if((Q|0)>=(c[V>>2]|0)){ea=70;break e}P=(ga(ka,Q)|0)+R|0;R=c[W>>2]|0;Q=R+(P*12|0)+q|0;if((a[Q]|0)==0){oa=0}else{oa=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[h+916+(q<<6)+(a[R+(P*12|0)+2+q|0]<<2)>>2]|0)|0}ka=R+(P*12|0)+S|0;if((a[ka]|0)==0){pa=0}else{pa=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[h+916+(S<<6)+(a[R+(P*12|0)+2+S|0]<<2)>>2]|0)|0}do{if(!((a[Q]|0)==0|(oa|0)==0)){if((c[oa+92>>2]|0)!=(O|0)){break}a[H]=1;N=R+(P*12|0)+4+(q<<2)|0;C=e[N>>1]|e[N+2>>1]<<16;b[u>>1]=C;b[u+2>>1]=C>>16;na=a[R+(P*12|0)+2+q|0]|0;break f}}while(0);if((a[ka]|0)==0|(pa|0)==0){na=A;break}if((c[pa+92>>2]|0)!=(O|0)){na=A;break}a[H]=1;Q=R+(P*12|0)+4+(S<<2)|0;C=e[Q>>1]|e[Q+2>>1]<<16;b[u>>1]=C;b[u+2>>1]=C>>16;na=a[R+(P*12|0)+2+S|0]|0}else{na=A}}while(0);ha=ia+1|0;if((ha|0)>=3){ea=83;break}ia=ha;A=na;z=c[B+(ha<<2)>>2]|0;ja=c[D+(ha<<2)>>2]|0}if((ea|0)==67){ec(1232,544,118,17296)}else if((ea|0)==70){ec(17016,544,119,17296)}else if((ea|0)==83){if(K){i=v;return}if((a[H]|0)!=0){a[t]=1;C=e[u>>1]|e[u+2>>1]<<16;b[X>>1]=C;b[X+2>>1]=C>>16}a[H]=0;X=g+10332|0;g=0;K=na;na=1;g:while(1){if(!na){ea=115;break}h:do{if((a[E+g|0]|0)==0){qa=K;ra=-1}else{ja=c[T>>2]|0;z=c[B+(g<<2)>>2]>>ja;A=c[D+(g<<2)>>2]>>ja;if(!((z|0)>-1)){ea=91;break g}ja=c[U>>2]|0;if((z|0)>=(ja|0)){ea=91;break g}if(!((A|0)>-1)){ea=94;break g}if((A|0)>=(c[V>>2]|0)){ea=94;break g}ia=(ga(ja,A)|0)+z|0;z=c[W>>2]|0;do{if((a[z+(ia*12|0)+q|0]|0)==1){A=z+(ia*12|0)+2+q|0;if((a[_]|0)!=(a[(a[A]|0)+(h+1300+(q<<4))|0]|0)){break}a[H]=1;ja=z+(ia*12|0)+4+(q<<2)|0;C=e[ja>>1]|e[ja+2>>1]<<16;b[u>>1]=C;b[u+2>>1]=C>>16;qa=a[A]|0;ra=q;break h}}while(0);if((a[z+(ia*12|0)+S|0]|0)!=1){qa=K;ra=-1;break}P=z+(ia*12|0)+2+S|0;if((a[_]|0)!=(a[(a[P]|0)+(h+1300+(S<<4))|0]|0)){qa=K;ra=-1;break}a[H]=1;R=z+(ia*12|0)+4+(S<<2)|0;C=e[R>>1]|e[R+2>>1]<<16;b[u>>1]=C;b[u+2>>1]=C>>16;qa=a[P]|0;ra=S}}while(0);do{if((a[H]|0)==1){if((qa|0)<0){ea=103;break g}if(!((ra|0)>-1)){ea=105;break g}if(!((qa|0)>-1)){ea=107;break g}P=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[h+916+(ra<<6)+(qa<<2)>>2]|0)|0;R=Qc[c[(c[M>>2]|0)+8>>2]&63](f,c[L>>2]|0)|0;if((P|0)==0|(R|0)==0){Ue((c[X>>2]|0)+4|0,1012,0);a[Y]=3;break}ka=c[P+92>>2]|0;if(!((ka|0)!=(c[R+92>>2]|0)&(a[h+1300+(ra<<4)+qa|0]|0)==0&(a[_]|0)==0)){break}R=c[r>>2]|0;c[F>>2]=e[u>>1]|e[u+2>>1]<<16;if(Ai(I,G,R-ka|0,R-O|0)|0){break}Ue(Z,1008,0);a[Y]=3}}while(0);R=g+1|0;if((R|0)>=3){ea=115;break}g=R;K=qa;na=(a[H]|0)==0}if((ea|0)==91){ec(1232,544,118,17296)}else if((ea|0)==94){ec(17016,544,119,17296)}else if((ea|0)==103){a[H]=0;a[t]=0;i=v;return}else if((ea|0)==105){ec(5136,15536,1839,18112)}else if((ea|0)==107){ec(3656,15536,1840,18112)}else if((ea|0)==115){i=v;return}}}}else if((ea|0)==8){ec(1232,544,118,17296)}else if((ea|0)==11){ec(17016,544,119,17296)}else if((ea|0)==15){ec(1232,544,118,17296)}else if((ea|0)==18){ec(17016,544,119,17296)}}function Gi(d,e,f,g,h,j,k,l,m,n,o,p,q,r){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|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,D=0;s=i;i=i+32|0;t=s|0;u=s+8|0;v=s+16|0;w=s+24|0;x=w;y=t|0;Fi(d,f,e,g,h,j,k,l,m,n,o,p,q,y,u|0);q=(a[y]|0)==0;do{if(q){z=6}else{if((a[t+1|0]|0)==0){z=6;break}if((b[u>>1]|0)==(b[u+4>>1]|0)){if((b[u+2>>1]|0)==(b[u+6>>1]|0)){z=6;break}}a[v]=0}}while(0);if((z|0)==6){Ci(d,f,e,k,l,m,n,p,o,x,v)}if(q){A=0}else{x=r;C=c[u>>2]|0;b[x>>1]=C;b[x+2>>1]=C>>16;A=1}a:do{if((a[t+1|0]|0)==0){B=A}else{do{if(!q){if((b[u>>1]|0)!=(b[u+4>>1]|0)){break}if((b[u+2>>1]|0)==(b[u+6>>1]|0)){B=A;break a}}}while(0);x=r+(A<<2)|0;C=c[u+4>>2]|0;b[x>>1]=C;b[x+2>>1]=C>>16;B=A+1|0}}while(0);if((a[v]|0)==0){D=B}else{v=r+(B<<2)|0;C=c[w>>2]|0;b[v>>1]=C;b[v+2>>1]=C>>16;D=B+1|0}if((D|0)<2){B=D;do{b[r+(B<<2)>>1]=0;b[r+(B<<2)+2>>1]=0;B=B+1|0;}while((B|0)<2);i=s;return}if((D|0)==2){i=s;return}else{ec(2360,15536,1943,18152)}}function Hi(f,g,h,j,k,l,m,n,o,p,q,r,s){f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;s=s|0;var t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0;t=i;i=i+80|0;u=t|0;v=t+8|0;w=t+72|0;x=m+k|0;m=n+l|0;n=c[h+10368>>2]|0;y=k>>n;z=l>>n;if(!((y|0)>-1)){ec(1232,544,118,17296)}n=c[h+10372>>2]|0;if((y|0)>=(n|0)){ec(1232,544,118,17296)}if(!((z|0)>-1)){ec(17016,544,119,17296)}if((z|0)>=(c[h+10376>>2]|0)){ec(17016,544,119,17296)}A=(ga(n,z)|0)+y|0;y=(c[h+10360>>2]|0)+(A*3|0)|0;A=((d[y]|d[y+1|0]<<8)<<16>>16&65535)>>>8&255&3;if((A|0)==2){B=a[j+10|0]|0;D=12}else if((A|0)==1){A=j+10|0;y=a[A]|0;if((y&16)==0){E=A;D=11}else{B=y;D=12}}else{E=j+10|0;D=11}if((D|0)==11){y=u|0;A=0;do{z=a[E]&3;if((z<<24>>24|0)==1){if((A|0)==0){D=20}else{D=19}}else if((z<<24>>24|0)==3){D=20}else if((z<<24>>24|0)==2){if((A|0)==1){D=20}else{D=19}}else{D=19}if((D|0)==19){D=0;a[s+2+A|0]=-1;a[s+A|0]=0}else if((D|0)==20){D=0;z=a[j+A|0]|0;a[s+2+A|0]=z;a[s+A|0]=1;n=b[j+2+(A<<2)+2>>1]|0;F=e[j+2+(A<<2)>>1]|0;Gi(f,g,h,k,l,o,x,m,p,q,A,z<<24>>24,r,y);z=u+(((d[E]|0)>>>(((A|0)!=0?3:2)>>>0)&1)<<2)|0;G=e[z>>1]|e[z+2>>1]<<16;z=w+(A<<2)|0;C=G;b[z>>1]=C;b[z+2>>1]=C>>16;z=(b[w+(A<<2)+2>>1]|0)+n&65535;b[s+4+(A<<2)>>1]=G+F;b[s+4+(A<<2)+2>>1]=z}A=A+1|0;}while((A|0)<2);i=t;return}else if((D|0)==12){D=(B&255)>>>5&255;Ei(f,g,h,k,l,x,m,o,p,q,r,D,v|0);r=s|0;o=v+(D*12|0)|0;b[r>>1]=b[o>>1]|0;b[r+2>>1]=b[o+2>>1]|0;b[r+4>>1]=b[o+4>>1]|0;b[r+6>>1]=b[o+6>>1]|0;b[r+8>>1]=b[o+8>>1]|0;b[r+10>>1]=b[o+10>>1]|0;if((a[r]|0)==0){i=t;return}r=s+1|0;if((a[r]|0)==0){i=t;return}if((q+p|0)!=12){i=t;return}a[s+3|0]=-1;a[r]=0;i=t;return}}function Ii(a,b,c,d,e,f,g,h,j,k,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;k=k|0;l=l|0;m=m|0;var n=0,o=0;n=i;i=i+16|0;o=n|0;Hi(a,b,c,d,e,f,g,h,j,k,l,m,o);ui(a,b,c,e,f,g,h,j,k,l,o);ai(c,g+e|0,h+f|0,k,l,o);i=n;return}function Ji(b,c){b=b|0;c=c|0;var d=0;od(c,1);d=(nd(c,6)|0)&255;a[b|0]=d;d=(nd(c,6)|0)&255;a[b+1|0]=d;d=(nd(c,3)|0)+255&255;a[b+2|0]=d;return}function Ki(a){a=a|0;return(a-19&255)>>>0<2>>>0|0}function Li(a){a=a|0;return(a-16&255)>>>0<3>>>0|0}function Mi(a){a=a|0;return(a&-2)<<24>>24==8|0}function Ni(a){a=a|0;return(a-16&255)>>>0<8>>>0|0}function Oi(a){a=a|0;return(a&-2)<<24>>24==6|0}function Pi(a){a=a|0;var b=0;switch(a&255|0){case 0:case 2:case 4:case 6:case 8:case 10:case 12:case 14:{b=1;break};default:{b=0}}return b|0}function Qi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[a+32>>2]|0;f=(c[a+36>>2]|0)-e>>2;while(1){a=f-1|0;if(!((a|0)>-1)){g=0;h=4;break}if(((c[e+(a<<2)>>2]|0)-d|0)>(b|0)){f=a}else{g=f;h=4;break}}if((h|0)==4){return g|0}return 0}function Ri(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=i;i=i+8|0;e=d|0;f=b+24|0;g=c[f>>2]|0;if((g-2|0)<=0){i=d;return}h=b+36|0;j=b+32|0;k=b+40|0;l=b+32|0;m=c[b+20>>2]|0;b=0;n=g;while(1){g=m+2|0;o=a[g]|0;do{if((o<<24>>24|0)==3|(o<<24>>24|0)==0){if((a[m]|0)!=0){p=b;q=m;r=n;break}s=m+1|0;if(!((a[s]|0)==0&o<<24>>24==3)){p=b;q=m;r=n;break}t=c[h>>2]|0;u=b+2+(t-(c[j>>2]|0)>>2)|0;c[e>>2]=u;if((t|0)==(c[k>>2]|0)){fj(l,e)}else{if((t|0)!=0){c[t>>2]=u}c[h>>2]=t+4}fv(g|0,m+3|0,-3-b+(c[f>>2]|0)|0)|0;t=(c[f>>2]|0)-1|0;c[f>>2]=t;p=b+1|0;q=s;r=t}else{p=b+2|0;q=g;r=n}}while(0);g=p+1|0;if((g|0)<(r-2|0)){m=q+1|0;b=g;n=r}else{break}}i=d;return}function Si(b){b=b|0;a[b|0]=0;a[b+1|0]=0;dv(b+4|0,0,48)|0;return}function Ti(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+32|0;d=a+16|0;e=a+28|0;f=a+36|0;while(1){g=c[b>>2]|0;if((g|0)==0){break}h=c[d>>2]|0;i=c[e>>2]|0;j=c[(c[h+(i>>>10<<2)>>2]|0)+((i&1023)<<2)>>2]|0;c[b>>2]=g-1;g=i+1|0;c[e>>2]=g;if(g>>>0>2047>>>0){Pu(c[h>>2]|0);c[d>>2]=(c[d>>2]|0)+4;c[e>>2]=(c[e>>2]|0)-1024}c[f>>2]=(c[f>>2]|0)-(c[j+24>>2]|0);if((j|0)==0){break}Vi(a,j)}f=c[a+8>>2]|0;if((f|0)!=0){Vi(a,f)}f=a+44|0;e=c[f>>2]|0;b=a+40|0;j=c[b>>2]|0;if((e|0)==(j|0)){k=e;l=e;m=j}else{h=0;g=j;j=e;while(1){e=c[g+(h<<2)>>2]|0;if((e|0)==0){n=j;o=g}else{Hu(c[e+20>>2]|0);i=c[e+32>>2]|0;if((i|0)!=0){p=e+36|0;q=c[p>>2]|0;if((q|0)!=(i|0)){c[p>>2]=q+(~((q-4+(-i|0)|0)>>>2)<<2)}Pu(i)}Pu(e|0);n=c[f>>2]|0;o=c[b>>2]|0}e=h+1|0;i=o;if(e>>>0<n-i>>2>>>0){h=e;g=o;j=n}else{k=n;l=o;m=i;break}}}if((l|0)!=0){if((k|0)!=(l|0)){c[f>>2]=k+(~((k-4+(-m|0)|0)>>>2)<<2)}Pu(l)}l=a+12|0;gj(l|0);m=c[d>>2]|0;k=a+20|0;a=c[k>>2]|0;do{if((m|0)!=(a|0)){f=m;do{Pu(c[f>>2]|0);f=f+4|0;}while((f|0)!=(a|0));f=c[d>>2]|0;o=c[k>>2]|0;if((o|0)==(f|0)){break}c[k>>2]=o+(~((o-4+(-f|0)|0)>>>2)<<2)}}while(0);k=c[l>>2]|0;if((k|0)==0){return}Pu(k);return}function Ui(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=a+32|0;d=c[b>>2]|0;if((d|0)==0){e=0;return e|0}f=a+16|0;g=c[f>>2]|0;h=a+28|0;i=c[h>>2]|0;j=c[(c[g+(i>>>10<<2)>>2]|0)+((i&1023)<<2)>>2]|0;c[b>>2]=d-1;d=i+1|0;c[h>>2]=d;if(d>>>0>2047>>>0){Pu(c[g>>2]|0);c[f>>2]=(c[f>>2]|0)+4;c[h>>2]=(c[h>>2]|0)-1024}h=a+36|0;c[h>>2]=(c[h>>2]|0)-(c[j+24>>2]|0);e=j;return e|0}function Vi(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+8|0;e=d|0;c[e>>2]=b;if((b|0)==0){i=d;return}f=a+40|0;g=a+44|0;h=c[g>>2]|0;if(!(h-(c[f>>2]|0)>>2>>>0<16>>>0)){Hu(c[b+20>>2]|0);j=c[b+32>>2]|0;if((j|0)!=0){k=b+36|0;l=c[k>>2]|0;if((l|0)!=(j|0)){c[k>>2]=l+(~((l-4+(-j|0)|0)>>>2)<<2)}Pu(j)}Pu(b|0);i=d;return}if((h|0)==(c[a+48>>2]|0)){ej(f,e);i=d;return}if((h|0)==0){m=0}else{c[h>>2]=b;m=c[g>>2]|0}c[g>>2]=m+4;i=d;return}function Wi(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=b+44|0;f=c[e>>2]|0;if((f|0)==(c[b+40>>2]|0)){g=Nu(48)|0;a[g]=0;a[g+1|0]=0;a[g+2|0]=0;h=g+32|0;c[h>>2]=0;i=g+36|0;c[i>>2]=0;j=g+40|0;c[j>>2]=0;k=Nu(64)|0;l=k;c[i>>2]=l;c[h>>2]=l;h=k+64|0;c[j>>2]=h;if((k|0)!=0){c[l>>2]=0}dv(k+4|0,0,60)|0;c[i>>2]=h;dv(g+8|0,0,24)|0;m=g}else{g=f-4|0;h=c[g>>2]|0;c[e>>2]=f+(~((g+(-g|0)|0)>>>2)<<2);m=h}a[m|0]=0;a[m+1|0]=0;a[m+2|0]=0;h=m+8|0;c[h>>2]=0;c[h+4>>2]=0;c[m+16>>2]=0;h=m+24|0;c[h>>2]=0;g=c[m+32>>2]|0;f=m+36|0;e=c[f>>2]|0;if((e|0)!=(g|0)){c[f>>2]=e+(~((e-4+(-g|0)|0)>>>2)<<2)}g=m+28|0;if((c[g>>2]|0)>=(d|0)){n=m;return n|0}e=Gu(d)|0;if((e|0)==0){Vi(b,m);n=0;return n|0}b=m+20|0;f=c[b>>2]|0;if((f|0)!=0){cv(e|0,f|0,c[h>>2]|0)|0;Hu(f)}c[b>>2]=e;c[g>>2]=d;n=m;return n|0}
|
|
|
|
|
|
|
|
function Do(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=i;i=i+328|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+104|0;m=d+112|0;n=d+128|0;o=d+144|0;p=d+152|0;q=d+312|0;r=d+320|0;s=c[g+4>>2]&74;if((s|0)==0){t=0}else if((s|0)==8){t=16}else if((s|0)==64){t=8}else{t=10}s=k|0;Zo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=c[l>>2]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=1;B=0}else{C=c[u+12>>2]|0;if((C|0)==(c[u+16>>2]|0)){D=Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0}else{D=c[C>>2]|0}if(!((D|0)==-1)){A=0;B=u;break}c[x>>2]=0;A=1;B=0}}while(0);C=c[e>>2]|0;do{if((C|0)==0){E=22}else{F=c[C+12>>2]|0;if((F|0)==(c[C+16>>2]|0)){G=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{G=c[F>>2]|0}if((G|0)==-1){c[e>>2]=0;E=22;break}else{if(A){H=C;break}else{I=l;J=C;break a}}}}while(0);if((E|0)==22){E=0;if(A){I=l;J=0;break}else{H=0}}C=a[g]|0;F=(C&1)==0;if(F){K=(C&255)>>>1}else{K=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(K|0)){if(F){L=(C&255)>>>1;M=(C&255)>>>1}else{C=c[y>>2]|0;L=C;M=C}tm(n,L<<1,0);if((a[g]&1)==0){N=10}else{N=(c[f>>2]&-2)-1|0}tm(n,N,0);if((a[g]&1)==0){O=v}else{O=c[w>>2]|0}c[o>>2]=O+M;P=O}else{P=l}C=B+12|0;F=c[C>>2]|0;Q=B+16|0;if((F|0)==(c[Q>>2]|0)){R=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{R=c[F>>2]|0}if((Vo(R,t,P,o,r,z,m,k,q,s)|0)!=0){I=P;J=H;break}F=c[C>>2]|0;if((F|0)==(c[Q>>2]|0)){Fc[c[(c[B>>2]|0)+40>>2]&255](B)|0;l=P;u=B;continue}else{c[C>>2]=F+4;l=P;u=B;continue}}u=a[m]|0;if((u&1)==0){S=(u&255)>>>1}else{S=c[m+4>>2]|0}do{if((S|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}P=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=P}}while(0);r=Rt(I,c[o>>2]|0,h,t)|0;c[j>>2]=r;hr(m,k,c[q>>2]|0,h);do{if((B|0)==0){T=1;U=0}else{q=c[B+12>>2]|0;if((q|0)==(c[B+16>>2]|0)){V=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{V=c[q>>2]|0}if(!((V|0)==-1)){T=0;U=B;break}c[x>>2]=0;T=1;U=0}}while(0);do{if((J|0)==0){E=67}else{x=c[J+12>>2]|0;if((x|0)==(c[J+16>>2]|0)){W=Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0}else{W=c[x>>2]|0}if((W|0)==-1){c[e>>2]=0;E=67;break}if(!T){break}X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}}while(0);do{if((E|0)==67){if(T){break}X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}}while(0);c[h>>2]=c[h>>2]|2;X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}function Eo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Fo(a,0,j,k,f,g,h);i=b;return}function Fo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,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;d=i;i=i+328|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+104|0;m=d+112|0;n=d+128|0;o=d+144|0;p=d+152|0;q=d+312|0;r=d+320|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==0){t=0}else if((s|0)==8){t=16}else{t=10}s=k|0;Zo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=c[l>>2]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=1;B=0}else{C=c[u+12>>2]|0;if((C|0)==(c[u+16>>2]|0)){D=Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0}else{D=c[C>>2]|0}if(!((D|0)==-1)){A=0;B=u;break}c[x>>2]=0;A=1;B=0}}while(0);C=c[e>>2]|0;do{if((C|0)==0){E=22}else{F=c[C+12>>2]|0;if((F|0)==(c[C+16>>2]|0)){G=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{G=c[F>>2]|0}if((G|0)==-1){c[e>>2]=0;E=22;break}else{if(A){H=C;break}else{I=l;J=C;break a}}}}while(0);if((E|0)==22){E=0;if(A){I=l;J=0;break}else{H=0}}C=a[g]|0;F=(C&1)==0;if(F){L=(C&255)>>>1}else{L=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(L|0)){if(F){M=(C&255)>>>1;N=(C&255)>>>1}else{C=c[y>>2]|0;M=C;N=C}tm(n,M<<1,0);if((a[g]&1)==0){O=10}else{O=(c[f>>2]&-2)-1|0}tm(n,O,0);if((a[g]&1)==0){P=v}else{P=c[w>>2]|0}c[o>>2]=P+N;Q=P}else{Q=l}C=B+12|0;F=c[C>>2]|0;R=B+16|0;if((F|0)==(c[R>>2]|0)){S=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{S=c[F>>2]|0}if((Vo(S,t,Q,o,r,z,m,k,q,s)|0)!=0){I=Q;J=H;break}F=c[C>>2]|0;if((F|0)==(c[R>>2]|0)){Fc[c[(c[B>>2]|0)+40>>2]&255](B)|0;l=Q;u=B;continue}else{c[C>>2]=F+4;l=Q;u=B;continue}}u=a[m]|0;if((u&1)==0){T=(u&255)>>>1}else{T=c[m+4>>2]|0}do{if((T|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}Q=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=Q}}while(0);r=Qt(I,c[o>>2]|0,h,t)|0;c[j>>2]=r;c[j+4>>2]=K;hr(m,k,c[q>>2]|0,h);do{if((B|0)==0){U=1;V=0}else{q=c[B+12>>2]|0;if((q|0)==(c[B+16>>2]|0)){W=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{W=c[q>>2]|0}if(!((W|0)==-1)){U=0;V=B;break}c[x>>2]=0;U=1;V=0}}while(0);do{if((J|0)==0){E=67}else{x=c[J+12>>2]|0;if((x|0)==(c[J+16>>2]|0)){X=Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0}else{X=c[x>>2]|0}if((X|0)==-1){c[e>>2]=0;E=67;break}if(!U){break}Y=b|0;c[Y>>2]=V;Z=160;_=0;rm(n);rm(m);$=104;aa=0;i=d;return}}while(0);do{if((E|0)==67){if(U){break}Y=b|0;c[Y>>2]=V;Z=160;_=0;rm(n);rm(m);$=104;aa=0;i=d;return}}while(0);c[h>>2]=c[h>>2]|2;Y=b|0;c[Y>>2]=V;Z=160;_=0;rm(n);rm(m);$=104;aa=0;i=d;return}function Go(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Ho(a,0,j,k,f,g,h);i=b;return}function Ho(d,e,f,g,h,j,k){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;e=i;i=i+328|0;l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=g;g=i;i=i+4|0;i=i+7&-8;c[g>>2]=c[l>>2];l=e|0;m=e+104|0;n=e+112|0;o=e+128|0;p=e+144|0;q=e+152|0;r=e+312|0;s=e+320|0;t=c[h+4>>2]&74;if((t|0)==0){u=0}else if((t|0)==8){u=16}else if((t|0)==64){u=8}else{u=10}t=l|0;Zo(n,h,t,m);h=o;dv(h|0,0,12)|0;tm(o,10,0);if((a[h]&1)==0){l=o+1|0;v=l;w=l;x=o+8|0}else{l=o+8|0;v=c[l>>2]|0;w=o+1|0;x=l}c[p>>2]=v;l=q|0;c[r>>2]=l;c[s>>2]=0;y=f|0;f=g|0;g=o|0;z=o+4|0;A=c[m>>2]|0;m=v;v=c[y>>2]|0;a:while(1){do{if((v|0)==0){B=1;C=0}else{D=c[v+12>>2]|0;if((D|0)==(c[v+16>>2]|0)){E=Fc[c[(c[v>>2]|0)+36>>2]&255](v)|0}else{E=c[D>>2]|0}if(!((E|0)==-1)){B=0;C=v;break}c[y>>2]=0;B=1;C=0}}while(0);D=c[f>>2]|0;do{if((D|0)==0){F=22}else{G=c[D+12>>2]|0;if((G|0)==(c[D+16>>2]|0)){H=Fc[c[(c[D>>2]|0)+36>>2]&255](D)|0}else{H=c[G>>2]|0}if((H|0)==-1){c[f>>2]=0;F=22;break}else{if(B){I=D;break}else{J=m;K=D;break a}}}}while(0);if((F|0)==22){F=0;if(B){J=m;K=0;break}else{I=0}}D=a[h]|0;G=(D&1)==0;if(G){L=(D&255)>>>1}else{L=c[z>>2]|0}if(((c[p>>2]|0)-m|0)==(L|0)){if(G){M=(D&255)>>>1;N=(D&255)>>>1}else{D=c[z>>2]|0;M=D;N=D}tm(o,M<<1,0);if((a[h]&1)==0){O=10}else{O=(c[g>>2]&-2)-1|0}tm(o,O,0);if((a[h]&1)==0){P=w}else{P=c[x>>2]|0}c[p>>2]=P+N;Q=P}else{Q=m}D=C+12|0;G=c[D>>2]|0;R=C+16|0;if((G|0)==(c[R>>2]|0)){S=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{S=c[G>>2]|0}if((Vo(S,u,Q,p,s,A,n,l,r,t)|0)!=0){J=Q;K=I;break}G=c[D>>2]|0;if((G|0)==(c[R>>2]|0)){Fc[c[(c[C>>2]|0)+40>>2]&255](C)|0;m=Q;v=C;continue}else{c[D>>2]=G+4;m=Q;v=C;continue}}v=a[n]|0;if((v&1)==0){T=(v&255)>>>1}else{T=c[n+4>>2]|0}do{if((T|0)!=0){v=c[r>>2]|0;if((v-q|0)>=160){break}Q=c[s>>2]|0;c[r>>2]=v+4;c[v>>2]=Q}}while(0);s=Pt(J,c[p>>2]|0,j,u)|0;b[k>>1]=s;hr(n,l,c[r>>2]|0,j);do{if((C|0)==0){U=1;V=0}else{r=c[C+12>>2]|0;if((r|0)==(c[C+16>>2]|0)){W=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{W=c[r>>2]|0}if(!((W|0)==-1)){U=0;V=C;break}c[y>>2]=0;U=1;V=0}}while(0);do{if((K|0)==0){F=67}else{y=c[K+12>>2]|0;if((y|0)==(c[K+16>>2]|0)){X=Fc[c[(c[K>>2]|0)+36>>2]&255](K)|0}else{X=c[y>>2]|0}if((X|0)==-1){c[f>>2]=0;F=67;break}if(!U){break}Y=d|0;c[Y>>2]=V;Z=160;_=0;rm(o);rm(n);$=104;aa=0;i=e;return}}while(0);do{if((F|0)==67){if(U){break}Y=d|0;c[Y>>2]=V;Z=160;_=0;rm(o);rm(n);$=104;aa=0;i=e;return}}while(0);c[j>>2]=c[j>>2]|2;Y=d|0;c[Y>>2]=V;Z=160;_=0;rm(o);rm(n);$=104;aa=0;i=e;return}function Io(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Jo(a,0,j,k,f,g,h);i=b;return}function Jo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=i;i=i+328|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+104|0;m=d+112|0;n=d+128|0;o=d+144|0;p=d+152|0;q=d+312|0;r=d+320|0;s=c[g+4>>2]&74;if((s|0)==0){t=0}else if((s|0)==64){t=8}else if((s|0)==8){t=16}else{t=10}s=k|0;Zo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=c[l>>2]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=1;B=0}else{C=c[u+12>>2]|0;if((C|0)==(c[u+16>>2]|0)){D=Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0}else{D=c[C>>2]|0}if(!((D|0)==-1)){A=0;B=u;break}c[x>>2]=0;A=1;B=0}}while(0);C=c[e>>2]|0;do{if((C|0)==0){E=22}else{F=c[C+12>>2]|0;if((F|0)==(c[C+16>>2]|0)){G=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{G=c[F>>2]|0}if((G|0)==-1){c[e>>2]=0;E=22;break}else{if(A){H=C;break}else{I=l;J=C;break a}}}}while(0);if((E|0)==22){E=0;if(A){I=l;J=0;break}else{H=0}}C=a[g]|0;F=(C&1)==0;if(F){K=(C&255)>>>1}else{K=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(K|0)){if(F){L=(C&255)>>>1;M=(C&255)>>>1}else{C=c[y>>2]|0;L=C;M=C}tm(n,L<<1,0);if((a[g]&1)==0){N=10}else{N=(c[f>>2]&-2)-1|0}tm(n,N,0);if((a[g]&1)==0){O=v}else{O=c[w>>2]|0}c[o>>2]=O+M;P=O}else{P=l}C=B+12|0;F=c[C>>2]|0;Q=B+16|0;if((F|0)==(c[Q>>2]|0)){R=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{R=c[F>>2]|0}if((Vo(R,t,P,o,r,z,m,k,q,s)|0)!=0){I=P;J=H;break}F=c[C>>2]|0;if((F|0)==(c[Q>>2]|0)){Fc[c[(c[B>>2]|0)+40>>2]&255](B)|0;l=P;u=B;continue}else{c[C>>2]=F+4;l=P;u=B;continue}}u=a[m]|0;if((u&1)==0){S=(u&255)>>>1}else{S=c[m+4>>2]|0}do{if((S|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}P=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=P}}while(0);r=Ot(I,c[o>>2]|0,h,t)|0;c[j>>2]=r;hr(m,k,c[q>>2]|0,h);do{if((B|0)==0){T=1;U=0}else{q=c[B+12>>2]|0;if((q|0)==(c[B+16>>2]|0)){V=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{V=c[q>>2]|0}if(!((V|0)==-1)){T=0;U=B;break}c[x>>2]=0;T=1;U=0}}while(0);do{if((J|0)==0){E=67}else{x=c[J+12>>2]|0;if((x|0)==(c[J+16>>2]|0)){W=Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0}else{W=c[x>>2]|0}if((W|0)==-1){c[e>>2]=0;E=67;break}if(!T){break}X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}}while(0);do{if((E|0)==67){if(T){break}X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}}while(0);c[h>>2]=c[h>>2]|2;X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}function Ko(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Lo(a,0,j,k,f,g,h);i=b;return}function Lo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=i;i=i+328|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+104|0;m=d+112|0;n=d+128|0;o=d+144|0;p=d+152|0;q=d+312|0;r=d+320|0;s=c[g+4>>2]&74;if((s|0)==0){t=0}else if((s|0)==8){t=16}else if((s|0)==64){t=8}else{t=10}s=k|0;Zo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=c[l>>2]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=1;B=0}else{C=c[u+12>>2]|0;if((C|0)==(c[u+16>>2]|0)){D=Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0}else{D=c[C>>2]|0}if(!((D|0)==-1)){A=0;B=u;break}c[x>>2]=0;A=1;B=0}}while(0);C=c[e>>2]|0;do{if((C|0)==0){E=22}else{F=c[C+12>>2]|0;if((F|0)==(c[C+16>>2]|0)){G=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{G=c[F>>2]|0}if((G|0)==-1){c[e>>2]=0;E=22;break}else{if(A){H=C;break}else{I=l;J=C;break a}}}}while(0);if((E|0)==22){E=0;if(A){I=l;J=0;break}else{H=0}}C=a[g]|0;F=(C&1)==0;if(F){K=(C&255)>>>1}else{K=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(K|0)){if(F){L=(C&255)>>>1;M=(C&255)>>>1}else{C=c[y>>2]|0;L=C;M=C}tm(n,L<<1,0);if((a[g]&1)==0){N=10}else{N=(c[f>>2]&-2)-1|0}tm(n,N,0);if((a[g]&1)==0){O=v}else{O=c[w>>2]|0}c[o>>2]=O+M;P=O}else{P=l}C=B+12|0;F=c[C>>2]|0;Q=B+16|0;if((F|0)==(c[Q>>2]|0)){R=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{R=c[F>>2]|0}if((Vo(R,t,P,o,r,z,m,k,q,s)|0)!=0){I=P;J=H;break}F=c[C>>2]|0;if((F|0)==(c[Q>>2]|0)){Fc[c[(c[B>>2]|0)+40>>2]&255](B)|0;l=P;u=B;continue}else{c[C>>2]=F+4;l=P;u=B;continue}}u=a[m]|0;if((u&1)==0){S=(u&255)>>>1}else{S=c[m+4>>2]|0}do{if((S|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}P=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=P}}while(0);r=Nt(I,c[o>>2]|0,h,t)|0;c[j>>2]=r;hr(m,k,c[q>>2]|0,h);do{if((B|0)==0){T=1;U=0}else{q=c[B+12>>2]|0;if((q|0)==(c[B+16>>2]|0)){V=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{V=c[q>>2]|0}if(!((V|0)==-1)){T=0;U=B;break}c[x>>2]=0;T=1;U=0}}while(0);do{if((J|0)==0){E=67}else{x=c[J+12>>2]|0;if((x|0)==(c[J+16>>2]|0)){W=Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0}else{W=c[x>>2]|0}if((W|0)==-1){c[e>>2]=0;E=67;break}if(!T){break}X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}}while(0);do{if((E|0)==67){if(T){break}X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}}while(0);c[h>>2]=c[h>>2]|2;X=b|0;c[X>>2]=U;Y=160;Z=0;rm(n);rm(m);_=104;$=0;i=d;return}function Mo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];No(a,0,j,k,f,g,h);i=b;return}function No(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,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;d=i;i=i+328|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+104|0;m=d+112|0;n=d+128|0;o=d+144|0;p=d+152|0;q=d+312|0;r=d+320|0;s=c[g+4>>2]&74;if((s|0)==64){t=8}else if((s|0)==0){t=0}else if((s|0)==8){t=16}else{t=10}s=k|0;Zo(m,g,s,l);g=n;dv(g|0,0,12)|0;tm(n,10,0);if((a[g]&1)==0){k=n+1|0;u=k;v=k;w=n+8|0}else{k=n+8|0;u=c[k>>2]|0;v=n+1|0;w=k}c[o>>2]=u;k=p|0;c[q>>2]=k;c[r>>2]=0;x=e|0;e=f|0;f=n|0;y=n+4|0;z=c[l>>2]|0;l=u;u=c[x>>2]|0;a:while(1){do{if((u|0)==0){A=1;B=0}else{C=c[u+12>>2]|0;if((C|0)==(c[u+16>>2]|0)){D=Fc[c[(c[u>>2]|0)+36>>2]&255](u)|0}else{D=c[C>>2]|0}if(!((D|0)==-1)){A=0;B=u;break}c[x>>2]=0;A=1;B=0}}while(0);C=c[e>>2]|0;do{if((C|0)==0){E=22}else{F=c[C+12>>2]|0;if((F|0)==(c[C+16>>2]|0)){G=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{G=c[F>>2]|0}if((G|0)==-1){c[e>>2]=0;E=22;break}else{if(A){H=C;break}else{I=l;J=C;break a}}}}while(0);if((E|0)==22){E=0;if(A){I=l;J=0;break}else{H=0}}C=a[g]|0;F=(C&1)==0;if(F){L=(C&255)>>>1}else{L=c[y>>2]|0}if(((c[o>>2]|0)-l|0)==(L|0)){if(F){M=(C&255)>>>1;N=(C&255)>>>1}else{C=c[y>>2]|0;M=C;N=C}tm(n,M<<1,0);if((a[g]&1)==0){O=10}else{O=(c[f>>2]&-2)-1|0}tm(n,O,0);if((a[g]&1)==0){P=v}else{P=c[w>>2]|0}c[o>>2]=P+N;Q=P}else{Q=l}C=B+12|0;F=c[C>>2]|0;R=B+16|0;if((F|0)==(c[R>>2]|0)){S=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{S=c[F>>2]|0}if((Vo(S,t,Q,o,r,z,m,k,q,s)|0)!=0){I=Q;J=H;break}F=c[C>>2]|0;if((F|0)==(c[R>>2]|0)){Fc[c[(c[B>>2]|0)+40>>2]&255](B)|0;l=Q;u=B;continue}else{c[C>>2]=F+4;l=Q;u=B;continue}}u=a[m]|0;if((u&1)==0){T=(u&255)>>>1}else{T=c[m+4>>2]|0}do{if((T|0)!=0){u=c[q>>2]|0;if((u-p|0)>=160){break}Q=c[r>>2]|0;c[q>>2]=u+4;c[u>>2]=Q}}while(0);r=Mt(I,c[o>>2]|0,h,t)|0;c[j>>2]=r;c[j+4>>2]=K;hr(m,k,c[q>>2]|0,h);do{if((B|0)==0){U=1;V=0}else{q=c[B+12>>2]|0;if((q|0)==(c[B+16>>2]|0)){W=Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0}else{W=c[q>>2]|0}if(!((W|0)==-1)){U=0;V=B;break}c[x>>2]=0;U=1;V=0}}while(0);do{if((J|0)==0){E=67}else{x=c[J+12>>2]|0;if((x|0)==(c[J+16>>2]|0)){X=Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0}else{X=c[x>>2]|0}if((X|0)==-1){c[e>>2]=0;E=67;break}if(!U){break}Y=b|0;c[Y>>2]=V;Z=160;_=0;rm(n);rm(m);$=104;aa=0;i=d;return}}while(0);do{if((E|0)==67){if(U){break}Y=b|0;c[Y>>2]=V;Z=160;_=0;rm(n);rm(m);$=104;aa=0;i=d;return}}while(0);c[h>>2]=c[h>>2]|2;Y=b|0;c[Y>>2]=V;Z=160;_=0;rm(n);rm(m);$=104;aa=0;i=d;return}function Oo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Po(a,0,j,k,f,g,h);i=b;return}function Po(b,d,e,f,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;d=i;i=i+376|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d+128|0;m=d+136|0;n=d+144|0;o=d+160|0;p=d+176|0;q=d+184|0;r=d+344|0;s=d+352|0;t=d+360|0;u=d+368|0;v=d|0;_o(n,h,v,l,m);h=o;dv(h|0,0,12)|0;tm(o,10,0);if((a[h]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;a[t]=1;a[u]=69;A=e|0;e=f|0;f=o|0;B=o+4|0;C=c[l>>2]|0;l=c[m>>2]|0;m=x;x=c[A>>2]|0;a:while(1){do{if((x|0)==0){D=1;E=0}else{F=c[x+12>>2]|0;if((F|0)==(c[x+16>>2]|0)){G=Fc[c[(c[x>>2]|0)+36>>2]&255](x)|0}else{G=c[F>>2]|0}if(!((G|0)==-1)){D=0;E=x;break}c[A>>2]=0;D=1;E=0}}while(0);F=c[e>>2]|0;do{if((F|0)==0){H=18}else{I=c[F+12>>2]|0;if((I|0)==(c[F+16>>2]|0)){J=Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0}else{J=c[I>>2]|0}if((J|0)==-1){c[e>>2]=0;H=18;break}else{if(D){K=F;break}else{L=m;M=F;break a}}}}while(0);if((H|0)==18){H=0;if(D){L=m;M=0;break}else{K=0}}F=a[h]|0;I=(F&1)==0;if(I){N=(F&255)>>>1}else{N=c[B>>2]|0}if(((c[p>>2]|0)-m|0)==(N|0)){if(I){O=(F&255)>>>1;P=(F&255)>>>1}else{F=c[B>>2]|0;O=F;P=F}tm(o,O<<1,0);if((a[h]&1)==0){Q=10}else{Q=(c[f>>2]&-2)-1|0}tm(o,Q,0);if((a[h]&1)==0){R=y}else{R=c[z>>2]|0}c[p>>2]=R+P;S=R}else{S=m}F=E+12|0;I=c[F>>2]|0;T=E+16|0;if((I|0)==(c[T>>2]|0)){U=Fc[c[(c[E>>2]|0)+36>>2]&255](E)|0}else{U=c[I>>2]|0}if(($o(U,t,u,S,p,C,l,n,w,r,s,v)|0)!=0){L=S;M=K;break}I=c[F>>2]|0;if((I|0)==(c[T>>2]|0)){Fc[c[(c[E>>2]|0)+40>>2]&255](E)|0;m=S;x=E;continue}else{c[F>>2]=I+4;m=S;x=E;continue}}x=a[n]|0;if((x&1)==0){V=(x&255)>>>1}else{V=c[n+4>>2]|0}do{if((V|0)!=0){if((a[t]|0)==0){break}x=c[r>>2]|0;if((x-q|0)>=160){break}S=c[s>>2]|0;c[r>>2]=x+4;c[x>>2]=S}}while(0);W=+Lt(L,c[p>>2]|0,j);g[k>>2]=W;hr(n,w,c[r>>2]|0,j);do{if((E|0)==0){X=1;Y=0}else{r=c[E+12>>2]|0;if((r|0)==(c[E+16>>2]|0)){Z=Fc[c[(c[E>>2]|0)+36>>2]&255](E)|0}else{Z=c[r>>2]|0}if(!((Z|0)==-1)){X=0;Y=E;break}c[A>>2]=0;X=1;Y=0}}while(0);do{if((M|0)==0){H=64}else{A=c[M+12>>2]|0;if((A|0)==(c[M+16>>2]|0)){_=Fc[c[(c[M>>2]|0)+36>>2]&255](M)|0}else{_=c[A>>2]|0}if((_|0)==-1){c[e>>2]=0;H=64;break}if(!X){break}$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}}while(0);do{if((H|0)==64){if(X){break}$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}}while(0);c[j>>2]=c[j>>2]|2;$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}function Qo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];Ro(a,0,j,k,f,g,h);i=b;return}function Ro(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;d=i;i=i+376|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d+128|0;m=d+136|0;n=d+144|0;o=d+160|0;p=d+176|0;q=d+184|0;r=d+344|0;s=d+352|0;t=d+360|0;u=d+368|0;v=d|0;_o(n,g,v,l,m);g=o;dv(g|0,0,12)|0;tm(o,10,0);if((a[g]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;a[t]=1;a[u]=69;A=e|0;e=f|0;f=o|0;B=o+4|0;C=c[l>>2]|0;l=c[m>>2]|0;m=x;x=c[A>>2]|0;a:while(1){do{if((x|0)==0){D=1;E=0}else{F=c[x+12>>2]|0;if((F|0)==(c[x+16>>2]|0)){G=Fc[c[(c[x>>2]|0)+36>>2]&255](x)|0}else{G=c[F>>2]|0}if(!((G|0)==-1)){D=0;E=x;break}c[A>>2]=0;D=1;E=0}}while(0);F=c[e>>2]|0;do{if((F|0)==0){H=18}else{I=c[F+12>>2]|0;if((I|0)==(c[F+16>>2]|0)){J=Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0}else{J=c[I>>2]|0}if((J|0)==-1){c[e>>2]=0;H=18;break}else{if(D){K=F;break}else{L=m;M=F;break a}}}}while(0);if((H|0)==18){H=0;if(D){L=m;M=0;break}else{K=0}}F=a[g]|0;I=(F&1)==0;if(I){N=(F&255)>>>1}else{N=c[B>>2]|0}if(((c[p>>2]|0)-m|0)==(N|0)){if(I){O=(F&255)>>>1;P=(F&255)>>>1}else{F=c[B>>2]|0;O=F;P=F}tm(o,O<<1,0);if((a[g]&1)==0){Q=10}else{Q=(c[f>>2]&-2)-1|0}tm(o,Q,0);if((a[g]&1)==0){R=y}else{R=c[z>>2]|0}c[p>>2]=R+P;S=R}else{S=m}F=E+12|0;I=c[F>>2]|0;T=E+16|0;if((I|0)==(c[T>>2]|0)){U=Fc[c[(c[E>>2]|0)+36>>2]&255](E)|0}else{U=c[I>>2]|0}if(($o(U,t,u,S,p,C,l,n,w,r,s,v)|0)!=0){L=S;M=K;break}I=c[F>>2]|0;if((I|0)==(c[T>>2]|0)){Fc[c[(c[E>>2]|0)+40>>2]&255](E)|0;m=S;x=E;continue}else{c[F>>2]=I+4;m=S;x=E;continue}}x=a[n]|0;if((x&1)==0){V=(x&255)>>>1}else{V=c[n+4>>2]|0}do{if((V|0)!=0){if((a[t]|0)==0){break}x=c[r>>2]|0;if((x-q|0)>=160){break}S=c[s>>2]|0;c[r>>2]=x+4;c[x>>2]=S}}while(0);W=+Kt(L,c[p>>2]|0,j);h[k>>3]=W;hr(n,w,c[r>>2]|0,j);do{if((E|0)==0){X=1;Y=0}else{r=c[E+12>>2]|0;if((r|0)==(c[E+16>>2]|0)){Z=Fc[c[(c[E>>2]|0)+36>>2]&255](E)|0}else{Z=c[r>>2]|0}if(!((Z|0)==-1)){X=0;Y=E;break}c[A>>2]=0;X=1;Y=0}}while(0);do{if((M|0)==0){H=64}else{A=c[M+12>>2]|0;if((A|0)==(c[M+16>>2]|0)){_=Fc[c[(c[M>>2]|0)+36>>2]&255](M)|0}else{_=c[A>>2]|0}if((_|0)==-1){c[e>>2]=0;H=64;break}if(!X){break}$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}}while(0);do{if((H|0)==64){if(X){break}$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}}while(0);c[j>>2]=c[j>>2]|2;$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}function So(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;b=i;i=i+16|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;c[j>>2]=c[d>>2];c[k>>2]=c[e>>2];To(a,0,j,k,f,g,h);i=b;return}function To(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;d=i;i=i+376|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d+128|0;m=d+136|0;n=d+144|0;o=d+160|0;p=d+176|0;q=d+184|0;r=d+344|0;s=d+352|0;t=d+360|0;u=d+368|0;v=d|0;_o(n,g,v,l,m);g=o;dv(g|0,0,12)|0;tm(o,10,0);if((a[g]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;a[t]=1;a[u]=69;A=e|0;e=f|0;f=o|0;B=o+4|0;C=c[l>>2]|0;l=c[m>>2]|0;m=x;x=c[A>>2]|0;a:while(1){do{if((x|0)==0){D=1;E=0}else{F=c[x+12>>2]|0;if((F|0)==(c[x+16>>2]|0)){G=Fc[c[(c[x>>2]|0)+36>>2]&255](x)|0}else{G=c[F>>2]|0}if(!((G|0)==-1)){D=0;E=x;break}c[A>>2]=0;D=1;E=0}}while(0);F=c[e>>2]|0;do{if((F|0)==0){H=18}else{I=c[F+12>>2]|0;if((I|0)==(c[F+16>>2]|0)){J=Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0}else{J=c[I>>2]|0}if((J|0)==-1){c[e>>2]=0;H=18;break}else{if(D){K=F;break}else{L=m;M=F;break a}}}}while(0);if((H|0)==18){H=0;if(D){L=m;M=0;break}else{K=0}}F=a[g]|0;I=(F&1)==0;if(I){N=(F&255)>>>1}else{N=c[B>>2]|0}if(((c[p>>2]|0)-m|0)==(N|0)){if(I){O=(F&255)>>>1;P=(F&255)>>>1}else{F=c[B>>2]|0;O=F;P=F}tm(o,O<<1,0);if((a[g]&1)==0){Q=10}else{Q=(c[f>>2]&-2)-1|0}tm(o,Q,0);if((a[g]&1)==0){R=y}else{R=c[z>>2]|0}c[p>>2]=R+P;S=R}else{S=m}F=E+12|0;I=c[F>>2]|0;T=E+16|0;if((I|0)==(c[T>>2]|0)){U=Fc[c[(c[E>>2]|0)+36>>2]&255](E)|0}else{U=c[I>>2]|0}if(($o(U,t,u,S,p,C,l,n,w,r,s,v)|0)!=0){L=S;M=K;break}I=c[F>>2]|0;if((I|0)==(c[T>>2]|0)){Fc[c[(c[E>>2]|0)+40>>2]&255](E)|0;m=S;x=E;continue}else{c[F>>2]=I+4;m=S;x=E;continue}}x=a[n]|0;if((x&1)==0){V=(x&255)>>>1}else{V=c[n+4>>2]|0}do{if((V|0)!=0){if((a[t]|0)==0){break}x=c[r>>2]|0;if((x-q|0)>=160){break}S=c[s>>2]|0;c[r>>2]=x+4;c[x>>2]=S}}while(0);W=+Jt(L,c[p>>2]|0,j);h[k>>3]=W;hr(n,w,c[r>>2]|0,j);do{if((E|0)==0){X=1;Y=0}else{r=c[E+12>>2]|0;if((r|0)==(c[E+16>>2]|0)){Z=Fc[c[(c[E>>2]|0)+36>>2]&255](E)|0}else{Z=c[r>>2]|0}if(!((Z|0)==-1)){X=0;Y=E;break}c[A>>2]=0;X=1;Y=0}}while(0);do{if((M|0)==0){H=64}else{A=c[M+12>>2]|0;if((A|0)==(c[M+16>>2]|0)){_=Fc[c[(c[M>>2]|0)+36>>2]&255](M)|0}else{_=c[A>>2]|0}if((_|0)==-1){c[e>>2]=0;H=64;break}if(!X){break}$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}}while(0);do{if((H|0)==64){if(X){break}$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}}while(0);c[j>>2]=c[j>>2]|2;$=b|0;c[$>>2]=Y;aa=160;ba=0;rm(o);rm(n);ca=128;da=0;i=d;return}function Uo(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;d=i;i=i+344|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=d|0;l=d+16|0;m=d+120|0;n=d+136|0;o=d+144|0;p=d+160|0;q=d+168|0;r=d+328|0;s=d+336|0;dv(m|0,0,12)|0;Lm(n,g);g=n|0;n=c[g>>2]|0;if(!((c[8714]|0)==-1)){c[k>>2]=34856;c[k+4>>2]=16;c[k+8>>2]=0;mm(34856,k,114)}k=(c[8715]|0)-1|0;t=c[n+8>>2]|0;do{if((c[n+12>>2]|0)-t>>2>>>0>k>>>0){u=c[t+(k<<2)>>2]|0;if((u|0)==0){break}v=l|0;Sc[c[(c[u>>2]|0)+48>>2]&15](u,27208,27234,v)|0;Ul(c[g>>2]|0)|0;u=o;dv(u|0,0,12)|0;tm(o,10,0);if((a[u]&1)==0){w=o+1|0;x=w;y=w;z=o+8|0}else{w=o+8|0;x=c[w>>2]|0;y=o+1|0;z=w}c[p>>2]=x;w=q|0;c[r>>2]=w;c[s>>2]=0;A=e|0;B=f|0;C=o|0;D=o+4|0;E=x;F=c[A>>2]|0;a:while(1){do{if((F|0)==0){G=1;H=0}else{I=c[F+12>>2]|0;if((I|0)==(c[F+16>>2]|0)){J=Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0}else{J=c[I>>2]|0}if(!((J|0)==-1)){G=0;H=F;break}c[A>>2]=0;G=1;H=0}}while(0);I=c[B>>2]|0;do{if((I|0)==0){K=26}else{L=c[I+12>>2]|0;if((L|0)==(c[I+16>>2]|0)){M=Fc[c[(c[I>>2]|0)+36>>2]&255](I)|0}else{M=c[L>>2]|0}if((M|0)==-1){c[B>>2]=0;K=26;break}else{if(G){break}else{N=E;break a}}}}while(0);if((K|0)==26){K=0;if(G){N=E;break}}I=a[u]|0;L=(I&1)==0;if(L){O=(I&255)>>>1}else{O=c[D>>2]|0}if(((c[p>>2]|0)-E|0)==(O|0)){if(L){P=(I&255)>>>1;Q=(I&255)>>>1}else{I=c[D>>2]|0;P=I;Q=I}tm(o,P<<1,0);if((a[u]&1)==0){R=10}else{R=(c[C>>2]&-2)-1|0}tm(o,R,0);if((a[u]&1)==0){S=y}else{S=c[z>>2]|0}c[p>>2]=S+Q;T=S}else{T=E}I=H+12|0;L=c[I>>2]|0;U=H+16|0;if((L|0)==(c[U>>2]|0)){V=Fc[c[(c[H>>2]|0)+36>>2]&255](H)|0}else{V=c[L>>2]|0}if((Vo(V,16,T,p,s,0,m,w,r,v)|0)!=0){N=T;break}L=c[I>>2]|0;if((L|0)==(c[U>>2]|0)){Fc[c[(c[H>>2]|0)+40>>2]&255](H)|0;E=T;F=H;continue}else{c[I>>2]=L+4;E=T;F=H;continue}}a[N+3|0]=0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}F=Xa(2147483647,14472,0)|0;c[8330]=F}}while(0);F=xo(N,c[8330]|0,11744,(E=i,i=i+8|0,c[E>>2]=j,E)|0)|0;i=E;if((F|0)!=1){c[h>>2]=4}F=c[A>>2]|0;do{if((F|0)==0){W=1;X=0}else{E=c[F+12>>2]|0;if((E|0)==(c[F+16>>2]|0)){Y=Fc[c[(c[F>>2]|0)+36>>2]&255](F)|0}else{Y=c[E>>2]|0}if(!((Y|0)==-1)){W=0;X=F;break}c[A>>2]=0;W=1;X=0}}while(0);A=c[B>>2]|0;do{if((A|0)==0){K=74}else{F=c[A+12>>2]|0;if((F|0)==(c[A+16>>2]|0)){Z=Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0}else{Z=c[F>>2]|0}if((Z|0)==-1){c[B>>2]=0;K=74;break}if(!W){break}_=b|0;c[_>>2]=X;$=160;aa=0;rm(o);rm(m);ba=104;ca=0;i=d;return}}while(0);do{if((K|0)==74){if(W){break}_=b|0;c[_>>2]=X;$=160;aa=0;rm(o);rm(m);ba=104;ca=0;i=d;return}}while(0);c[h>>2]=c[h>>2]|2;_=b|0;c[_>>2]=X;$=160;aa=0;rm(o);rm(m);ba=104;ca=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function Vo(b,d,e,f,g,h,i,j,k,l){b=b|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;var m=0,n=0,o=0,p=0,q=0,r=0;m=c[f>>2]|0;n=(m|0)==(e|0);do{if(n){o=(c[l+96>>2]|0)==(b|0);if(!o){if((c[l+100>>2]|0)!=(b|0)){break}}c[f>>2]=e+1;a[e]=o?43:45;c[g>>2]=0;p=0;return p|0}}while(0);o=a[i]|0;if((o&1)==0){q=(o&255)>>>1}else{q=c[i+4>>2]|0}if((q|0)!=0&(b|0)==(h|0)){h=c[k>>2]|0;if((h-j|0)>=160){p=0;return p|0}j=c[g>>2]|0;c[k>>2]=h+4;c[h>>2]=j;c[g>>2]=0;p=0;return p|0}j=l+104|0;h=l;while(1){k=h+4|0;if((c[h>>2]|0)==(b|0)){r=h;break}if((k|0)==(j|0)){r=j;break}else{h=k}}h=r-l|0;l=h>>2;if((h|0)>92){p=-1;return p|0}do{if((d|0)==8|(d|0)==10){if((l|0)<(d|0)){break}else{p=-1}return p|0}else if((d|0)==16){if((h|0)<88){break}if(n){p=-1;return p|0}if((m-e|0)>=3){p=-1;return p|0}if((a[m-1|0]|0)!=48){p=-1;return p|0}c[g>>2]=0;r=a[27208+l|0]|0;c[f>>2]=m+1;a[m]=r;p=0;return p|0}}while(0);e=a[27208+l|0]|0;c[f>>2]=m+1;a[m]=e;c[g>>2]=(c[g>>2]|0)+1;p=0;return p|0}function Wo(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+40|0;h=g|0;j=g+16|0;k=g+32|0;Lm(k,d);d=k|0;k=c[d>>2]|0;if(!((c[8716]|0)==-1)){c[j>>2]=34864;c[j+4>>2]=16;c[j+8>>2]=0;mm(34864,j,114)}j=(c[8717]|0)-1|0;l=c[k+8>>2]|0;do{if((c[k+12>>2]|0)-l>>2>>>0>j>>>0){m=c[l+(j<<2)>>2]|0;if((m|0)==0){break}Sc[c[(c[m>>2]|0)+32>>2]&15](m,27208,27234,e)|0;m=c[d>>2]|0;if(!((c[8620]|0)==-1)){c[h>>2]=34480;c[h+4>>2]=16;c[h+8>>2]=0;mm(34480,h,114)}n=(c[8621]|0)-1|0;o=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-o>>2>>>0>n>>>0){p=c[o+(n<<2)>>2]|0;if((p|0)==0){break}q=p;r=Fc[c[(c[p>>2]|0)+16>>2]&255](q)|0;a[f]=r;Ec[c[(c[p>>2]|0)+20>>2]&127](b,q);Ul(c[d>>2]|0)|0;i=g;return}}while(0);n=pc(4)|0;lu(n);Fb(n|0,25544,156)}}while(0);g=pc(4)|0;lu(g);Fb(g|0,25544,156)}function Xo(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;h=i;i=i+40|0;j=h|0;k=h+16|0;l=h+32|0;Lm(l,d);d=l|0;l=c[d>>2]|0;if(!((c[8716]|0)==-1)){c[k>>2]=34864;c[k+4>>2]=16;c[k+8>>2]=0;mm(34864,k,114)}k=(c[8717]|0)-1|0;m=c[l+8>>2]|0;do{if((c[l+12>>2]|0)-m>>2>>>0>k>>>0){n=c[m+(k<<2)>>2]|0;if((n|0)==0){break}Sc[c[(c[n>>2]|0)+32>>2]&15](n,27208,27240,e)|0;n=c[d>>2]|0;if(!((c[8620]|0)==-1)){c[j>>2]=34480;c[j+4>>2]=16;c[j+8>>2]=0;mm(34480,j,114)}o=(c[8621]|0)-1|0;p=c[n+8>>2]|0;do{if((c[n+12>>2]|0)-p>>2>>>0>o>>>0){q=c[p+(o<<2)>>2]|0;if((q|0)==0){break}r=q;s=q;t=Fc[c[(c[s>>2]|0)+12>>2]&255](r)|0;a[f]=t;t=Fc[c[(c[s>>2]|0)+16>>2]&255](r)|0;a[g]=t;Ec[c[(c[q>>2]|0)+20>>2]&127](b,r);Ul(c[d>>2]|0)|0;i=h;return}}while(0);o=pc(4)|0;lu(o);Fb(o|0,25544,156)}}while(0);h=pc(4)|0;lu(h);Fb(h|0,25544,156)}function Yo(b,d,e,f,g,h,i,j,k,l,m,n){b=b|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;var o=0,p=0,q=0,r=0,s=0;if(b<<24>>24==h<<24>>24){if((a[d]|0)==0){o=-1;return o|0}a[d]=0;h=c[g>>2]|0;c[g>>2]=h+1;a[h]=46;h=a[j]|0;if((h&1)==0){p=(h&255)>>>1}else{p=c[j+4>>2]|0}if((p|0)==0){o=0;return o|0}p=c[l>>2]|0;if((p-k|0)>=160){o=0;return o|0}h=c[m>>2]|0;c[l>>2]=p+4;c[p>>2]=h;o=0;return o|0}do{if(b<<24>>24==i<<24>>24){h=a[j]|0;if((h&1)==0){q=(h&255)>>>1}else{q=c[j+4>>2]|0}if((q|0)==0){break}if((a[d]|0)==0){o=-1;return o|0}h=c[l>>2]|0;if((h-k|0)>=160){o=0;return o|0}p=c[m>>2]|0;c[l>>2]=h+4;c[h>>2]=p;c[m>>2]=0;o=0;return o|0}}while(0);q=n+32|0;i=n;while(1){p=i+1|0;if((a[i]|0)==b<<24>>24){r=i;break}if((p|0)==(q|0)){r=q;break}else{i=p}}i=r-n|0;if((i|0)>31){o=-1;return o|0}n=a[27208+i|0]|0;if((i|0)==25|(i|0)==24){r=c[g>>2]|0;do{if((r|0)!=(f|0)){if((a[r-1|0]&95|0)==(a[e]&127|0)){break}else{o=-1}return o|0}}while(0);c[g>>2]=r+1;a[r]=n;o=0;return o|0}else if((i|0)==22|(i|0)==23){a[e]=80;r=c[g>>2]|0;c[g>>2]=r+1;a[r]=n;o=0;return o|0}else{r=a[e]|0;do{if((n&95|0)==(r<<24>>24|0)){a[e]=r|-128;if((a[d]|0)==0){break}a[d]=0;f=a[j]|0;if((f&1)==0){s=(f&255)>>>1}else{s=c[j+4>>2]|0}if((s|0)==0){break}f=c[l>>2]|0;if((f-k|0)>=160){break}q=c[m>>2]|0;c[l>>2]=f+4;c[f>>2]=q}}while(0);l=c[g>>2]|0;c[g>>2]=l+1;a[l]=n;if((i|0)>21){o=0;return o|0}c[m>>2]=(c[m>>2]|0)+1;o=0;return o|0}return 0}function Zo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=i;i=i+40|0;g=f|0;h=f+16|0;j=f+32|0;Lm(j,b);b=j|0;j=c[b>>2]|0;if(!((c[8714]|0)==-1)){c[h>>2]=34856;c[h+4>>2]=16;c[h+8>>2]=0;mm(34856,h,114)}h=(c[8715]|0)-1|0;k=c[j+8>>2]|0;do{if((c[j+12>>2]|0)-k>>2>>>0>h>>>0){l=c[k+(h<<2)>>2]|0;if((l|0)==0){break}Sc[c[(c[l>>2]|0)+48>>2]&15](l,27208,27234,d)|0;l=c[b>>2]|0;if(!((c[8618]|0)==-1)){c[g>>2]=34472;c[g+4>>2]=16;c[g+8>>2]=0;mm(34472,g,114)}m=(c[8619]|0)-1|0;n=c[l+8>>2]|0;do{if((c[l+12>>2]|0)-n>>2>>>0>m>>>0){o=c[n+(m<<2)>>2]|0;if((o|0)==0){break}p=o;q=Fc[c[(c[o>>2]|0)+16>>2]&255](p)|0;c[e>>2]=q;Ec[c[(c[o>>2]|0)+20>>2]&127](a,p);Ul(c[b>>2]|0)|0;i=f;return}}while(0);m=pc(4)|0;lu(m);Fb(m|0,25544,156)}}while(0);f=pc(4)|0;lu(f);Fb(f|0,25544,156)}function _o(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=i;i=i+40|0;h=g|0;j=g+16|0;k=g+32|0;Lm(k,b);b=k|0;k=c[b>>2]|0;if(!((c[8714]|0)==-1)){c[j>>2]=34856;c[j+4>>2]=16;c[j+8>>2]=0;mm(34856,j,114)}j=(c[8715]|0)-1|0;l=c[k+8>>2]|0;do{if((c[k+12>>2]|0)-l>>2>>>0>j>>>0){m=c[l+(j<<2)>>2]|0;if((m|0)==0){break}Sc[c[(c[m>>2]|0)+48>>2]&15](m,27208,27240,d)|0;m=c[b>>2]|0;if(!((c[8618]|0)==-1)){c[h>>2]=34472;c[h+4>>2]=16;c[h+8>>2]=0;mm(34472,h,114)}n=(c[8619]|0)-1|0;o=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-o>>2>>>0>n>>>0){p=c[o+(n<<2)>>2]|0;if((p|0)==0){break}q=p;r=p;s=Fc[c[(c[r>>2]|0)+12>>2]&255](q)|0;c[e>>2]=s;s=Fc[c[(c[r>>2]|0)+16>>2]&255](q)|0;c[f>>2]=s;Ec[c[(c[p>>2]|0)+20>>2]&127](a,q);Ul(c[b>>2]|0)|0;i=g;return}}while(0);n=pc(4)|0;lu(n);Fb(n|0,25544,156)}}while(0);g=pc(4)|0;lu(g);Fb(g|0,25544,156)}function $o(b,d,e,f,g,h,i,j,k,l,m,n){b=b|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;var o=0,p=0,q=0,r=0,s=0;if((b|0)==(h|0)){if((a[d]|0)==0){o=-1;return o|0}a[d]=0;h=c[g>>2]|0;c[g>>2]=h+1;a[h]=46;h=a[j]|0;if((h&1)==0){p=(h&255)>>>1}else{p=c[j+4>>2]|0}if((p|0)==0){o=0;return o|0}p=c[l>>2]|0;if((p-k|0)>=160){o=0;return o|0}h=c[m>>2]|0;c[l>>2]=p+4;c[p>>2]=h;o=0;return o|0}do{if((b|0)==(i|0)){h=a[j]|0;if((h&1)==0){q=(h&255)>>>1}else{q=c[j+4>>2]|0}if((q|0)==0){break}if((a[d]|0)==0){o=-1;return o|0}h=c[l>>2]|0;if((h-k|0)>=160){o=0;return o|0}p=c[m>>2]|0;c[l>>2]=h+4;c[h>>2]=p;c[m>>2]=0;o=0;return o|0}}while(0);q=n+128|0;i=n;while(1){p=i+4|0;if((c[i>>2]|0)==(b|0)){r=i;break}if((p|0)==(q|0)){r=q;break}else{i=p}}i=r-n|0;n=i>>2;if((i|0)>124){o=-1;return o|0}r=a[27208+n|0]|0;do{if((n|0)==25|(n|0)==24){q=c[g>>2]|0;do{if((q|0)!=(f|0)){if((a[q-1|0]&95|0)==(a[e]&127|0)){break}else{o=-1}return o|0}}while(0);c[g>>2]=q+1;a[q]=r;o=0;return o|0}else if((n|0)==22|(n|0)==23){a[e]=80}else{b=a[e]|0;if((r&95|0)!=(b<<24>>24|0)){break}a[e]=b|-128;if((a[d]|0)==0){break}a[d]=0;b=a[j]|0;if((b&1)==0){s=(b&255)>>>1}else{s=c[j+4>>2]|0}if((s|0)==0){break}b=c[l>>2]|0;if((b-k|0)>=160){break}p=c[m>>2]|0;c[l>>2]=b+4;c[b>>2]=p}}while(0);l=c[g>>2]|0;c[g>>2]=l+1;a[l]=r;if((i|0)>84){o=0;return o|0}c[m>>2]=(c[m>>2]|0)+1;o=0;return o|0}function ap(a){a=a|0;Sl(a|0);Pu(a);return}function bp(a){a=a|0;Sl(a|0);return}function cp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=i;i=i+48|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+16|0;m=j+24|0;n=j+32|0;if((c[f+4>>2]&1|0)==0){o=c[(c[d>>2]|0)+24>>2]|0;c[l>>2]=c[e>>2];Kc[o&63](b,d,l,f,g,h&1);i=j;return}Lm(m,f);f=m|0;m=c[f>>2]|0;if(!((c[8620]|0)==-1)){c[k>>2]=34480;c[k+4>>2]=16;c[k+8>>2]=0;mm(34480,k,114)}k=(c[8621]|0)-1|0;g=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-g>>2>>>0>k>>>0){l=c[g+(k<<2)>>2]|0;if((l|0)==0){break}d=l;Ul(c[f>>2]|0)|0;o=c[l>>2]|0;if(h){Ec[c[o+24>>2]&127](n,d)}else{Ec[c[o+28>>2]&127](n,d)}d=n;o=a[d]|0;if((o&1)==0){l=n+1|0;p=l;q=l;r=n+8|0}else{l=n+8|0;p=c[l>>2]|0;q=n+1|0;r=l}l=e|0;s=n+4|0;t=p;u=o;while(1){if((u&1)==0){v=(u&255)>>>1;w=q}else{v=c[s>>2]|0;w=c[r>>2]|0}if((t|0)==(w+v|0)){break}o=a[t]|0;x=c[l>>2]|0;do{if((x|0)!=0){y=x+24|0;z=c[y>>2]|0;if((z|0)!=(c[x+28>>2]|0)){c[y>>2]=z+1;a[z]=o;break}if(!((Qc[c[(c[x>>2]|0)+52>>2]&63](x,o&255)|0)==-1)){break}c[l>>2]=0}}while(0);t=t+1|0;u=a[d]|0}c[b>>2]=c[l>>2];rm(n);i=j;return}}while(0);j=pc(4)|0;lu(j);Fb(j|0,25544,156)}function dp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+80|0;j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=d|0;k=d+8|0;l=d+24|0;m=d+48|0;n=d+56|0;o=d+64|0;p=d+72|0;q=j|0;a[q]=a[19432]|0;a[q+1|0]=a[19433]|0;a[q+2|0]=a[19434]|0;a[q+3|0]=a[19435]|0;a[q+4|0]=a[19436]|0;a[q+5|0]=a[19437]|0;r=j+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=r}else{a[r]=43;u=j+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;u=v+1|0;v=t&74;do{if((v|0)==64){a[u]=111}else if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else{a[u]=100}}while(0);u=k|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=ep(u,12,c[8330]|0,q,(q=i,i=i+8|0,c[q>>2]=h,q)|0)|0;i=q;q=k+t|0;h=c[s>>2]&176;do{if((h|0)==32){w=q}else if((h|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=k+1|0;break}if(!((t|0)>1&s<<24>>24==48)){x=22;break}s=a[k+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=k+2|0}else{x=22}}while(0);if((x|0)==22){w=u}x=l|0;Lm(o,f);fp(u,w,q,x,m,n,o);Ul(c[o>>2]|0)|0;c[p>>2]=c[e>>2];Bd(b,p,x,c[m>>2]|0,c[n>>2]|0,f,g);i=d;return}function ep(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+16|0;h=g|0;j=h;c[j>>2]=f;c[j+4>>2]=0;j=bc(d|0)|0;d=cc(a|0,b|0,e|0,h|0)|0;if((j|0)==0){i=g;return d|0}bc(j|0)|0;i=g;return d|0}function fp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;k=i;i=i+48|0;l=k|0;m=k+16|0;n=k+32|0;o=j|0;j=c[o>>2]|0;if(!((c[8716]|0)==-1)){c[m>>2]=34864;c[m+4>>2]=16;c[m+8>>2]=0;mm(34864,m,114)}m=(c[8717]|0)-1|0;p=c[j+8>>2]|0;if(!((c[j+12>>2]|0)-p>>2>>>0>m>>>0)){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}j=c[p+(m<<2)>>2]|0;if((j|0)==0){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}q=j;r=c[o>>2]|0;if(!((c[8620]|0)==-1)){c[l>>2]=34480;c[l+4>>2]=16;c[l+8>>2]=0;mm(34480,l,114)}l=(c[8621]|0)-1|0;o=c[r+8>>2]|0;if(!((c[r+12>>2]|0)-o>>2>>>0>l>>>0)){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}r=c[o+(l<<2)>>2]|0;if((r|0)==0){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}s=r;Ec[c[(c[r>>2]|0)+20>>2]&127](n,s);t=n;l=a[t]|0;if((l&1)==0){u=(l&255)>>>1}else{u=c[n+4>>2]|0}do{if((u|0)==0){Sc[c[(c[j>>2]|0)+32>>2]&15](q,b,e,f)|0;c[h>>2]=f+(e-b)}else{c[h>>2]=f;l=a[b]|0;if((l<<24>>24|0)==45|(l<<24>>24|0)==43){o=Qc[c[(c[j>>2]|0)+28>>2]&63](q,l)|0;l=c[h>>2]|0;c[h>>2]=l+1;a[l]=o;v=b+1|0}else{v=b}do{if((e-v|0)>1){if((a[v]|0)!=48){w=v;break}o=v+1|0;l=a[o]|0;if(!((l<<24>>24|0)==120|(l<<24>>24|0)==88)){w=v;break}l=j;m=Qc[c[(c[l>>2]|0)+28>>2]&63](q,48)|0;p=c[h>>2]|0;c[h>>2]=p+1;a[p]=m;m=Qc[c[(c[l>>2]|0)+28>>2]&63](q,a[o]|0)|0;o=c[h>>2]|0;c[h>>2]=o+1;a[o]=m;w=v+2|0}else{w=v}}while(0);do{if((w|0)!=(e|0)){m=e-1|0;if(m>>>0>w>>>0){x=w;y=m}else{break}do{m=a[x]|0;a[x]=a[y]|0;a[y]=m;x=x+1|0;y=y-1|0;}while(x>>>0<y>>>0)}}while(0);m=Fc[c[(c[r>>2]|0)+16>>2]&255](s)|0;if(w>>>0<e>>>0){o=n+1|0;l=j;p=n+4|0;z=n+8|0;A=0;B=0;C=w;while(1){D=(a[t]&1)==0;do{if((a[(D?o:c[z>>2]|0)+B|0]|0)==0){E=B;F=A}else{if((A|0)!=(a[(D?o:c[z>>2]|0)+B|0]|0)){E=B;F=A;break}G=c[h>>2]|0;c[h>>2]=G+1;a[G]=m;G=a[t]|0;if((G&1)==0){H=(G&255)>>>1}else{H=c[p>>2]|0}E=(B>>>0<(H-1|0)>>>0)+B|0;F=0}}while(0);D=Qc[c[(c[l>>2]|0)+28>>2]&63](q,a[C]|0)|0;G=c[h>>2]|0;c[h>>2]=G+1;a[G]=D;D=C+1|0;if(D>>>0<e>>>0){A=F+1|0;B=E;C=D}else{break}}}C=f+(w-b)|0;B=c[h>>2]|0;if((C|0)==(B|0)){break}A=B-1|0;if(A>>>0>C>>>0){I=C;J=A}else{break}do{A=a[I]|0;a[I]=a[J]|0;a[J]=A;I=I+1|0;J=J-1|0;}while(I>>>0<J>>>0)}}while(0);if((d|0)==(e|0)){K=c[h>>2]|0;c[g>>2]=K;rm(n);i=k;return}else{K=f+(d-b)|0;c[g>>2]=K;rm(n);i=k;return}}function gp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+112|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+32|0;n=d+80|0;o=d+88|0;p=d+96|0;q=d+104|0;c[k>>2]=37;c[k+4>>2]=0;r=k;k=r+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=k}else{a[k]=43;u=r+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;a[v+1|0]=108;u=v+2|0;v=t&74;do{if((v|0)==64){a[u]=111}else if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else{a[u]=100}}while(0);u=l|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=ep(u,22,c[8330]|0,r,(r=i,i=i+16|0,c[r>>2]=h,c[r+8>>2]=j,r)|0)|0;i=r;r=l+t|0;j=c[s>>2]&176;do{if((j|0)==32){w=r}else if((j|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=l+1|0;break}if(!((t|0)>1&s<<24>>24==48)){x=22;break}s=a[l+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=l+2|0}else{x=22}}while(0);if((x|0)==22){w=u}x=m|0;Lm(p,f);fp(u,w,r,x,n,o,p);Ul(c[p>>2]|0)|0;c[q>>2]=c[e>>2];Bd(b,q,x,c[n>>2]|0,c[o>>2]|0,f,g);i=d;return}function hp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+80|0;j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=d|0;k=d+8|0;l=d+24|0;m=d+48|0;n=d+56|0;o=d+64|0;p=d+72|0;q=j|0;a[q]=a[19432]|0;a[q+1|0]=a[19433]|0;a[q+2|0]=a[19434]|0;a[q+3|0]=a[19435]|0;a[q+4|0]=a[19436]|0;a[q+5|0]=a[19437]|0;r=j+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=r}else{a[r]=43;u=j+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;u=v+1|0;v=t&74;do{if((v|0)==64){a[u]=111}else if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else{a[u]=117}}while(0);u=k|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=ep(u,12,c[8330]|0,q,(q=i,i=i+8|0,c[q>>2]=h,q)|0)|0;i=q;q=k+t|0;h=c[s>>2]&176;do{if((h|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=k+1|0;break}if(!((t|0)>1&s<<24>>24==48)){x=22;break}s=a[k+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=k+2|0}else if((h|0)==32){w=q}else{x=22}}while(0);if((x|0)==22){w=u}x=l|0;Lm(o,f);fp(u,w,q,x,m,n,o);Ul(c[o>>2]|0)|0;c[p>>2]=c[e>>2];Bd(b,p,x,c[m>>2]|0,c[n>>2]|0,f,g);i=d;return}function ip(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+112|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+32|0;n=d+80|0;o=d+88|0;p=d+96|0;q=d+104|0;c[k>>2]=37;c[k+4>>2]=0;r=k;k=r+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=k}else{a[k]=43;u=r+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;a[v+1|0]=108;u=v+2|0;v=t&74;do{if((v|0)==64){a[u]=111}else if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else{a[u]=117}}while(0);u=l|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=ep(u,23,c[8330]|0,r,(r=i,i=i+16|0,c[r>>2]=h,c[r+8>>2]=j,r)|0)|0;i=r;r=l+t|0;j=c[s>>2]&176;do{if((j|0)==32){w=r}else if((j|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=l+1|0;break}if(!((t|0)>1&s<<24>>24==48)){x=22;break}s=a[l+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=l+2|0}else{x=22}}while(0);if((x|0)==22){w=u}x=m|0;Lm(p,f);fp(u,w,r,x,n,o,p);Ul(c[p>>2]|0)|0;c[q>>2]=c[e>>2];Bd(b,q,x,c[n>>2]|0,c[o>>2]|0,f,g);i=d;return}function jp(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=+j;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=i;i=i+152|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+40|0;n=d+48|0;o=d+112|0;p=d+120|0;q=d+128|0;r=d+136|0;s=d+144|0;c[k>>2]=37;c[k+4>>2]=0;t=k;k=t+1|0;u=f+4|0;v=c[u>>2]|0;if((v&2048|0)==0){w=k}else{a[k]=43;w=t+2|0}if((v&1024|0)==0){x=w}else{a[w]=35;x=w+1|0}w=v&260;k=v>>>14;do{if((w|0)==260){if((k&1|0)==0){a[x]=97;y=0;break}else{a[x]=65;y=0;break}}else{a[x]=46;v=x+2|0;a[x+1|0]=42;if((w|0)==4){if((k&1|0)==0){a[v]=102;y=1;break}else{a[v]=70;y=1;break}}else if((w|0)==256){if((k&1|0)==0){a[v]=101;y=1;break}else{a[v]=69;y=1;break}}else{if((k&1|0)==0){a[v]=103;y=1;break}else{a[v]=71;y=1;break}}}}while(0);k=l|0;c[m>>2]=k;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=c[8330]|0;if(y){w=ep(k,30,l,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;A=w}else{w=ep(k,30,l,t,(z=i,i=i+8|0,h[z>>3]=j,z)|0)|0;i=z;A=w}do{if((A|0)>29){w=(a[51808]|0)==0;if(y){do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=kp(m,c[8330]|0,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;B=l}else{do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);w=kp(m,c[8330]|0,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;B=w}w=c[m>>2]|0;if((w|0)!=0){C=B;D=w;E=w;break}Uu();w=c[m>>2]|0;C=B;D=w;E=w}else{C=A;D=0;E=c[m>>2]|0}}while(0);A=E+C|0;B=c[u>>2]&176;do{if((B|0)==32){F=A}else if((B|0)==16){u=a[E]|0;if((u<<24>>24|0)==45|(u<<24>>24|0)==43){F=E+1|0;break}if(!((C|0)>1&u<<24>>24==48)){G=53;break}u=a[E+1|0]|0;if(!((u<<24>>24|0)==120|(u<<24>>24|0)==88)){G=53;break}F=E+2|0}else{G=53}}while(0);if((G|0)==53){F=E}do{if((E|0)==(k|0)){H=n|0;I=0;J=k}else{G=Gu(C<<1)|0;if((G|0)!=0){H=G;I=G;J=E;break}Uu();H=0;I=0;J=c[m>>2]|0}}while(0);Lm(q,f);lp(J,F,A,H,o,p,q);Ul(c[q>>2]|0)|0;q=e|0;c[s>>2]=c[q>>2];Bd(r,s,H,c[o>>2]|0,c[p>>2]|0,f,g);g=c[r>>2]|0;c[q>>2]=g;c[b>>2]=g;if((I|0)!=0){Hu(I)}if((D|0)==0){i=d;return}Hu(D);i=d;return}function kp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;i=i+16|0;g=f|0;h=g;c[h>>2]=e;c[h+4>>2]=0;h=bc(b|0)|0;b=rc(a|0,d|0,g|0)|0;if((h|0)==0){i=f;return b|0}bc(h|0)|0;i=f;return b|0}function lp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;k=i;i=i+48|0;l=k|0;m=k+16|0;n=k+32|0;o=j|0;j=c[o>>2]|0;if(!((c[8716]|0)==-1)){c[m>>2]=34864;c[m+4>>2]=16;c[m+8>>2]=0;mm(34864,m,114)}m=(c[8717]|0)-1|0;p=c[j+8>>2]|0;if(!((c[j+12>>2]|0)-p>>2>>>0>m>>>0)){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}j=c[p+(m<<2)>>2]|0;if((j|0)==0){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}q=j;r=c[o>>2]|0;if(!((c[8620]|0)==-1)){c[l>>2]=34480;c[l+4>>2]=16;c[l+8>>2]=0;mm(34480,l,114)}l=(c[8621]|0)-1|0;o=c[r+8>>2]|0;if(!((c[r+12>>2]|0)-o>>2>>>0>l>>>0)){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}r=c[o+(l<<2)>>2]|0;if((r|0)==0){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}s=r;Ec[c[(c[r>>2]|0)+20>>2]&127](n,s);c[h>>2]=f;t=a[b]|0;if((t<<24>>24|0)==45|(t<<24>>24|0)==43){l=Qc[c[(c[j>>2]|0)+28>>2]&63](q,t)|0;t=c[h>>2]|0;c[h>>2]=t+1;a[t]=l;u=b+1|0}else{u=b}l=e;a:do{if((l-u|0)>1){if((a[u]|0)!=48){v=21;break}t=u+1|0;o=a[t]|0;if(!((o<<24>>24|0)==120|(o<<24>>24|0)==88)){v=21;break}o=j;m=Qc[c[(c[o>>2]|0)+28>>2]&63](q,48)|0;p=c[h>>2]|0;c[h>>2]=p+1;a[p]=m;m=u+2|0;p=Qc[c[(c[o>>2]|0)+28>>2]&63](q,a[t]|0)|0;t=c[h>>2]|0;c[h>>2]=t+1;a[t]=p;if(m>>>0<e>>>0){w=m}else{x=m;y=m;break}while(1){p=a[w]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=w+1|0;if((Ua(p<<24>>24|0,c[8330]|0)|0)==0){x=m;y=w;break a}if(t>>>0<e>>>0){w=t}else{x=m;y=t;break}}}else{v=21}}while(0);b:do{if((v|0)==21){if(u>>>0<e>>>0){z=u}else{x=u;y=u;break}while(1){w=a[z]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}m=Xa(2147483647,14472,0)|0;c[8330]=m}}while(0);p=z+1|0;if((ib(w<<24>>24|0,c[8330]|0)|0)==0){x=u;y=z;break b}if(p>>>0<e>>>0){z=p}else{x=u;y=p;break}}}}while(0);u=n;z=a[u]|0;if((z&1)==0){A=(z&255)>>>1}else{A=c[n+4>>2]|0}do{if((A|0)==0){Sc[c[(c[j>>2]|0)+32>>2]&15](q,x,y,c[h>>2]|0)|0;c[h>>2]=(c[h>>2]|0)+(y-x)}else{do{if((x|0)!=(y|0)){z=y-1|0;if(z>>>0>x>>>0){B=x;C=z}else{break}do{z=a[B]|0;a[B]=a[C]|0;a[C]=z;B=B+1|0;C=C-1|0;}while(B>>>0<C>>>0)}}while(0);w=Fc[c[(c[r>>2]|0)+16>>2]&255](s)|0;if(x>>>0<y>>>0){z=n+1|0;v=n+4|0;p=n+8|0;m=j;t=0;o=0;D=x;while(1){E=(a[u]&1)==0;do{if((a[(E?z:c[p>>2]|0)+o|0]|0)>0){if((t|0)!=(a[(E?z:c[p>>2]|0)+o|0]|0)){F=o;G=t;break}H=c[h>>2]|0;c[h>>2]=H+1;a[H]=w;H=a[u]|0;if((H&1)==0){I=(H&255)>>>1}else{I=c[v>>2]|0}F=(o>>>0<(I-1|0)>>>0)+o|0;G=0}else{F=o;G=t}}while(0);E=Qc[c[(c[m>>2]|0)+28>>2]&63](q,a[D]|0)|0;H=c[h>>2]|0;c[h>>2]=H+1;a[H]=E;E=D+1|0;if(E>>>0<y>>>0){t=G+1|0;o=F;D=E}else{break}}}D=f+(x-b)|0;o=c[h>>2]|0;if((D|0)==(o|0)){break}t=o-1|0;if(t>>>0>D>>>0){J=D;K=t}else{break}do{t=a[J]|0;a[J]=a[K]|0;a[K]=t;J=J+1|0;K=K-1|0;}while(J>>>0<K>>>0)}}while(0);c:do{if(y>>>0<e>>>0){K=j;J=y;while(1){x=a[J]|0;if(x<<24>>24==46){break}F=Qc[c[(c[K>>2]|0)+28>>2]&63](q,x)|0;x=c[h>>2]|0;c[h>>2]=x+1;a[x]=F;F=J+1|0;if(F>>>0<e>>>0){J=F}else{L=F;break c}}K=Fc[c[(c[r>>2]|0)+12>>2]&255](s)|0;F=c[h>>2]|0;c[h>>2]=F+1;a[F]=K;L=J+1|0}else{L=y}}while(0);Sc[c[(c[j>>2]|0)+32>>2]&15](q,L,e,c[h>>2]|0)|0;q=(c[h>>2]|0)+(l-L)|0;c[h>>2]=q;if((d|0)==(e|0)){M=q;c[g>>2]=M;rm(n);i=k;return}M=f+(d-b)|0;c[g>>2]=M;rm(n);i=k;return}function mp(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=+j;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=i;i=i+152|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+40|0;n=d+48|0;o=d+112|0;p=d+120|0;q=d+128|0;r=d+136|0;s=d+144|0;c[k>>2]=37;c[k+4>>2]=0;t=k;k=t+1|0;u=f+4|0;v=c[u>>2]|0;if((v&2048|0)==0){w=k}else{a[k]=43;w=t+2|0}if((v&1024|0)==0){x=w}else{a[w]=35;x=w+1|0}w=v&260;k=v>>>14;do{if((w|0)==260){a[x]=76;v=x+1|0;if((k&1|0)==0){a[v]=97;y=0;break}else{a[v]=65;y=0;break}}else{a[x]=46;a[x+1|0]=42;a[x+2|0]=76;v=x+3|0;if((w|0)==4){if((k&1|0)==0){a[v]=102;y=1;break}else{a[v]=70;y=1;break}}else if((w|0)==256){if((k&1|0)==0){a[v]=101;y=1;break}else{a[v]=69;y=1;break}}else{if((k&1|0)==0){a[v]=103;y=1;break}else{a[v]=71;y=1;break}}}}while(0);k=l|0;c[m>>2]=k;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=c[8330]|0;if(y){w=ep(k,30,l,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;A=w}else{w=ep(k,30,l,t,(z=i,i=i+8|0,h[z>>3]=j,z)|0)|0;i=z;A=w}do{if((A|0)>29){w=(a[51808]|0)==0;if(y){do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=kp(m,c[8330]|0,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;B=l}else{do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);w=kp(m,c[8330]|0,t,(z=i,i=i+8|0,h[z>>3]=j,z)|0)|0;i=z;B=w}w=c[m>>2]|0;if((w|0)!=0){C=B;D=w;E=w;break}Uu();w=c[m>>2]|0;C=B;D=w;E=w}else{C=A;D=0;E=c[m>>2]|0}}while(0);A=E+C|0;B=c[u>>2]&176;do{if((B|0)==32){F=A}else if((B|0)==16){u=a[E]|0;if((u<<24>>24|0)==45|(u<<24>>24|0)==43){F=E+1|0;break}if(!((C|0)>1&u<<24>>24==48)){G=53;break}u=a[E+1|0]|0;if(!((u<<24>>24|0)==120|(u<<24>>24|0)==88)){G=53;break}F=E+2|0}else{G=53}}while(0);if((G|0)==53){F=E}do{if((E|0)==(k|0)){H=n|0;I=0;J=k}else{G=Gu(C<<1)|0;if((G|0)!=0){H=G;I=G;J=E;break}Uu();H=0;I=0;J=c[m>>2]|0}}while(0);Lm(q,f);lp(J,F,A,H,o,p,q);Ul(c[q>>2]|0)|0;q=e|0;c[s>>2]=c[q>>2];Bd(r,s,H,c[o>>2]|0,c[p>>2]|0,f,g);g=c[r>>2]|0;c[q>>2]=g;c[b>>2]=g;if((I|0)!=0){Hu(I)}if((D|0)==0){i=d;return}Hu(D);i=d;return}function np(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=i;i=i+104|0;j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=d|0;k=d+24|0;l=d+48|0;m=d+88|0;n=d+96|0;o=d+16|0;a[o]=a[19440]|0;a[o+1|0]=a[19441]|0;a[o+2|0]=a[19442]|0;a[o+3|0]=a[19443]|0;a[o+4|0]=a[19444]|0;a[o+5|0]=a[19445]|0;p=k|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}q=Xa(2147483647,14472,0)|0;c[8330]=q}}while(0);q=ep(p,20,c[8330]|0,o,(o=i,i=i+8|0,c[o>>2]=h,o)|0)|0;i=o;o=k+q|0;h=c[f+4>>2]&176;do{if((h|0)==32){r=o}else if((h|0)==16){s=a[p]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){r=k+1|0;break}if(!((q|0)>1&s<<24>>24==48)){t=12;break}s=a[k+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){t=12;break}r=k+2|0}else{t=12}}while(0);if((t|0)==12){r=p}t=l|0;Lm(m,f);h=m|0;m=c[h>>2]|0;if(!((c[8716]|0)==-1)){c[j>>2]=34864;c[j+4>>2]=16;c[j+8>>2]=0;mm(34864,j,114)}j=(c[8717]|0)-1|0;s=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-s>>2>>>0>j>>>0){u=c[s+(j<<2)>>2]|0;if((u|0)==0){break}Ul(c[h>>2]|0)|0;Sc[c[(c[u>>2]|0)+32>>2]&15](u,p,o,t)|0;u=l+q|0;if((r|0)==(o|0)){v=u;w=e|0;x=c[w>>2]|0;y=n|0;c[y>>2]=x;Bd(b,n,t,v,u,f,g);z=37;A=0;i=d;return}v=l+(r-k)|0;w=e|0;x=c[w>>2]|0;y=n|0;c[y>>2]=x;Bd(b,n,t,v,u,f,g);z=37;A=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function op(a){a=a|0;Sl(a|0);Pu(a);return}function pp(a){a=a|0;Sl(a|0);return}function qp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=i;i=i+48|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+16|0;m=j+24|0;n=j+32|0;if((c[f+4>>2]&1|0)==0){o=c[(c[d>>2]|0)+24>>2]|0;c[l>>2]=c[e>>2];Kc[o&63](b,d,l,f,g,h&1);i=j;return}Lm(m,f);f=m|0;m=c[f>>2]|0;if(!((c[8618]|0)==-1)){c[k>>2]=34472;c[k+4>>2]=16;c[k+8>>2]=0;mm(34472,k,114)}k=(c[8619]|0)-1|0;g=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-g>>2>>>0>k>>>0){l=c[g+(k<<2)>>2]|0;if((l|0)==0){break}d=l;Ul(c[f>>2]|0)|0;o=c[l>>2]|0;if(h){Ec[c[o+24>>2]&127](n,d)}else{Ec[c[o+28>>2]&127](n,d)}d=n;o=a[d]|0;if((o&1)==0){l=n+4|0;p=l;q=l;r=n+8|0}else{l=n+8|0;p=c[l>>2]|0;q=n+4|0;r=l}l=e|0;s=p;t=o;while(1){if((t&1)==0){u=(t&255)>>>1;v=q}else{u=c[q>>2]|0;v=c[r>>2]|0}if((s|0)==(v+(u<<2)|0)){break}o=c[s>>2]|0;w=c[l>>2]|0;do{if((w|0)!=0){x=w+24|0;y=c[x>>2]|0;if((y|0)==(c[w+28>>2]|0)){z=Qc[c[(c[w>>2]|0)+52>>2]&63](w,o)|0}else{c[x>>2]=y+4;c[y>>2]=o;z=o}if(!((z|0)==-1)){break}c[l>>2]=0}}while(0);s=s+4|0;t=a[d]|0}c[b>>2]=c[l>>2];Cm(n);i=j;return}}while(0);j=pc(4)|0;lu(j);Fb(j|0,25544,156)}function rp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+144|0;j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=d|0;k=d+8|0;l=d+24|0;m=d+112|0;n=d+120|0;o=d+128|0;p=d+136|0;q=j|0;a[q]=a[19432]|0;a[q+1|0]=a[19433]|0;a[q+2|0]=a[19434]|0;a[q+3|0]=a[19435]|0;a[q+4|0]=a[19436]|0;a[q+5|0]=a[19437]|0;r=j+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=r}else{a[r]=43;u=j+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;u=v+1|0;v=t&74;do{if((v|0)==64){a[u]=111}else if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else{a[u]=100}}while(0);u=k|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=ep(u,12,c[8330]|0,q,(q=i,i=i+8|0,c[q>>2]=h,q)|0)|0;i=q;q=k+t|0;h=c[s>>2]&176;do{if((h|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=k+1|0;break}if(!((t|0)>1&s<<24>>24==48)){x=22;break}s=a[k+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=k+2|0}else if((h|0)==32){w=q}else{x=22}}while(0);if((x|0)==22){w=u}x=l|0;Lm(o,f);sp(u,w,q,x,m,n,o);Ul(c[o>>2]|0)|0;c[p>>2]=c[e>>2];tp(b,p,x,c[m>>2]|0,c[n>>2]|0,f,g);i=d;return}function sp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;k=i;i=i+48|0;l=k|0;m=k+16|0;n=k+32|0;o=j|0;j=c[o>>2]|0;if(!((c[8714]|0)==-1)){c[m>>2]=34856;c[m+4>>2]=16;c[m+8>>2]=0;mm(34856,m,114)}m=(c[8715]|0)-1|0;p=c[j+8>>2]|0;if(!((c[j+12>>2]|0)-p>>2>>>0>m>>>0)){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}j=c[p+(m<<2)>>2]|0;if((j|0)==0){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}q=j;r=c[o>>2]|0;if(!((c[8618]|0)==-1)){c[l>>2]=34472;c[l+4>>2]=16;c[l+8>>2]=0;mm(34472,l,114)}l=(c[8619]|0)-1|0;o=c[r+8>>2]|0;if(!((c[r+12>>2]|0)-o>>2>>>0>l>>>0)){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}r=c[o+(l<<2)>>2]|0;if((r|0)==0){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}s=r;Ec[c[(c[r>>2]|0)+20>>2]&127](n,s);t=n;l=a[t]|0;if((l&1)==0){u=(l&255)>>>1}else{u=c[n+4>>2]|0}do{if((u|0)==0){Sc[c[(c[j>>2]|0)+48>>2]&15](q,b,e,f)|0;l=f+(e-b<<2)|0;c[h>>2]=l;v=l}else{c[h>>2]=f;l=a[b]|0;if((l<<24>>24|0)==45|(l<<24>>24|0)==43){o=Qc[c[(c[j>>2]|0)+44>>2]&63](q,l)|0;l=c[h>>2]|0;c[h>>2]=l+4;c[l>>2]=o;w=b+1|0}else{w=b}do{if((e-w|0)>1){if((a[w]|0)!=48){x=w;break}o=w+1|0;l=a[o]|0;if(!((l<<24>>24|0)==120|(l<<24>>24|0)==88)){x=w;break}l=j;m=Qc[c[(c[l>>2]|0)+44>>2]&63](q,48)|0;p=c[h>>2]|0;c[h>>2]=p+4;c[p>>2]=m;m=Qc[c[(c[l>>2]|0)+44>>2]&63](q,a[o]|0)|0;o=c[h>>2]|0;c[h>>2]=o+4;c[o>>2]=m;x=w+2|0}else{x=w}}while(0);do{if((x|0)!=(e|0)){m=e-1|0;if(m>>>0>x>>>0){y=x;z=m}else{break}do{m=a[y]|0;a[y]=a[z]|0;a[z]=m;y=y+1|0;z=z-1|0;}while(y>>>0<z>>>0)}}while(0);m=Fc[c[(c[r>>2]|0)+16>>2]&255](s)|0;if(x>>>0<e>>>0){o=n+1|0;l=j;p=n+4|0;A=n+8|0;B=0;C=0;D=x;while(1){E=(a[t]&1)==0;do{if((a[(E?o:c[A>>2]|0)+C|0]|0)==0){F=C;G=B}else{if((B|0)!=(a[(E?o:c[A>>2]|0)+C|0]|0)){F=C;G=B;break}H=c[h>>2]|0;c[h>>2]=H+4;c[H>>2]=m;H=a[t]|0;if((H&1)==0){I=(H&255)>>>1}else{I=c[p>>2]|0}F=(C>>>0<(I-1|0)>>>0)+C|0;G=0}}while(0);E=Qc[c[(c[l>>2]|0)+44>>2]&63](q,a[D]|0)|0;H=c[h>>2]|0;J=H+4|0;c[h>>2]=J;c[H>>2]=E;E=D+1|0;if(E>>>0<e>>>0){B=G+1|0;C=F;D=E}else{K=J;break}}}else{K=c[h>>2]|0}D=f+(x-b<<2)|0;if((D|0)==(K|0)){v=K;break}C=K-4|0;if(C>>>0>D>>>0){L=D;M=C}else{v=K;break}while(1){C=c[L>>2]|0;c[L>>2]=c[M>>2];c[M>>2]=C;C=L+4|0;D=M-4|0;if(C>>>0<D>>>0){L=C;M=D}else{v=K;break}}}}while(0);if((d|0)==(e|0)){N=v;c[g>>2]=N;rm(n);i=k;return}N=f+(d-b<<2)|0;c[g>>2]=N;rm(n);i=k;return}function tp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;k=i;i=i+16|0;l=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[l>>2];l=k|0;m=d|0;d=c[m>>2]|0;if((d|0)==0){c[b>>2]=0;i=k;return}n=g;g=e;o=n-g>>2;p=h+12|0;h=c[p>>2]|0;q=(h|0)>(o|0)?h-o|0:0;o=f;h=o-g|0;g=h>>2;do{if((h|0)>0){if((Hc[c[(c[d>>2]|0)+48>>2]&63](d,e,g)|0)==(g|0)){break}c[m>>2]=0;c[b>>2]=0;i=k;return}}while(0);do{if((q|0)>0){Bm(l,q,j);if((a[l]&1)==0){r=l+4|0}else{r=c[l+8>>2]|0}if((Hc[c[(c[d>>2]|0)+48>>2]&63](d,r,q)|0)==(q|0)){Cm(l);break}c[m>>2]=0;c[b>>2]=0;Cm(l);i=k;return}}while(0);l=n-o|0;o=l>>2;do{if((l|0)>0){if((Hc[c[(c[d>>2]|0)+48>>2]&63](d,f,o)|0)==(o|0)){break}c[m>>2]=0;c[b>>2]=0;i=k;return}}while(0);c[p>>2]=0;c[b>>2]=d;i=k;return}function up(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+232|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+32|0;n=d+200|0;o=d+208|0;p=d+216|0;q=d+224|0;c[k>>2]=37;c[k+4>>2]=0;r=k;k=r+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=k}else{a[k]=43;u=r+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;a[v+1|0]=108;u=v+2|0;v=t&74;do{if((v|0)==64){a[u]=111}else if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else{a[u]=100}}while(0);u=l|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=ep(u,22,c[8330]|0,r,(r=i,i=i+16|0,c[r>>2]=h,c[r+8>>2]=j,r)|0)|0;i=r;r=l+t|0;j=c[s>>2]&176;do{if((j|0)==32){w=r}else if((j|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=l+1|0;break}if(!((t|0)>1&s<<24>>24==48)){x=22;break}s=a[l+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=l+2|0}else{x=22}}while(0);if((x|0)==22){w=u}x=m|0;Lm(p,f);sp(u,w,r,x,n,o,p);Ul(c[p>>2]|0)|0;c[q>>2]=c[e>>2];tp(b,q,x,c[n>>2]|0,c[o>>2]|0,f,g);i=d;return}function vp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+144|0;j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=d|0;k=d+8|0;l=d+24|0;m=d+112|0;n=d+120|0;o=d+128|0;p=d+136|0;q=j|0;a[q]=a[19432]|0;a[q+1|0]=a[19433]|0;a[q+2|0]=a[19434]|0;a[q+3|0]=a[19435]|0;a[q+4|0]=a[19436]|0;a[q+5|0]=a[19437]|0;r=j+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=r}else{a[r]=43;u=j+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;u=v+1|0;v=t&74;do{if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else if((v|0)==64){a[u]=111}else{a[u]=117}}while(0);u=k|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}v=Xa(2147483647,14472,0)|0;c[8330]=v}}while(0);v=ep(u,12,c[8330]|0,q,(q=i,i=i+8|0,c[q>>2]=h,q)|0)|0;i=q;q=k+v|0;h=c[s>>2]&176;do{if((h|0)==32){w=q}else if((h|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=k+1|0;break}if(!((v|0)>1&s<<24>>24==48)){x=22;break}s=a[k+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=k+2|0}else{x=22}}while(0);if((x|0)==22){w=u}x=l|0;Lm(o,f);sp(u,w,q,x,m,n,o);Ul(c[o>>2]|0)|0;c[p>>2]=c[e>>2];tp(b,p,x,c[m>>2]|0,c[n>>2]|0,f,g);i=d;return}function wp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=i;i=i+240|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+32|0;n=d+208|0;o=d+216|0;p=d+224|0;q=d+232|0;c[k>>2]=37;c[k+4>>2]=0;r=k;k=r+1|0;s=f+4|0;t=c[s>>2]|0;if((t&2048|0)==0){u=k}else{a[k]=43;u=r+2|0}if((t&512|0)==0){v=u}else{a[u]=35;v=u+1|0}a[v]=108;a[v+1|0]=108;u=v+2|0;v=t&74;do{if((v|0)==8){if((t&16384|0)==0){a[u]=120;break}else{a[u]=88;break}}else if((v|0)==64){a[u]=111}else{a[u]=117}}while(0);u=l|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}v=Xa(2147483647,14472,0)|0;c[8330]=v}}while(0);v=ep(u,23,c[8330]|0,r,(r=i,i=i+16|0,c[r>>2]=h,c[r+8>>2]=j,r)|0)|0;i=r;r=l+v|0;j=c[s>>2]&176;do{if((j|0)==32){w=r}else if((j|0)==16){s=a[u]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){w=l+1|0;break}if(!((v|0)>1&s<<24>>24==48)){x=22;break}s=a[l+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){x=22;break}w=l+2|0}else{x=22}}while(0);if((x|0)==22){w=u}x=m|0;Lm(p,f);sp(u,w,r,x,n,o,p);Ul(c[p>>2]|0)|0;c[q>>2]=c[e>>2];tp(b,q,x,c[n>>2]|0,c[o>>2]|0,f,g);i=d;return}function xp(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=+j;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=i;i=i+320|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+40|0;n=d+48|0;o=d+280|0;p=d+288|0;q=d+296|0;r=d+304|0;s=d+312|0;c[k>>2]=37;c[k+4>>2]=0;t=k;k=t+1|0;u=f+4|0;v=c[u>>2]|0;if((v&2048|0)==0){w=k}else{a[k]=43;w=t+2|0}if((v&1024|0)==0){x=w}else{a[w]=35;x=w+1|0}w=v&260;k=v>>>14;do{if((w|0)==260){if((k&1|0)==0){a[x]=97;y=0;break}else{a[x]=65;y=0;break}}else{a[x]=46;v=x+2|0;a[x+1|0]=42;if((w|0)==256){if((k&1|0)==0){a[v]=101;y=1;break}else{a[v]=69;y=1;break}}else if((w|0)==4){if((k&1|0)==0){a[v]=102;y=1;break}else{a[v]=70;y=1;break}}else{if((k&1|0)==0){a[v]=103;y=1;break}else{a[v]=71;y=1;break}}}}while(0);k=l|0;c[m>>2]=k;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=c[8330]|0;if(y){w=ep(k,30,l,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;A=w}else{w=ep(k,30,l,t,(z=i,i=i+8|0,h[z>>3]=j,z)|0)|0;i=z;A=w}do{if((A|0)>29){w=(a[51808]|0)==0;if(y){do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=kp(m,c[8330]|0,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;B=l}else{do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);w=kp(m,c[8330]|0,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;B=w}w=c[m>>2]|0;if((w|0)!=0){C=B;D=w;E=w;break}Uu();w=c[m>>2]|0;C=B;D=w;E=w}else{C=A;D=0;E=c[m>>2]|0}}while(0);A=E+C|0;B=c[u>>2]&176;do{if((B|0)==16){u=a[E]|0;if((u<<24>>24|0)==45|(u<<24>>24|0)==43){F=E+1|0;break}if(!((C|0)>1&u<<24>>24==48)){G=53;break}u=a[E+1|0]|0;if(!((u<<24>>24|0)==120|(u<<24>>24|0)==88)){G=53;break}F=E+2|0}else if((B|0)==32){F=A}else{G=53}}while(0);if((G|0)==53){F=E}do{if((E|0)==(k|0)){H=n|0;I=0;J=k}else{G=Gu(C<<3)|0;B=G;if((G|0)!=0){H=B;I=B;J=E;break}Uu();H=B;I=B;J=c[m>>2]|0}}while(0);Lm(q,f);yp(J,F,A,H,o,p,q);Ul(c[q>>2]|0)|0;q=e|0;c[s>>2]=c[q>>2];tp(r,s,H,c[o>>2]|0,c[p>>2]|0,f,g);g=c[r>>2]|0;c[q>>2]=g;c[b>>2]=g;if((I|0)!=0){Hu(I)}if((D|0)==0){i=d;return}Hu(D);i=d;return}function yp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;k=i;i=i+48|0;l=k|0;m=k+16|0;n=k+32|0;o=j|0;j=c[o>>2]|0;if(!((c[8714]|0)==-1)){c[m>>2]=34856;c[m+4>>2]=16;c[m+8>>2]=0;mm(34856,m,114)}m=(c[8715]|0)-1|0;p=c[j+8>>2]|0;if(!((c[j+12>>2]|0)-p>>2>>>0>m>>>0)){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}j=c[p+(m<<2)>>2]|0;if((j|0)==0){q=pc(4)|0;r=q;lu(r);Fb(q|0,25544,156)}q=j;r=c[o>>2]|0;if(!((c[8618]|0)==-1)){c[l>>2]=34472;c[l+4>>2]=16;c[l+8>>2]=0;mm(34472,l,114)}l=(c[8619]|0)-1|0;o=c[r+8>>2]|0;if(!((c[r+12>>2]|0)-o>>2>>>0>l>>>0)){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}r=c[o+(l<<2)>>2]|0;if((r|0)==0){s=pc(4)|0;t=s;lu(t);Fb(s|0,25544,156)}s=r;Ec[c[(c[r>>2]|0)+20>>2]&127](n,s);c[h>>2]=f;t=a[b]|0;if((t<<24>>24|0)==45|(t<<24>>24|0)==43){l=Qc[c[(c[j>>2]|0)+44>>2]&63](q,t)|0;t=c[h>>2]|0;c[h>>2]=t+4;c[t>>2]=l;u=b+1|0}else{u=b}l=e;a:do{if((l-u|0)>1){if((a[u]|0)!=48){v=21;break}t=u+1|0;o=a[t]|0;if(!((o<<24>>24|0)==120|(o<<24>>24|0)==88)){v=21;break}o=j;m=Qc[c[(c[o>>2]|0)+44>>2]&63](q,48)|0;p=c[h>>2]|0;c[h>>2]=p+4;c[p>>2]=m;m=u+2|0;p=Qc[c[(c[o>>2]|0)+44>>2]&63](q,a[t]|0)|0;t=c[h>>2]|0;c[h>>2]=t+4;c[t>>2]=p;if(m>>>0<e>>>0){w=m}else{x=m;y=m;break}while(1){p=a[w]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}t=Xa(2147483647,14472,0)|0;c[8330]=t}}while(0);t=w+1|0;if((Ua(p<<24>>24|0,c[8330]|0)|0)==0){x=m;y=w;break a}if(t>>>0<e>>>0){w=t}else{x=m;y=t;break}}}else{v=21}}while(0);b:do{if((v|0)==21){if(u>>>0<e>>>0){z=u}else{x=u;y=u;break}while(1){w=a[z]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}m=Xa(2147483647,14472,0)|0;c[8330]=m}}while(0);p=z+1|0;if((ib(w<<24>>24|0,c[8330]|0)|0)==0){x=u;y=z;break b}if(p>>>0<e>>>0){z=p}else{x=u;y=p;break}}}}while(0);u=n;z=a[u]|0;if((z&1)==0){A=(z&255)>>>1}else{A=c[n+4>>2]|0}do{if((A|0)==0){Sc[c[(c[j>>2]|0)+48>>2]&15](q,x,y,c[h>>2]|0)|0;z=(c[h>>2]|0)+(y-x<<2)|0;c[h>>2]=z;B=z}else{do{if((x|0)!=(y|0)){z=y-1|0;if(z>>>0>x>>>0){C=x;D=z}else{break}do{z=a[C]|0;a[C]=a[D]|0;a[D]=z;C=C+1|0;D=D-1|0;}while(C>>>0<D>>>0)}}while(0);w=Fc[c[(c[r>>2]|0)+16>>2]&255](s)|0;if(x>>>0<y>>>0){z=n+1|0;v=n+4|0;p=n+8|0;m=j;t=0;o=0;E=x;while(1){F=(a[u]&1)==0;do{if((a[(F?z:c[p>>2]|0)+o|0]|0)>0){if((t|0)!=(a[(F?z:c[p>>2]|0)+o|0]|0)){G=o;H=t;break}I=c[h>>2]|0;c[h>>2]=I+4;c[I>>2]=w;I=a[u]|0;if((I&1)==0){J=(I&255)>>>1}else{J=c[v>>2]|0}G=(o>>>0<(J-1|0)>>>0)+o|0;H=0}else{G=o;H=t}}while(0);F=Qc[c[(c[m>>2]|0)+44>>2]&63](q,a[E]|0)|0;I=c[h>>2]|0;K=I+4|0;c[h>>2]=K;c[I>>2]=F;F=E+1|0;if(F>>>0<y>>>0){t=H+1|0;o=G;E=F}else{L=K;break}}}else{L=c[h>>2]|0}E=f+(x-b<<2)|0;if((E|0)==(L|0)){B=L;break}o=L-4|0;if(o>>>0>E>>>0){M=E;N=o}else{B=L;break}while(1){o=c[M>>2]|0;c[M>>2]=c[N>>2];c[N>>2]=o;o=M+4|0;E=N-4|0;if(o>>>0<E>>>0){M=o;N=E}else{B=L;break}}}}while(0);c:do{if(y>>>0<e>>>0){L=j;N=y;while(1){M=a[N]|0;if(M<<24>>24==46){break}x=Qc[c[(c[L>>2]|0)+44>>2]&63](q,M)|0;M=c[h>>2]|0;G=M+4|0;c[h>>2]=G;c[M>>2]=x;x=N+1|0;if(x>>>0<e>>>0){N=x}else{O=x;P=G;break c}}L=Fc[c[(c[r>>2]|0)+12>>2]&255](s)|0;G=c[h>>2]|0;x=G+4|0;c[h>>2]=x;c[G>>2]=L;O=N+1|0;P=x}else{O=y;P=B}}while(0);Sc[c[(c[j>>2]|0)+48>>2]&15](q,O,e,P)|0;P=(c[h>>2]|0)+(l-O<<2)|0;c[h>>2]=P;if((d|0)==(e|0)){Q=P;c[g>>2]=Q;rm(n);i=k;return}Q=f+(d-b<<2)|0;c[g>>2]=Q;rm(n);i=k;return}function zp(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=+j;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=i;i=i+320|0;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;l=d+8|0;m=d+40|0;n=d+48|0;o=d+280|0;p=d+288|0;q=d+296|0;r=d+304|0;s=d+312|0;c[k>>2]=37;c[k+4>>2]=0;t=k;k=t+1|0;u=f+4|0;v=c[u>>2]|0;if((v&2048|0)==0){w=k}else{a[k]=43;w=t+2|0}if((v&1024|0)==0){x=w}else{a[w]=35;x=w+1|0}w=v&260;k=v>>>14;do{if((w|0)==260){a[x]=76;v=x+1|0;if((k&1|0)==0){a[v]=97;y=0;break}else{a[v]=65;y=0;break}}else{a[x]=46;a[x+1|0]=42;a[x+2|0]=76;v=x+3|0;if((w|0)==4){if((k&1|0)==0){a[v]=102;y=1;break}else{a[v]=70;y=1;break}}else if((w|0)==256){if((k&1|0)==0){a[v]=101;y=1;break}else{a[v]=69;y=1;break}}else{if((k&1|0)==0){a[v]=103;y=1;break}else{a[v]=71;y=1;break}}}}while(0);k=l|0;c[m>>2]=k;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=c[8330]|0;if(y){w=ep(k,30,l,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;A=w}else{w=ep(k,30,l,t,(z=i,i=i+8|0,h[z>>3]=j,z)|0)|0;i=z;A=w}do{if((A|0)>29){w=(a[51808]|0)==0;if(y){do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);l=kp(m,c[8330]|0,t,(z=i,i=i+16|0,c[z>>2]=c[f+8>>2],h[z+8>>3]=j,z)|0)|0;i=z;B=l}else{do{if(w){if((ub(51808)|0)==0){break}l=Xa(2147483647,14472,0)|0;c[8330]=l}}while(0);w=kp(m,c[8330]|0,t,(z=i,i=i+8|0,h[z>>3]=j,z)|0)|0;i=z;B=w}w=c[m>>2]|0;if((w|0)!=0){C=B;D=w;E=w;break}Uu();w=c[m>>2]|0;C=B;D=w;E=w}else{C=A;D=0;E=c[m>>2]|0}}while(0);A=E+C|0;B=c[u>>2]&176;do{if((B|0)==32){F=A}else if((B|0)==16){u=a[E]|0;if((u<<24>>24|0)==45|(u<<24>>24|0)==43){F=E+1|0;break}if(!((C|0)>1&u<<24>>24==48)){G=53;break}u=a[E+1|0]|0;if(!((u<<24>>24|0)==120|(u<<24>>24|0)==88)){G=53;break}F=E+2|0}else{G=53}}while(0);if((G|0)==53){F=E}do{if((E|0)==(k|0)){H=n|0;I=0;J=k}else{G=Gu(C<<3)|0;B=G;if((G|0)!=0){H=B;I=B;J=E;break}Uu();H=B;I=B;J=c[m>>2]|0}}while(0);Lm(q,f);yp(J,F,A,H,o,p,q);Ul(c[q>>2]|0)|0;q=e|0;c[s>>2]=c[q>>2];tp(r,s,H,c[o>>2]|0,c[p>>2]|0,f,g);g=c[r>>2]|0;c[q>>2]=g;c[b>>2]=g;if((I|0)!=0){Hu(I)}if((D|0)==0){i=d;return}Hu(D);i=d;return}function Ap(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=i;i=i+216|0;j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=d|0;k=d+24|0;l=d+48|0;m=d+200|0;n=d+208|0;o=d+16|0;a[o]=a[19440]|0;a[o+1|0]=a[19441]|0;a[o+2|0]=a[19442]|0;a[o+3|0]=a[19443]|0;a[o+4|0]=a[19444]|0;a[o+5|0]=a[19445]|0;p=k|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}q=Xa(2147483647,14472,0)|0;c[8330]=q}}while(0);q=ep(p,20,c[8330]|0,o,(o=i,i=i+8|0,c[o>>2]=h,o)|0)|0;i=o;o=k+q|0;h=c[f+4>>2]&176;do{if((h|0)==32){r=o}else if((h|0)==16){s=a[p]|0;if((s<<24>>24|0)==45|(s<<24>>24|0)==43){r=k+1|0;break}if(!((q|0)>1&s<<24>>24==48)){t=12;break}s=a[k+1|0]|0;if(!((s<<24>>24|0)==120|(s<<24>>24|0)==88)){t=12;break}r=k+2|0}else{t=12}}while(0);if((t|0)==12){r=p}Lm(m,f);t=m|0;m=c[t>>2]|0;if(!((c[8714]|0)==-1)){c[j>>2]=34856;c[j+4>>2]=16;c[j+8>>2]=0;mm(34856,j,114)}j=(c[8715]|0)-1|0;h=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-h>>2>>>0>j>>>0){s=c[h+(j<<2)>>2]|0;if((s|0)==0){break}Ul(c[t>>2]|0)|0;u=l|0;Sc[c[(c[s>>2]|0)+48>>2]&15](s,p,o,u)|0;s=l+(q<<2)|0;if((r|0)==(o|0)){v=s;w=e|0;x=c[w>>2]|0;y=n|0;c[y>>2]=x;tp(b,n,u,v,s,f,g);z=148;A=0;i=d;return}v=l+(r-k<<2)|0;w=e|0;x=c[w>>2]|0;y=n|0;c[y>>2]=x;tp(b,n,u,v,s,f,g);z=148;A=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function Bp(d,e,f,g,h,j,k,l,m){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;n=i;i=i+48|0;o=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[o>>2];o=g;g=i;i=i+4|0;i=i+7&-8;c[g>>2]=c[o>>2];o=n|0;p=n+16|0;q=n+24|0;r=n+32|0;s=n+40|0;Lm(p,h);t=p|0;p=c[t>>2]|0;if(!((c[8716]|0)==-1)){c[o>>2]=34864;c[o+4>>2]=16;c[o+8>>2]=0;mm(34864,o,114)}o=(c[8717]|0)-1|0;u=c[p+8>>2]|0;do{if((c[p+12>>2]|0)-u>>2>>>0>o>>>0){v=c[u+(o<<2)>>2]|0;if((v|0)==0){break}w=v;Ul(c[t>>2]|0)|0;c[j>>2]=0;x=f|0;a:do{if((l|0)==(m|0)){y=67}else{z=g|0;A=v;B=v+8|0;C=v;D=e;E=r|0;F=s|0;G=q|0;H=l;I=0;b:while(1){J=I;while(1){if((J|0)!=0){y=67;break a}K=c[x>>2]|0;do{if((K|0)==0){L=0}else{if((c[K+12>>2]|0)!=(c[K+16>>2]|0)){L=K;break}if(!((Fc[c[(c[K>>2]|0)+36>>2]&255](K)|0)==-1)){L=K;break}c[x>>2]=0;L=0}}while(0);K=(L|0)==0;M=c[z>>2]|0;c:do{if((M|0)==0){y=20}else{do{if((c[M+12>>2]|0)==(c[M+16>>2]|0)){if(!((Fc[c[(c[M>>2]|0)+36>>2]&255](M)|0)==-1)){break}c[z>>2]=0;y=20;break c}}while(0);if(K){N=M}else{y=21;break b}}}while(0);if((y|0)==20){y=0;if(K){y=21;break b}else{N=0}}if((Hc[c[(c[A>>2]|0)+36>>2]&63](w,a[H]|0,0)|0)<<24>>24==37){y=24;break}M=a[H]|0;if(M<<24>>24>-1){O=c[B>>2]|0;if(!((b[O+(M<<24>>24<<1)>>1]&8192)==0)){P=H;y=35;break}}Q=L+12|0;M=c[Q>>2]|0;R=L+16|0;if((M|0)==(c[R>>2]|0)){S=(Fc[c[(c[L>>2]|0)+36>>2]&255](L)|0)&255}else{S=a[M]|0}M=Qc[c[(c[C>>2]|0)+12>>2]&63](w,S)|0;if(M<<24>>24==(Qc[c[(c[C>>2]|0)+12>>2]&63](w,a[H]|0)|0)<<24>>24){y=62;break}c[j>>2]=4;J=4}d:do{if((y|0)==24){y=0;J=H+1|0;if((J|0)==(m|0)){y=25;break b}M=Hc[c[(c[A>>2]|0)+36>>2]&63](w,a[J]|0,0)|0;if((M<<24>>24|0)==69|(M<<24>>24|0)==48){T=H+2|0;if((T|0)==(m|0)){y=28;break b}U=M;V=Hc[c[(c[A>>2]|0)+36>>2]&63](w,a[T]|0,0)|0;W=T}else{U=0;V=M;W=J}J=c[(c[D>>2]|0)+36>>2]|0;c[E>>2]=L;c[F>>2]=N;Oc[J&15](q,e,r,s,h,j,k,V,U);c[x>>2]=c[G>>2];X=W+1|0}else if((y|0)==35){while(1){y=0;J=P+1|0;if((J|0)==(m|0)){Y=m;break}M=a[J]|0;if(!(M<<24>>24>-1)){Y=J;break}if((b[O+(M<<24>>24<<1)>>1]&8192)==0){Y=J;break}else{P=J;y=35}}K=L;J=N;M=N;while(1){do{if((K|0)==0){Z=0}else{if((c[K+12>>2]|0)!=(c[K+16>>2]|0)){Z=K;break}if(!((Fc[c[(c[K>>2]|0)+36>>2]&255](K)|0)==-1)){Z=K;break}c[x>>2]=0;Z=0}}while(0);T=(Z|0)==0;do{if((J|0)==0){_=M;y=48}else{if((c[J+12>>2]|0)!=(c[J+16>>2]|0)){if(T){$=J;aa=M;break}else{X=Y;break d}}if((Fc[c[(c[J>>2]|0)+36>>2]&255](J)|0)==-1){c[z>>2]=0;_=0;y=48;break}else{if(T^(M|0)==0){$=M;aa=M;break}else{X=Y;break d}}}}while(0);if((y|0)==48){y=0;if(T){X=Y;break d}else{$=0;aa=_}}ba=Z+12|0;ca=c[ba>>2]|0;da=Z+16|0;if((ca|0)==(c[da>>2]|0)){ea=(Fc[c[(c[Z>>2]|0)+36>>2]&255](Z)|0)&255}else{ea=a[ca]|0}if(!(ea<<24>>24>-1)){X=Y;break d}if((b[(c[B>>2]|0)+(ea<<24>>24<<1)>>1]&8192)==0){X=Y;break d}ca=c[ba>>2]|0;if((ca|0)==(c[da>>2]|0)){Fc[c[(c[Z>>2]|0)+40>>2]&255](Z)|0;K=Z;J=$;M=aa;continue}else{c[ba>>2]=ca+1;K=Z;J=$;M=aa;continue}}}else if((y|0)==62){y=0;M=c[Q>>2]|0;if((M|0)==(c[R>>2]|0)){Fc[c[(c[L>>2]|0)+40>>2]&255](L)|0}else{c[Q>>2]=M+1}X=H+1|0}}while(0);if((X|0)==(m|0)){y=67;break a}H=X;I=c[j>>2]|0}if((y|0)==21){c[j>>2]=4;fa=L;break}else if((y|0)==25){c[j>>2]=4;fa=L;break}else if((y|0)==28){c[j>>2]=4;fa=L;break}}}while(0);if((y|0)==67){fa=c[x>>2]|0}w=f|0;do{if((fa|0)==0){ga=0}else{if((c[fa+12>>2]|0)!=(c[fa+16>>2]|0)){ga=fa;break}if(!((Fc[c[(c[fa>>2]|0)+36>>2]&255](fa)|0)==-1)){ga=fa;break}c[w>>2]=0;ga=0}}while(0);w=(ga|0)==0;x=g|0;v=c[x>>2]|0;e:do{if((v|0)==0){y=77}else{do{if((c[v+12>>2]|0)==(c[v+16>>2]|0)){if(!((Fc[c[(c[v>>2]|0)+36>>2]&255](v)|0)==-1)){break}c[x>>2]=0;y=77;break e}}while(0);if(!w){break}ha=d|0;c[ha>>2]=ga;i=n;return}}while(0);do{if((y|0)==77){if(w){break}ha=d|0;c[ha>>2]=ga;i=n;return}}while(0);c[j>>2]=c[j>>2]|2;ha=d|0;c[ha>>2]=ga;i=n;return}}while(0);n=pc(4)|0;lu(n);Fb(n|0,25544,156)}function Cp(a){a=a|0;Sl(a|0);Pu(a);return}function Dp(a){a=a|0;Sl(a|0);return}function Ep(a){a=a|0;return 2}function Fp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0;j=i;i=i+16|0;k=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[k>>2];k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+8|0;c[k>>2]=c[d>>2];c[l>>2]=c[e>>2];Bp(a,b,k,l,f,g,h,19424,19432);i=j;return}function Gp(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;k=i;i=i+16|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=k|0;m=k+8|0;n=d+8|0;o=Fc[c[(c[n>>2]|0)+20>>2]&255](n)|0;c[l>>2]=c[e>>2];c[m>>2]=c[f>>2];f=a[o]|0;if((f&1)==0){p=(f&255)>>>1;q=o+1|0;r=o+1|0}else{f=c[o+8>>2]|0;p=c[o+4>>2]|0;q=f;r=f}Bp(b,d,l,m,g,h,j,q,r+p|0);i=k;return}function Hp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=i;i=i+32|0;k=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[k>>2];k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+8|0;m=j+24|0;Lm(m,f);f=m|0;m=c[f>>2]|0;if(!((c[8716]|0)==-1)){c[l>>2]=34864;c[l+4>>2]=16;c[l+8>>2]=0;mm(34864,l,114)}l=(c[8717]|0)-1|0;n=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-n>>2>>>0>l>>>0){o=c[n+(l<<2)>>2]|0;if((o|0)==0){break}Ul(c[f>>2]|0)|0;p=c[e>>2]|0;q=b+8|0;r=Fc[c[c[q>>2]>>2]&255](q)|0;c[k>>2]=p;p=(bo(d,k,r,r+168|0,o,g,0)|0)-r|0;if((p|0)>=168){s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}c[h+24>>2]=((p|0)/12|0|0)%7|0;s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}}while(0);j=pc(4)|0;lu(j);Fb(j|0,25544,156)}function Ip(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=i;i=i+32|0;k=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[k>>2];k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+8|0;m=j+24|0;Lm(m,f);f=m|0;m=c[f>>2]|0;if(!((c[8716]|0)==-1)){c[l>>2]=34864;c[l+4>>2]=16;c[l+8>>2]=0;mm(34864,l,114)}l=(c[8717]|0)-1|0;n=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-n>>2>>>0>l>>>0){o=c[n+(l<<2)>>2]|0;if((o|0)==0){break}Ul(c[f>>2]|0)|0;p=c[e>>2]|0;q=b+8|0;r=Fc[c[(c[q>>2]|0)+4>>2]&255](q)|0;c[k>>2]=p;p=(bo(d,k,r,r+288|0,o,g,0)|0)-r|0;if((p|0)>=288){s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}c[h+16>>2]=((p|0)/12|0|0)%12|0;s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}}while(0);j=pc(4)|0;lu(j);Fb(j|0,25544,156)}function Jp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;b=i;i=i+32|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;l=b+24|0;Lm(l,f);f=l|0;l=c[f>>2]|0;if(!((c[8716]|0)==-1)){c[k>>2]=34864;c[k+4>>2]=16;c[k+8>>2]=0;mm(34864,k,114)}k=(c[8717]|0)-1|0;m=c[l+8>>2]|0;do{if((c[l+12>>2]|0)-m>>2>>>0>k>>>0){n=c[m+(k<<2)>>2]|0;if((n|0)==0){break}Ul(c[f>>2]|0)|0;c[j>>2]=c[e>>2];o=Op(d,j,g,n,4)|0;if((c[g>>2]&4|0)!=0){p=4;q=0;r=d|0;s=c[r>>2]|0;t=a|0;c[t>>2]=s;i=b;return}if((o|0)<69){u=o+2e3|0}else{u=(o-69|0)>>>0<31>>>0?o+1900|0:o}c[h+20>>2]=u-1900;p=4;q=0;r=d|0;s=c[r>>2]|0;t=a|0;c[t>>2]=s;i=b;return}}while(0);b=pc(4)|0;lu(b);Fb(b|0,25544,156)}function Kp(b,d,e,f,g,h,j,k,l){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;l=i;i=i+328|0;m=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[m>>2];m=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[m>>2];m=l|0;n=l+8|0;o=l+16|0;p=l+24|0;q=l+32|0;r=l+40|0;s=l+48|0;t=l+56|0;u=l+64|0;v=l+72|0;w=l+80|0;x=l+88|0;y=l+96|0;z=l+112|0;A=l+120|0;B=l+128|0;C=l+136|0;D=l+144|0;E=l+152|0;F=l+160|0;G=l+168|0;H=l+176|0;I=l+184|0;J=l+192|0;K=l+200|0;L=l+208|0;M=l+216|0;N=l+224|0;O=l+232|0;P=l+240|0;Q=l+248|0;R=l+256|0;S=l+264|0;T=l+272|0;U=l+280|0;V=l+288|0;W=l+296|0;X=l+304|0;Y=l+312|0;Z=l+320|0;c[h>>2]=0;Lm(z,g);_=z|0;z=c[_>>2]|0;if(!((c[8716]|0)==-1)){c[y>>2]=34864;c[y+4>>2]=16;c[y+8>>2]=0;mm(34864,y,114)}y=(c[8717]|0)-1|0;$=c[z+8>>2]|0;do{if((c[z+12>>2]|0)-$>>2>>>0>y>>>0){aa=c[$+(y<<2)>>2]|0;if((aa|0)==0){break}ba=aa;Ul(c[_>>2]|0)|0;a:do{switch(k<<24>>24|0){case 109:{c[r>>2]=c[f>>2];aa=Op(e,r,h,ba,2)|0;ca=c[h>>2]|0;if((ca&4|0)==0&(aa|0)<13){c[j+16>>2]=aa-1;break a}else{c[h>>2]=ca|4;break a}break};case 121:{c[n>>2]=c[f>>2];ca=Op(e,n,h,ba,4)|0;if((c[h>>2]&4|0)!=0){break a}if((ca|0)<69){da=ca+2e3|0}else{da=(ca-69|0)>>>0<31>>>0?ca+1900|0:ca}c[j+20>>2]=da-1900;break};case 68:{ca=e|0;c[E>>2]=c[ca>>2];c[F>>2]=c[f>>2];Bp(D,d,E,F,g,h,j,19416,19424);c[ca>>2]=c[D>>2];break};case 106:{c[s>>2]=c[f>>2];ca=Op(e,s,h,ba,3)|0;aa=c[h>>2]|0;if((aa&4|0)==0&(ca|0)<366){c[j+28>>2]=ca;break a}else{c[h>>2]=aa|4;break a}break};case 98:case 66:case 104:{aa=c[f>>2]|0;ca=d+8|0;ea=Fc[c[(c[ca>>2]|0)+4>>2]&255](ca)|0;c[w>>2]=aa;aa=(bo(e,w,ea,ea+288|0,ba,h,0)|0)-ea|0;if((aa|0)>=288){break a}c[j+16>>2]=((aa|0)/12|0|0)%12|0;break};case 114:{aa=e|0;c[M>>2]=c[aa>>2];c[N>>2]=c[f>>2];Bp(L,d,M,N,g,h,j,19392,19403);c[aa>>2]=c[L>>2];break};case 84:{aa=e|0;c[S>>2]=c[aa>>2];c[T>>2]=c[f>>2];Bp(R,d,S,T,g,h,j,19376,19384);c[aa>>2]=c[R>>2];break};case 119:{c[o>>2]=c[f>>2];aa=Op(e,o,h,ba,1)|0;ea=c[h>>2]|0;if((ea&4|0)==0&(aa|0)<7){c[j+24>>2]=aa;break a}else{c[h>>2]=ea|4;break a}break};case 82:{ea=e|0;c[P>>2]=c[ea>>2];c[Q>>2]=c[f>>2];Bp(O,d,P,Q,g,h,j,19384,19389);c[ea>>2]=c[O>>2];break};case 112:{c[K>>2]=c[f>>2];Mp(d,j+8|0,e,K,h,ba);break};case 70:{ea=e|0;c[H>>2]=c[ea>>2];c[I>>2]=c[f>>2];Bp(G,d,H,I,g,h,j,19408,19416);c[ea>>2]=c[G>>2];break};case 97:case 65:{ea=c[f>>2]|0;aa=d+8|0;ca=Fc[c[c[aa>>2]>>2]&255](aa)|0;c[x>>2]=ea;ea=(bo(e,x,ca,ca+168|0,ba,h,0)|0)-ca|0;if((ea|0)>=168){break a}c[j+24>>2]=((ea|0)/12|0|0)%7|0;break};case 110:case 116:{c[J>>2]=c[f>>2];Lp(0,e,J,h,ba);break};case 83:{c[p>>2]=c[f>>2];ea=Op(e,p,h,ba,2)|0;ca=c[h>>2]|0;if((ca&4|0)==0&(ea|0)<61){c[j>>2]=ea;break a}else{c[h>>2]=ca|4;break a}break};case 73:{ca=j+8|0;c[t>>2]=c[f>>2];ea=Op(e,t,h,ba,2)|0;aa=c[h>>2]|0;do{if((aa&4|0)==0){if(!((ea-1|0)>>>0<12>>>0)){break}c[ca>>2]=ea;break a}}while(0);c[h>>2]=aa|4;break};case 77:{c[q>>2]=c[f>>2];ea=Op(e,q,h,ba,2)|0;ca=c[h>>2]|0;if((ca&4|0)==0&(ea|0)<60){c[j+4>>2]=ea;break a}else{c[h>>2]=ca|4;break a}break};case 120:{ca=c[(c[d>>2]|0)+20>>2]|0;c[U>>2]=c[e>>2];c[V>>2]=c[f>>2];Mc[ca&127](b,d,U,V,g,h,j);i=l;return};case 88:{ca=d+8|0;ea=Fc[c[(c[ca>>2]|0)+24>>2]&255](ca)|0;ca=e|0;c[X>>2]=c[ca>>2];c[Y>>2]=c[f>>2];fa=a[ea]|0;if((fa&1)==0){ga=(fa&255)>>>1;ha=ea+1|0;ia=ea+1|0}else{fa=c[ea+8>>2]|0;ga=c[ea+4>>2]|0;ha=fa;ia=fa}Bp(W,d,X,Y,g,h,j,ha,ia+ga|0);c[ca>>2]=c[W>>2];break};case 99:{ca=d+8|0;fa=Fc[c[(c[ca>>2]|0)+12>>2]&255](ca)|0;ca=e|0;c[B>>2]=c[ca>>2];c[C>>2]=c[f>>2];ea=a[fa]|0;if((ea&1)==0){ja=(ea&255)>>>1;ka=fa+1|0;la=fa+1|0}else{ea=c[fa+8>>2]|0;ja=c[fa+4>>2]|0;ka=ea;la=ea}Bp(A,d,B,C,g,h,j,ka,la+ja|0);c[ca>>2]=c[A>>2];break};case 72:{c[u>>2]=c[f>>2];ca=Op(e,u,h,ba,2)|0;ea=c[h>>2]|0;if((ea&4|0)==0&(ca|0)<24){c[j+8>>2]=ca;break a}else{c[h>>2]=ea|4;break a}break};case 89:{c[m>>2]=c[f>>2];ea=Op(e,m,h,ba,4)|0;if((c[h>>2]&4|0)!=0){break a}c[j+20>>2]=ea-1900;break};case 37:{c[Z>>2]=c[f>>2];Np(0,e,Z,h,ba);break};case 100:case 101:{ea=j+12|0;c[v>>2]=c[f>>2];ca=Op(e,v,h,ba,2)|0;fa=c[h>>2]|0;do{if((fa&4|0)==0){if(!((ca-1|0)>>>0<31>>>0)){break}c[ea>>2]=ca;break a}}while(0);c[h>>2]=fa|4;break};default:{c[h>>2]=c[h>>2]|4}}}while(0);c[b>>2]=c[e>>2];i=l;return}}while(0);l=pc(4)|0;lu(l);Fb(l|0,25544,156)}function Lp(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;j=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[j>>2];j=e|0;e=f|0;f=h+8|0;a:while(1){h=c[j>>2]|0;do{if((h|0)==0){k=0}else{if((c[h+12>>2]|0)!=(c[h+16>>2]|0)){k=h;break}if((Fc[c[(c[h>>2]|0)+36>>2]&255](h)|0)==-1){c[j>>2]=0;k=0;break}else{k=c[j>>2]|0;break}}}while(0);h=(k|0)==0;l=c[e>>2]|0;do{if((l|0)==0){m=12}else{if((c[l+12>>2]|0)!=(c[l+16>>2]|0)){if(h){n=l;break}else{o=l;break a}}if((Fc[c[(c[l>>2]|0)+36>>2]&255](l)|0)==-1){c[e>>2]=0;m=12;break}else{if(h){n=l;break}else{o=l;break a}}}}while(0);if((m|0)==12){m=0;if(h){o=0;break}else{n=0}}l=c[j>>2]|0;p=c[l+12>>2]|0;if((p|0)==(c[l+16>>2]|0)){q=(Fc[c[(c[l>>2]|0)+36>>2]&255](l)|0)&255}else{q=a[p]|0}if(!(q<<24>>24>-1)){o=n;break}if((b[(c[f>>2]|0)+(q<<24>>24<<1)>>1]&8192)==0){o=n;break}p=c[j>>2]|0;l=p+12|0;r=c[l>>2]|0;if((r|0)==(c[p+16>>2]|0)){Fc[c[(c[p>>2]|0)+40>>2]&255](p)|0;continue}else{c[l>>2]=r+1;continue}}n=c[j>>2]|0;do{if((n|0)==0){s=0}else{if((c[n+12>>2]|0)!=(c[n+16>>2]|0)){s=n;break}if((Fc[c[(c[n>>2]|0)+36>>2]&255](n)|0)==-1){c[j>>2]=0;s=0;break}else{s=c[j>>2]|0;break}}}while(0);j=(s|0)==0;b:do{if((o|0)==0){m=32}else{do{if((c[o+12>>2]|0)==(c[o+16>>2]|0)){if(!((Fc[c[(c[o>>2]|0)+36>>2]&255](o)|0)==-1)){break}c[e>>2]=0;m=32;break b}}while(0);if(!j){break}i=d;return}}while(0);do{if((m|0)==32){if(j){break}i=d;return}}while(0);c[g>>2]=c[g>>2]|2;i=d;return}function Mp(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0;j=i;i=i+8|0;k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=j|0;l=b+8|0;b=Fc[c[(c[l>>2]|0)+8>>2]&255](l)|0;l=a[b]|0;if((l&1)==0){m=(l&255)>>>1}else{m=c[b+4>>2]|0}l=a[b+12|0]|0;if((l&1)==0){n=(l&255)>>>1}else{n=c[b+16>>2]|0}if((m|0)==(-n|0)){c[g>>2]=c[g>>2]|4;i=j;return}c[k>>2]=c[f>>2];f=bo(e,k,b,b+24|0,h,g,0)|0;g=f-b|0;do{if((f|0)==(b|0)){if((c[d>>2]|0)!=12){break}c[d>>2]=0;i=j;return}}while(0);if((g|0)!=12){i=j;return}g=c[d>>2]|0;if((g|0)>=12){i=j;return}c[d>>2]=g+12;i=j;return}function Np(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;b=i;h=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[h>>2];h=d|0;d=c[h>>2]|0;do{if((d|0)==0){j=0}else{if((c[d+12>>2]|0)!=(c[d+16>>2]|0)){j=d;break}if((Fc[c[(c[d>>2]|0)+36>>2]&255](d)|0)==-1){c[h>>2]=0;j=0;break}else{j=c[h>>2]|0;break}}}while(0);d=(j|0)==0;j=e|0;e=c[j>>2]|0;a:do{if((e|0)==0){k=11}else{do{if((c[e+12>>2]|0)==(c[e+16>>2]|0)){if(!((Fc[c[(c[e>>2]|0)+36>>2]&255](e)|0)==-1)){break}c[j>>2]=0;k=11;break a}}while(0);if(d){l=e}else{k=12}}}while(0);if((k|0)==11){if(d){k=12}else{l=0}}if((k|0)==12){c[f>>2]=c[f>>2]|6;i=b;return}d=c[h>>2]|0;e=c[d+12>>2]|0;if((e|0)==(c[d+16>>2]|0)){m=(Fc[c[(c[d>>2]|0)+36>>2]&255](d)|0)&255}else{m=a[e]|0}if(!((Hc[c[(c[g>>2]|0)+36>>2]&63](g,m,0)|0)<<24>>24==37)){c[f>>2]=c[f>>2]|4;i=b;return}m=c[h>>2]|0;g=m+12|0;e=c[g>>2]|0;if((e|0)==(c[m+16>>2]|0)){Fc[c[(c[m>>2]|0)+40>>2]&255](m)|0}else{c[g>>2]=e+1}e=c[h>>2]|0;do{if((e|0)==0){n=0}else{if((c[e+12>>2]|0)!=(c[e+16>>2]|0)){n=e;break}if((Fc[c[(c[e>>2]|0)+36>>2]&255](e)|0)==-1){c[h>>2]=0;n=0;break}else{n=c[h>>2]|0;break}}}while(0);h=(n|0)==0;b:do{if((l|0)==0){k=31}else{do{if((c[l+12>>2]|0)==(c[l+16>>2]|0)){if(!((Fc[c[(c[l>>2]|0)+36>>2]&255](l)|0)==-1)){break}c[j>>2]=0;k=31;break b}}while(0);if(!h){break}i=b;return}}while(0);do{if((k|0)==31){if(h){break}i=b;return}}while(0);c[f>>2]=c[f>>2]|2;i=b;return}function Op(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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;j=i;k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=d|0;d=c[k>>2]|0;do{if((d|0)==0){l=0}else{if((c[d+12>>2]|0)!=(c[d+16>>2]|0)){l=d;break}if((Fc[c[(c[d>>2]|0)+36>>2]&255](d)|0)==-1){c[k>>2]=0;l=0;break}else{l=c[k>>2]|0;break}}}while(0);d=(l|0)==0;l=e|0;e=c[l>>2]|0;a:do{if((e|0)==0){m=11}else{do{if((c[e+12>>2]|0)==(c[e+16>>2]|0)){if(!((Fc[c[(c[e>>2]|0)+36>>2]&255](e)|0)==-1)){break}c[l>>2]=0;m=11;break a}}while(0);if(d){n=e}else{m=12}}}while(0);if((m|0)==11){if(d){m=12}else{n=0}}if((m|0)==12){c[f>>2]=c[f>>2]|6;o=0;i=j;return o|0}d=c[k>>2]|0;e=c[d+12>>2]|0;if((e|0)==(c[d+16>>2]|0)){p=(Fc[c[(c[d>>2]|0)+36>>2]&255](d)|0)&255}else{p=a[e]|0}do{if(p<<24>>24>-1){e=g+8|0;if((b[(c[e>>2]|0)+(p<<24>>24<<1)>>1]&2048)==0){break}d=g;q=(Hc[c[(c[d>>2]|0)+36>>2]&63](g,p,0)|0)<<24>>24;r=c[k>>2]|0;s=r+12|0;t=c[s>>2]|0;if((t|0)==(c[r+16>>2]|0)){Fc[c[(c[r>>2]|0)+40>>2]&255](r)|0;u=q;v=h;w=n;x=n}else{c[s>>2]=t+1;u=q;v=h;w=n;x=n}while(1){y=u-48|0;q=v-1|0;t=c[k>>2]|0;do{if((t|0)==0){z=0}else{if((c[t+12>>2]|0)!=(c[t+16>>2]|0)){z=t;break}if((Fc[c[(c[t>>2]|0)+36>>2]&255](t)|0)==-1){c[k>>2]=0;z=0;break}else{z=c[k>>2]|0;break}}}while(0);t=(z|0)==0;do{if((w|0)==0){A=0;B=x}else{if((c[w+12>>2]|0)!=(c[w+16>>2]|0)){A=w;B=x;break}if(!((Fc[c[(c[w>>2]|0)+36>>2]&255](w)|0)==-1)){A=x;B=x;break}c[l>>2]=0;A=0;B=0}}while(0);C=c[k>>2]|0;if(!((t^(A|0)==0)&(q|0)>0)){m=40;break}s=c[C+12>>2]|0;if((s|0)==(c[C+16>>2]|0)){D=(Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)&255}else{D=a[s]|0}if(!(D<<24>>24>-1)){o=y;m=52;break}if((b[(c[e>>2]|0)+(D<<24>>24<<1)>>1]&2048)==0){o=y;m=52;break}s=((Hc[c[(c[d>>2]|0)+36>>2]&63](g,D,0)|0)<<24>>24)+(y*10|0)|0;r=c[k>>2]|0;E=r+12|0;F=c[E>>2]|0;if((F|0)==(c[r+16>>2]|0)){Fc[c[(c[r>>2]|0)+40>>2]&255](r)|0;u=s;v=q;w=A;x=B;continue}else{c[E>>2]=F+1;u=s;v=q;w=A;x=B;continue}}if((m|0)==40){do{if((C|0)==0){G=0}else{if((c[C+12>>2]|0)!=(c[C+16>>2]|0)){G=C;break}if((Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0)==-1){c[k>>2]=0;G=0;break}else{G=c[k>>2]|0;break}}}while(0);d=(G|0)==0;b:do{if((B|0)==0){m=50}else{do{if((c[B+12>>2]|0)==(c[B+16>>2]|0)){if(!((Fc[c[(c[B>>2]|0)+36>>2]&255](B)|0)==-1)){break}c[l>>2]=0;m=50;break b}}while(0);if(d){o=y}else{break}i=j;return o|0}}while(0);do{if((m|0)==50){if(d){break}else{o=y}i=j;return o|0}}while(0);c[f>>2]=c[f>>2]|2;o=y;i=j;return o|0}else if((m|0)==52){i=j;return o|0}}}while(0);c[f>>2]=c[f>>2]|4;o=0;i=j;return o|0}function Pp(a,b,d,e,f,g,h,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;l=i;i=i+48|0;m=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[m>>2];m=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[m>>2];m=l|0;n=l+16|0;o=l+24|0;p=l+32|0;q=l+40|0;Lm(n,f);r=n|0;n=c[r>>2]|0;if(!((c[8714]|0)==-1)){c[m>>2]=34856;c[m+4>>2]=16;c[m+8>>2]=0;mm(34856,m,114)}m=(c[8715]|0)-1|0;s=c[n+8>>2]|0;do{if((c[n+12>>2]|0)-s>>2>>>0>m>>>0){t=c[s+(m<<2)>>2]|0;if((t|0)==0){break}u=t;Ul(c[r>>2]|0)|0;c[g>>2]=0;v=d|0;a:do{if((j|0)==(k|0)){w=71}else{x=e|0;y=t;z=t;A=t;B=b;C=p|0;D=q|0;E=o|0;F=j;G=0;b:while(1){H=G;while(1){if((H|0)!=0){w=71;break a}I=c[v>>2]|0;do{if((I|0)==0){J=1;K=0}else{L=c[I+12>>2]|0;if((L|0)==(c[I+16>>2]|0)){M=Fc[c[(c[I>>2]|0)+36>>2]&255](I)|0}else{M=c[L>>2]|0}if(!((M|0)==-1)){J=0;K=I;break}c[v>>2]=0;J=1;K=0}}while(0);I=c[x>>2]|0;do{if((I|0)==0){w=23}else{L=c[I+12>>2]|0;if((L|0)==(c[I+16>>2]|0)){N=Fc[c[(c[I>>2]|0)+36>>2]&255](I)|0}else{N=c[L>>2]|0}if((N|0)==-1){c[x>>2]=0;w=23;break}else{if(J){O=I;break}else{w=25;break b}}}}while(0);if((w|0)==23){w=0;if(J){w=25;break b}else{O=0}}if((Hc[c[(c[y>>2]|0)+52>>2]&63](u,c[F>>2]|0,0)|0)<<24>>24==37){w=28;break}if(Hc[c[(c[z>>2]|0)+12>>2]&63](u,8192,c[F>>2]|0)|0){P=F;w=38;break}Q=K+12|0;I=c[Q>>2]|0;R=K+16|0;if((I|0)==(c[R>>2]|0)){S=Fc[c[(c[K>>2]|0)+36>>2]&255](K)|0}else{S=c[I>>2]|0}I=Qc[c[(c[A>>2]|0)+28>>2]&63](u,S)|0;if((I|0)==(Qc[c[(c[A>>2]|0)+28>>2]&63](u,c[F>>2]|0)|0)){w=66;break}c[g>>2]=4;H=4}c:do{if((w|0)==28){w=0;H=F+4|0;if((H|0)==(k|0)){w=29;break b}I=Hc[c[(c[y>>2]|0)+52>>2]&63](u,c[H>>2]|0,0)|0;if((I<<24>>24|0)==69|(I<<24>>24|0)==48){L=F+8|0;if((L|0)==(k|0)){w=32;break b}T=I;U=Hc[c[(c[y>>2]|0)+52>>2]&63](u,c[L>>2]|0,0)|0;V=L}else{T=0;U=I;V=H}H=c[(c[B>>2]|0)+36>>2]|0;c[C>>2]=K;c[D>>2]=O;Oc[H&15](o,b,p,q,f,g,h,U,T);c[v>>2]=c[E>>2];W=V+4|0}else if((w|0)==38){while(1){w=0;H=P+4|0;if((H|0)==(k|0)){X=k;break}if(Hc[c[(c[z>>2]|0)+12>>2]&63](u,8192,c[H>>2]|0)|0){P=H;w=38}else{X=H;break}}H=K;I=O;L=O;while(1){do{if((H|0)==0){Y=1;Z=0}else{_=c[H+12>>2]|0;if((_|0)==(c[H+16>>2]|0)){$=Fc[c[(c[H>>2]|0)+36>>2]&255](H)|0}else{$=c[_>>2]|0}if(!(($|0)==-1)){Y=0;Z=H;break}c[v>>2]=0;Y=1;Z=0}}while(0);do{if((I|0)==0){aa=L;w=53}else{_=c[I+12>>2]|0;if((_|0)==(c[I+16>>2]|0)){ba=Fc[c[(c[I>>2]|0)+36>>2]&255](I)|0}else{ba=c[_>>2]|0}if((ba|0)==-1){c[x>>2]=0;aa=0;w=53;break}else{if(Y^(L|0)==0){ca=L;da=L;break}else{W=X;break c}}}}while(0);if((w|0)==53){w=0;if(Y){W=X;break c}else{ca=0;da=aa}}_=Z+12|0;ea=c[_>>2]|0;fa=Z+16|0;if((ea|0)==(c[fa>>2]|0)){ga=Fc[c[(c[Z>>2]|0)+36>>2]&255](Z)|0}else{ga=c[ea>>2]|0}if(!(Hc[c[(c[z>>2]|0)+12>>2]&63](u,8192,ga)|0)){W=X;break c}ea=c[_>>2]|0;if((ea|0)==(c[fa>>2]|0)){Fc[c[(c[Z>>2]|0)+40>>2]&255](Z)|0;H=Z;I=ca;L=da;continue}else{c[_>>2]=ea+4;H=Z;I=ca;L=da;continue}}}else if((w|0)==66){w=0;L=c[Q>>2]|0;if((L|0)==(c[R>>2]|0)){Fc[c[(c[K>>2]|0)+40>>2]&255](K)|0}else{c[Q>>2]=L+4}W=F+4|0}}while(0);if((W|0)==(k|0)){w=71;break a}F=W;G=c[g>>2]|0}if((w|0)==25){c[g>>2]=4;ha=K;break}else if((w|0)==29){c[g>>2]=4;ha=K;break}else if((w|0)==32){c[g>>2]=4;ha=K;break}}}while(0);if((w|0)==71){ha=c[v>>2]|0}u=d|0;do{if((ha|0)==0){ia=1;ja=0}else{t=c[ha+12>>2]|0;if((t|0)==(c[ha+16>>2]|0)){ka=Fc[c[(c[ha>>2]|0)+36>>2]&255](ha)|0}else{ka=c[t>>2]|0}if(!((ka|0)==-1)){ia=0;ja=ha;break}c[u>>2]=0;ia=1;ja=0}}while(0);u=e|0;v=c[u>>2]|0;do{if((v|0)==0){w=84}else{t=c[v+12>>2]|0;if((t|0)==(c[v+16>>2]|0)){la=Fc[c[(c[v>>2]|0)+36>>2]&255](v)|0}else{la=c[t>>2]|0}if((la|0)==-1){c[u>>2]=0;w=84;break}if(!ia){break}ma=a|0;c[ma>>2]=ja;i=l;return}}while(0);do{if((w|0)==84){if(ia){break}ma=a|0;c[ma>>2]=ja;i=l;return}}while(0);c[g>>2]=c[g>>2]|2;ma=a|0;c[ma>>2]=ja;i=l;return}}while(0);l=pc(4)|0;lu(l);Fb(l|0,25544,156)}function Qp(a){a=a|0;Sl(a|0);Pu(a);return}function Rp(a){a=a|0;Sl(a|0);return}function Sp(a){a=a|0;return 2}function Tp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0;j=i;i=i+16|0;k=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[k>>2];k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+8|0;c[k>>2]=c[d>>2];c[l>>2]=c[e>>2];Pp(a,b,k,l,f,g,h,19344,19376);i=j;return}function Up(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;k=i;i=i+16|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=k|0;m=k+8|0;n=d+8|0;o=Fc[c[(c[n>>2]|0)+20>>2]&255](n)|0;c[l>>2]=c[e>>2];c[m>>2]=c[f>>2];f=a[o]|0;if((f&1)==0){p=(f&255)>>>1;q=o+4|0;r=o+4|0}else{f=c[o+8>>2]|0;p=c[o+4>>2]|0;q=f;r=f}Pp(b,d,l,m,g,h,j,q,r+(p<<2)|0);i=k;return}function Vp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=i;i=i+32|0;k=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[k>>2];k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+8|0;m=j+24|0;Lm(m,f);f=m|0;m=c[f>>2]|0;if(!((c[8714]|0)==-1)){c[l>>2]=34856;c[l+4>>2]=16;c[l+8>>2]=0;mm(34856,l,114)}l=(c[8715]|0)-1|0;n=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-n>>2>>>0>l>>>0){o=c[n+(l<<2)>>2]|0;if((o|0)==0){break}Ul(c[f>>2]|0)|0;p=c[e>>2]|0;q=b+8|0;r=Fc[c[c[q>>2]>>2]&255](q)|0;c[k>>2]=p;p=(Bo(d,k,r,r+168|0,o,g,0)|0)-r|0;if((p|0)>=168){s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}c[h+24>>2]=((p|0)/12|0|0)%7|0;s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}}while(0);j=pc(4)|0;lu(j);Fb(j|0,25544,156)}function Wp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=i;i=i+32|0;k=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[k>>2];k=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[k>>2];k=j|0;l=j+8|0;m=j+24|0;Lm(m,f);f=m|0;m=c[f>>2]|0;if(!((c[8714]|0)==-1)){c[l>>2]=34856;c[l+4>>2]=16;c[l+8>>2]=0;mm(34856,l,114)}l=(c[8715]|0)-1|0;n=c[m+8>>2]|0;do{if((c[m+12>>2]|0)-n>>2>>>0>l>>>0){o=c[n+(l<<2)>>2]|0;if((o|0)==0){break}Ul(c[f>>2]|0)|0;p=c[e>>2]|0;q=b+8|0;r=Fc[c[(c[q>>2]|0)+4>>2]&255](q)|0;c[k>>2]=p;p=(Bo(d,k,r,r+288|0,o,g,0)|0)-r|0;if((p|0)>=288){s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}c[h+16>>2]=((p|0)/12|0|0)%12|0;s=4;t=0;u=d|0;v=c[u>>2]|0;w=a|0;c[w>>2]=v;i=j;return}}while(0);j=pc(4)|0;lu(j);Fb(j|0,25544,156)}function Xp(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;b=i;i=i+32|0;j=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[j>>2];j=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[j>>2];j=b|0;k=b+8|0;l=b+24|0;Lm(l,f);f=l|0;l=c[f>>2]|0;if(!((c[8714]|0)==-1)){c[k>>2]=34856;c[k+4>>2]=16;c[k+8>>2]=0;mm(34856,k,114)}k=(c[8715]|0)-1|0;m=c[l+8>>2]|0;do{if((c[l+12>>2]|0)-m>>2>>>0>k>>>0){n=c[m+(k<<2)>>2]|0;if((n|0)==0){break}Ul(c[f>>2]|0)|0;c[j>>2]=c[e>>2];o=aq(d,j,g,n,4)|0;if((c[g>>2]&4|0)!=0){p=4;q=0;r=d|0;s=c[r>>2]|0;t=a|0;c[t>>2]=s;i=b;return}if((o|0)<69){u=o+2e3|0}else{u=(o-69|0)>>>0<31>>>0?o+1900|0:o}c[h+20>>2]=u-1900;p=4;q=0;r=d|0;s=c[r>>2]|0;t=a|0;c[t>>2]=s;i=b;return}}while(0);b=pc(4)|0;lu(b);Fb(b|0,25544,156)}function Yp(b,d,e,f,g,h,j,k,l){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;l=i;i=i+328|0;m=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[m>>2];m=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[m>>2];m=l|0;n=l+8|0;o=l+16|0;p=l+24|0;q=l+32|0;r=l+40|0;s=l+48|0;t=l+56|0;u=l+64|0;v=l+72|0;w=l+80|0;x=l+88|0;y=l+96|0;z=l+112|0;A=l+120|0;B=l+128|0;C=l+136|0;D=l+144|0;E=l+152|0;F=l+160|0;G=l+168|0;H=l+176|0;I=l+184|0;J=l+192|0;K=l+200|0;L=l+208|0;M=l+216|0;N=l+224|0;O=l+232|0;P=l+240|0;Q=l+248|0;R=l+256|0;S=l+264|0;T=l+272|0;U=l+280|0;V=l+288|0;W=l+296|0;X=l+304|0;Y=l+312|0;Z=l+320|0;c[h>>2]=0;Lm(z,g);_=z|0;z=c[_>>2]|0;if(!((c[8714]|0)==-1)){c[y>>2]=34856;c[y+4>>2]=16;c[y+8>>2]=0;mm(34856,y,114)}y=(c[8715]|0)-1|0;$=c[z+8>>2]|0;do{if((c[z+12>>2]|0)-$>>2>>>0>y>>>0){aa=c[$+(y<<2)>>2]|0;if((aa|0)==0){break}ba=aa;Ul(c[_>>2]|0)|0;a:do{switch(k<<24>>24|0){case 84:{aa=e|0;c[S>>2]=c[aa>>2];c[T>>2]=c[f>>2];Pp(R,d,S,T,g,h,j,19208,19240);c[aa>>2]=c[R>>2];break};case 119:{c[o>>2]=c[f>>2];aa=aq(e,o,h,ba,1)|0;ca=c[h>>2]|0;if((ca&4|0)==0&(aa|0)<7){c[j+24>>2]=aa;break a}else{c[h>>2]=ca|4;break a}break};case 77:{c[q>>2]=c[f>>2];ca=aq(e,q,h,ba,2)|0;aa=c[h>>2]|0;if((aa&4|0)==0&(ca|0)<60){c[j+4>>2]=ca;break a}else{c[h>>2]=aa|4;break a}break};case 110:case 116:{c[J>>2]=c[f>>2];Zp(0,e,J,h,ba);break};case 82:{aa=e|0;c[P>>2]=c[aa>>2];c[Q>>2]=c[f>>2];Pp(O,d,P,Q,g,h,j,19240,19260);c[aa>>2]=c[O>>2];break};case 106:{c[s>>2]=c[f>>2];aa=aq(e,s,h,ba,3)|0;ca=c[h>>2]|0;if((ca&4|0)==0&(aa|0)<366){c[j+28>>2]=aa;break a}else{c[h>>2]=ca|4;break a}break};case 89:{c[m>>2]=c[f>>2];ca=aq(e,m,h,ba,4)|0;if((c[h>>2]&4|0)!=0){break a}c[j+20>>2]=ca-1900;break};case 37:{c[Z>>2]=c[f>>2];$p(0,e,Z,h,ba);break};case 109:{c[r>>2]=c[f>>2];ca=aq(e,r,h,ba,2)|0;aa=c[h>>2]|0;if((aa&4|0)==0&(ca|0)<13){c[j+16>>2]=ca-1;break a}else{c[h>>2]=aa|4;break a}break};case 72:{c[u>>2]=c[f>>2];aa=aq(e,u,h,ba,2)|0;ca=c[h>>2]|0;if((ca&4|0)==0&(aa|0)<24){c[j+8>>2]=aa;break a}else{c[h>>2]=ca|4;break a}break};case 98:case 66:case 104:{ca=c[f>>2]|0;aa=d+8|0;da=Fc[c[(c[aa>>2]|0)+4>>2]&255](aa)|0;c[w>>2]=ca;ca=(Bo(e,w,da,da+288|0,ba,h,0)|0)-da|0;if((ca|0)>=288){break a}c[j+16>>2]=((ca|0)/12|0|0)%12|0;break};case 68:{ca=e|0;c[E>>2]=c[ca>>2];c[F>>2]=c[f>>2];Pp(D,d,E,F,g,h,j,19312,19344);c[ca>>2]=c[D>>2];break};case 112:{c[K>>2]=c[f>>2];_p(d,j+8|0,e,K,h,ba);break};case 114:{ca=e|0;c[M>>2]=c[ca>>2];c[N>>2]=c[f>>2];Pp(L,d,M,N,g,h,j,19264,19308);c[ca>>2]=c[L>>2];break};case 73:{ca=j+8|0;c[t>>2]=c[f>>2];da=aq(e,t,h,ba,2)|0;aa=c[h>>2]|0;do{if((aa&4|0)==0){if(!((da-1|0)>>>0<12>>>0)){break}c[ca>>2]=da;break a}}while(0);c[h>>2]=aa|4;break};case 120:{da=c[(c[d>>2]|0)+20>>2]|0;c[U>>2]=c[e>>2];c[V>>2]=c[f>>2];Mc[da&127](b,d,U,V,g,h,j);i=l;return};case 88:{da=d+8|0;ca=Fc[c[(c[da>>2]|0)+24>>2]&255](da)|0;da=e|0;c[X>>2]=c[da>>2];c[Y>>2]=c[f>>2];ea=a[ca]|0;if((ea&1)==0){fa=(ea&255)>>>1;ga=ca+4|0;ha=ca+4|0}else{ea=c[ca+8>>2]|0;fa=c[ca+4>>2]|0;ga=ea;ha=ea}Pp(W,d,X,Y,g,h,j,ga,ha+(fa<<2)|0);c[da>>2]=c[W>>2];break};case 121:{c[n>>2]=c[f>>2];da=aq(e,n,h,ba,4)|0;if((c[h>>2]&4|0)!=0){break a}if((da|0)<69){ia=da+2e3|0}else{ia=(da-69|0)>>>0<31>>>0?da+1900|0:da}c[j+20>>2]=ia-1900;break};case 70:{da=e|0;c[H>>2]=c[da>>2];c[I>>2]=c[f>>2];Pp(G,d,H,I,g,h,j,19176,19208);c[da>>2]=c[G>>2];break};case 100:case 101:{da=j+12|0;c[v>>2]=c[f>>2];ea=aq(e,v,h,ba,2)|0;ca=c[h>>2]|0;do{if((ca&4|0)==0){if(!((ea-1|0)>>>0<31>>>0)){break}c[da>>2]=ea;break a}}while(0);c[h>>2]=ca|4;break};case 83:{c[p>>2]=c[f>>2];ea=aq(e,p,h,ba,2)|0;da=c[h>>2]|0;if((da&4|0)==0&(ea|0)<61){c[j>>2]=ea;break a}else{c[h>>2]=da|4;break a}break};case 99:{da=d+8|0;ea=Fc[c[(c[da>>2]|0)+12>>2]&255](da)|0;da=e|0;c[B>>2]=c[da>>2];c[C>>2]=c[f>>2];aa=a[ea]|0;if((aa&1)==0){ja=(aa&255)>>>1;ka=ea+4|0;la=ea+4|0}else{aa=c[ea+8>>2]|0;ja=c[ea+4>>2]|0;ka=aa;la=aa}Pp(A,d,B,C,g,h,j,ka,la+(ja<<2)|0);c[da>>2]=c[A>>2];break};case 97:case 65:{da=c[f>>2]|0;aa=d+8|0;ea=Fc[c[c[aa>>2]>>2]&255](aa)|0;c[x>>2]=da;da=(Bo(e,x,ea,ea+168|0,ba,h,0)|0)-ea|0;if((da|0)>=168){break a}c[j+24>>2]=((da|0)/12|0|0)%7|0;break};default:{c[h>>2]=c[h>>2]|4}}}while(0);c[b>>2]=c[e>>2];i=l;return}}while(0);l=pc(4)|0;lu(l);Fb(l|0,25544,156)}function Zp(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;a=i;g=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[g>>2];g=b|0;b=d|0;d=f;a:while(1){h=c[g>>2]|0;do{if((h|0)==0){j=1}else{k=c[h+12>>2]|0;if((k|0)==(c[h+16>>2]|0)){l=Fc[c[(c[h>>2]|0)+36>>2]&255](h)|0}else{l=c[k>>2]|0}if((l|0)==-1){c[g>>2]=0;j=1;break}else{j=(c[g>>2]|0)==0;break}}}while(0);h=c[b>>2]|0;do{if((h|0)==0){m=15}else{k=c[h+12>>2]|0;if((k|0)==(c[h+16>>2]|0)){n=Fc[c[(c[h>>2]|0)+36>>2]&255](h)|0}else{n=c[k>>2]|0}if((n|0)==-1){c[b>>2]=0;m=15;break}else{if(j){o=h;break}else{p=h;break a}}}}while(0);if((m|0)==15){m=0;if(j){p=0;break}else{o=0}}h=c[g>>2]|0;k=c[h+12>>2]|0;if((k|0)==(c[h+16>>2]|0)){q=Fc[c[(c[h>>2]|0)+36>>2]&255](h)|0}else{q=c[k>>2]|0}if(!(Hc[c[(c[d>>2]|0)+12>>2]&63](f,8192,q)|0)){p=o;break}k=c[g>>2]|0;h=k+12|0;r=c[h>>2]|0;if((r|0)==(c[k+16>>2]|0)){Fc[c[(c[k>>2]|0)+40>>2]&255](k)|0;continue}else{c[h>>2]=r+4;continue}}o=c[g>>2]|0;do{if((o|0)==0){s=1}else{q=c[o+12>>2]|0;if((q|0)==(c[o+16>>2]|0)){t=Fc[c[(c[o>>2]|0)+36>>2]&255](o)|0}else{t=c[q>>2]|0}if((t|0)==-1){c[g>>2]=0;s=1;break}else{s=(c[g>>2]|0)==0;break}}}while(0);do{if((p|0)==0){m=37}else{g=c[p+12>>2]|0;if((g|0)==(c[p+16>>2]|0)){u=Fc[c[(c[p>>2]|0)+36>>2]&255](p)|0}else{u=c[g>>2]|0}if((u|0)==-1){c[b>>2]=0;m=37;break}if(!s){break}i=a;return}}while(0);do{if((m|0)==37){if(s){break}i=a;return}}while(0);c[e>>2]=c[e>>2]|2;i=a;return}function _p(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0;j=i;i=i+8|0;k=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[k>>2];k=j|0;l=b+8|0;b=Fc[c[(c[l>>2]|0)+8>>2]&255](l)|0;l=a[b]|0;if((l&1)==0){m=(l&255)>>>1}else{m=c[b+4>>2]|0}l=a[b+12|0]|0;if((l&1)==0){n=(l&255)>>>1}else{n=c[b+16>>2]|0}if((m|0)==(-n|0)){c[g>>2]=c[g>>2]|4;i=j;return}c[k>>2]=c[f>>2];f=Bo(e,k,b,b+24|0,h,g,0)|0;g=f-b|0;do{if((f|0)==(b|0)){if((c[d>>2]|0)!=12){break}c[d>>2]=0;i=j;return}}while(0);if((g|0)!=12){i=j;return}g=c[d>>2]|0;if((g|0)>=12){i=j;return}c[d>>2]=g+12;i=j;return}function $p(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;a=i;g=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[g>>2];g=b|0;b=c[g>>2]|0;do{if((b|0)==0){h=1}else{j=c[b+12>>2]|0;if((j|0)==(c[b+16>>2]|0)){k=Fc[c[(c[b>>2]|0)+36>>2]&255](b)|0}else{k=c[j>>2]|0}if((k|0)==-1){c[g>>2]=0;h=1;break}else{h=(c[g>>2]|0)==0;break}}}while(0);k=d|0;d=c[k>>2]|0;do{if((d|0)==0){l=14}else{b=c[d+12>>2]|0;if((b|0)==(c[d+16>>2]|0)){m=Fc[c[(c[d>>2]|0)+36>>2]&255](d)|0}else{m=c[b>>2]|0}if((m|0)==-1){c[k>>2]=0;l=14;break}else{if(h){n=d;break}else{l=16;break}}}}while(0);if((l|0)==14){if(h){l=16}else{n=0}}if((l|0)==16){c[e>>2]=c[e>>2]|6;i=a;return}h=c[g>>2]|0;d=c[h+12>>2]|0;if((d|0)==(c[h+16>>2]|0)){o=Fc[c[(c[h>>2]|0)+36>>2]&255](h)|0}else{o=c[d>>2]|0}if(!((Hc[c[(c[f>>2]|0)+52>>2]&63](f,o,0)|0)<<24>>24==37)){c[e>>2]=c[e>>2]|4;i=a;return}o=c[g>>2]|0;f=o+12|0;d=c[f>>2]|0;if((d|0)==(c[o+16>>2]|0)){Fc[c[(c[o>>2]|0)+40>>2]&255](o)|0}else{c[f>>2]=d+4}d=c[g>>2]|0;do{if((d|0)==0){p=1}else{f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){q=Fc[c[(c[d>>2]|0)+36>>2]&255](d)|0}else{q=c[f>>2]|0}if((q|0)==-1){c[g>>2]=0;p=1;break}else{p=(c[g>>2]|0)==0;break}}}while(0);do{if((n|0)==0){l=38}else{g=c[n+12>>2]|0;if((g|0)==(c[n+16>>2]|0)){r=Fc[c[(c[n>>2]|0)+36>>2]&255](n)|0}else{r=c[g>>2]|0}if((r|0)==-1){c[k>>2]=0;l=38;break}if(!p){break}i=a;return}}while(0);do{if((l|0)==38){if(p){break}i=a;return}}while(0);c[e>>2]=c[e>>2]|2;i=a;return}function aq(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=i;h=b;b=i;i=i+4|0;i=i+7&-8;c[b>>2]=c[h>>2];h=a|0;a=c[h>>2]|0;do{if((a|0)==0){j=1}else{k=c[a+12>>2]|0;if((k|0)==(c[a+16>>2]|0)){l=Fc[c[(c[a>>2]|0)+36>>2]&255](a)|0}else{l=c[k>>2]|0}if((l|0)==-1){c[h>>2]=0;j=1;break}else{j=(c[h>>2]|0)==0;break}}}while(0);l=b|0;b=c[l>>2]|0;do{if((b|0)==0){m=14}else{a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){n=Fc[c[(c[b>>2]|0)+36>>2]&255](b)|0}else{n=c[a>>2]|0}if((n|0)==-1){c[l>>2]=0;m=14;break}else{if(j){o=b;break}else{m=16;break}}}}while(0);if((m|0)==14){if(j){m=16}else{o=0}}if((m|0)==16){c[d>>2]=c[d>>2]|6;p=0;i=g;return p|0}j=c[h>>2]|0;b=c[j+12>>2]|0;if((b|0)==(c[j+16>>2]|0)){q=Fc[c[(c[j>>2]|0)+36>>2]&255](j)|0}else{q=c[b>>2]|0}b=e;if(!(Hc[c[(c[b>>2]|0)+12>>2]&63](e,2048,q)|0)){c[d>>2]=c[d>>2]|4;p=0;i=g;return p|0}j=e;n=(Hc[c[(c[j>>2]|0)+52>>2]&63](e,q,0)|0)<<24>>24;q=c[h>>2]|0;a=q+12|0;k=c[a>>2]|0;if((k|0)==(c[q+16>>2]|0)){Fc[c[(c[q>>2]|0)+40>>2]&255](q)|0;r=n;s=f;t=o;u=o}else{c[a>>2]=k+4;r=n;s=f;t=o;u=o}while(1){v=r-48|0;o=s-1|0;f=c[h>>2]|0;do{if((f|0)==0){w=1}else{n=c[f+12>>2]|0;if((n|0)==(c[f+16>>2]|0)){x=Fc[c[(c[f>>2]|0)+36>>2]&255](f)|0}else{x=c[n>>2]|0}if((x|0)==-1){c[h>>2]=0;w=1;break}else{w=(c[h>>2]|0)==0;break}}}while(0);do{if((t|0)==0){y=1;z=0;A=u}else{f=c[t+12>>2]|0;if((f|0)==(c[t+16>>2]|0)){B=Fc[c[(c[t>>2]|0)+36>>2]&255](t)|0}else{B=c[f>>2]|0}if((B|0)==-1){c[l>>2]=0;y=1;z=0;A=0;break}else{y=(u|0)==0;z=u;A=u;break}}}while(0);C=c[h>>2]|0;if(!((w^y)&(o|0)>0)){break}f=c[C+12>>2]|0;if((f|0)==(c[C+16>>2]|0)){D=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{D=c[f>>2]|0}if(!(Hc[c[(c[b>>2]|0)+12>>2]&63](e,2048,D)|0)){p=v;m=63;break}f=((Hc[c[(c[j>>2]|0)+52>>2]&63](e,D,0)|0)<<24>>24)+(v*10|0)|0;n=c[h>>2]|0;k=n+12|0;a=c[k>>2]|0;if((a|0)==(c[n+16>>2]|0)){Fc[c[(c[n>>2]|0)+40>>2]&255](n)|0;r=f;s=o;t=z;u=A;continue}else{c[k>>2]=a+4;r=f;s=o;t=z;u=A;continue}}if((m|0)==63){i=g;return p|0}do{if((C|0)==0){E=1}else{u=c[C+12>>2]|0;if((u|0)==(c[C+16>>2]|0)){F=Fc[c[(c[C>>2]|0)+36>>2]&255](C)|0}else{F=c[u>>2]|0}if((F|0)==-1){c[h>>2]=0;E=1;break}else{E=(c[h>>2]|0)==0;break}}}while(0);do{if((A|0)==0){m=60}else{h=c[A+12>>2]|0;if((h|0)==(c[A+16>>2]|0)){G=Fc[c[(c[A>>2]|0)+36>>2]&255](A)|0}else{G=c[h>>2]|0}if((G|0)==-1){c[l>>2]=0;m=60;break}if(E){p=v}else{break}i=g;return p|0}}while(0);do{if((m|0)==60){if(E){break}else{p=v}i=g;return p|0}}while(0);c[d>>2]=c[d>>2]|2;p=v;i=g;return p|0}function bq(b){b=b|0;var d=0,e=0,f=0;d=b+8|0;e=c[d>>2]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}f=Xa(2147483647,14472,0)|0;c[8330]=f}}while(0);if((e|0)!=(c[8330]|0)){pb(c[d>>2]|0)}Sl(b|0);Pu(b);return}function cq(b){b=b|0;var d=0,e=0,f=0,g=0;d=b+8|0;e=c[d>>2]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}f=Xa(2147483647,14472,0)|0;c[8330]=f}}while(0);if((e|0)==(c[8330]|0)){g=b|0;Sl(g);return}pb(c[d>>2]|0);g=b|0;Sl(g);return}function dq(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=i;i=i+112|0;f=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[f>>2];f=g|0;l=g+8|0;m=l|0;n=f|0;a[n]=37;o=f+1|0;a[o]=j;p=f+2|0;a[p]=k;a[f+3|0]=0;if(!(k<<24>>24==0)){a[o]=k;a[p]=j}j=gc(m|0,100,n|0,h|0,c[d+8>>2]|0)|0;d=l+j|0;l=c[e>>2]|0;if((j|0)==0){q=l;r=b|0;c[r>>2]=q;s=100;t=0;i=g;return}else{u=m;v=l;w=l}while(1){l=a[u]|0;do{if((v|0)==0){x=0;y=w}else{m=v+24|0;j=c[m>>2]|0;if((j|0)==(c[v+28>>2]|0)){e=(Qc[c[(c[v>>2]|0)+52>>2]&63](v,l&255)|0)==-1;x=e?0:v;y=e?0:w;break}else{c[m>>2]=j+1;a[j]=l;x=v;y=w;break}}}while(0);l=u+1|0;if((l|0)==(d|0)){q=y;break}else{u=l;v=x;w=y}}r=b|0;c[r>>2]=q;s=100;t=0;i=g;return}function eq(b){b=b|0;var d=0,e=0,f=0;d=b+8|0;e=c[d>>2]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}f=Xa(2147483647,14472,0)|0;c[8330]=f}}while(0);if((e|0)!=(c[8330]|0)){pb(c[d>>2]|0)}Sl(b|0);Pu(b);return}function fq(b){b=b|0;var d=0,e=0,f=0,g=0;d=b+8|0;e=c[d>>2]|0;do{if((a[51808]|0)==0){if((ub(51808)|0)==0){break}f=Xa(2147483647,14472,0)|0;c[8330]=f}}while(0);if((e|0)==(c[8330]|0)){g=b|0;Sl(g);return}pb(c[d>>2]|0);g=b|0;Sl(g);return}function gq(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;f=i;i=i+408|0;e=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[e>>2];e=f|0;k=f+400|0;l=e|0;c[k>>2]=e+400;hq(b+8|0,l,k,g,h,j);j=c[k>>2]|0;k=c[d>>2]|0;if((l|0)==(j|0)){m=k;n=a|0;c[n>>2]=m;o=400;p=0;i=f;return}else{q=l;r=k;s=k}while(1){k=c[q>>2]|0;if((r|0)==0){t=0;u=s}else{l=r+24|0;d=c[l>>2]|0;if((d|0)==(c[r+28>>2]|0)){v=Qc[c[(c[r>>2]|0)+52>>2]&63](r,k)|0}else{c[l>>2]=d+4;c[d>>2]=k;v=k}k=(v|0)==-1;t=k?0:r;u=k?0:s}k=q+4|0;if((k|0)==(j|0)){m=u;break}else{q=k;r=t;s=u}}n=a|0;c[n>>2]=m;o=400;p=0;i=f;return}function hq(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;i=i+120|0;k=j|0;l=j+112|0;m=i;i=i+4|0;i=i+7&-8;n=j+8|0;o=k|0;a[o]=37;p=k+1|0;a[p]=g;q=k+2|0;a[q]=h;a[k+3|0]=0;if(!(h<<24>>24==0)){a[p]=h;a[q]=g}g=b|0;gc(n|0,100,o|0,f|0,c[g>>2]|0)|0;c[l>>2]=0;c[l+4>>2]=0;c[m>>2]=n;n=(c[e>>2]|0)-d>>2;f=bc(c[g>>2]|0)|0;g=bu(d,m,n,l)|0;if((f|0)!=0){bc(f|0)|0}if((g|0)==-1){dr(8296)}else{c[e>>2]=d+(g<<2);i=j;return}}function iq(a){a=a|0;Sl(a|0);Pu(a);return}function jq(a){a=a|0;Sl(a|0);return}function kq(a){a=a|0;return 127}function lq(a){a=a|0;return 127}function mq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function nq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function oq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function pq(a,b){a=a|0;b=b|0;qm(a,1,45);return}function qq(a){a=a|0;return 0}function rq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function sq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function tq(a){a=a|0;Sl(a|0);Pu(a);return}function uq(a){a=a|0;Sl(a|0);return}function vq(a){a=a|0;return 127}function wq(a){a=a|0;return 127}function xq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function yq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function zq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Aq(a,b){a=a|0;b=b|0;qm(a,1,45);return}function Bq(a){a=a|0;return 0}function Cq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function Dq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function Eq(a){a=a|0;Sl(a|0);Pu(a);return}function Fq(a){a=a|0;Sl(a|0);return}function Gq(a){a=a|0;return 2147483647}function Hq(a){a=a|0;return 2147483647}function Iq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Jq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Kq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Lq(a,b){a=a|0;b=b|0;Bm(a,1,45);return}function Mq(a){a=a|0;return 0}function Nq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function Oq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function Pq(a){a=a|0;Sl(a|0);Pu(a);return}function Qq(a){a=a|0;Sl(a|0);return}function Rq(a){a=a|0;return 2147483647}function Sq(a){a=a|0;return 2147483647}function Tq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Uq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Vq(a,b){a=a|0;b=b|0;dv(a|0,0,12)|0;return}function Wq(a,b){a=a|0;b=b|0;Bm(a,1,45);return}function Xq(a){a=a|0;return 0}function Yq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function Zq(b,c){b=b|0;c=c|0;c=b;C=67109634;a[c]=C;C=C>>8;a[c+1|0]=C;C=C>>8;a[c+2|0]=C;C=C>>8;a[c+3|0]=C;return}function _q(a){a=a|0;Sl(a|0);Pu(a);return}function $q(a){a=a|0;Sl(a|0);return}function ar(b,d,e,f,g,h,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;d=i;i=i+280|0;l=e;e=i;i=i+4|0;i=i+7&-8;c[e>>2]=c[l>>2];l=f;f=i;i=i+4|0;i=i+7&-8;c[f>>2]=c[l>>2];l=d|0;m=d+16|0;n=d+120|0;o=d+128|0;p=d+136|0;q=d+144|0;r=d+152|0;s=d+160|0;t=d+176|0;u=n|0;c[u>>2]=m;v=n+4|0;c[v>>2]=194;w=m+100|0;Lm(p,h);m=p|0;x=c[m>>2]|0;if(!((c[8716]|0)==-1)){c[l>>2]=34864;c[l+4>>2]=16;c[l+8>>2]=0;mm(34864,l,114)}l=(c[8717]|0)-1|0;y=c[x+8>>2]|0;do{if((c[x+12>>2]|0)-y>>2>>>0>l>>>0){z=c[y+(l<<2)>>2]|0;if((z|0)==0){break}A=z;a[q]=0;B=f|0;c[r>>2]=c[B>>2];do{if(cr(e,r,g,p,c[h+4>>2]|0,j,q,A,n,o,w)|0){C=s|0;Sc[c[(c[z>>2]|0)+32>>2]&15](A,19160,19170,C)|0;D=t|0;E=c[o>>2]|0;F=c[u>>2]|0;G=E-F|0;do{if((G|0)>98){H=Gu(G+2|0)|0;if((H|0)!=0){I=H;J=H;break}Uu();I=0;J=0}else{I=D;J=0}}while(0);if((a[q]|0)==0){K=I}else{a[I]=45;K=I+1|0}if(F>>>0<E>>>0){G=s+10|0;H=s;L=K;M=F;while(1){N=a[M]|0;O=C;while(1){P=O+1|0;if((a[O]|0)==N<<24>>24){Q=O;break}if((P|0)==(G|0)){Q=G;break}else{O=P}}a[L]=a[19160+(Q-H)|0]|0;O=M+1|0;N=L+1|0;if(O>>>0<(c[o>>2]|0)>>>0){L=N;M=O}else{R=N;break}}}else{R=K}a[R]=0;M=dc(D|0,15784,(L=i,i=i+8|0,c[L>>2]=k,L)|0)|0;i=L;if((M|0)==1){if((J|0)==0){break}Hu(J);break}M=pc(8)|0;_l(M,15400);Fb(M|0,25560,30)}}while(0);A=e|0;z=c[A>>2]|0;do{if((z|0)==0){S=0}else{if((c[z+12>>2]|0)!=(c[z+16>>2]|0)){S=z;break}if(!((Fc[c[(c[z>>2]|0)+36>>2]&255](z)|0)==-1)){S=z;break}c[A>>2]=0;S=0}}while(0);A=(S|0)==0;z=c[B>>2]|0;do{if((z|0)==0){T=45}else{if((c[z+12>>2]|0)!=(c[z+16>>2]|0)){if(A){break}else{T=47;break}}if((Fc[c[(c[z>>2]|0)+36>>2]&255](z)|0)==-1){c[B>>2]=0;T=45;break}else{if(A){break}else{T=47;break}}}}while(0);if((T|0)==45){if(A){T=47}}if((T|0)==47){c[j>>2]=c[j>>2]|2}c[b>>2]=S;Ul(c[m>>2]|0)|0;B=c[u>>2]|0;c[u>>2]=0;if((B|0)==0){U=100;V=0;i=d;return}Dc[c[v>>2]&511](B);U=100;V=0;i=d;return}}while(0);d=pc(4)|0;lu(d);Fb(d|0,25544,156)}function br(a){a=a|0;return}
|
|
|
|
|
|
|
|
function Gu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;do{if(a>>>0<245>>>0){if(a>>>0<11>>>0){b=16}else{b=a+11&-8}d=b>>>3;e=c[7832]|0;f=e>>>(d>>>0);if((f&3|0)!=0){g=(f&1^1)+d|0;h=g<<1;i=31368+(h<<2)|0;j=31368+(h+2<<2)|0;h=c[j>>2]|0;k=h+8|0;l=c[k>>2]|0;do{if((i|0)==(l|0)){c[7832]=e&~(1<<g)}else{if(l>>>0<(c[7836]|0)>>>0){hc();return 0}m=l+12|0;if((c[m>>2]|0)==(h|0)){c[m>>2]=i;c[j>>2]=l;break}else{hc();return 0}}}while(0);l=g<<3;c[h+4>>2]=l|3;j=h+(l|4)|0;c[j>>2]=c[j>>2]|1;n=k;return n|0}if(!(b>>>0>(c[7834]|0)>>>0)){o=b;break}if((f|0)!=0){j=2<<d;l=f<<d&(j|-j);j=(l&-l)-1|0;l=j>>>12&16;i=j>>>(l>>>0);j=i>>>5&8;m=i>>>(j>>>0);i=m>>>2&4;p=m>>>(i>>>0);m=p>>>1&2;q=p>>>(m>>>0);p=q>>>1&1;r=(j|l|i|m|p)+(q>>>(p>>>0))|0;p=r<<1;q=31368+(p<<2)|0;m=31368+(p+2<<2)|0;p=c[m>>2]|0;i=p+8|0;l=c[i>>2]|0;do{if((q|0)==(l|0)){c[7832]=e&~(1<<r)}else{if(l>>>0<(c[7836]|0)>>>0){hc();return 0}j=l+12|0;if((c[j>>2]|0)==(p|0)){c[j>>2]=q;c[m>>2]=l;break}else{hc();return 0}}}while(0);l=r<<3;m=l-b|0;c[p+4>>2]=b|3;q=p;e=q+b|0;c[q+(b|4)>>2]=m|1;c[q+l>>2]=m;l=c[7834]|0;if((l|0)!=0){q=c[7837]|0;d=l>>>3;l=d<<1;f=31368+(l<<2)|0;k=c[7832]|0;h=1<<d;do{if((k&h|0)==0){c[7832]=k|h;s=f;t=31368+(l+2<<2)|0}else{d=31368+(l+2<<2)|0;g=c[d>>2]|0;if(!(g>>>0<(c[7836]|0)>>>0)){s=g;t=d;break}hc();return 0}}while(0);c[t>>2]=q;c[s+12>>2]=q;c[q+8>>2]=s;c[q+12>>2]=f}c[7834]=m;c[7837]=e;n=i;return n|0}l=c[7833]|0;if((l|0)==0){o=b;break}h=(l&-l)-1|0;l=h>>>12&16;k=h>>>(l>>>0);h=k>>>5&8;p=k>>>(h>>>0);k=p>>>2&4;r=p>>>(k>>>0);p=r>>>1&2;d=r>>>(p>>>0);r=d>>>1&1;g=c[31632+((h|l|k|p|r)+(d>>>(r>>>0))<<2)>>2]|0;r=g;d=g;p=(c[g+4>>2]&-8)-b|0;while(1){g=c[r+16>>2]|0;if((g|0)==0){k=c[r+20>>2]|0;if((k|0)==0){break}else{u=k}}else{u=g}g=(c[u+4>>2]&-8)-b|0;k=g>>>0<p>>>0;r=u;d=k?u:d;p=k?g:p}r=d;i=c[7836]|0;if(r>>>0<i>>>0){hc();return 0}e=r+b|0;m=e;if(!(r>>>0<e>>>0)){hc();return 0}e=c[d+24>>2]|0;f=c[d+12>>2]|0;do{if((f|0)==(d|0)){q=d+20|0;g=c[q>>2]|0;if((g|0)==0){k=d+16|0;l=c[k>>2]|0;if((l|0)==0){v=0;break}else{w=l;x=k}}else{w=g;x=q}while(1){q=w+20|0;g=c[q>>2]|0;if((g|0)!=0){w=g;x=q;continue}q=w+16|0;g=c[q>>2]|0;if((g|0)==0){break}else{w=g;x=q}}if(x>>>0<i>>>0){hc();return 0}else{c[x>>2]=0;v=w;break}}else{q=c[d+8>>2]|0;if(q>>>0<i>>>0){hc();return 0}g=q+12|0;if((c[g>>2]|0)!=(d|0)){hc();return 0}k=f+8|0;if((c[k>>2]|0)==(d|0)){c[g>>2]=f;c[k>>2]=q;v=f;break}else{hc();return 0}}}while(0);a:do{if((e|0)!=0){f=c[d+28>>2]|0;i=31632+(f<<2)|0;do{if((d|0)==(c[i>>2]|0)){c[i>>2]=v;if((v|0)!=0){break}c[7833]=c[7833]&~(1<<f);break a}else{if(e>>>0<(c[7836]|0)>>>0){hc();return 0}q=e+16|0;if((c[q>>2]|0)==(d|0)){c[q>>2]=v}else{c[e+20>>2]=v}if((v|0)==0){break a}}}while(0);if(v>>>0<(c[7836]|0)>>>0){hc();return 0}c[v+24>>2]=e;f=c[d+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[v+16>>2]=f;c[f+24>>2]=v;break}}}while(0);f=c[d+20>>2]|0;if((f|0)==0){break}if(f>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[v+20>>2]=f;c[f+24>>2]=v;break}}}while(0);if(p>>>0<16>>>0){e=p+b|0;c[d+4>>2]=e|3;f=r+(e+4)|0;c[f>>2]=c[f>>2]|1}else{c[d+4>>2]=b|3;c[r+(b|4)>>2]=p|1;c[r+(p+b)>>2]=p;f=c[7834]|0;if((f|0)!=0){e=c[7837]|0;i=f>>>3;f=i<<1;q=31368+(f<<2)|0;k=c[7832]|0;g=1<<i;do{if((k&g|0)==0){c[7832]=k|g;y=q;z=31368+(f+2<<2)|0}else{i=31368+(f+2<<2)|0;l=c[i>>2]|0;if(!(l>>>0<(c[7836]|0)>>>0)){y=l;z=i;break}hc();return 0}}while(0);c[z>>2]=e;c[y+12>>2]=e;c[e+8>>2]=y;c[e+12>>2]=q}c[7834]=p;c[7837]=m}n=d+8|0;return n|0}else{if(a>>>0>4294967231>>>0){o=-1;break}f=a+11|0;g=f&-8;k=c[7833]|0;if((k|0)==0){o=g;break}r=-g|0;i=f>>>8;do{if((i|0)==0){A=0}else{if(g>>>0>16777215>>>0){A=31;break}f=(i+1048320|0)>>>16&8;l=i<<f;h=(l+520192|0)>>>16&4;j=l<<h;l=(j+245760|0)>>>16&2;B=14-(h|f|l)+(j<<l>>>15)|0;A=g>>>((B+7|0)>>>0)&1|B<<1}}while(0);i=c[31632+(A<<2)>>2]|0;b:do{if((i|0)==0){C=0;D=r;E=0}else{if((A|0)==31){F=0}else{F=25-(A>>>1)|0}d=0;m=r;p=i;q=g<<F;e=0;while(1){B=c[p+4>>2]&-8;l=B-g|0;if(l>>>0<m>>>0){if((B|0)==(g|0)){C=p;D=l;E=p;break b}else{G=p;H=l}}else{G=d;H=m}l=c[p+20>>2]|0;B=c[p+16+(q>>>31<<2)>>2]|0;j=(l|0)==0|(l|0)==(B|0)?e:l;if((B|0)==0){C=G;D=H;E=j;break}else{d=G;m=H;p=B;q=q<<1;e=j}}}}while(0);if((E|0)==0&(C|0)==0){i=2<<A;r=k&(i|-i);if((r|0)==0){o=g;break}i=(r&-r)-1|0;r=i>>>12&16;e=i>>>(r>>>0);i=e>>>5&8;q=e>>>(i>>>0);e=q>>>2&4;p=q>>>(e>>>0);q=p>>>1&2;m=p>>>(q>>>0);p=m>>>1&1;I=c[31632+((i|r|e|q|p)+(m>>>(p>>>0))<<2)>>2]|0}else{I=E}if((I|0)==0){J=D;K=C}else{p=I;m=D;q=C;while(1){e=(c[p+4>>2]&-8)-g|0;r=e>>>0<m>>>0;i=r?e:m;e=r?p:q;r=c[p+16>>2]|0;if((r|0)!=0){p=r;m=i;q=e;continue}r=c[p+20>>2]|0;if((r|0)==0){J=i;K=e;break}else{p=r;m=i;q=e}}}if((K|0)==0){o=g;break}if(!(J>>>0<((c[7834]|0)-g|0)>>>0)){o=g;break}q=K;m=c[7836]|0;if(q>>>0<m>>>0){hc();return 0}p=q+g|0;k=p;if(!(q>>>0<p>>>0)){hc();return 0}e=c[K+24>>2]|0;i=c[K+12>>2]|0;do{if((i|0)==(K|0)){r=K+20|0;d=c[r>>2]|0;if((d|0)==0){j=K+16|0;B=c[j>>2]|0;if((B|0)==0){L=0;break}else{M=B;N=j}}else{M=d;N=r}while(1){r=M+20|0;d=c[r>>2]|0;if((d|0)!=0){M=d;N=r;continue}r=M+16|0;d=c[r>>2]|0;if((d|0)==0){break}else{M=d;N=r}}if(N>>>0<m>>>0){hc();return 0}else{c[N>>2]=0;L=M;break}}else{r=c[K+8>>2]|0;if(r>>>0<m>>>0){hc();return 0}d=r+12|0;if((c[d>>2]|0)!=(K|0)){hc();return 0}j=i+8|0;if((c[j>>2]|0)==(K|0)){c[d>>2]=i;c[j>>2]=r;L=i;break}else{hc();return 0}}}while(0);c:do{if((e|0)!=0){i=c[K+28>>2]|0;m=31632+(i<<2)|0;do{if((K|0)==(c[m>>2]|0)){c[m>>2]=L;if((L|0)!=0){break}c[7833]=c[7833]&~(1<<i);break c}else{if(e>>>0<(c[7836]|0)>>>0){hc();return 0}r=e+16|0;if((c[r>>2]|0)==(K|0)){c[r>>2]=L}else{c[e+20>>2]=L}if((L|0)==0){break c}}}while(0);if(L>>>0<(c[7836]|0)>>>0){hc();return 0}c[L+24>>2]=e;i=c[K+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[L+16>>2]=i;c[i+24>>2]=L;break}}}while(0);i=c[K+20>>2]|0;if((i|0)==0){break}if(i>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[L+20>>2]=i;c[i+24>>2]=L;break}}}while(0);d:do{if(J>>>0<16>>>0){e=J+g|0;c[K+4>>2]=e|3;i=q+(e+4)|0;c[i>>2]=c[i>>2]|1}else{c[K+4>>2]=g|3;c[q+(g|4)>>2]=J|1;c[q+(J+g)>>2]=J;i=J>>>3;if(J>>>0<256>>>0){e=i<<1;m=31368+(e<<2)|0;r=c[7832]|0;j=1<<i;do{if((r&j|0)==0){c[7832]=r|j;O=m;P=31368+(e+2<<2)|0}else{i=31368+(e+2<<2)|0;d=c[i>>2]|0;if(!(d>>>0<(c[7836]|0)>>>0)){O=d;P=i;break}hc();return 0}}while(0);c[P>>2]=k;c[O+12>>2]=k;c[q+(g+8)>>2]=O;c[q+(g+12)>>2]=m;break}e=p;j=J>>>8;do{if((j|0)==0){Q=0}else{if(J>>>0>16777215>>>0){Q=31;break}r=(j+1048320|0)>>>16&8;i=j<<r;d=(i+520192|0)>>>16&4;B=i<<d;i=(B+245760|0)>>>16&2;l=14-(d|r|i)+(B<<i>>>15)|0;Q=J>>>((l+7|0)>>>0)&1|l<<1}}while(0);j=31632+(Q<<2)|0;c[q+(g+28)>>2]=Q;c[q+(g+20)>>2]=0;c[q+(g+16)>>2]=0;m=c[7833]|0;l=1<<Q;if((m&l|0)==0){c[7833]=m|l;c[j>>2]=e;c[q+(g+24)>>2]=j;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break}l=c[j>>2]|0;if((Q|0)==31){R=0}else{R=25-(Q>>>1)|0}e:do{if((c[l+4>>2]&-8|0)==(J|0)){S=l}else{j=l;m=J<<R;while(1){T=j+16+(m>>>31<<2)|0;i=c[T>>2]|0;if((i|0)==0){break}if((c[i+4>>2]&-8|0)==(J|0)){S=i;break e}else{j=i;m=m<<1}}if(T>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[T>>2]=e;c[q+(g+24)>>2]=j;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break d}}}while(0);l=S+8|0;m=c[l>>2]|0;i=c[7836]|0;if(S>>>0<i>>>0){hc();return 0}if(m>>>0<i>>>0){hc();return 0}else{c[m+12>>2]=e;c[l>>2]=e;c[q+(g+8)>>2]=m;c[q+(g+12)>>2]=S;c[q+(g+24)>>2]=0;break}}}while(0);n=K+8|0;return n|0}}while(0);K=c[7834]|0;if(!(o>>>0>K>>>0)){S=K-o|0;T=c[7837]|0;if(S>>>0>15>>>0){J=T;c[7837]=J+o;c[7834]=S;c[J+(o+4)>>2]=S|1;c[J+K>>2]=S;c[T+4>>2]=o|3}else{c[7834]=0;c[7837]=0;c[T+4>>2]=K|3;S=T+(K+4)|0;c[S>>2]=c[S>>2]|1}n=T+8|0;return n|0}T=c[7835]|0;if(o>>>0<T>>>0){S=T-o|0;c[7835]=S;T=c[7838]|0;K=T;c[7838]=K+o;c[K+(o+4)>>2]=S|1;c[T+4>>2]=o|3;n=T+8|0;return n|0}do{if((c[7756]|0)==0){T=Kb(30)|0;if((T-1&T|0)==0){c[7758]=T;c[7757]=T;c[7759]=-1;c[7760]=-1;c[7761]=0;c[7943]=0;T=(Ac(0)|0)&-16^1431655768;c[7756]=T;break}else{hc();return 0}}}while(0);T=o+48|0;S=c[7758]|0;K=o+47|0;J=S+K|0;R=-S|0;S=J&R;if(!(S>>>0>o>>>0)){n=0;return n|0}Q=c[7942]|0;do{if((Q|0)!=0){O=c[7940]|0;P=O+S|0;if(P>>>0<=O>>>0|P>>>0>Q>>>0){n=0}else{break}return n|0}}while(0);f:do{if((c[7943]&4|0)==0){Q=c[7838]|0;g:do{if((Q|0)==0){U=182}else{P=Q;O=31776;while(1){V=O|0;L=c[V>>2]|0;if(!(L>>>0>P>>>0)){W=O+4|0;if((L+(c[W>>2]|0)|0)>>>0>P>>>0){break}}L=c[O+8>>2]|0;if((L|0)==0){U=182;break g}else{O=L}}if((O|0)==0){U=182;break}P=J-(c[7835]|0)&R;if(!(P>>>0<2147483647>>>0)){X=0;break}e=Tb(P|0)|0;L=(e|0)==((c[V>>2]|0)+(c[W>>2]|0)|0);Y=L?e:-1;Z=L?P:0;_=e;$=P;U=191}}while(0);do{if((U|0)==182){Q=Tb(0)|0;if((Q|0)==-1){X=0;break}P=Q;e=c[7757]|0;L=e-1|0;if((L&P|0)==0){aa=S}else{aa=S-P+(L+P&-e)|0}e=c[7940]|0;P=e+aa|0;if(!(aa>>>0>o>>>0&aa>>>0<2147483647>>>0)){X=0;break}L=c[7942]|0;if((L|0)!=0){if(P>>>0<=e>>>0|P>>>0>L>>>0){X=0;break}}L=Tb(aa|0)|0;P=(L|0)==(Q|0);Y=P?Q:-1;Z=P?aa:0;_=L;$=aa;U=191}}while(0);h:do{if((U|0)==191){L=-$|0;if(!((Y|0)==-1)){ba=Z;ca=Y;U=202;break f}do{if((_|0)!=-1&$>>>0<2147483647>>>0&$>>>0<T>>>0){P=c[7758]|0;Q=K-$+P&-P;if(!(Q>>>0<2147483647>>>0)){da=$;break}if((Tb(Q|0)|0)==-1){Tb(L|0)|0;X=Z;break h}else{da=Q+$|0;break}}else{da=$}}while(0);if((_|0)==-1){X=Z}else{ba=da;ca=_;U=202;break f}}}while(0);c[7943]=c[7943]|4;ea=X;U=199}else{ea=0;U=199}}while(0);do{if((U|0)==199){if(!(S>>>0<2147483647>>>0)){break}X=Tb(S|0)|0;_=Tb(0)|0;if(!((_|0)!=-1&(X|0)!=-1&X>>>0<_>>>0)){break}da=_-X|0;_=da>>>0>(o+40|0)>>>0;if(_){ba=_?da:ea;ca=X;U=202}}}while(0);do{if((U|0)==202){ea=(c[7940]|0)+ba|0;c[7940]=ea;if(ea>>>0>(c[7941]|0)>>>0){c[7941]=ea}ea=c[7838]|0;i:do{if((ea|0)==0){S=c[7836]|0;if((S|0)==0|ca>>>0<S>>>0){c[7836]=ca}c[7944]=ca;c[7945]=ba;c[7947]=0;c[7841]=c[7756];c[7840]=-1;S=0;do{X=S<<1;da=31368+(X<<2)|0;c[31368+(X+3<<2)>>2]=da;c[31368+(X+2<<2)>>2]=da;S=S+1|0;}while(S>>>0<32>>>0);S=ca+8|0;if((S&7|0)==0){fa=0}else{fa=-S&7}S=ba-40-fa|0;c[7838]=ca+fa;c[7835]=S;c[ca+(fa+4)>>2]=S|1;c[ca+(ba-36)>>2]=40;c[7839]=c[7760]}else{S=31776;while(1){ga=c[S>>2]|0;ha=S+4|0;ia=c[ha>>2]|0;if((ca|0)==(ga+ia|0)){U=214;break}da=c[S+8>>2]|0;if((da|0)==0){break}else{S=da}}do{if((U|0)==214){if((c[S+12>>2]&8|0)!=0){break}da=ea;if(!(da>>>0>=ga>>>0&da>>>0<ca>>>0)){break}c[ha>>2]=ia+ba;X=(c[7835]|0)+ba|0;_=ea+8|0;if((_&7|0)==0){ja=0}else{ja=-_&7}_=X-ja|0;c[7838]=da+ja;c[7835]=_;c[da+(ja+4)>>2]=_|1;c[da+(X+4)>>2]=40;c[7839]=c[7760];break i}}while(0);if(ca>>>0<(c[7836]|0)>>>0){c[7836]=ca}S=ca+ba|0;X=31776;while(1){ka=X|0;if((c[ka>>2]|0)==(S|0)){U=224;break}da=c[X+8>>2]|0;if((da|0)==0){break}else{X=da}}do{if((U|0)==224){if((c[X+12>>2]&8|0)!=0){break}c[ka>>2]=ca;S=X+4|0;c[S>>2]=(c[S>>2]|0)+ba;S=ca+8|0;if((S&7|0)==0){la=0}else{la=-S&7}S=ca+(ba+8)|0;if((S&7|0)==0){ma=0}else{ma=-S&7}S=ca+(ma+ba)|0;da=S;_=la+o|0;Z=ca+_|0;$=Z;K=S-(ca+la)-o|0;c[ca+(la+4)>>2]=o|3;j:do{if((da|0)==(c[7838]|0)){T=(c[7835]|0)+K|0;c[7835]=T;c[7838]=$;c[ca+(_+4)>>2]=T|1}else{if((da|0)==(c[7837]|0)){T=(c[7834]|0)+K|0;c[7834]=T;c[7837]=$;c[ca+(_+4)>>2]=T|1;c[ca+(T+_)>>2]=T;break}T=ba+4|0;Y=c[ca+(T+ma)>>2]|0;if((Y&3|0)==1){aa=Y&-8;W=Y>>>3;k:do{if(Y>>>0<256>>>0){V=c[ca+((ma|8)+ba)>>2]|0;R=c[ca+(ba+12+ma)>>2]|0;J=31368+(W<<1<<2)|0;do{if((V|0)!=(J|0)){if(V>>>0<(c[7836]|0)>>>0){hc();return 0}if((c[V+12>>2]|0)==(da|0)){break}hc();return 0}}while(0);if((R|0)==(V|0)){c[7832]=c[7832]&~(1<<W);break}do{if((R|0)==(J|0)){na=R+8|0}else{if(R>>>0<(c[7836]|0)>>>0){hc();return 0}L=R+8|0;if((c[L>>2]|0)==(da|0)){na=L;break}hc();return 0}}while(0);c[V+12>>2]=R;c[na>>2]=V}else{J=S;L=c[ca+((ma|24)+ba)>>2]|0;O=c[ca+(ba+12+ma)>>2]|0;do{if((O|0)==(J|0)){Q=ma|16;P=ca+(T+Q)|0;e=c[P>>2]|0;if((e|0)==0){M=ca+(Q+ba)|0;Q=c[M>>2]|0;if((Q|0)==0){oa=0;break}else{pa=Q;qa=M}}else{pa=e;qa=P}while(1){P=pa+20|0;e=c[P>>2]|0;if((e|0)!=0){pa=e;qa=P;continue}P=pa+16|0;e=c[P>>2]|0;if((e|0)==0){break}else{pa=e;qa=P}}if(qa>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[qa>>2]=0;oa=pa;break}}else{P=c[ca+((ma|8)+ba)>>2]|0;if(P>>>0<(c[7836]|0)>>>0){hc();return 0}e=P+12|0;if((c[e>>2]|0)!=(J|0)){hc();return 0}M=O+8|0;if((c[M>>2]|0)==(J|0)){c[e>>2]=O;c[M>>2]=P;oa=O;break}else{hc();return 0}}}while(0);if((L|0)==0){break}O=c[ca+(ba+28+ma)>>2]|0;V=31632+(O<<2)|0;do{if((J|0)==(c[V>>2]|0)){c[V>>2]=oa;if((oa|0)!=0){break}c[7833]=c[7833]&~(1<<O);break k}else{if(L>>>0<(c[7836]|0)>>>0){hc();return 0}R=L+16|0;if((c[R>>2]|0)==(J|0)){c[R>>2]=oa}else{c[L+20>>2]=oa}if((oa|0)==0){break k}}}while(0);if(oa>>>0<(c[7836]|0)>>>0){hc();return 0}c[oa+24>>2]=L;J=ma|16;O=c[ca+(J+ba)>>2]|0;do{if((O|0)!=0){if(O>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[oa+16>>2]=O;c[O+24>>2]=oa;break}}}while(0);O=c[ca+(T+J)>>2]|0;if((O|0)==0){break}if(O>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[oa+20>>2]=O;c[O+24>>2]=oa;break}}}while(0);ra=ca+((aa|ma)+ba)|0;sa=aa+K|0}else{ra=da;sa=K}T=ra+4|0;c[T>>2]=c[T>>2]&-2;c[ca+(_+4)>>2]=sa|1;c[ca+(sa+_)>>2]=sa;T=sa>>>3;if(sa>>>0<256>>>0){W=T<<1;Y=31368+(W<<2)|0;O=c[7832]|0;L=1<<T;do{if((O&L|0)==0){c[7832]=O|L;ta=Y;ua=31368+(W+2<<2)|0}else{T=31368+(W+2<<2)|0;V=c[T>>2]|0;if(!(V>>>0<(c[7836]|0)>>>0)){ta=V;ua=T;break}hc();return 0}}while(0);c[ua>>2]=$;c[ta+12>>2]=$;c[ca+(_+8)>>2]=ta;c[ca+(_+12)>>2]=Y;break}W=Z;L=sa>>>8;do{if((L|0)==0){va=0}else{if(sa>>>0>16777215>>>0){va=31;break}O=(L+1048320|0)>>>16&8;aa=L<<O;T=(aa+520192|0)>>>16&4;V=aa<<T;aa=(V+245760|0)>>>16&2;R=14-(T|O|aa)+(V<<aa>>>15)|0;va=sa>>>((R+7|0)>>>0)&1|R<<1}}while(0);L=31632+(va<<2)|0;c[ca+(_+28)>>2]=va;c[ca+(_+20)>>2]=0;c[ca+(_+16)>>2]=0;Y=c[7833]|0;R=1<<va;if((Y&R|0)==0){c[7833]=Y|R;c[L>>2]=W;c[ca+(_+24)>>2]=L;c[ca+(_+12)>>2]=W;c[ca+(_+8)>>2]=W;break}R=c[L>>2]|0;if((va|0)==31){wa=0}else{wa=25-(va>>>1)|0}l:do{if((c[R+4>>2]&-8|0)==(sa|0)){xa=R}else{L=R;Y=sa<<wa;while(1){ya=L+16+(Y>>>31<<2)|0;aa=c[ya>>2]|0;if((aa|0)==0){break}if((c[aa+4>>2]&-8|0)==(sa|0)){xa=aa;break l}else{L=aa;Y=Y<<1}}if(ya>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[ya>>2]=W;c[ca+(_+24)>>2]=L;c[ca+(_+12)>>2]=W;c[ca+(_+8)>>2]=W;break j}}}while(0);R=xa+8|0;Y=c[R>>2]|0;J=c[7836]|0;if(xa>>>0<J>>>0){hc();return 0}if(Y>>>0<J>>>0){hc();return 0}else{c[Y+12>>2]=W;c[R>>2]=W;c[ca+(_+8)>>2]=Y;c[ca+(_+12)>>2]=xa;c[ca+(_+24)>>2]=0;break}}}while(0);n=ca+(la|8)|0;return n|0}}while(0);X=ea;_=31776;while(1){za=c[_>>2]|0;if(!(za>>>0>X>>>0)){Aa=c[_+4>>2]|0;Ba=za+Aa|0;if(Ba>>>0>X>>>0){break}}_=c[_+8>>2]|0}_=za+(Aa-39)|0;if((_&7|0)==0){Ca=0}else{Ca=-_&7}_=za+(Aa-47+Ca)|0;Z=_>>>0<(ea+16|0)>>>0?X:_;_=Z+8|0;$=ca+8|0;if(($&7|0)==0){Da=0}else{Da=-$&7}$=ba-40-Da|0;c[7838]=ca+Da;c[7835]=$;c[ca+(Da+4)>>2]=$|1;c[ca+(ba-36)>>2]=40;c[7839]=c[7760];c[Z+4>>2]=27;c[_>>2]=c[7944];c[_+4>>2]=c[7945];c[_+8>>2]=c[7946];c[_+12>>2]=c[7947];c[7944]=ca;c[7945]=ba;c[7947]=0;c[7946]=_;_=Z+28|0;c[_>>2]=7;if((Z+32|0)>>>0<Ba>>>0){$=_;while(1){_=$+4|0;c[_>>2]=7;if(($+8|0)>>>0<Ba>>>0){$=_}else{break}}}if((Z|0)==(X|0)){break}$=Z-ea|0;_=X+($+4)|0;c[_>>2]=c[_>>2]&-2;c[ea+4>>2]=$|1;c[X+$>>2]=$;_=$>>>3;if($>>>0<256>>>0){K=_<<1;da=31368+(K<<2)|0;S=c[7832]|0;j=1<<_;do{if((S&j|0)==0){c[7832]=S|j;Ea=da;Fa=31368+(K+2<<2)|0}else{_=31368+(K+2<<2)|0;Y=c[_>>2]|0;if(!(Y>>>0<(c[7836]|0)>>>0)){Ea=Y;Fa=_;break}hc();return 0}}while(0);c[Fa>>2]=ea;c[Ea+12>>2]=ea;c[ea+8>>2]=Ea;c[ea+12>>2]=da;break}K=ea;j=$>>>8;do{if((j|0)==0){Ga=0}else{if($>>>0>16777215>>>0){Ga=31;break}S=(j+1048320|0)>>>16&8;X=j<<S;Z=(X+520192|0)>>>16&4;_=X<<Z;X=(_+245760|0)>>>16&2;Y=14-(Z|S|X)+(_<<X>>>15)|0;Ga=$>>>((Y+7|0)>>>0)&1|Y<<1}}while(0);j=31632+(Ga<<2)|0;c[ea+28>>2]=Ga;c[ea+20>>2]=0;c[ea+16>>2]=0;da=c[7833]|0;Y=1<<Ga;if((da&Y|0)==0){c[7833]=da|Y;c[j>>2]=K;c[ea+24>>2]=j;c[ea+12>>2]=ea;c[ea+8>>2]=ea;break}Y=c[j>>2]|0;if((Ga|0)==31){Ha=0}else{Ha=25-(Ga>>>1)|0}m:do{if((c[Y+4>>2]&-8|0)==($|0)){Ia=Y}else{j=Y;da=$<<Ha;while(1){Ja=j+16+(da>>>31<<2)|0;X=c[Ja>>2]|0;if((X|0)==0){break}if((c[X+4>>2]&-8|0)==($|0)){Ia=X;break m}else{j=X;da=da<<1}}if(Ja>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[Ja>>2]=K;c[ea+24>>2]=j;c[ea+12>>2]=ea;c[ea+8>>2]=ea;break i}}}while(0);$=Ia+8|0;Y=c[$>>2]|0;da=c[7836]|0;if(Ia>>>0<da>>>0){hc();return 0}if(Y>>>0<da>>>0){hc();return 0}else{c[Y+12>>2]=K;c[$>>2]=K;c[ea+8>>2]=Y;c[ea+12>>2]=Ia;c[ea+24>>2]=0;break}}}while(0);ea=c[7835]|0;if(!(ea>>>0>o>>>0)){break}Y=ea-o|0;c[7835]=Y;ea=c[7838]|0;$=ea;c[7838]=$+o;c[$+(o+4)>>2]=Y|1;c[ea+4>>2]=o|3;n=ea+8|0;return n|0}}while(0);o=Vb()|0;c[o>>2]=12;n=0;return n|0}function Hu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;if((a|0)==0){return}b=a-8|0;d=b;e=c[7836]|0;if(b>>>0<e>>>0){hc()}f=c[a-4>>2]|0;g=f&3;if((g|0)==1){hc()}h=f&-8;i=a+(h-8)|0;j=i;a:do{if((f&1|0)==0){k=c[b>>2]|0;if((g|0)==0){return}l=-8-k|0;m=a+l|0;n=m;o=k+h|0;if(m>>>0<e>>>0){hc()}if((n|0)==(c[7837]|0)){p=a+(h-4)|0;if((c[p>>2]&3|0)!=3){q=n;r=o;break}c[7834]=o;c[p>>2]=c[p>>2]&-2;c[a+(l+4)>>2]=o|1;c[i>>2]=o;return}p=k>>>3;if(k>>>0<256>>>0){k=c[a+(l+8)>>2]|0;s=c[a+(l+12)>>2]|0;t=31368+(p<<1<<2)|0;do{if((k|0)!=(t|0)){if(k>>>0<e>>>0){hc()}if((c[k+12>>2]|0)==(n|0)){break}hc()}}while(0);if((s|0)==(k|0)){c[7832]=c[7832]&~(1<<p);q=n;r=o;break}do{if((s|0)==(t|0)){u=s+8|0}else{if(s>>>0<e>>>0){hc()}v=s+8|0;if((c[v>>2]|0)==(n|0)){u=v;break}hc()}}while(0);c[k+12>>2]=s;c[u>>2]=k;q=n;r=o;break}t=m;p=c[a+(l+24)>>2]|0;v=c[a+(l+12)>>2]|0;do{if((v|0)==(t|0)){w=a+(l+20)|0;x=c[w>>2]|0;if((x|0)==0){y=a+(l+16)|0;z=c[y>>2]|0;if((z|0)==0){A=0;break}else{B=z;C=y}}else{B=x;C=w}while(1){w=B+20|0;x=c[w>>2]|0;if((x|0)!=0){B=x;C=w;continue}w=B+16|0;x=c[w>>2]|0;if((x|0)==0){break}else{B=x;C=w}}if(C>>>0<e>>>0){hc()}else{c[C>>2]=0;A=B;break}}else{w=c[a+(l+8)>>2]|0;if(w>>>0<e>>>0){hc()}x=w+12|0;if((c[x>>2]|0)!=(t|0)){hc()}y=v+8|0;if((c[y>>2]|0)==(t|0)){c[x>>2]=v;c[y>>2]=w;A=v;break}else{hc()}}}while(0);if((p|0)==0){q=n;r=o;break}v=c[a+(l+28)>>2]|0;m=31632+(v<<2)|0;do{if((t|0)==(c[m>>2]|0)){c[m>>2]=A;if((A|0)!=0){break}c[7833]=c[7833]&~(1<<v);q=n;r=o;break a}else{if(p>>>0<(c[7836]|0)>>>0){hc()}k=p+16|0;if((c[k>>2]|0)==(t|0)){c[k>>2]=A}else{c[p+20>>2]=A}if((A|0)==0){q=n;r=o;break a}}}while(0);if(A>>>0<(c[7836]|0)>>>0){hc()}c[A+24>>2]=p;t=c[a+(l+16)>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[7836]|0)>>>0){hc()}else{c[A+16>>2]=t;c[t+24>>2]=A;break}}}while(0);t=c[a+(l+20)>>2]|0;if((t|0)==0){q=n;r=o;break}if(t>>>0<(c[7836]|0)>>>0){hc()}else{c[A+20>>2]=t;c[t+24>>2]=A;q=n;r=o;break}}else{q=d;r=h}}while(0);d=q;if(!(d>>>0<i>>>0)){hc()}A=a+(h-4)|0;e=c[A>>2]|0;if((e&1|0)==0){hc()}do{if((e&2|0)==0){if((j|0)==(c[7838]|0)){B=(c[7835]|0)+r|0;c[7835]=B;c[7838]=q;c[q+4>>2]=B|1;if((q|0)!=(c[7837]|0)){return}c[7837]=0;c[7834]=0;return}if((j|0)==(c[7837]|0)){B=(c[7834]|0)+r|0;c[7834]=B;c[7837]=q;c[q+4>>2]=B|1;c[d+B>>2]=B;return}B=(e&-8)+r|0;C=e>>>3;b:do{if(e>>>0<256>>>0){u=c[a+h>>2]|0;g=c[a+(h|4)>>2]|0;b=31368+(C<<1<<2)|0;do{if((u|0)!=(b|0)){if(u>>>0<(c[7836]|0)>>>0){hc()}if((c[u+12>>2]|0)==(j|0)){break}hc()}}while(0);if((g|0)==(u|0)){c[7832]=c[7832]&~(1<<C);break}do{if((g|0)==(b|0)){D=g+8|0}else{if(g>>>0<(c[7836]|0)>>>0){hc()}f=g+8|0;if((c[f>>2]|0)==(j|0)){D=f;break}hc()}}while(0);c[u+12>>2]=g;c[D>>2]=u}else{b=i;f=c[a+(h+16)>>2]|0;t=c[a+(h|4)>>2]|0;do{if((t|0)==(b|0)){p=a+(h+12)|0;v=c[p>>2]|0;if((v|0)==0){m=a+(h+8)|0;k=c[m>>2]|0;if((k|0)==0){E=0;break}else{F=k;G=m}}else{F=v;G=p}while(1){p=F+20|0;v=c[p>>2]|0;if((v|0)!=0){F=v;G=p;continue}p=F+16|0;v=c[p>>2]|0;if((v|0)==0){break}else{F=v;G=p}}if(G>>>0<(c[7836]|0)>>>0){hc()}else{c[G>>2]=0;E=F;break}}else{p=c[a+h>>2]|0;if(p>>>0<(c[7836]|0)>>>0){hc()}v=p+12|0;if((c[v>>2]|0)!=(b|0)){hc()}m=t+8|0;if((c[m>>2]|0)==(b|0)){c[v>>2]=t;c[m>>2]=p;E=t;break}else{hc()}}}while(0);if((f|0)==0){break}t=c[a+(h+20)>>2]|0;u=31632+(t<<2)|0;do{if((b|0)==(c[u>>2]|0)){c[u>>2]=E;if((E|0)!=0){break}c[7833]=c[7833]&~(1<<t);break b}else{if(f>>>0<(c[7836]|0)>>>0){hc()}g=f+16|0;if((c[g>>2]|0)==(b|0)){c[g>>2]=E}else{c[f+20>>2]=E}if((E|0)==0){break b}}}while(0);if(E>>>0<(c[7836]|0)>>>0){hc()}c[E+24>>2]=f;b=c[a+(h+8)>>2]|0;do{if((b|0)!=0){if(b>>>0<(c[7836]|0)>>>0){hc()}else{c[E+16>>2]=b;c[b+24>>2]=E;break}}}while(0);b=c[a+(h+12)>>2]|0;if((b|0)==0){break}if(b>>>0<(c[7836]|0)>>>0){hc()}else{c[E+20>>2]=b;c[b+24>>2]=E;break}}}while(0);c[q+4>>2]=B|1;c[d+B>>2]=B;if((q|0)!=(c[7837]|0)){H=B;break}c[7834]=B;return}else{c[A>>2]=e&-2;c[q+4>>2]=r|1;c[d+r>>2]=r;H=r}}while(0);r=H>>>3;if(H>>>0<256>>>0){d=r<<1;e=31368+(d<<2)|0;A=c[7832]|0;E=1<<r;do{if((A&E|0)==0){c[7832]=A|E;I=e;J=31368+(d+2<<2)|0}else{r=31368+(d+2<<2)|0;h=c[r>>2]|0;if(!(h>>>0<(c[7836]|0)>>>0)){I=h;J=r;break}hc()}}while(0);c[J>>2]=q;c[I+12>>2]=q;c[q+8>>2]=I;c[q+12>>2]=e;return}e=q;I=H>>>8;do{if((I|0)==0){K=0}else{if(H>>>0>16777215>>>0){K=31;break}J=(I+1048320|0)>>>16&8;d=I<<J;E=(d+520192|0)>>>16&4;A=d<<E;d=(A+245760|0)>>>16&2;r=14-(E|J|d)+(A<<d>>>15)|0;K=H>>>((r+7|0)>>>0)&1|r<<1}}while(0);I=31632+(K<<2)|0;c[q+28>>2]=K;c[q+20>>2]=0;c[q+16>>2]=0;r=c[7833]|0;d=1<<K;c:do{if((r&d|0)==0){c[7833]=r|d;c[I>>2]=e;c[q+24>>2]=I;c[q+12>>2]=q;c[q+8>>2]=q}else{A=c[I>>2]|0;if((K|0)==31){L=0}else{L=25-(K>>>1)|0}d:do{if((c[A+4>>2]&-8|0)==(H|0)){M=A}else{J=A;E=H<<L;while(1){N=J+16+(E>>>31<<2)|0;h=c[N>>2]|0;if((h|0)==0){break}if((c[h+4>>2]&-8|0)==(H|0)){M=h;break d}else{J=h;E=E<<1}}if(N>>>0<(c[7836]|0)>>>0){hc()}else{c[N>>2]=e;c[q+24>>2]=J;c[q+12>>2]=q;c[q+8>>2]=q;break c}}}while(0);A=M+8|0;B=c[A>>2]|0;E=c[7836]|0;if(M>>>0<E>>>0){hc()}if(B>>>0<E>>>0){hc()}else{c[B+12>>2]=e;c[A>>2]=e;c[q+8>>2]=B;c[q+12>>2]=M;c[q+24>>2]=0;break}}}while(0);q=(c[7840]|0)-1|0;c[7840]=q;if((q|0)==0){O=31784}else{return}while(1){q=c[O>>2]|0;if((q|0)==0){break}else{O=q+8|0}}c[7840]=-1;return}function Iu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if((a|0)==0){d=Gu(b)|0;return d|0}if(b>>>0>4294967231>>>0){e=Vb()|0;c[e>>2]=12;d=0;return d|0}if(b>>>0<11>>>0){f=16}else{f=b+11&-8}e=Ju(a-8|0,f)|0;if((e|0)!=0){d=e+8|0;return d|0}e=Gu(b)|0;if((e|0)==0){d=0;return d|0}f=c[a-4>>2]|0;g=(f&-8)-((f&3|0)==0?8:4)|0;cv(e|0,a|0,g>>>0<b>>>0?g:b)|0;Hu(a);d=e;return d|0}function Ju(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;e=c[d>>2]|0;f=e&-8;g=a;h=g+f|0;i=h;j=c[7836]|0;if(g>>>0<j>>>0){hc();return 0}k=e&3;if(!((k|0)!=1&g>>>0<h>>>0)){hc();return 0}l=g+(f|4)|0;m=c[l>>2]|0;if((m&1|0)==0){hc();return 0}if((k|0)==0){if(b>>>0<256>>>0){n=0;return n|0}do{if(!(f>>>0<(b+4|0)>>>0)){if((f-b|0)>>>0>c[7758]<<1>>>0){break}else{n=a}return n|0}}while(0);n=0;return n|0}if(!(f>>>0<b>>>0)){k=f-b|0;if(!(k>>>0>15>>>0)){n=a;return n|0}c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=k|3;c[l>>2]=c[l>>2]|1;Mu(g+b|0,k);n=a;return n|0}if((i|0)==(c[7838]|0)){k=(c[7835]|0)+f|0;if(!(k>>>0>b>>>0)){n=0;return n|0}l=k-b|0;c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=l|1;c[7838]=g+b;c[7835]=l;n=a;return n|0}if((i|0)==(c[7837]|0)){l=(c[7834]|0)+f|0;if(l>>>0<b>>>0){n=0;return n|0}k=l-b|0;if(k>>>0>15>>>0){c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=k|1;c[g+l>>2]=k;o=g+(l+4)|0;c[o>>2]=c[o>>2]&-2;p=g+b|0;q=k}else{c[d>>2]=e&1|l|2;e=g+(l+4)|0;c[e>>2]=c[e>>2]|1;p=0;q=0}c[7834]=q;c[7837]=p;n=a;return n|0}if((m&2|0)!=0){n=0;return n|0}p=(m&-8)+f|0;if(p>>>0<b>>>0){n=0;return n|0}q=p-b|0;e=m>>>3;a:do{if(m>>>0<256>>>0){l=c[g+(f+8)>>2]|0;k=c[g+(f+12)>>2]|0;o=31368+(e<<1<<2)|0;do{if((l|0)!=(o|0)){if(l>>>0<j>>>0){hc();return 0}if((c[l+12>>2]|0)==(i|0)){break}hc();return 0}}while(0);if((k|0)==(l|0)){c[7832]=c[7832]&~(1<<e);break}do{if((k|0)==(o|0)){r=k+8|0}else{if(k>>>0<j>>>0){hc();return 0}s=k+8|0;if((c[s>>2]|0)==(i|0)){r=s;break}hc();return 0}}while(0);c[l+12>>2]=k;c[r>>2]=l}else{o=h;s=c[g+(f+24)>>2]|0;t=c[g+(f+12)>>2]|0;do{if((t|0)==(o|0)){u=g+(f+20)|0;v=c[u>>2]|0;if((v|0)==0){w=g+(f+16)|0;x=c[w>>2]|0;if((x|0)==0){y=0;break}else{z=x;A=w}}else{z=v;A=u}while(1){u=z+20|0;v=c[u>>2]|0;if((v|0)!=0){z=v;A=u;continue}u=z+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{z=v;A=u}}if(A>>>0<j>>>0){hc();return 0}else{c[A>>2]=0;y=z;break}}else{u=c[g+(f+8)>>2]|0;if(u>>>0<j>>>0){hc();return 0}v=u+12|0;if((c[v>>2]|0)!=(o|0)){hc();return 0}w=t+8|0;if((c[w>>2]|0)==(o|0)){c[v>>2]=t;c[w>>2]=u;y=t;break}else{hc();return 0}}}while(0);if((s|0)==0){break}t=c[g+(f+28)>>2]|0;l=31632+(t<<2)|0;do{if((o|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[7833]=c[7833]&~(1<<t);break a}else{if(s>>>0<(c[7836]|0)>>>0){hc();return 0}k=s+16|0;if((c[k>>2]|0)==(o|0)){c[k>>2]=y}else{c[s+20>>2]=y}if((y|0)==0){break a}}}while(0);if(y>>>0<(c[7836]|0)>>>0){hc();return 0}c[y+24>>2]=s;o=c[g+(f+16)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[y+16>>2]=o;c[o+24>>2]=y;break}}}while(0);o=c[g+(f+20)>>2]|0;if((o|0)==0){break}if(o>>>0<(c[7836]|0)>>>0){hc();return 0}else{c[y+20>>2]=o;c[o+24>>2]=y;break}}}while(0);if(q>>>0<16>>>0){c[d>>2]=p|c[d>>2]&1|2;y=g+(p|4)|0;c[y>>2]=c[y>>2]|1;n=a;return n|0}else{c[d>>2]=c[d>>2]&1|b|2;c[g+(b+4)>>2]=q|3;d=g+(p|4)|0;c[d>>2]=c[d>>2]|1;Mu(g+b|0,q);n=a;return n|0}return 0}function Ku(a,b){a=a|0;b=b|0;var c=0;if(a>>>0<9>>>0){c=Gu(b)|0;return c|0}else{c=Lu(a,b)|0;return c|0}return 0}function Lu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a>>>0<16>>>0?16:a;if((d-1&d|0)==0){e=d}else{a=16;while(1){if(a>>>0<d>>>0){a=a<<1}else{e=a;break}}}if(!((-64-e|0)>>>0>b>>>0)){a=Vb()|0;c[a>>2]=12;f=0;return f|0}if(b>>>0<11>>>0){g=16}else{g=b+11&-8}b=Gu(e+12+g|0)|0;if((b|0)==0){f=0;return f|0}a=b-8|0;d=a;h=e-1|0;do{if((b&h|0)==0){i=d}else{j=b+h&-e;k=j-8|0;l=a;if((k-l|0)>>>0>15>>>0){m=k}else{m=j+(e-8)|0}j=m;k=m-l|0;l=b-4|0;n=c[l>>2]|0;o=(n&-8)-k|0;if((n&3|0)==0){c[m>>2]=(c[a>>2]|0)+k;c[m+4>>2]=o;i=j;break}else{n=m+4|0;c[n>>2]=o|c[n>>2]&1|2;n=m+(o+4)|0;c[n>>2]=c[n>>2]|1;c[l>>2]=k|c[l>>2]&1|2;l=b+(k-4)|0;c[l>>2]=c[l>>2]|1;Mu(d,k);i=j;break}}}while(0);d=i+4|0;b=c[d>>2]|0;do{if((b&3|0)!=0){m=b&-8;if(!(m>>>0>(g+16|0)>>>0)){break}a=m-g|0;e=i;c[d>>2]=g|b&1|2;c[e+(g|4)>>2]=a|3;h=e+(m|4)|0;c[h>>2]=c[h>>2]|1;Mu(e+g|0,a)}}while(0);f=i+8|0;return f|0}function Mu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,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;d=a;e=d+b|0;f=e;g=c[a+4>>2]|0;a:do{if((g&1|0)==0){h=c[a>>2]|0;if((g&3|0)==0){return}i=d+(-h|0)|0;j=i;k=h+b|0;l=c[7836]|0;if(i>>>0<l>>>0){hc()}if((j|0)==(c[7837]|0)){m=d+(b+4)|0;if((c[m>>2]&3|0)!=3){n=j;o=k;break}c[7834]=k;c[m>>2]=c[m>>2]&-2;c[d+(4-h)>>2]=k|1;c[e>>2]=k;return}m=h>>>3;if(h>>>0<256>>>0){p=c[d+(8-h)>>2]|0;q=c[d+(12-h)>>2]|0;r=31368+(m<<1<<2)|0;do{if((p|0)!=(r|0)){if(p>>>0<l>>>0){hc()}if((c[p+12>>2]|0)==(j|0)){break}hc()}}while(0);if((q|0)==(p|0)){c[7832]=c[7832]&~(1<<m);n=j;o=k;break}do{if((q|0)==(r|0)){s=q+8|0}else{if(q>>>0<l>>>0){hc()}t=q+8|0;if((c[t>>2]|0)==(j|0)){s=t;break}hc()}}while(0);c[p+12>>2]=q;c[s>>2]=p;n=j;o=k;break}r=i;m=c[d+(24-h)>>2]|0;t=c[d+(12-h)>>2]|0;do{if((t|0)==(r|0)){u=16-h|0;v=d+(u+4)|0;w=c[v>>2]|0;if((w|0)==0){x=d+u|0;u=c[x>>2]|0;if((u|0)==0){y=0;break}else{z=u;A=x}}else{z=w;A=v}while(1){v=z+20|0;w=c[v>>2]|0;if((w|0)!=0){z=w;A=v;continue}v=z+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{z=w;A=v}}if(A>>>0<l>>>0){hc()}else{c[A>>2]=0;y=z;break}}else{v=c[d+(8-h)>>2]|0;if(v>>>0<l>>>0){hc()}w=v+12|0;if((c[w>>2]|0)!=(r|0)){hc()}x=t+8|0;if((c[x>>2]|0)==(r|0)){c[w>>2]=t;c[x>>2]=v;y=t;break}else{hc()}}}while(0);if((m|0)==0){n=j;o=k;break}t=c[d+(28-h)>>2]|0;l=31632+(t<<2)|0;do{if((r|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[7833]=c[7833]&~(1<<t);n=j;o=k;break a}else{if(m>>>0<(c[7836]|0)>>>0){hc()}i=m+16|0;if((c[i>>2]|0)==(r|0)){c[i>>2]=y}else{c[m+20>>2]=y}if((y|0)==0){n=j;o=k;break a}}}while(0);if(y>>>0<(c[7836]|0)>>>0){hc()}c[y+24>>2]=m;r=16-h|0;t=c[d+r>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[7836]|0)>>>0){hc()}else{c[y+16>>2]=t;c[t+24>>2]=y;break}}}while(0);t=c[d+(r+4)>>2]|0;if((t|0)==0){n=j;o=k;break}if(t>>>0<(c[7836]|0)>>>0){hc()}else{c[y+20>>2]=t;c[t+24>>2]=y;n=j;o=k;break}}else{n=a;o=b}}while(0);a=c[7836]|0;if(e>>>0<a>>>0){hc()}y=d+(b+4)|0;z=c[y>>2]|0;do{if((z&2|0)==0){if((f|0)==(c[7838]|0)){A=(c[7835]|0)+o|0;c[7835]=A;c[7838]=n;c[n+4>>2]=A|1;if((n|0)!=(c[7837]|0)){return}c[7837]=0;c[7834]=0;return}if((f|0)==(c[7837]|0)){A=(c[7834]|0)+o|0;c[7834]=A;c[7837]=n;c[n+4>>2]=A|1;c[n+A>>2]=A;return}A=(z&-8)+o|0;s=z>>>3;b:do{if(z>>>0<256>>>0){g=c[d+(b+8)>>2]|0;t=c[d+(b+12)>>2]|0;h=31368+(s<<1<<2)|0;do{if((g|0)!=(h|0)){if(g>>>0<a>>>0){hc()}if((c[g+12>>2]|0)==(f|0)){break}hc()}}while(0);if((t|0)==(g|0)){c[7832]=c[7832]&~(1<<s);break}do{if((t|0)==(h|0)){B=t+8|0}else{if(t>>>0<a>>>0){hc()}m=t+8|0;if((c[m>>2]|0)==(f|0)){B=m;break}hc()}}while(0);c[g+12>>2]=t;c[B>>2]=g}else{h=e;m=c[d+(b+24)>>2]|0;l=c[d+(b+12)>>2]|0;do{if((l|0)==(h|0)){i=d+(b+20)|0;p=c[i>>2]|0;if((p|0)==0){q=d+(b+16)|0;v=c[q>>2]|0;if((v|0)==0){C=0;break}else{D=v;E=q}}else{D=p;E=i}while(1){i=D+20|0;p=c[i>>2]|0;if((p|0)!=0){D=p;E=i;continue}i=D+16|0;p=c[i>>2]|0;if((p|0)==0){break}else{D=p;E=i}}if(E>>>0<a>>>0){hc()}else{c[E>>2]=0;C=D;break}}else{i=c[d+(b+8)>>2]|0;if(i>>>0<a>>>0){hc()}p=i+12|0;if((c[p>>2]|0)!=(h|0)){hc()}q=l+8|0;if((c[q>>2]|0)==(h|0)){c[p>>2]=l;c[q>>2]=i;C=l;break}else{hc()}}}while(0);if((m|0)==0){break}l=c[d+(b+28)>>2]|0;g=31632+(l<<2)|0;do{if((h|0)==(c[g>>2]|0)){c[g>>2]=C;if((C|0)!=0){break}c[7833]=c[7833]&~(1<<l);break b}else{if(m>>>0<(c[7836]|0)>>>0){hc()}t=m+16|0;if((c[t>>2]|0)==(h|0)){c[t>>2]=C}else{c[m+20>>2]=C}if((C|0)==0){break b}}}while(0);if(C>>>0<(c[7836]|0)>>>0){hc()}c[C+24>>2]=m;h=c[d+(b+16)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[7836]|0)>>>0){hc()}else{c[C+16>>2]=h;c[h+24>>2]=C;break}}}while(0);h=c[d+(b+20)>>2]|0;if((h|0)==0){break}if(h>>>0<(c[7836]|0)>>>0){hc()}else{c[C+20>>2]=h;c[h+24>>2]=C;break}}}while(0);c[n+4>>2]=A|1;c[n+A>>2]=A;if((n|0)!=(c[7837]|0)){F=A;break}c[7834]=A;return}else{c[y>>2]=z&-2;c[n+4>>2]=o|1;c[n+o>>2]=o;F=o}}while(0);o=F>>>3;if(F>>>0<256>>>0){z=o<<1;y=31368+(z<<2)|0;C=c[7832]|0;b=1<<o;do{if((C&b|0)==0){c[7832]=C|b;G=y;H=31368+(z+2<<2)|0}else{o=31368+(z+2<<2)|0;d=c[o>>2]|0;if(!(d>>>0<(c[7836]|0)>>>0)){G=d;H=o;break}hc()}}while(0);c[H>>2]=n;c[G+12>>2]=n;c[n+8>>2]=G;c[n+12>>2]=y;return}y=n;G=F>>>8;do{if((G|0)==0){I=0}else{if(F>>>0>16777215>>>0){I=31;break}H=(G+1048320|0)>>>16&8;z=G<<H;b=(z+520192|0)>>>16&4;C=z<<b;z=(C+245760|0)>>>16&2;o=14-(b|H|z)+(C<<z>>>15)|0;I=F>>>((o+7|0)>>>0)&1|o<<1}}while(0);G=31632+(I<<2)|0;c[n+28>>2]=I;c[n+20>>2]=0;c[n+16>>2]=0;o=c[7833]|0;z=1<<I;if((o&z|0)==0){c[7833]=o|z;c[G>>2]=y;c[n+24>>2]=G;c[n+12>>2]=n;c[n+8>>2]=n;return}z=c[G>>2]|0;if((I|0)==31){J=0}else{J=25-(I>>>1)|0}c:do{if((c[z+4>>2]&-8|0)==(F|0)){K=z}else{I=z;G=F<<J;while(1){L=I+16+(G>>>31<<2)|0;o=c[L>>2]|0;if((o|0)==0){break}if((c[o+4>>2]&-8|0)==(F|0)){K=o;break c}else{I=o;G=G<<1}}if(L>>>0<(c[7836]|0)>>>0){hc()}c[L>>2]=y;c[n+24>>2]=I;c[n+12>>2]=n;c[n+8>>2]=n;return}}while(0);L=K+8|0;F=c[L>>2]|0;J=c[7836]|0;if(K>>>0<J>>>0){hc()}if(F>>>0<J>>>0){hc()}c[F+12>>2]=y;c[L>>2]=y;c[n+8>>2]=F;c[n+12>>2]=K;c[n+24>>2]=0;return}function Nu(a){a=a|0;var b=0,d=0,e=0;b=(a|0)==0?1:a;while(1){d=Gu(b)|0;if((d|0)!=0){e=10;break}a=(I=c[10888]|0,c[10888]=I+0,I);if((a|0)==0){break}Uc[a&3]()}if((e|0)==10){return d|0}d=pc(4)|0;c[d>>2]=19472;Fb(d|0,25528,174);return 0}function Ou(a){a=a|0;return Nu(a)|0}function Pu(a){a=a|0;if((a|0)==0){return}Hu(a);return}function Qu(a){a=a|0;Pu(a);return}function Ru(a){a=a|0;Pu(a);return}function Su(a){a=a|0;return}function Tu(a){a=a|0;return 9160}function Uu(){var a=0;a=pc(4)|0;c[a>>2]=19472;Fb(a|0,25528,174)}function Vu(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=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,L=0,M=0,N=0,O=0.0,P=0.0,Q=0,R=0,S=0,T=0,U=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0.0,ea=0.0,fa=0,ha=0,ia=0.0,ja=0.0,ka=0,la=0.0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0.0,va=0,wa=0.0,xa=0,ya=0.0,za=0,Aa=0,Ba=0,Ca=0.0,Da=0,Ea=0.0,Fa=0.0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0.0,xc=0,yc=0,zc=0.0,Ac=0.0,Bc=0.0,Cc=0.0,Dc=0.0,Ec=0.0,Fc=0.0,Gc=0,Hc=0,Ic=0.0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0;g=i;i=i+512|0;h=g|0;if((e|0)==1){j=-1074;k=53}else if((e|0)==0){j=-149;k=24}else if((e|0)==2){j=-1074;k=53}else{l=0.0;i=g;return+l}e=b+4|0;m=b+100|0;do{n=c[e>>2]|0;if(n>>>0<(c[m>>2]|0)>>>0){c[e>>2]=n+1;o=d[n]|0}else{o=Yu(b)|0}}while((Sa(o|0)|0)!=0);do{if((o|0)==45|(o|0)==43){n=1-(((o|0)==45)<<1)|0;p=c[e>>2]|0;if(p>>>0<(c[m>>2]|0)>>>0){c[e>>2]=p+1;q=d[p]|0;r=n;break}else{q=Yu(b)|0;r=n;break}}else{q=o;r=1}}while(0);o=0;n=q;while(1){if((n|32|0)!=(a[3344+o|0]|0)){s=o;t=n;break}do{if(o>>>0<7>>>0){q=c[e>>2]|0;if(q>>>0<(c[m>>2]|0)>>>0){c[e>>2]=q+1;u=d[q]|0;break}else{u=Yu(b)|0;break}}else{u=n}}while(0);q=o+1|0;if(q>>>0<8>>>0){o=q;n=u}else{s=q;t=u;break}}do{if((s|0)==3){x=23}else if((s|0)!=8){u=(f|0)==0;if(!(s>>>0<4>>>0|u)){if((s|0)==8){break}else{x=23;break}}a:do{if((s|0)==0){n=0;o=t;while(1){if((o|32|0)!=(a[14392+n|0]|0)){y=o;z=n;break a}do{if(n>>>0<2>>>0){q=c[e>>2]|0;if(q>>>0<(c[m>>2]|0)>>>0){c[e>>2]=q+1;A=d[q]|0;break}else{A=Yu(b)|0;break}}else{A=o}}while(0);q=n+1|0;if(q>>>0<3>>>0){n=q;o=A}else{y=A;z=q;break}}}else{y=t;z=s}}while(0);if((z|0)==0){do{if((y|0)==48){o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;B=d[o]|0}else{B=Yu(b)|0}if((B|32|0)!=120){if((c[m>>2]|0)==0){C=48;break}c[e>>2]=(c[e>>2]|0)-1;C=48;break}o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;D=d[o]|0;E=0}else{D=Yu(b)|0;E=0}while(1){if((D|0)==46){x=70;break}else if((D|0)!=48){F=D;G=0;H=0;I=0;J=0;L=E;M=0;N=0;O=1.0;P=0.0;Q=0;break}o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;D=d[o]|0;E=1;continue}else{D=Yu(b)|0;E=1;continue}}b:do{if((x|0)==70){o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;R=d[o]|0}else{R=Yu(b)|0}if((R|0)==48){S=-1;T=-1}else{F=R;G=0;H=0;I=0;J=0;L=E;M=1;N=0;O=1.0;P=0.0;Q=0;break}while(1){o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;U=d[o]|0}else{U=Yu(b)|0}if((U|0)!=48){F=U;G=0;H=0;I=S;J=T;L=1;M=1;N=0;O=1.0;P=0.0;Q=0;break b}o=hv(T,S,-1,-1)|0;S=K;T=o}}}while(0);c:while(1){o=F-48|0;do{if(o>>>0<10>>>0){W=o;x=84}else{n=F|32;q=(F|0)==46;if(!((n-97|0)>>>0<6>>>0|q)){X=F;break c}if(q){if((M|0)==0){Y=G;Z=H;_=G;$=H;aa=L;ba=1;ca=N;da=O;ea=P;fa=Q;break}else{X=46;break c}}else{W=(F|0)>57?n-87|0:o;x=84;break}}}while(0);if((x|0)==84){x=0;o=0;do{if((G|0)<(o|0)|(G|0)==(o|0)&H>>>0<8>>>0){ha=N;ia=O;ja=P;ka=W+(Q<<4)|0}else{n=0;if((G|0)<(n|0)|(G|0)==(n|0)&H>>>0<14>>>0){la=O*.0625;ha=N;ia=la;ja=P+la*+(W|0);ka=Q;break}if(!((W|0)!=0&(N|0)==0)){ha=N;ia=O;ja=P;ka=Q;break}ha=1;ia=O;ja=P+O*.5;ka=Q}}while(0);o=hv(H,G,1,0)|0;Y=K;Z=o;_=I;$=J;aa=1;ba=M;ca=ha;da=ia;ea=ja;fa=ka}o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;F=d[o]|0;G=Y;H=Z;I=_;J=$;L=aa;M=ba;N=ca;O=da;P=ea;Q=fa;continue}else{F=Yu(b)|0;G=Y;H=Z;I=_;J=$;L=aa;M=ba;N=ca;O=da;P=ea;Q=fa;continue}}if((L|0)==0){o=(c[m>>2]|0)==0;if(!o){c[e>>2]=(c[e>>2]|0)-1}do{if(u){Xu(b,0)}else{if(o){break}n=c[e>>2]|0;c[e>>2]=n-1;if((M|0)==0){break}c[e>>2]=n-2}}while(0);l=+(r|0)*0.0;i=g;return+l}o=(M|0)==0;n=o?H:J;q=o?G:I;o=0;if((G|0)<(o|0)|(G|0)==(o|0)&H>>>0<8>>>0){o=Q;p=G;ma=H;while(1){na=o<<4;oa=hv(ma,p,1,0)|0;pa=K;qa=0;if((pa|0)<(qa|0)|(pa|0)==(qa|0)&oa>>>0<8>>>0){o=na;p=pa;ma=oa}else{ra=na;break}}}else{ra=Q}do{if((X|32|0)==112){ma=Wu(b,f)|0;p=K;if(!((ma|0)==0&(p|0)==(-2147483648|0))){sa=p;ta=ma;break}if(u){Xu(b,0);l=0.0;i=g;return+l}else{if((c[m>>2]|0)==0){sa=0;ta=0;break}c[e>>2]=(c[e>>2]|0)-1;sa=0;ta=0;break}}else{if((c[m>>2]|0)==0){sa=0;ta=0;break}c[e>>2]=(c[e>>2]|0)-1;sa=0;ta=0}}while(0);ma=hv(n<<2|0>>>30,q<<2|n>>>30,-32,-1)|0;p=hv(ma,K,ta,sa)|0;ma=K;if((ra|0)==0){l=+(r|0)*0.0;i=g;return+l}o=0;if((ma|0)>(o|0)|(ma|0)==(o|0)&p>>>0>(-j|0)>>>0){o=Vb()|0;c[o>>2]=34;l=+(r|0)*1.7976931348623157e+308*1.7976931348623157e+308;i=g;return+l}o=j-106|0;na=(o|0)<0|0?-1:0;if((ma|0)<(na|0)|(ma|0)==(na|0)&p>>>0<o>>>0){o=Vb()|0;c[o>>2]=34;l=+(r|0)*2.2250738585072014e-308*2.2250738585072014e-308;i=g;return+l}if((ra|0)>-1){o=ra;la=P;na=ma;oa=p;while(1){pa=o<<1;if(la<.5){ua=la;va=pa}else{ua=la+-1.0;va=pa|1}wa=la+ua;pa=hv(oa,na,-1,-1)|0;qa=K;if((va|0)>-1){o=va;la=wa;na=qa;oa=pa}else{xa=va;ya=wa;za=qa;Aa=pa;break}}}else{xa=ra;ya=P;za=ma;Aa=p}oa=0;na=iv(32,0,j,(j|0)<0|0?-1:0)|0;o=hv(Aa,za,na,K)|0;na=K;if((oa|0)>(na|0)|(oa|0)==(na|0)&k>>>0>o>>>0){na=o;Ba=(na|0)<0?0:na}else{Ba=k}do{if((Ba|0)<53){la=+(r|0);wa=+Cb(+(+Zu(1.0,84-Ba|0)),+la);if(!((Ba|0)<32&ya!=0.0)){Ca=ya;Da=xa;Ea=wa;Fa=la;break}na=xa&1;Ca=(na|0)==0?0.0:ya;Da=(na^1)+xa|0;Ea=wa;Fa=la}else{Ca=ya;Da=xa;Ea=0.0;Fa=+(r|0)}}while(0);la=Fa*Ca+(Ea+Fa*+(Da>>>0>>>0))-Ea;if(!(la!=0.0)){p=Vb()|0;c[p>>2]=34}l=+_u(la,Aa);i=g;return+l}else{C=y}}while(0);p=j+k|0;ma=-p|0;na=C;o=0;while(1){if((na|0)==46){x=139;break}else if((na|0)!=48){Ga=na;Ha=0;Ia=o;Ja=0;Ka=0;break}oa=c[e>>2]|0;if(oa>>>0<(c[m>>2]|0)>>>0){c[e>>2]=oa+1;na=d[oa]|0;o=1;continue}else{na=Yu(b)|0;o=1;continue}}d:do{if((x|0)==139){na=c[e>>2]|0;if(na>>>0<(c[m>>2]|0)>>>0){c[e>>2]=na+1;La=d[na]|0}else{La=Yu(b)|0}if((La|0)==48){Ma=-1;Na=-1}else{Ga=La;Ha=1;Ia=o;Ja=0;Ka=0;break}while(1){na=c[e>>2]|0;if(na>>>0<(c[m>>2]|0)>>>0){c[e>>2]=na+1;Oa=d[na]|0}else{Oa=Yu(b)|0}if((Oa|0)!=48){Ga=Oa;Ha=1;Ia=1;Ja=Ma;Ka=Na;break d}na=hv(Na,Ma,-1,-1)|0;Ma=K;Na=na}}}while(0);o=h|0;c[o>>2]=0;na=Ga-48|0;oa=(Ga|0)==46;e:do{if(na>>>0<10>>>0|oa){n=h+496|0;q=Ja;pa=Ka;qa=0;Pa=0;Qa=0;Ra=Ia;Ta=Ha;Ua=0;Va=0;Wa=Ga;Xa=na;Ya=oa;while(1){do{if(Ya){if((Ta|0)==0){Za=Va;_a=Ua;ab=1;bb=Ra;cb=Qa;db=qa;eb=Pa;fb=qa;gb=Pa}else{hb=q;ib=pa;jb=qa;kb=Pa;lb=Qa;mb=Ra;nb=Ua;ob=Va;pb=Wa;break e}}else{qb=hv(Pa,qa,1,0)|0;rb=K;sb=(Wa|0)!=48;if((Ua|0)>=125){if(!sb){Za=Va;_a=Ua;ab=Ta;bb=Ra;cb=Qa;db=rb;eb=qb;fb=q;gb=pa;break}c[n>>2]=c[n>>2]|1;Za=Va;_a=Ua;ab=Ta;bb=Ra;cb=Qa;db=rb;eb=qb;fb=q;gb=pa;break}tb=h+(Ua<<2)|0;if((Va|0)==0){ub=Xa}else{ub=Wa-48+((c[tb>>2]|0)*10|0)|0}c[tb>>2]=ub;tb=Va+1|0;vb=(tb|0)==9;Za=vb?0:tb;_a=(vb&1)+Ua|0;ab=Ta;bb=1;cb=sb?qb:Qa;db=rb;eb=qb;fb=q;gb=pa}}while(0);qb=c[e>>2]|0;if(qb>>>0<(c[m>>2]|0)>>>0){c[e>>2]=qb+1;wb=d[qb]|0}else{wb=Yu(b)|0}qb=wb-48|0;rb=(wb|0)==46;if(qb>>>0<10>>>0|rb){q=fb;pa=gb;qa=db;Pa=eb;Qa=cb;Ra=bb;Ta=ab;Ua=_a;Va=Za;Wa=wb;Xa=qb;Ya=rb}else{xb=fb;yb=gb;zb=db;Ab=eb;Bb=cb;Db=bb;Eb=ab;Fb=_a;Gb=Za;Hb=wb;x=162;break}}}else{xb=Ja;yb=Ka;zb=0;Ab=0;Bb=0;Db=Ia;Eb=Ha;Fb=0;Gb=0;Hb=Ga;x=162}}while(0);if((x|0)==162){oa=(Eb|0)==0;hb=oa?zb:xb;ib=oa?Ab:yb;jb=zb;kb=Ab;lb=Bb;mb=Db;nb=Fb;ob=Gb;pb=Hb}oa=(mb|0)!=0;do{if(oa){if((pb|32|0)!=101){x=171;break}na=Wu(b,f)|0;Ya=K;do{if((na|0)==0&(Ya|0)==(-2147483648|0)){if(u){Xu(b,0);l=0.0;i=g;return+l}else{if((c[m>>2]|0)==0){Ib=0;Jb=0;break}c[e>>2]=(c[e>>2]|0)-1;Ib=0;Jb=0;break}}else{Ib=Ya;Jb=na}}while(0);na=hv(Jb,Ib,ib,hb)|0;Kb=K;Lb=na}else{x=171}}while(0);do{if((x|0)==171){if(!((pb|0)>-1)){Kb=hb;Lb=ib;break}if((c[m>>2]|0)==0){Kb=hb;Lb=ib;break}c[e>>2]=(c[e>>2]|0)-1;Kb=hb;Lb=ib}}while(0);if(!oa){na=Vb()|0;c[na>>2]=22;Xu(b,0);l=0.0;i=g;return+l}na=c[o>>2]|0;if((na|0)==0){l=+(r|0)*0.0;i=g;return+l}Ya=0;do{if((Lb|0)==(kb|0)&(Kb|0)==(jb|0)&((jb|0)<(Ya|0)|(jb|0)==(Ya|0)&kb>>>0<10>>>0)){if(!(k>>>0>30>>>0)){if((na>>>(k>>>0)|0)!=0){break}}l=+(r|0)*+(na>>>0>>>0);i=g;return+l}}while(0);na=(j|0)/-2|0;Ya=(na|0)<0|0?-1:0;if((Kb|0)>(Ya|0)|(Kb|0)==(Ya|0)&Lb>>>0>na>>>0){na=Vb()|0;c[na>>2]=34;l=+(r|0)*1.7976931348623157e+308*1.7976931348623157e+308;i=g;return+l}na=j-106|0;Ya=(na|0)<0|0?-1:0;if((Kb|0)<(Ya|0)|(Kb|0)==(Ya|0)&Lb>>>0<na>>>0){na=Vb()|0;c[na>>2]=34;l=+(r|0)*2.2250738585072014e-308*2.2250738585072014e-308;i=g;return+l}if((ob|0)==0){Mb=nb}else{if((ob|0)<9){na=h+(nb<<2)|0;Ya=ob;oa=c[na>>2]|0;do{oa=oa*10|0;Ya=Ya+1|0;}while((Ya|0)<9);c[na>>2]=oa}Mb=nb+1|0}Ya=Lb;do{if((lb|0)<9){if(!((lb|0)<=(Ya|0)&(Ya|0)<18)){break}if((Ya|0)==9){l=+(r|0)*+((c[o>>2]|0)>>>0>>>0);i=g;return+l}if((Ya|0)<9){l=+(r|0)*+((c[o>>2]|0)>>>0>>>0)/+(c[216+(8-Ya<<2)>>2]|0);i=g;return+l}Xa=k+27+(Ya*-3|0)|0;Wa=c[o>>2]|0;if((Xa|0)<=30){if((Wa>>>(Xa>>>0)|0)!=0){break}}l=+(r|0)*+(Wa>>>0>>>0)*+(c[216+(Ya-10<<2)>>2]|0);i=g;return+l}}while(0);o=(Ya|0)%9|0;if((o|0)==0){Nb=0;Ob=Mb;Pb=0;Qb=Ya}else{oa=(Ya|0)>-1?o:o+9|0;o=c[216+(8-oa<<2)>>2]|0;do{if((Mb|0)==0){Rb=0;Sb=0;Tb=Ya}else{na=1e9/(o|0)|0;Wa=Ya;Xa=0;Va=0;Ua=0;while(1){Ta=h+(Va<<2)|0;Ra=c[Ta>>2]|0;Qa=((Ra>>>0)/(o>>>0)|0)+Ua|0;c[Ta>>2]=Qa;Ub=ga((Ra>>>0)%(o>>>0)|0,na)|0;Ra=Va+1|0;if((Va|0)==(Xa|0)&(Qa|0)==0){Wb=Ra&127;Xb=Wa-9|0}else{Wb=Xa;Xb=Wa}if((Ra|0)==(Mb|0)){break}else{Wa=Xb;Xa=Wb;Va=Ra;Ua=Ub}}if((Ub|0)==0){Rb=Mb;Sb=Wb;Tb=Xb;break}c[h+(Mb<<2)>>2]=Ub;Rb=Mb+1|0;Sb=Wb;Tb=Xb}}while(0);Nb=Sb;Ob=Rb;Pb=0;Qb=9-oa+Tb|0}f:while(1){o=h+(Nb<<2)|0;if((Qb|0)<18){Ya=Ob;Ua=Pb;while(1){Va=0;Xa=Ya+127|0;Wa=Ya;while(1){na=Xa&127;Ra=h+(na<<2)|0;Qa=c[Ra>>2]|0;Ta=hv(Qa<<29|0>>>3,0<<29|Qa>>>3,Va,0)|0;Qa=K;Pa=0;if(Qa>>>0>Pa>>>0|Qa>>>0==Pa>>>0&Ta>>>0>1e9>>>0){Pa=sv(Ta,Qa,1e9,0)|0;qa=tv(Ta,Qa,1e9,0)|0;Yb=Pa;Zb=qa}else{Yb=0;Zb=Ta}c[Ra>>2]=Zb;Ra=(na|0)==(Nb|0);if((na|0)!=(Wa+127&127|0)|Ra){_b=Wa}else{_b=(Zb|0)==0?na:Wa}if(Ra){break}else{Va=Yb;Xa=na-1|0;Wa=_b}}Wa=Ua-29|0;if((Yb|0)==0){Ya=_b;Ua=Wa}else{$b=Wa;ac=_b;bc=Yb;break}}}else{if((Qb|0)==18){cc=Ob;dc=Pb}else{ec=Nb;fc=Ob;gc=Pb;hc=Qb;break}while(1){if(!((c[o>>2]|0)>>>0<9007199>>>0)){ec=Nb;fc=cc;gc=dc;hc=18;break f}Ua=0;Ya=cc+127|0;Wa=cc;while(1){Xa=Ya&127;Va=h+(Xa<<2)|0;na=c[Va>>2]|0;Ra=hv(na<<29|0>>>3,0<<29|na>>>3,Ua,0)|0;na=K;Ta=0;if(na>>>0>Ta>>>0|na>>>0==Ta>>>0&Ra>>>0>1e9>>>0){Ta=sv(Ra,na,1e9,0)|0;qa=tv(Ra,na,1e9,0)|0;ic=Ta;jc=qa}else{ic=0;jc=Ra}c[Va>>2]=jc;Va=(Xa|0)==(Nb|0);if((Xa|0)!=(Wa+127&127|0)|Va){kc=Wa}else{kc=(jc|0)==0?Xa:Wa}if(Va){break}else{Ua=ic;Ya=Xa-1|0;Wa=kc}}Wa=dc-29|0;if((ic|0)==0){cc=kc;dc=Wa}else{$b=Wa;ac=kc;bc=ic;break}}}o=Nb+127&127;if((o|0)==(ac|0)){Wa=ac+127&127;Ya=h+((ac+126&127)<<2)|0;c[Ya>>2]=c[Ya>>2]|c[h+(Wa<<2)>>2];lc=Wa}else{lc=ac}c[h+(o<<2)>>2]=bc;Nb=o;Ob=lc;Pb=$b;Qb=Qb+9|0}g:while(1){mc=fc+1&127;oa=h+((fc+127&127)<<2)|0;o=ec;Wa=gc;Ya=hc;while(1){Ua=(Ya|0)==18;Xa=(Ya|0)>27?9:1;nc=o;oc=Wa;while(1){Va=0;while(1){Ra=Va+nc&127;if((Ra|0)==(fc|0)){pc=2;break}qa=c[h+(Ra<<2)>>2]|0;Ra=c[208+(Va<<2)>>2]|0;if(qa>>>0<Ra>>>0){pc=2;break}Ta=Va+1|0;if(qa>>>0>Ra>>>0){pc=Va;break}if((Ta|0)<2){Va=Ta}else{pc=Ta;break}}if((pc|0)==2&Ua){break g}qc=Xa+oc|0;if((nc|0)==(fc|0)){nc=fc;oc=qc}else{break}}Ua=(1<<Xa)-1|0;Va=1e9>>>(Xa>>>0);rc=Ya;sc=nc;Ta=nc;tc=0;do{Ra=h+(Ta<<2)|0;qa=c[Ra>>2]|0;na=(qa>>>(Xa>>>0))+tc|0;c[Ra>>2]=na;tc=ga(qa&Ua,Va)|0;qa=(Ta|0)==(sc|0)&(na|0)==0;Ta=Ta+1&127;rc=qa?rc-9|0:rc;sc=qa?Ta:sc;}while((Ta|0)!=(fc|0));if((tc|0)==0){o=sc;Wa=qc;Ya=rc;continue}if((mc|0)!=(sc|0)){break}c[oa>>2]=c[oa>>2]|1;o=sc;Wa=qc;Ya=rc}c[h+(fc<<2)>>2]=tc;ec=sc;fc=mc;gc=qc;hc=rc}Ya=nc&127;if((Ya|0)==(fc|0)){c[h+(mc-1<<2)>>2]=0;uc=mc}else{uc=fc}la=+((c[h+(Ya<<2)>>2]|0)>>>0>>>0);Ya=nc+1&127;if((Ya|0)==(uc|0)){Wa=uc+1&127;c[h+(Wa-1<<2)>>2]=0;vc=Wa}else{vc=uc}wa=+(r|0);wc=wa*(la*1.0e9+ +((c[h+(Ya<<2)>>2]|0)>>>0>>>0));Ya=oc+53|0;Wa=Ya-j|0;if((Wa|0)<(k|0)){xc=(Wa|0)<0?0:Wa;yc=1}else{xc=k;yc=0}if((xc|0)<53){la=+Cb(+(+Zu(1.0,105-xc|0)),+wc);zc=+$a(+wc,+(+Zu(1.0,53-xc|0)));Ac=la;Bc=zc;Cc=la+(wc-zc)}else{Ac=0.0;Bc=0.0;Cc=wc}o=nc+2&127;do{if((o|0)==(vc|0)){Dc=Bc}else{oa=c[h+(o<<2)>>2]|0;do{if(oa>>>0<5e8>>>0){if((oa|0)==0){if((nc+3&127|0)==(vc|0)){Ec=Bc;break}}Ec=wa*.25+Bc}else{if(oa>>>0>5e8>>>0){Ec=wa*.75+Bc;break}if((nc+3&127|0)==(vc|0)){Ec=wa*.5+Bc;break}else{Ec=wa*.75+Bc;break}}}while(0);if((53-xc|0)<=1){Dc=Ec;break}if(+$a(+Ec,+1.0)!=0.0){Dc=Ec;break}Dc=Ec+1.0}}while(0);wa=Cc+Dc-Ac;do{if((Ya&2147483647|0)>(-2-p|0)){if(+V(+wa)<9007199254740992.0){Fc=wa;Gc=yc;Hc=oc}else{Fc=wa*.5;Gc=(yc|0)!=0&(xc|0)==(Wa|0)?0:yc;Hc=oc+1|0}if((Hc+50|0)<=(ma|0)){if(!((Gc|0)!=0&Dc!=0.0)){Ic=Fc;Jc=Hc;break}}o=Vb()|0;c[o>>2]=34;Ic=Fc;Jc=Hc}else{Ic=wa;Jc=oc}}while(0);l=+_u(Ic,Jc);i=g;return+l}else if((z|0)==3){ma=c[e>>2]|0;if(ma>>>0<(c[m>>2]|0)>>>0){c[e>>2]=ma+1;Kc=d[ma]|0}else{Kc=Yu(b)|0}if((Kc|0)==40){Lc=1}else{if((c[m>>2]|0)==0){l=+v;i=g;return+l}c[e>>2]=(c[e>>2]|0)-1;l=+v;i=g;return+l}while(1){ma=c[e>>2]|0;if(ma>>>0<(c[m>>2]|0)>>>0){c[e>>2]=ma+1;Mc=d[ma]|0}else{Mc=Yu(b)|0}if(!((Mc-48|0)>>>0<10>>>0|(Mc-65|0)>>>0<26>>>0)){if(!((Mc-97|0)>>>0<26>>>0|(Mc|0)==95)){break}}Lc=Lc+1|0}if((Mc|0)==41){l=+v;i=g;return+l}ma=(c[m>>2]|0)==0;if(!ma){c[e>>2]=(c[e>>2]|0)-1}if(u){Wa=Vb()|0;c[Wa>>2]=22;Xu(b,0);l=0.0;i=g;return+l}if((Lc|0)==0|ma){l=+v;i=g;return+l}else{Nc=Lc}while(1){ma=Nc-1|0;c[e>>2]=(c[e>>2]|0)-1;if((ma|0)==0){l=+v;break}else{Nc=ma}}i=g;return+l}else{if((c[m>>2]|0)!=0){c[e>>2]=(c[e>>2]|0)-1}u=Vb()|0;c[u>>2]=22;Xu(b,0);l=0.0;i=g;return+l}}}while(0);do{if((x|0)==23){b=(c[m>>2]|0)==0;if(!b){c[e>>2]=(c[e>>2]|0)-1}if(s>>>0<4>>>0|(f|0)==0|b){break}else{Oc=s}do{c[e>>2]=(c[e>>2]|0)-1;Oc=Oc-1|0;}while(Oc>>>0>3>>>0)}}while(0);l=+(r|0)*w;i=g;return+l}function Wu(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=a+4|0;f=c[e>>2]|0;g=a+100|0;if(f>>>0<(c[g>>2]|0)>>>0){c[e>>2]=f+1;h=d[f]|0}else{h=Yu(a)|0}do{if((h|0)==45|(h|0)==43){f=(h|0)==45|0;i=c[e>>2]|0;if(i>>>0<(c[g>>2]|0)>>>0){c[e>>2]=i+1;j=d[i]|0}else{j=Yu(a)|0}if((j-48|0)>>>0<10>>>0|(b|0)==0){k=f;l=j;break}if((c[g>>2]|0)==0){k=f;l=j;break}c[e>>2]=(c[e>>2]|0)-1;k=f;l=j}else{k=0;l=h}}while(0);if((l-48|0)>>>0>9>>>0){if((c[g>>2]|0)==0){m=-2147483648;n=0;return(K=m,n)|0}c[e>>2]=(c[e>>2]|0)-1;m=-2147483648;n=0;return(K=m,n)|0}else{o=l;p=0}while(1){q=o-48+p|0;l=c[e>>2]|0;if(l>>>0<(c[g>>2]|0)>>>0){c[e>>2]=l+1;r=d[l]|0}else{r=Yu(a)|0}if(!((r-48|0)>>>0<10>>>0&(q|0)<214748364)){break}o=r;p=q*10|0}p=q;o=(q|0)<0|0?-1:0;if((r-48|0)>>>0<10>>>0){q=r;l=o;h=p;while(1){j=rv(h,l,10,0)|0;b=K;f=hv(q,(q|0)<0|0?-1:0,-48,-1)|0;i=hv(f,K,j,b)|0;b=K;j=c[e>>2]|0;if(j>>>0<(c[g>>2]|0)>>>0){c[e>>2]=j+1;s=d[j]|0}else{s=Yu(a)|0}j=21474836;if((s-48|0)>>>0<10>>>0&((b|0)<(j|0)|(b|0)==(j|0)&i>>>0<2061584302>>>0)){q=s;l=b;h=i}else{t=s;u=b;v=i;break}}}else{t=r;u=o;v=p}if((t-48|0)>>>0<10>>>0){do{t=c[e>>2]|0;if(t>>>0<(c[g>>2]|0)>>>0){c[e>>2]=t+1;w=d[t]|0}else{w=Yu(a)|0}}while((w-48|0)>>>0<10>>>0)}if((c[g>>2]|0)!=0){c[e>>2]=(c[e>>2]|0)-1}e=(k|0)!=0;k=iv(0,0,v,u)|0;m=e?K:u;n=e?k:v;return(K=m,n)|0}function Xu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a+104>>2]=b;d=c[a+8>>2]|0;e=c[a+4>>2]|0;f=d-e|0;c[a+108>>2]=f;if((b|0)!=0&(f|0)>(b|0)){c[a+100>>2]=e+b;return}else{c[a+100>>2]=d;return}}function Yu(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=b+104|0;f=c[e>>2]|0;if((f|0)==0){g=3}else{if((c[b+108>>2]|0)<(f|0)){g=3}}do{if((g|0)==3){f=av(b)|0;if((f|0)<0){break}h=c[e>>2]|0;i=c[b+8>>2]|0;do{if((h|0)==0){g=8}else{j=c[b+4>>2]|0;k=h-(c[b+108>>2]|0)-1|0;if((i-j|0)<=(k|0)){g=8;break}c[b+100>>2]=j+k}}while(0);if((g|0)==8){c[b+100>>2]=i}h=c[b+4>>2]|0;if((i|0)!=0){k=b+108|0;c[k>>2]=i+1-h+(c[k>>2]|0)}k=h-1|0;if((d[k]|0|0)==(f|0)){l=f;return l|0}a[k]=f;l=f;return l|0}}while(0);c[b+100>>2]=0;l=-1;return l|0}function Zu(a,b){a=+a;b=b|0;var d=0.0,e=0,f=0.0,g=0;do{if((b|0)>1023){d=a*8.98846567431158e+307;e=b-1023|0;if((e|0)<=1023){f=d;g=e;break}e=b-2046|0;f=d*8.98846567431158e+307;g=(e|0)>1023?1023:e}else{if(!((b|0)<-1022)){f=a;g=b;break}d=a*2.2250738585072014e-308;e=b+1022|0;if(!((e|0)<-1022)){f=d;g=e;break}e=b+2044|0;f=d*2.2250738585072014e-308;g=(e|0)<-1022?-1022:e}}while(0);return+(f*(c[k>>2]=0<<20|0>>>12,c[k+4>>2]=g+1023<<20|0>>>12,+h[k>>3]))}function _u(a,b){a=+a;b=b|0;return+(+Zu(a,b))}function $u(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=b+74|0;e=a[d]|0;a[d]=e-1&255|e;e=b+20|0;d=b+44|0;if((c[e>>2]|0)>>>0>(c[d>>2]|0)>>>0){Hc[c[b+36>>2]&63](b,0,0)|0}c[b+16>>2]=0;c[b+28>>2]=0;c[e>>2]=0;e=b|0;f=c[e>>2]|0;if((f&20|0)==0){g=c[d>>2]|0;c[b+8>>2]=g;c[b+4>>2]=g;h=0;return h|0}if((f&4|0)==0){h=-1;return h|0}c[e>>2]=f|32;h=-1;return h|0}function av(a){a=a|0;var b=0,e=0,f=0,g=0;b=i;i=i+8|0;e=b|0;if((c[a+8>>2]|0)==0){if(($u(a)|0)==0){f=3}else{g=-1}}else{f=3}do{if((f|0)==3){if((Hc[c[a+32>>2]&63](a,e,1)|0)!=1){g=-1;break}g=d[e]|0}}while(0);i=b;return g|0}function bv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0.0,j=0,k=0,l=0,m=0;d=i;i=i+112|0;e=d|0;dv(e|0,0,112)|0;f=e+4|0;c[f>>2]=a;g=e+8|0;c[g>>2]=-1;c[e+44>>2]=a;c[e+76>>2]=-1;Xu(e,0);h=+Vu(e,2,1);j=(c[f>>2]|0)-(c[g>>2]|0)+(c[e+108>>2]|0)|0;if((b|0)==0){k=112;l=0;i=d;return+h}if((j|0)==0){m=a}else{m=a+j|0}c[b>>2]=m;k=112;l=0;i=d;return+h}function cv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return wb(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function dv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;g=b&3;h=d|d<<8|d<<16|d<<24;i=f&~3;if(g){g=b+4-g|0;while((b|0)<(g|0)){a[b]=d;b=b+1|0}}while((b|0)<(i|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b]=d;b=b+1|0}return b-e|0}function ev(b){b=b|0;var c=0;c=b;while(a[c]|0){c=c+1|0}return c-b|0}function fv(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b]=a[c]|0}b=e}else{cv(b,c,d)|0}return b|0}function gv(i,j,k,l,m,n,o,p){i=i;j=j;k=k;l=l;m=m;n=n;o=o;p=p;a=i;b=j;c=k;d=l;e=m;f=n;g=o;h=p}function hv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return(K=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function iv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return(K=e,a-c>>>0|0)|0}function jv(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){K=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}K=a<<c-32;return 0}function kv(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){K=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}K=0;return b>>>c-32|0}function lv(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){K=b>>c;return a>>>c|(b&(1<<c)-1)<<32-c}K=(b|0)<0?-1:0;return b>>c-32|0}function mv(b){b=b|0;var c=0;c=a[n+(b>>>24)|0]|0;if((c|0)<8)return c|0;c=a[n+(b>>16&255)|0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>8&255)|0]|0;if((c|0)<8)return c+16|0;return(a[n+(b&255)|0]|0)+24|0}function nv(b){b=b|0;var c=0;c=a[m+(b&255)|0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)|0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)|0]|0;if((c|0)<8)return c+16|0;return(a[m+(b>>>24)|0]|0)+24|0}function ov(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=ga(d,c)|0;f=a>>>16;a=(e>>>16)+(ga(d,f)|0)|0;d=b>>>16;b=ga(d,c)|0;return(K=(a>>>16)+(ga(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function pv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=iv(e^a,f^b,e,f)|0;b=K;a=g^e;e=h^f;f=iv((uv(i,b,iv(g^c,h^d,g,h)|0,K,0)|0)^a,K^e,a,e)|0;return(K=K,f)|0}function qv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+8|0;g=f|0;h=b>>31|((b|0)<0?-1:0)<<1;j=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;k=e>>31|((e|0)<0?-1:0)<<1;l=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;m=iv(h^a,j^b,h,j)|0;b=K;uv(m,b,iv(k^d,l^e,k,l)|0,K,g)|0;l=iv(c[g>>2]^h,c[g+4>>2]^j,h,j)|0;j=K;i=f;return(K=j,l)|0}function rv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=ov(e,a)|0;f=K;return(K=(ga(b,a)|0)+(ga(d,e)|0)+f|f&0,c|0|0)|0}function sv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=uv(a,b,c,d,0)|0;return(K=K,e)|0}function tv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+8|0;g=f|0;uv(a,b,d,e,g)|0;i=f;return(K=c[g+4>>2]|0,c[g>>2]|0)|0}function uv(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0,M=0;g=a;h=b;i=h;j=d;k=e;l=k;if((i|0)==0){m=(f|0)!=0;if((l|0)==0){if(m){c[f>>2]=(g>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return(K=n,o)|0}else{if(!m){n=0;o=0;return(K=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;o=0;return(K=n,o)|0}}m=(l|0)==0;do{if((j|0)==0){if(m){if((f|0)!=0){c[f>>2]=(i>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return(K=n,o)|0}if((g|0)==0){if((f|0)!=0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return(K=n,o)|0}p=l-1|0;if((p&l|0)==0){if((f|0)!=0){c[f>>2]=a|0;c[f+4>>2]=p&i|b&0}n=0;o=i>>>((nv(l|0)|0)>>>0);return(K=n,o)|0}p=(mv(l|0)|0)-(mv(i|0)|0)|0;if(p>>>0<=30){q=p+1|0;r=31-p|0;s=q;t=i<<r|g>>>(q>>>0);u=i>>>(q>>>0);v=0;w=g<<r;break}if((f|0)==0){n=0;o=0;return(K=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return(K=n,o)|0}else{if(!m){r=(mv(l|0)|0)-(mv(i|0)|0)|0;if(r>>>0<=31){q=r+1|0;p=31-r|0;x=r-31>>31;s=q;t=g>>>(q>>>0)&x|i<<p;u=i>>>(q>>>0)&x;v=0;w=g<<p;break}if((f|0)==0){n=0;o=0;return(K=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return(K=n,o)|0}p=j-1|0;if((p&j|0)!=0){x=(mv(j|0)|0)+33-(mv(i|0)|0)|0;q=64-x|0;r=32-x|0;y=r>>31;z=x-32|0;A=z>>31;s=x;t=r-1>>31&i>>>(z>>>0)|(i<<r|g>>>(x>>>0))&A;u=A&i>>>(x>>>0);v=g<<q&y;w=(i<<q|g>>>(z>>>0))&y|g<<r&x-33>>31;break}if((f|0)!=0){c[f>>2]=p&g;c[f+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return(K=n,o)|0}else{p=nv(j|0)|0;n=i>>>(p>>>0)|0;o=i<<32-p|g>>>(p>>>0)|0;return(K=n,o)|0}}}while(0);if((s|0)==0){B=w;C=v;D=u;E=t;F=0;G=0}else{g=d|0|0;d=k|e&0;e=hv(g,d,-1,-1)|0;k=K;i=w;w=v;v=u;u=t;t=s;s=0;while(1){H=w>>>31|i<<1;I=s|w<<1;j=u<<1|i>>>31|0;a=u>>>31|v<<1|0;iv(e,k,j,a)|0;b=K;h=b>>31|((b|0)<0?-1:0)<<1;J=h&1;L=iv(j,a,h&g,(((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1)&d)|0;M=K;b=t-1|0;if((b|0)==0){break}else{i=H;w=I;v=M;u=L;t=b;s=J}}B=H;C=I;D=M;E=L;F=0;G=J}J=C;C=0;if((f|0)!=0){c[f>>2]=E;c[f+4>>2]=D}n=(J|0)>>>31|(B|C)<<1|(C<<1|J>>>31)&0|F;o=(J<<1|0>>>31)&-2|G;return(K=n,o)|0}function vv(){qc()}function wv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Cc[a&31](b|0,c|0,d|0,e|0,f|0)}function xv(a,b){a=a|0;b=b|0;Dc[a&511](b|0)}function yv(a,b,c){a=a|0;b=b|0;c=c|0;Ec[a&127](b|0,c|0)}function zv(a,b){a=a|0;b=b|0;return Fc[a&255](b|0)|0}function Av(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 Gc[a&31](b|0,c|0,d|0,e|0,f|0)|0}function Bv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Hc[a&63](b|0,c|0,d|0)|0}function Cv(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;Ic[a&15](b|0,c|0,d|0,e|0,f|0,+g)}function Dv(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;Jc[a&63](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function Ev(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;Kc[a&63](b|0,c|0,d|0,e|0,f|0,g|0)}function Fv(a,b,c,d,e,f,g,h,i,j,k,l,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;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;Lc[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)}function Gv(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;Mc[a&127](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function Hv(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;Nc[a&7](b|0,c|0,d|0,e|0,f|0,g|0,+h)}function Iv(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;Oc[a&15](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Jv(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;Pc[a&15](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function Kv(a,b,c){a=a|0;b=b|0;c=c|0;return Qc[a&63](b|0,c|0)|0}function Lv(a,b,c,d,e,f,g,h,i,j,k,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;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;Rc[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)}function Mv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Sc[a&15](b|0,c|0,d|0,e|0)|0}function Nv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Tc[a&63](b|0,c|0,d|0)}function Ov(a){a=a|0;Uc[a&3]()}function Pv(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 Vc[a&31](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)|0}function Qv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Wc[a&63](b|0,c|0,d|0,e|0)}function Rv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ha(0)}function Sv(a){a=a|0;ha(1)}function Tv(a,b){a=a|0;b=b|0;ha(2)}function Uv(a){a=a|0;ha(3);return 0}function Vv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ha(4);return 0}function Wv(a,b,c){a=a|0;b=b|0;c=c|0;ha(5);return 0}function Xv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;ha(6)}function Yv(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;ha(7)}function Zv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ha(8)}function _v(a,b,c,d,e,f,g,h,i,j,k,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;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;ha(9)}function $v(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;ha(10)}function aw(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;ha(11)}function bw(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;ha(12)}function cw(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;ha(13)}function dw(a,b){a=a|0;b=b|0;ha(14);return 0}function ew(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;ha(15)}function fw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ha(16);return 0}function gw(a,b,c){a=a|0;b=b|0;c=c|0;ha(17)}function hw(){ha(18)}function iw(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;ha(19);return 0}function jw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ha(20)}
|
|
|
|
|
|
|
|
|
|
// EMSCRIPTEN_END_FUNCS
|
|
var Cc=[Rv,Rv,Vf,Rv,Nf,Rv,Bu,Rv,Cu,Rv,Qf,Rv,Au,Rv,Mf,Rv,Wf,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv,Rv];var Dc=[Sv,Sv,Hr,Sv,_n,Sv,pp,Sv,cm,Sv,jk,Sv,Om,Sv,Mr,Sv,Zr,Sv,Kl,Sv,Rh,Sv,xl,Sv,ap,Sv,Wl,Sv,Ls,Sv,am,Sv,yo,Sv,Ti,Sv,Qn,Sv,Mn,Sv,Xl,Sv,Xr,Sv,ls,Sv,Rp,Sv,zo,Sv,lu,Sv,En,Sv,Dr,Sv,Yr,Sv,qn,Sv,$n,Sv,Eq,Sv,Rr,Sv,yj,Sv,it,Sv,qu,Sv,ht,Sv,Kn,Sv,am,Sv,Wn,Sv,fk,Sv,jq,Sv,kt,Sv,_r,Sv,Hu,Sv,wr,Sv,gt,Sv,On,Sv,jj,Sv,un,Sv,wl,Sv,th,Sv,ck,Sv,Vn,Sv,eq,Sv,Xl,Sv,Ed,Sv,St,Sv,bp,Sv,Ws,Sv,rf,Sv,Fq,Sv,pn,Sv,Bn,Sv,bq,Sv,Qp,Sv,Nn,Sv,tq,Sv,Bk,Sv,Ru,Sv,Nm,Sv,Le,Sv,Vt,Sv,Wt,Sv,Fn,Sv,an,Sv,Si,Sv,vs,Sv,nu,Sv,rn,Sv,Ln,Sv,_q,Sv,ol,Sv,Pq,Sv,Gn,Sv,Vr,Sv,tu,Sv,Su,Sv,Yt,Sv,ru,Sv,Dl,Sv,Qr,Sv,vj,Sv,cq,Sv,jr,Sv,mu,Sv,ft,Sv,br,Sv,Oh,Sv,Xt,Sv,iq,Sv,op,Sv,Pn,Sv,El,Sv,Ut,Sv,Rn,Sv,wn,Sv,km,Sv,ql,Sv,Ds,Sv,qr,Sv,ir,Sv,sh,Sv,jt,Sv,xr,Sv,Cm,Sv,kj,Sv,Cd,Sv,nu,Sv,uu,Sv,An,Sv,Me,Sv,lm,Sv,bk,Sv,on,Sv,pu,Sv,ik,Sv,qf,Sv,Be,Sv,Dn,Sv,gk,Sv,Cr,Sv,hk,Sv,Km,Sv,zn,Sv,Ll,Sv,Tr,Sv,Qq,Sv,Cp,Sv,uq,Sv,Ne,Sv,Fe,Sv,vn,Sv,$m,Sv,yn,Sv,xj,Sv,Dp,Sv,su,Sv,Ir,Sv,pl,Sv,tn,Sv,ek,Sv,fq,Sv,Ee,Sv,Ck,Sv,rr,Sv,$q,Sv,rm,Sv,ms,Sv,$l,Sv,kl,Sv,Zt,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv,Sv];var Ec=[Tv,Tv,tt,Tv,Vq,Tv,xq,Tv,qt,Tv,Oq,Tv,pt,Tv,Dq,Tv,zj,Tv,rl,Tv,ak,Tv,Gr,Tv,Jq,Tv,pq,Tv,Yq,Tv,Lq,Tv,oq,Tv,Tq,Tv,mq,Tv,Wq,Tv,Ur,Tv,Fl,Tv,yl,Tv,Zq,Tv,Dd,Tv,st,Tv,Yf,Tv,yq,Tv,_l,Tv,ut,Tv,Nq,Tv,Aq,Tv,rt,Tv,Cq,Tv,Pm,Tv,Ml,Tv,Lr,Tv,Iq,Tv,$j,Tv,sq,Tv,rq,Tv,nq,Tv,bn,Tv,Kq,Tv,Ge,Tv,Uq,Tv,zq,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv,Tv];var Fc=[Uv,Uv,It,Uv,Hq,Uv,Wm,Uv,As,Uv,yt,Uv,Xm,Uv,bt,Uv,Gt,Uv,vq,Uv,Ep,Uv,wt,Uv,Ol,Uv,kn,Uv,jn,Uv,at,Uv,Ct,Uv,At,Uv,ou,Uv,bm,Uv,lt,Uv,Bt,Uv,Ft,Uv,mt,Uv,Tm,Uv,zs,Uv,Xq,Uv,Dt,Uv,sl,Uv,wq,Uv,Ss,Uv,Rq,Uv,vt,Uv,zl,Uv,Tu,Uv,In,Uv,qq,Uv,Al,Uv,nt,Uv,Um,Uv,fn,Uv,Gl,Uv,Cs,Uv,Bq,Uv,Ht,Uv,Nl,Uv,Rs,Uv,Is,Uv,gn,Uv,kq,Uv,xt,Uv,lq,Uv,Yl,Uv,Ik,Uv,Gq,Uv,Ks,Uv,Mq,Uv,zt,Uv,Sq,Uv,Hs,Uv,Sp,Uv,ot,Uv,Et,Uv,Vs,Uv,et,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv,Uv];var Gc=[Vv,Vv,ks,Vv,Qs,Vv,Xn,Vv,ct,Vv,Ts,Vv,us,Vv,Gs,Vv,Sn,Vv,ys,Vv,Bs,Vv,$s,Vv,Js,Vv,Vv,Vv,Vv,Vv,Vv,Vv];var Hc=[Wv,Wv,Un,Wv,os,Wv,gs,Wv,vu,Wv,js,Wv,Zn,Wv,fm,Wv,Zm,Wv,Vm,Wv,$r,Wv,cn,Wv,Jr,Wv,ts,Wv,es,Wv,tl,Wv,gm,Wv,hn,Wv,qs,Wv,Er,Wv,Qm,Wv,Hl,Wv,mn,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv,Wv];var Ic=[Xv,Xv,zp,Xv,xp,Xv,mp,Xv,jp,Xv,Xv,Xv,Xv,Xv,Xv,Xv];var Jc=[Yv,Yv,gh,Yv,qh,Yv,ch,Yv,Hg,Yv,gq,Yv,fh,Yv,ph,Yv,dq,Yv,eh,Yv,mh,Yv,oh,Yv,ih,Yv,hh,Yv,ar,Yv,kr,Yv,jh,Yv,lh,Yv,nh,Yv,er,Yv,kh,Yv,Ng,Yv,rh,Yv,mr,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv,Yv];var Kc=[Zv,Zv,Du,Zv,vp,Zv,rp,Zv,qp,Zv,Eu,Zv,Ap,Zv,Fr,Zv,dn,Zv,np,Zv,Ag,Zv,cp,Zv,hp,Zv,dp,Zv,Fu,Zv,Rm,Zv,Kr,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv,Zv];var Lc=[_v,_v,Gg,_v];var Mc=[$v,$v,Jp,$v,Tp,$v,Tg,$v,_g,$v,Vp,$v,Br,$v,Wg,$v,wp,$v,up,$v,vr,$v,$g,$v,Fp,$v,Mg,$v,Og,$v,Dg,$v,ah,$v,Ip,$v,Ug,$v,Wp,$v,Eg,$v,ip,$v,Rg,$v,Oo,$v,Yg,$v,Uo,$v,Qg,$v,Hp,$v,Vg,$v,Io,$v,Up,$v,gp,$v,Xg,$v,Mo,$v,Eo,$v,Go,$v,vo,$v,Ko,$v,Co,$v,Ao,$v,So,$v,Qo,$v,bh,$v,Sg,$v,Xp,$v,jo,$v,Gp,$v,no,$v,fo,$v,ho,$v,lo,$v,co,$v,to,$v,ro,$v,po,$v,ao,$v,Zg,$v,$v,$v,$v,$v,$v,$v,$v,$v,$v,$v,$v,$v,$v,$v];var Nc=[aw,aw,yr,aw,sr,aw,aw,aw];var Oc=[bw,bw,Bg,bw,Yp,bw,Ig,bw,Kp,bw,bw,bw,bw,bw,bw,bw];var Pc=[cw,cw,Jg,cw,Lg,cw,Fg,cw,Kg,cw,cw,cw,cw,cw,cw,cw];var Qc=[dw,dw,ps,dw,Pl,dw,hs,dw,ln,dw,rs,dw,of,dw,ns,dw,Bl,dw,Il,dw,ds,dw,pf,dw,nn,dw,fs,dw,_m,dw,Ym,dw,ul,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw,dw];var Rc=[ew,ew,Cg,ew];var Sc=[fw,fw,as,fw,Mh,fw,bs,fw,ss,fw,is,fw,cs,fw,fw,fw];var Tc=[gw,gw,yg,gw,Xf,gw,xg,gw,qg,gw,Uf,gw,gg,gw,tg,gw,jg,gw,wg,gw,ug,gw,Of,gw,$f,gw,zg,gw,Zf,gw,kg,gw,sg,gw,em,gw,Jn,gw,ig,gw,Tf,gw,Nh,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw,gw];var Uc=[hw,hw,vv,hw];var Vc=[iw,iw,Es,iw,Os,iw,Ms,iw,Zs,iw,Fs,iw,Xs,iw,ws,iw,xs,iw,iw,iw,iw,iw,iw,iw,iw,iw,iw,iw,iw,iw,iw,iw];var Wc=[jw,jw,eg,jw,cg,jw,xu,jw,yu,jw,ag,jw,lg,jw,dg,jw,Pf,jw,ng,jw,Sf,jw,wu,jw,og,jw,pg,jw,fg,jw,Sm,jw,Yn,jw,en,jw,Rf,jw,Tn,jw,_f,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw,jw];return{_de265_get_error_text:Nd,_strlen:ev,_de265_get_image_plane_user_data:pe,_de265_release_next_picture:_d,_de265_push_end_of_NAL:Vd,_de265_get_highest_TID:$d,_de265_free_decoder:Qd,_de265_set_limit_TID:be,_de265_get_image_plane:oe,_de265_get_parameter_bool:he,_de265_get_version:Ld,_de265_change_framerate:de,_de265_get_image_width:ke,_de265_set_parameter_int:ge,_de265_get_current_TID:ae,_memset:dv,_de265_isOK:Od,_de265_push_end_of_frame:Wd,_memcpy:cv,_de265_set_framerate_ratio:ce,_de265_get_bits_per_pixel:me,_de265_get_chroma_format:ne,_de265_get_image_user_data:re,_de265_get_version_number:Md,_de265_get_image_PTS:qe,_de265_get_number_of_input_bytes_pending:ie,_de265_flush_data:Sd,_realloc:Iu,_de265_new_decoder:Pd,_de265_get_number_of_NAL_units_pending:je,_de265_get_next_picture:Yd,_de265_peek_next_picture:Zd,_de265_decode:Td,_de265_set_parameter_bool:fe,_de265_push_NAL:Ud,_free:Hu,_memmove:fv,__GLOBAL__I_a:Rl,_de265_set_verbosity:Xk,_de265_get_image_height:le,_de265_reset:Xd,_malloc:Gu,_emscripten_replace_memory:gv,_de265_get_warning:ee,_de265_push_data:Rd,_de265_set_image_user_data:se,runPostSets:ld,stackAlloc:Xc,stackSave:Yc,stackRestore:Zc,setThrew:_c,setTempRet0:bd,setTempRet1:cd,setTempRet2:dd,setTempRet3:ed,setTempRet4:fd,setTempRet5:gd,setTempRet6:hd,setTempRet7:id,setTempRet8:jd,setTempRet9:kd,dynCall_viiiii:wv,dynCall_vi:xv,dynCall_vii:yv,dynCall_ii:zv,dynCall_iiiiii:Av,dynCall_iiii:Bv,dynCall_viiiiid:Cv,dynCall_viiiiiiii:Dv,dynCall_viiiiii:Ev,dynCall_viiiiiiiiiiiii:Fv,dynCall_viiiiiii:Gv,dynCall_viiiiiid:Hv,dynCall_viiiiiiiii:Iv,dynCall_viiiiiiiiii:Jv,dynCall_iii:Kv,dynCall_viiiiiiiiiiii:Lv,dynCall_iiiii:Mv,dynCall_viii:Nv,dynCall_v:Ov,dynCall_iiiiiiiii:Pv,dynCall_viiii:Qv}})
|
|
|
|
|
|
// EMSCRIPTEN_END_ASM
|
|
({ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "invoke_viiiii": invoke_viiiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_iiiiii": invoke_iiiiii, "invoke_iiii": invoke_iiii, "invoke_viiiiid": invoke_viiiiid, "invoke_viiiiiiii": invoke_viiiiiiii, "invoke_viiiiii": invoke_viiiiii, "invoke_viiiiiiiiiiiii": invoke_viiiiiiiiiiiii, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiid": invoke_viiiiiid, "invoke_viiiiiiiii": invoke_viiiiiiiii, "invoke_viiiiiiiiii": invoke_viiiiiiiiii, "invoke_iii": invoke_iii, "invoke_viiiiiiiiiiii": invoke_viiiiiiiiiiii, "invoke_iiiii": invoke_iiiii, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_iiiiiiiii": invoke_iiiiiiiii, "invoke_viiii": invoke_viiii, "_llvm_lifetime_end": _llvm_lifetime_end, "__scanString": __scanString, "_pthread_mutex_lock": _pthread_mutex_lock, "___cxa_end_catch": ___cxa_end_catch, "_strtoull": _strtoull, "_fflush": _fflush, "__isLeapYear": __isLeapYear, "_fwrite": _fwrite, "_send": _send, "_pthread_mutex_init": _pthread_mutex_init, "_llvm_umul_with_overflow_i32": _llvm_umul_with_overflow_i32, "_isspace": _isspace, "_read": _read, "_isxdigit_l": _isxdigit_l, "_fileno": _fileno, "___cxa_guard_abort": ___cxa_guard_abort, "_newlocale": _newlocale, "___gxx_personality_v0": ___gxx_personality_v0, "_pthread_cond_wait": _pthread_cond_wait, "___cxa_rethrow": ___cxa_rethrow, "_fmod": _fmod, "___resumeException": ___resumeException, "_llvm_va_end": _llvm_va_end, "_vsscanf": _vsscanf, "_snprintf": _snprintf, "_fgetc": _fgetc, "__getFloat": __getFloat, "_pthread_cond_signal": _pthread_cond_signal, "___cxa_free_exception": ___cxa_free_exception, "_isdigit_l": _isdigit_l, "___setErrNo": ___setErrNo, "_isxdigit": _isxdigit, "_exit": _exit, "_sprintf": _sprintf, "_asprintf": _asprintf, "___ctype_b_loc": ___ctype_b_loc, "_freelocale": _freelocale, "_catgets": _catgets, "___cxa_is_number_type": ___cxa_is_number_type, "_llvm_uadd_with_overflow_i32": _llvm_uadd_with_overflow_i32, "___cxa_does_inherit": ___cxa_does_inherit, "___cxa_guard_acquire": ___cxa_guard_acquire, "___cxa_begin_catch": ___cxa_begin_catch, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_recv": _recv, "__parseInt64": __parseInt64, "__ZSt18uncaught_exceptionv": __ZSt18uncaught_exceptionv, "__ZNSt9exceptionD2Ev": __ZNSt9exceptionD2Ev, "_mkport": _mkport, "_copysign": _copysign, "__exit": __exit, "_strftime": _strftime, "___cxa_throw": ___cxa_throw, "_printf": _printf, "_pread": _pread, "_strtoull_l": _strtoull_l, "__arraySum": __arraySum, "_sysconf": _sysconf, "_strtoll_l": _strtoll_l, "___cxa_find_matching_catch": ___cxa_find_matching_catch, "__formatString": __formatString, "_pthread_cond_broadcast": _pthread_cond_broadcast, "__ZSt9terminatev": __ZSt9terminatev, "_vfprintf": _vfprintf, "_pthread_mutex_unlock": _pthread_mutex_unlock, "___cxa_call_unexpected": ___cxa_call_unexpected, "_sbrk": _sbrk, "_atexit": _atexit, "___errno_location": ___errno_location, "_strerror": _strerror, "_pthread_mutex_destroy": _pthread_mutex_destroy, "_catclose": _catclose, "_llvm_lifetime_start": _llvm_lifetime_start, "___cxa_guard_release": ___cxa_guard_release, "_ungetc": _ungetc, "_pthread_cond_destroy": _pthread_cond_destroy, "_uselocale": _uselocale, "_vsnprintf": _vsnprintf, "_sscanf": _sscanf, "___assert_fail": ___assert_fail, "_fread": _fread, "_strftime_l": _strftime_l, "_abort": _abort, "_fprintf": _fprintf, "_isdigit": _isdigit, "_strtoll": _strtoll, "__addDays": __addDays, "_fabs": _fabs, "__reallyNegative": __reallyNegative, "_write": _write, "___cxa_allocate_exception": ___cxa_allocate_exception, "___cxa_pure_virtual": ___cxa_pure_virtual, "_vasprintf": _vasprintf, "_catopen": _catopen, "___ctype_toupper_loc": ___ctype_toupper_loc, "___ctype_tolower_loc": ___ctype_tolower_loc, "_pthread_join": _pthread_join, "_pthread_cond_init": _pthread_cond_init, "_pwrite": _pwrite, "_strerror_r": _strerror_r, "_pthread_create": _pthread_create, "_time": _time, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8, "ctlz_i8": ctlz_i8, "NaN": NaN, "Infinity": Infinity, "_stdin": _stdin, "__ZTVN10__cxxabiv117__class_type_infoE": __ZTVN10__cxxabiv117__class_type_infoE, "_stderr": _stderr, "__ZTISt9exception": __ZTISt9exception, "__ZTVN10__cxxabiv120__si_class_type_infoE": __ZTVN10__cxxabiv120__si_class_type_infoE, "_stdout": _stdout, "___dso_handle": ___dso_handle }, buffer);
|
|
var _de265_get_error_text = Module["_de265_get_error_text"] = asm["_de265_get_error_text"];
|
|
var _strlen = Module["_strlen"] = asm["_strlen"];
|
|
var _de265_get_image_plane_user_data = Module["_de265_get_image_plane_user_data"] = asm["_de265_get_image_plane_user_data"];
|
|
var _de265_release_next_picture = Module["_de265_release_next_picture"] = asm["_de265_release_next_picture"];
|
|
var _de265_push_end_of_NAL = Module["_de265_push_end_of_NAL"] = asm["_de265_push_end_of_NAL"];
|
|
var _de265_get_highest_TID = Module["_de265_get_highest_TID"] = asm["_de265_get_highest_TID"];
|
|
var _de265_free_decoder = Module["_de265_free_decoder"] = asm["_de265_free_decoder"];
|
|
var _de265_set_limit_TID = Module["_de265_set_limit_TID"] = asm["_de265_set_limit_TID"];
|
|
var _de265_get_image_plane = Module["_de265_get_image_plane"] = asm["_de265_get_image_plane"];
|
|
var _de265_get_parameter_bool = Module["_de265_get_parameter_bool"] = asm["_de265_get_parameter_bool"];
|
|
var _de265_get_version = Module["_de265_get_version"] = asm["_de265_get_version"];
|
|
var _de265_change_framerate = Module["_de265_change_framerate"] = asm["_de265_change_framerate"];
|
|
var _de265_get_image_width = Module["_de265_get_image_width"] = asm["_de265_get_image_width"];
|
|
var _de265_set_parameter_int = Module["_de265_set_parameter_int"] = asm["_de265_set_parameter_int"];
|
|
var _de265_get_current_TID = Module["_de265_get_current_TID"] = asm["_de265_get_current_TID"];
|
|
var _memset = Module["_memset"] = asm["_memset"];
|
|
var _de265_isOK = Module["_de265_isOK"] = asm["_de265_isOK"];
|
|
var _de265_push_end_of_frame = Module["_de265_push_end_of_frame"] = asm["_de265_push_end_of_frame"];
|
|
var _memcpy = Module["_memcpy"] = asm["_memcpy"];
|
|
var _de265_set_framerate_ratio = Module["_de265_set_framerate_ratio"] = asm["_de265_set_framerate_ratio"];
|
|
var _de265_get_bits_per_pixel = Module["_de265_get_bits_per_pixel"] = asm["_de265_get_bits_per_pixel"];
|
|
var _de265_get_chroma_format = Module["_de265_get_chroma_format"] = asm["_de265_get_chroma_format"];
|
|
var _de265_get_image_user_data = Module["_de265_get_image_user_data"] = asm["_de265_get_image_user_data"];
|
|
var _de265_get_version_number = Module["_de265_get_version_number"] = asm["_de265_get_version_number"];
|
|
var _de265_get_image_PTS = Module["_de265_get_image_PTS"] = asm["_de265_get_image_PTS"];
|
|
var _de265_get_number_of_input_bytes_pending = Module["_de265_get_number_of_input_bytes_pending"] = asm["_de265_get_number_of_input_bytes_pending"];
|
|
var _de265_flush_data = Module["_de265_flush_data"] = asm["_de265_flush_data"];
|
|
var _realloc = Module["_realloc"] = asm["_realloc"];
|
|
var _de265_new_decoder = Module["_de265_new_decoder"] = asm["_de265_new_decoder"];
|
|
var _de265_get_number_of_NAL_units_pending = Module["_de265_get_number_of_NAL_units_pending"] = asm["_de265_get_number_of_NAL_units_pending"];
|
|
var _de265_get_next_picture = Module["_de265_get_next_picture"] = asm["_de265_get_next_picture"];
|
|
var _de265_peek_next_picture = Module["_de265_peek_next_picture"] = asm["_de265_peek_next_picture"];
|
|
var _de265_decode = Module["_de265_decode"] = asm["_de265_decode"];
|
|
var _de265_set_parameter_bool = Module["_de265_set_parameter_bool"] = asm["_de265_set_parameter_bool"];
|
|
var _de265_push_NAL = Module["_de265_push_NAL"] = asm["_de265_push_NAL"];
|
|
var _free = Module["_free"] = asm["_free"];
|
|
var _memmove = Module["_memmove"] = asm["_memmove"];
|
|
var __GLOBAL__I_a = Module["__GLOBAL__I_a"] = asm["__GLOBAL__I_a"];
|
|
var _de265_set_verbosity = Module["_de265_set_verbosity"] = asm["_de265_set_verbosity"];
|
|
var _de265_get_image_height = Module["_de265_get_image_height"] = asm["_de265_get_image_height"];
|
|
var _de265_reset = Module["_de265_reset"] = asm["_de265_reset"];
|
|
var _malloc = Module["_malloc"] = asm["_malloc"];
|
|
var _emscripten_replace_memory = Module["_emscripten_replace_memory"] = asm["_emscripten_replace_memory"];
|
|
var _de265_get_warning = Module["_de265_get_warning"] = asm["_de265_get_warning"];
|
|
var _de265_push_data = Module["_de265_push_data"] = asm["_de265_push_data"];
|
|
var _de265_set_image_user_data = Module["_de265_set_image_user_data"] = asm["_de265_set_image_user_data"];
|
|
var runPostSets = Module["runPostSets"] = asm["runPostSets"];
|
|
var dynCall_viiiii = Module["dynCall_viiiii"] = asm["dynCall_viiiii"];
|
|
var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"];
|
|
var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"];
|
|
var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"];
|
|
var dynCall_iiiiii = Module["dynCall_iiiiii"] = asm["dynCall_iiiiii"];
|
|
var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"];
|
|
var dynCall_viiiiid = Module["dynCall_viiiiid"] = asm["dynCall_viiiiid"];
|
|
var dynCall_viiiiiiii = Module["dynCall_viiiiiiii"] = asm["dynCall_viiiiiiii"];
|
|
var dynCall_viiiiii = Module["dynCall_viiiiii"] = asm["dynCall_viiiiii"];
|
|
var dynCall_viiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiii"] = asm["dynCall_viiiiiiiiiiiii"];
|
|
var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = asm["dynCall_viiiiiii"];
|
|
var dynCall_viiiiiid = Module["dynCall_viiiiiid"] = asm["dynCall_viiiiiid"];
|
|
var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = asm["dynCall_viiiiiiiii"];
|
|
var dynCall_viiiiiiiiii = Module["dynCall_viiiiiiiiii"] = asm["dynCall_viiiiiiiiii"];
|
|
var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"];
|
|
var dynCall_viiiiiiiiiiii = Module["dynCall_viiiiiiiiiiii"] = asm["dynCall_viiiiiiiiiiii"];
|
|
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_viiii = Module["dynCall_viiii"] = asm["dynCall_viiii"];
|
|
|
|
Runtime.stackAlloc = function(size) { return asm['stackAlloc'](size) };
|
|
Runtime.stackSave = function() { return asm['stackSave']() };
|
|
Runtime.stackRestore = function(top) { asm['stackRestore'](top) };
|
|
|
|
// TODO: strip out parts of this we do not need
|
|
|
|
//======= begin closure i64 code =======
|
|
|
|
// Copyright 2009 The Closure Library Authors. All Rights Reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS-IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
/**
|
|
* @fileoverview Defines a Long class for representing a 64-bit two's-complement
|
|
* integer value, which faithfully simulates the behavior of a Java "long". This
|
|
* implementation is derived from LongLib in GWT.
|
|
*
|
|
*/
|
|
|
|
var i64Math = (function() { // Emscripten wrapper
|
|
var goog = { math: {} };
|
|
|
|
|
|
/**
|
|
* Constructs a 64-bit two's-complement integer, given its low and high 32-bit
|
|
* values as *signed* integers. See the from* functions below for more
|
|
* convenient ways of constructing Longs.
|
|
*
|
|
* The internal representation of a long is the two given signed, 32-bit values.
|
|
* We use 32-bit pieces because these are the size of integers on which
|
|
* Javascript performs bit-operations. For operations like addition and
|
|
* multiplication, we split each number into 16-bit pieces, which can easily be
|
|
* multiplied within Javascript's floating-point representation without overflow
|
|
* or change in sign.
|
|
*
|
|
* In the algorithms below, we frequently reduce the negative case to the
|
|
* positive case by negating the input(s) and then post-processing the result.
|
|
* Note that we must ALWAYS check specially whether those values are MIN_VALUE
|
|
* (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as
|
|
* a positive number, it overflows back into a negative). Not handling this
|
|
* case would often result in infinite recursion.
|
|
*
|
|
* @param {number} low The low (signed) 32 bits of the long.
|
|
* @param {number} high The high (signed) 32 bits of the long.
|
|
* @constructor
|
|
*/
|
|
goog.math.Long = function(low, high) {
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
this.low_ = low | 0; // force into 32 signed bits.
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
this.high_ = high | 0; // force into 32 signed bits.
|
|
};
|
|
|
|
|
|
// NOTE: Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the
|
|
// from* methods on which they depend.
|
|
|
|
|
|
/**
|
|
* A cache of the Long representations of small integer values.
|
|
* @type {!Object}
|
|
* @private
|
|
*/
|
|
goog.math.Long.IntCache_ = {};
|
|
|
|
|
|
/**
|
|
* Returns a Long representing the given (32-bit) integer value.
|
|
* @param {number} value The 32-bit integer in question.
|
|
* @return {!goog.math.Long} The corresponding Long value.
|
|
*/
|
|
goog.math.Long.fromInt = function(value) {
|
|
if (-128 <= value && value < 128) {
|
|
var cachedObj = goog.math.Long.IntCache_[value];
|
|
if (cachedObj) {
|
|
return cachedObj;
|
|
}
|
|
}
|
|
|
|
var obj = new goog.math.Long(value | 0, value < 0 ? -1 : 0);
|
|
if (-128 <= value && value < 128) {
|
|
goog.math.Long.IntCache_[value] = obj;
|
|
}
|
|
return obj;
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns a Long representing the given value, provided that it is a finite
|
|
* number. Otherwise, zero is returned.
|
|
* @param {number} value The number in question.
|
|
* @return {!goog.math.Long} The corresponding Long value.
|
|
*/
|
|
goog.math.Long.fromNumber = function(value) {
|
|
if (isNaN(value) || !isFinite(value)) {
|
|
return goog.math.Long.ZERO;
|
|
} else if (value <= -goog.math.Long.TWO_PWR_63_DBL_) {
|
|
return goog.math.Long.MIN_VALUE;
|
|
} else if (value + 1 >= goog.math.Long.TWO_PWR_63_DBL_) {
|
|
return goog.math.Long.MAX_VALUE;
|
|
} else if (value < 0) {
|
|
return goog.math.Long.fromNumber(-value).negate();
|
|
} else {
|
|
return new goog.math.Long(
|
|
(value % goog.math.Long.TWO_PWR_32_DBL_) | 0,
|
|
(value / goog.math.Long.TWO_PWR_32_DBL_) | 0);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns a Long representing the 64-bit integer that comes by concatenating
|
|
* the given high and low bits. Each is assumed to use 32 bits.
|
|
* @param {number} lowBits The low 32-bits.
|
|
* @param {number} highBits The high 32-bits.
|
|
* @return {!goog.math.Long} The corresponding Long value.
|
|
*/
|
|
goog.math.Long.fromBits = function(lowBits, highBits) {
|
|
return new goog.math.Long(lowBits, highBits);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns a Long representation of the given string, written using the given
|
|
* radix.
|
|
* @param {string} str The textual representation of the Long.
|
|
* @param {number=} opt_radix The radix in which the text is written.
|
|
* @return {!goog.math.Long} The corresponding Long value.
|
|
*/
|
|
goog.math.Long.fromString = function(str, opt_radix) {
|
|
if (str.length == 0) {
|
|
throw Error('number format error: empty string');
|
|
}
|
|
|
|
var radix = opt_radix || 10;
|
|
if (radix < 2 || 36 < radix) {
|
|
throw Error('radix out of range: ' + radix);
|
|
}
|
|
|
|
if (str.charAt(0) == '-') {
|
|
return goog.math.Long.fromString(str.substring(1), radix).negate();
|
|
} else if (str.indexOf('-') >= 0) {
|
|
throw Error('number format error: interior "-" character: ' + str);
|
|
}
|
|
|
|
// Do several (8) digits each time through the loop, so as to
|
|
// minimize the calls to the very expensive emulated div.
|
|
var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 8));
|
|
|
|
var result = goog.math.Long.ZERO;
|
|
for (var i = 0; i < str.length; i += 8) {
|
|
var size = Math.min(8, str.length - i);
|
|
var value = parseInt(str.substring(i, i + size), radix);
|
|
if (size < 8) {
|
|
var power = goog.math.Long.fromNumber(Math.pow(radix, size));
|
|
result = result.multiply(power).add(goog.math.Long.fromNumber(value));
|
|
} else {
|
|
result = result.multiply(radixToPower);
|
|
result = result.add(goog.math.Long.fromNumber(value));
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
|
|
|
|
// NOTE: the compiler should inline these constant values below and then remove
|
|
// these variables, so there should be no runtime penalty for these.
|
|
|
|
|
|
/**
|
|
* Number used repeated below in calculations. This must appear before the
|
|
* first call to any from* function below.
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_16_DBL_ = 1 << 16;
|
|
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_24_DBL_ = 1 << 24;
|
|
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_32_DBL_ =
|
|
goog.math.Long.TWO_PWR_16_DBL_ * goog.math.Long.TWO_PWR_16_DBL_;
|
|
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_31_DBL_ =
|
|
goog.math.Long.TWO_PWR_32_DBL_ / 2;
|
|
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_48_DBL_ =
|
|
goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_16_DBL_;
|
|
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_64_DBL_ =
|
|
goog.math.Long.TWO_PWR_32_DBL_ * goog.math.Long.TWO_PWR_32_DBL_;
|
|
|
|
|
|
/**
|
|
* @type {number}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_63_DBL_ =
|
|
goog.math.Long.TWO_PWR_64_DBL_ / 2;
|
|
|
|
|
|
/** @type {!goog.math.Long} */
|
|
goog.math.Long.ZERO = goog.math.Long.fromInt(0);
|
|
|
|
|
|
/** @type {!goog.math.Long} */
|
|
goog.math.Long.ONE = goog.math.Long.fromInt(1);
|
|
|
|
|
|
/** @type {!goog.math.Long} */
|
|
goog.math.Long.NEG_ONE = goog.math.Long.fromInt(-1);
|
|
|
|
|
|
/** @type {!goog.math.Long} */
|
|
goog.math.Long.MAX_VALUE =
|
|
goog.math.Long.fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0);
|
|
|
|
|
|
/** @type {!goog.math.Long} */
|
|
goog.math.Long.MIN_VALUE = goog.math.Long.fromBits(0, 0x80000000 | 0);
|
|
|
|
|
|
/**
|
|
* @type {!goog.math.Long}
|
|
* @private
|
|
*/
|
|
goog.math.Long.TWO_PWR_24_ = goog.math.Long.fromInt(1 << 24);
|
|
|
|
|
|
/** @return {number} The value, assuming it is a 32-bit integer. */
|
|
goog.math.Long.prototype.toInt = function() {
|
|
return this.low_;
|
|
};
|
|
|
|
|
|
/** @return {number} The closest floating-point representation to this value. */
|
|
goog.math.Long.prototype.toNumber = function() {
|
|
return this.high_ * goog.math.Long.TWO_PWR_32_DBL_ +
|
|
this.getLowBitsUnsigned();
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number=} opt_radix The radix in which the text should be written.
|
|
* @return {string} The textual representation of this value.
|
|
*/
|
|
goog.math.Long.prototype.toString = function(opt_radix) {
|
|
var radix = opt_radix || 10;
|
|
if (radix < 2 || 36 < radix) {
|
|
throw Error('radix out of range: ' + radix);
|
|
}
|
|
|
|
if (this.isZero()) {
|
|
return '0';
|
|
}
|
|
|
|
if (this.isNegative()) {
|
|
if (this.equals(goog.math.Long.MIN_VALUE)) {
|
|
// We need to change the Long value before it can be negated, so we remove
|
|
// the bottom-most digit in this base and then recurse to do the rest.
|
|
var radixLong = goog.math.Long.fromNumber(radix);
|
|
var div = this.div(radixLong);
|
|
var rem = div.multiply(radixLong).subtract(this);
|
|
return div.toString(radix) + rem.toInt().toString(radix);
|
|
} else {
|
|
return '-' + this.negate().toString(radix);
|
|
}
|
|
}
|
|
|
|
// Do several (6) digits each time through the loop, so as to
|
|
// minimize the calls to the very expensive emulated div.
|
|
var radixToPower = goog.math.Long.fromNumber(Math.pow(radix, 6));
|
|
|
|
var rem = this;
|
|
var result = '';
|
|
while (true) {
|
|
var remDiv = rem.div(radixToPower);
|
|
var intval = rem.subtract(remDiv.multiply(radixToPower)).toInt();
|
|
var digits = intval.toString(radix);
|
|
|
|
rem = remDiv;
|
|
if (rem.isZero()) {
|
|
return digits + result;
|
|
} else {
|
|
while (digits.length < 6) {
|
|
digits = '0' + digits;
|
|
}
|
|
result = '' + digits + result;
|
|
}
|
|
}
|
|
};
|
|
|
|
|
|
/** @return {number} The high 32-bits as a signed value. */
|
|
goog.math.Long.prototype.getHighBits = function() {
|
|
return this.high_;
|
|
};
|
|
|
|
|
|
/** @return {number} The low 32-bits as a signed value. */
|
|
goog.math.Long.prototype.getLowBits = function() {
|
|
return this.low_;
|
|
};
|
|
|
|
|
|
/** @return {number} The low 32-bits as an unsigned value. */
|
|
goog.math.Long.prototype.getLowBitsUnsigned = function() {
|
|
return (this.low_ >= 0) ?
|
|
this.low_ : goog.math.Long.TWO_PWR_32_DBL_ + this.low_;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {number} Returns the number of bits needed to represent the absolute
|
|
* value of this Long.
|
|
*/
|
|
goog.math.Long.prototype.getNumBitsAbs = function() {
|
|
if (this.isNegative()) {
|
|
if (this.equals(goog.math.Long.MIN_VALUE)) {
|
|
return 64;
|
|
} else {
|
|
return this.negate().getNumBitsAbs();
|
|
}
|
|
} else {
|
|
var val = this.high_ != 0 ? this.high_ : this.low_;
|
|
for (var bit = 31; bit > 0; bit--) {
|
|
if ((val & (1 << bit)) != 0) {
|
|
break;
|
|
}
|
|
}
|
|
return this.high_ != 0 ? bit + 33 : bit + 1;
|
|
}
|
|
};
|
|
|
|
|
|
/** @return {boolean} Whether this value is zero. */
|
|
goog.math.Long.prototype.isZero = function() {
|
|
return this.high_ == 0 && this.low_ == 0;
|
|
};
|
|
|
|
|
|
/** @return {boolean} Whether this value is negative. */
|
|
goog.math.Long.prototype.isNegative = function() {
|
|
return this.high_ < 0;
|
|
};
|
|
|
|
|
|
/** @return {boolean} Whether this value is odd. */
|
|
goog.math.Long.prototype.isOdd = function() {
|
|
return (this.low_ & 1) == 1;
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {boolean} Whether this Long equals the other.
|
|
*/
|
|
goog.math.Long.prototype.equals = function(other) {
|
|
return (this.high_ == other.high_) && (this.low_ == other.low_);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {boolean} Whether this Long does not equal the other.
|
|
*/
|
|
goog.math.Long.prototype.notEquals = function(other) {
|
|
return (this.high_ != other.high_) || (this.low_ != other.low_);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {boolean} Whether this Long is less than the other.
|
|
*/
|
|
goog.math.Long.prototype.lessThan = function(other) {
|
|
return this.compare(other) < 0;
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {boolean} Whether this Long is less than or equal to the other.
|
|
*/
|
|
goog.math.Long.prototype.lessThanOrEqual = function(other) {
|
|
return this.compare(other) <= 0;
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {boolean} Whether this Long is greater than the other.
|
|
*/
|
|
goog.math.Long.prototype.greaterThan = function(other) {
|
|
return this.compare(other) > 0;
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {boolean} Whether this Long is greater than or equal to the other.
|
|
*/
|
|
goog.math.Long.prototype.greaterThanOrEqual = function(other) {
|
|
return this.compare(other) >= 0;
|
|
};
|
|
|
|
|
|
/**
|
|
* Compares this Long with the given one.
|
|
* @param {goog.math.Long} other Long to compare against.
|
|
* @return {number} 0 if they are the same, 1 if the this is greater, and -1
|
|
* if the given one is greater.
|
|
*/
|
|
goog.math.Long.prototype.compare = function(other) {
|
|
if (this.equals(other)) {
|
|
return 0;
|
|
}
|
|
|
|
var thisNeg = this.isNegative();
|
|
var otherNeg = other.isNegative();
|
|
if (thisNeg && !otherNeg) {
|
|
return -1;
|
|
}
|
|
if (!thisNeg && otherNeg) {
|
|
return 1;
|
|
}
|
|
|
|
// at this point, the signs are the same, so subtraction will not overflow
|
|
if (this.subtract(other).isNegative()) {
|
|
return -1;
|
|
} else {
|
|
return 1;
|
|
}
|
|
};
|
|
|
|
|
|
/** @return {!goog.math.Long} The negation of this value. */
|
|
goog.math.Long.prototype.negate = function() {
|
|
if (this.equals(goog.math.Long.MIN_VALUE)) {
|
|
return goog.math.Long.MIN_VALUE;
|
|
} else {
|
|
return this.not().add(goog.math.Long.ONE);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns the sum of this and the given Long.
|
|
* @param {goog.math.Long} other Long to add to this one.
|
|
* @return {!goog.math.Long} The sum of this and the given Long.
|
|
*/
|
|
goog.math.Long.prototype.add = function(other) {
|
|
// Divide each number into 4 chunks of 16 bits, and then sum the chunks.
|
|
|
|
var a48 = this.high_ >>> 16;
|
|
var a32 = this.high_ & 0xFFFF;
|
|
var a16 = this.low_ >>> 16;
|
|
var a00 = this.low_ & 0xFFFF;
|
|
|
|
var b48 = other.high_ >>> 16;
|
|
var b32 = other.high_ & 0xFFFF;
|
|
var b16 = other.low_ >>> 16;
|
|
var b00 = other.low_ & 0xFFFF;
|
|
|
|
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
c00 += a00 + b00;
|
|
c16 += c00 >>> 16;
|
|
c00 &= 0xFFFF;
|
|
c16 += a16 + b16;
|
|
c32 += c16 >>> 16;
|
|
c16 &= 0xFFFF;
|
|
c32 += a32 + b32;
|
|
c48 += c32 >>> 16;
|
|
c32 &= 0xFFFF;
|
|
c48 += a48 + b48;
|
|
c48 &= 0xFFFF;
|
|
return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns the difference of this and the given Long.
|
|
* @param {goog.math.Long} other Long to subtract from this.
|
|
* @return {!goog.math.Long} The difference of this and the given Long.
|
|
*/
|
|
goog.math.Long.prototype.subtract = function(other) {
|
|
return this.add(other.negate());
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns the product of this and the given long.
|
|
* @param {goog.math.Long} other Long to multiply with this.
|
|
* @return {!goog.math.Long} The product of this and the other.
|
|
*/
|
|
goog.math.Long.prototype.multiply = function(other) {
|
|
if (this.isZero()) {
|
|
return goog.math.Long.ZERO;
|
|
} else if (other.isZero()) {
|
|
return goog.math.Long.ZERO;
|
|
}
|
|
|
|
if (this.equals(goog.math.Long.MIN_VALUE)) {
|
|
return other.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO;
|
|
} else if (other.equals(goog.math.Long.MIN_VALUE)) {
|
|
return this.isOdd() ? goog.math.Long.MIN_VALUE : goog.math.Long.ZERO;
|
|
}
|
|
|
|
if (this.isNegative()) {
|
|
if (other.isNegative()) {
|
|
return this.negate().multiply(other.negate());
|
|
} else {
|
|
return this.negate().multiply(other).negate();
|
|
}
|
|
} else if (other.isNegative()) {
|
|
return this.multiply(other.negate()).negate();
|
|
}
|
|
|
|
// If both longs are small, use float multiplication
|
|
if (this.lessThan(goog.math.Long.TWO_PWR_24_) &&
|
|
other.lessThan(goog.math.Long.TWO_PWR_24_)) {
|
|
return goog.math.Long.fromNumber(this.toNumber() * other.toNumber());
|
|
}
|
|
|
|
// Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.
|
|
// We can skip products that would overflow.
|
|
|
|
var a48 = this.high_ >>> 16;
|
|
var a32 = this.high_ & 0xFFFF;
|
|
var a16 = this.low_ >>> 16;
|
|
var a00 = this.low_ & 0xFFFF;
|
|
|
|
var b48 = other.high_ >>> 16;
|
|
var b32 = other.high_ & 0xFFFF;
|
|
var b16 = other.low_ >>> 16;
|
|
var b00 = other.low_ & 0xFFFF;
|
|
|
|
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
c00 += a00 * b00;
|
|
c16 += c00 >>> 16;
|
|
c00 &= 0xFFFF;
|
|
c16 += a16 * b00;
|
|
c32 += c16 >>> 16;
|
|
c16 &= 0xFFFF;
|
|
c16 += a00 * b16;
|
|
c32 += c16 >>> 16;
|
|
c16 &= 0xFFFF;
|
|
c32 += a32 * b00;
|
|
c48 += c32 >>> 16;
|
|
c32 &= 0xFFFF;
|
|
c32 += a16 * b16;
|
|
c48 += c32 >>> 16;
|
|
c32 &= 0xFFFF;
|
|
c32 += a00 * b32;
|
|
c48 += c32 >>> 16;
|
|
c32 &= 0xFFFF;
|
|
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
|
|
c48 &= 0xFFFF;
|
|
return goog.math.Long.fromBits((c16 << 16) | c00, (c48 << 16) | c32);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns this Long divided by the given one.
|
|
* @param {goog.math.Long} other Long by which to divide.
|
|
* @return {!goog.math.Long} This Long divided by the given one.
|
|
*/
|
|
goog.math.Long.prototype.div = function(other) {
|
|
if (other.isZero()) {
|
|
throw Error('division by zero');
|
|
} else if (this.isZero()) {
|
|
return goog.math.Long.ZERO;
|
|
}
|
|
|
|
if (this.equals(goog.math.Long.MIN_VALUE)) {
|
|
if (other.equals(goog.math.Long.ONE) ||
|
|
other.equals(goog.math.Long.NEG_ONE)) {
|
|
return goog.math.Long.MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE
|
|
} else if (other.equals(goog.math.Long.MIN_VALUE)) {
|
|
return goog.math.Long.ONE;
|
|
} else {
|
|
// At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.
|
|
var halfThis = this.shiftRight(1);
|
|
var approx = halfThis.div(other).shiftLeft(1);
|
|
if (approx.equals(goog.math.Long.ZERO)) {
|
|
return other.isNegative() ? goog.math.Long.ONE : goog.math.Long.NEG_ONE;
|
|
} else {
|
|
var rem = this.subtract(other.multiply(approx));
|
|
var result = approx.add(rem.div(other));
|
|
return result;
|
|
}
|
|
}
|
|
} else if (other.equals(goog.math.Long.MIN_VALUE)) {
|
|
return goog.math.Long.ZERO;
|
|
}
|
|
|
|
if (this.isNegative()) {
|
|
if (other.isNegative()) {
|
|
return this.negate().div(other.negate());
|
|
} else {
|
|
return this.negate().div(other).negate();
|
|
}
|
|
} else if (other.isNegative()) {
|
|
return this.div(other.negate()).negate();
|
|
}
|
|
|
|
// Repeat the following until the remainder is less than other: find a
|
|
// floating-point that approximates remainder / other *from below*, add this
|
|
// into the result, and subtract it from the remainder. It is critical that
|
|
// the approximate value is less than or equal to the real value so that the
|
|
// remainder never becomes negative.
|
|
var res = goog.math.Long.ZERO;
|
|
var rem = this;
|
|
while (rem.greaterThanOrEqual(other)) {
|
|
// Approximate the result of division. This may be a little greater or
|
|
// smaller than the actual value.
|
|
var approx = Math.max(1, Math.floor(rem.toNumber() / other.toNumber()));
|
|
|
|
// We will tweak the approximate result by changing it in the 48-th digit or
|
|
// the smallest non-fractional digit, whichever is larger.
|
|
var log2 = Math.ceil(Math.log(approx) / Math.LN2);
|
|
var delta = (log2 <= 48) ? 1 : Math.pow(2, log2 - 48);
|
|
|
|
// Decrease the approximation until it is smaller than the remainder. Note
|
|
// that if it is too large, the product overflows and is negative.
|
|
var approxRes = goog.math.Long.fromNumber(approx);
|
|
var approxRem = approxRes.multiply(other);
|
|
while (approxRem.isNegative() || approxRem.greaterThan(rem)) {
|
|
approx -= delta;
|
|
approxRes = goog.math.Long.fromNumber(approx);
|
|
approxRem = approxRes.multiply(other);
|
|
}
|
|
|
|
// We know the answer can't be zero... and actually, zero would cause
|
|
// infinite recursion since we would make no progress.
|
|
if (approxRes.isZero()) {
|
|
approxRes = goog.math.Long.ONE;
|
|
}
|
|
|
|
res = res.add(approxRes);
|
|
rem = rem.subtract(approxRem);
|
|
}
|
|
return res;
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns this Long modulo the given one.
|
|
* @param {goog.math.Long} other Long by which to mod.
|
|
* @return {!goog.math.Long} This Long modulo the given one.
|
|
*/
|
|
goog.math.Long.prototype.modulo = function(other) {
|
|
return this.subtract(this.div(other).multiply(other));
|
|
};
|
|
|
|
|
|
/** @return {!goog.math.Long} The bitwise-NOT of this value. */
|
|
goog.math.Long.prototype.not = function() {
|
|
return goog.math.Long.fromBits(~this.low_, ~this.high_);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns the bitwise-AND of this Long and the given one.
|
|
* @param {goog.math.Long} other The Long with which to AND.
|
|
* @return {!goog.math.Long} The bitwise-AND of this and the other.
|
|
*/
|
|
goog.math.Long.prototype.and = function(other) {
|
|
return goog.math.Long.fromBits(this.low_ & other.low_,
|
|
this.high_ & other.high_);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns the bitwise-OR of this Long and the given one.
|
|
* @param {goog.math.Long} other The Long with which to OR.
|
|
* @return {!goog.math.Long} The bitwise-OR of this and the other.
|
|
*/
|
|
goog.math.Long.prototype.or = function(other) {
|
|
return goog.math.Long.fromBits(this.low_ | other.low_,
|
|
this.high_ | other.high_);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns the bitwise-XOR of this Long and the given one.
|
|
* @param {goog.math.Long} other The Long with which to XOR.
|
|
* @return {!goog.math.Long} The bitwise-XOR of this and the other.
|
|
*/
|
|
goog.math.Long.prototype.xor = function(other) {
|
|
return goog.math.Long.fromBits(this.low_ ^ other.low_,
|
|
this.high_ ^ other.high_);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns this Long with bits shifted to the left by the given amount.
|
|
* @param {number} numBits The number of bits by which to shift.
|
|
* @return {!goog.math.Long} This shifted to the left by the given amount.
|
|
*/
|
|
goog.math.Long.prototype.shiftLeft = function(numBits) {
|
|
numBits &= 63;
|
|
if (numBits == 0) {
|
|
return this;
|
|
} else {
|
|
var low = this.low_;
|
|
if (numBits < 32) {
|
|
var high = this.high_;
|
|
return goog.math.Long.fromBits(
|
|
low << numBits,
|
|
(high << numBits) | (low >>> (32 - numBits)));
|
|
} else {
|
|
return goog.math.Long.fromBits(0, low << (numBits - 32));
|
|
}
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns this Long with bits shifted to the right by the given amount.
|
|
* @param {number} numBits The number of bits by which to shift.
|
|
* @return {!goog.math.Long} This shifted to the right by the given amount.
|
|
*/
|
|
goog.math.Long.prototype.shiftRight = function(numBits) {
|
|
numBits &= 63;
|
|
if (numBits == 0) {
|
|
return this;
|
|
} else {
|
|
var high = this.high_;
|
|
if (numBits < 32) {
|
|
var low = this.low_;
|
|
return goog.math.Long.fromBits(
|
|
(low >>> numBits) | (high << (32 - numBits)),
|
|
high >> numBits);
|
|
} else {
|
|
return goog.math.Long.fromBits(
|
|
high >> (numBits - 32),
|
|
high >= 0 ? 0 : -1);
|
|
}
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns this Long with bits shifted to the right by the given amount, with
|
|
* the new top bits matching the current sign bit.
|
|
* @param {number} numBits The number of bits by which to shift.
|
|
* @return {!goog.math.Long} This shifted to the right by the given amount, with
|
|
* zeros placed into the new leading bits.
|
|
*/
|
|
goog.math.Long.prototype.shiftRightUnsigned = function(numBits) {
|
|
numBits &= 63;
|
|
if (numBits == 0) {
|
|
return this;
|
|
} else {
|
|
var high = this.high_;
|
|
if (numBits < 32) {
|
|
var low = this.low_;
|
|
return goog.math.Long.fromBits(
|
|
(low >>> numBits) | (high << (32 - numBits)),
|
|
high >>> numBits);
|
|
} else if (numBits == 32) {
|
|
return goog.math.Long.fromBits(high, 0);
|
|
} else {
|
|
return goog.math.Long.fromBits(high >>> (numBits - 32), 0);
|
|
}
|
|
}
|
|
};
|
|
|
|
//======= begin jsbn =======
|
|
|
|
var navigator = { appName: 'Modern Browser' }; // polyfill a little
|
|
|
|
// Copyright (c) 2005 Tom Wu
|
|
// All Rights Reserved.
|
|
// http://www-cs-students.stanford.edu/~tjw/jsbn/
|
|
|
|
/*
|
|
* Copyright (c) 2003-2005 Tom Wu
|
|
* All Rights Reserved.
|
|
*
|
|
* 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" AND WITHOUT WARRANTY OF ANY KIND,
|
|
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
|
|
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
|
|
* THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
|
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*
|
|
* In addition, the following condition applies:
|
|
*
|
|
* All redistributions must retain an intact copy of this copyright notice
|
|
* and disclaimer.
|
|
*/
|
|
|
|
// Basic JavaScript BN library - subset useful for RSA encryption.
|
|
|
|
// Bits per digit
|
|
var dbits;
|
|
|
|
// JavaScript engine analysis
|
|
var canary = 0xdeadbeefcafe;
|
|
var j_lm = ((canary&0xffffff)==0xefcafe);
|
|
|
|
// (public) Constructor
|
|
function BigInteger(a,b,c) {
|
|
if(a != null)
|
|
if("number" == typeof a) this.fromNumber(a,b,c);
|
|
else if(b == null && "string" != typeof a) this.fromString(a,256);
|
|
else this.fromString(a,b);
|
|
}
|
|
|
|
// return new, unset BigInteger
|
|
function nbi() { return new BigInteger(null); }
|
|
|
|
// am: Compute w_j += (x*this_i), propagate carries,
|
|
// c is initial carry, returns final carry.
|
|
// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
|
|
// We need to select the fastest one that works in this environment.
|
|
|
|
// am1: use a single mult and divide to get the high bits,
|
|
// max digit bits should be 26 because
|
|
// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
|
|
function am1(i,x,w,j,c,n) {
|
|
while(--n >= 0) {
|
|
var v = x*this[i++]+w[j]+c;
|
|
c = Math.floor(v/0x4000000);
|
|
w[j++] = v&0x3ffffff;
|
|
}
|
|
return c;
|
|
}
|
|
// am2 avoids a big mult-and-extract completely.
|
|
// Max digit bits should be <= 30 because we do bitwise ops
|
|
// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
|
|
function am2(i,x,w,j,c,n) {
|
|
var xl = x&0x7fff, xh = x>>15;
|
|
while(--n >= 0) {
|
|
var l = this[i]&0x7fff;
|
|
var h = this[i++]>>15;
|
|
var m = xh*l+h*xl;
|
|
l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);
|
|
c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
|
|
w[j++] = l&0x3fffffff;
|
|
}
|
|
return c;
|
|
}
|
|
// Alternately, set max digit bits to 28 since some
|
|
// browsers slow down when dealing with 32-bit numbers.
|
|
function am3(i,x,w,j,c,n) {
|
|
var xl = x&0x3fff, xh = x>>14;
|
|
while(--n >= 0) {
|
|
var l = this[i]&0x3fff;
|
|
var h = this[i++]>>14;
|
|
var m = xh*l+h*xl;
|
|
l = xl*l+((m&0x3fff)<<14)+w[j]+c;
|
|
c = (l>>28)+(m>>14)+xh*h;
|
|
w[j++] = l&0xfffffff;
|
|
}
|
|
return c;
|
|
}
|
|
if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
|
|
BigInteger.prototype.am = am2;
|
|
dbits = 30;
|
|
}
|
|
else if(j_lm && (navigator.appName != "Netscape")) {
|
|
BigInteger.prototype.am = am1;
|
|
dbits = 26;
|
|
}
|
|
else { // Mozilla/Netscape seems to prefer am3
|
|
BigInteger.prototype.am = am3;
|
|
dbits = 28;
|
|
}
|
|
|
|
BigInteger.prototype.DB = dbits;
|
|
BigInteger.prototype.DM = ((1<<dbits)-1);
|
|
BigInteger.prototype.DV = (1<<dbits);
|
|
|
|
var BI_FP = 52;
|
|
BigInteger.prototype.FV = Math.pow(2,BI_FP);
|
|
BigInteger.prototype.F1 = BI_FP-dbits;
|
|
BigInteger.prototype.F2 = 2*dbits-BI_FP;
|
|
|
|
// Digit conversions
|
|
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
var BI_RC = new Array();
|
|
var rr,vv;
|
|
rr = "0".charCodeAt(0);
|
|
for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
|
|
rr = "a".charCodeAt(0);
|
|
for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
|
|
rr = "A".charCodeAt(0);
|
|
for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
|
|
|
|
function int2char(n) { return BI_RM.charAt(n); }
|
|
function intAt(s,i) {
|
|
var c = BI_RC[s.charCodeAt(i)];
|
|
return (c==null)?-1:c;
|
|
}
|
|
|
|
// (protected) copy this to r
|
|
function bnpCopyTo(r) {
|
|
for(var i = this.t-1; i >= 0; --i) r[i] = this[i];
|
|
r.t = this.t;
|
|
r.s = this.s;
|
|
}
|
|
|
|
// (protected) set from integer value x, -DV <= x < DV
|
|
function bnpFromInt(x) {
|
|
this.t = 1;
|
|
this.s = (x<0)?-1:0;
|
|
if(x > 0) this[0] = x;
|
|
else if(x < -1) this[0] = x+DV;
|
|
else this.t = 0;
|
|
}
|
|
|
|
// return bigint initialized to value
|
|
function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
|
|
|
|
// (protected) set from string and radix
|
|
function bnpFromString(s,b) {
|
|
var k;
|
|
if(b == 16) k = 4;
|
|
else if(b == 8) k = 3;
|
|
else if(b == 256) k = 8; // byte array
|
|
else if(b == 2) k = 1;
|
|
else if(b == 32) k = 5;
|
|
else if(b == 4) k = 2;
|
|
else { this.fromRadix(s,b); return; }
|
|
this.t = 0;
|
|
this.s = 0;
|
|
var i = s.length, mi = false, sh = 0;
|
|
while(--i >= 0) {
|
|
var x = (k==8)?s[i]&0xff:intAt(s,i);
|
|
if(x < 0) {
|
|
if(s.charAt(i) == "-") mi = true;
|
|
continue;
|
|
}
|
|
mi = false;
|
|
if(sh == 0)
|
|
this[this.t++] = x;
|
|
else if(sh+k > this.DB) {
|
|
this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<<sh;
|
|
this[this.t++] = (x>>(this.DB-sh));
|
|
}
|
|
else
|
|
this[this.t-1] |= x<<sh;
|
|
sh += k;
|
|
if(sh >= this.DB) sh -= this.DB;
|
|
}
|
|
if(k == 8 && (s[0]&0x80) != 0) {
|
|
this.s = -1;
|
|
if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<<sh;
|
|
}
|
|
this.clamp();
|
|
if(mi) BigInteger.ZERO.subTo(this,this);
|
|
}
|
|
|
|
// (protected) clamp off excess high words
|
|
function bnpClamp() {
|
|
var c = this.s&this.DM;
|
|
while(this.t > 0 && this[this.t-1] == c) --this.t;
|
|
}
|
|
|
|
// (public) return string representation in given radix
|
|
function bnToString(b) {
|
|
if(this.s < 0) return "-"+this.negate().toString(b);
|
|
var k;
|
|
if(b == 16) k = 4;
|
|
else if(b == 8) k = 3;
|
|
else if(b == 2) k = 1;
|
|
else if(b == 32) k = 5;
|
|
else if(b == 4) k = 2;
|
|
else return this.toRadix(b);
|
|
var km = (1<<k)-1, d, m = false, r = "", i = this.t;
|
|
var p = this.DB-(i*this.DB)%k;
|
|
if(i-- > 0) {
|
|
if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }
|
|
while(i >= 0) {
|
|
if(p < k) {
|
|
d = (this[i]&((1<<p)-1))<<(k-p);
|
|
d |= this[--i]>>(p+=this.DB-k);
|
|
}
|
|
else {
|
|
d = (this[i]>>(p-=k))&km;
|
|
if(p <= 0) { p += this.DB; --i; }
|
|
}
|
|
if(d > 0) m = true;
|
|
if(m) r += int2char(d);
|
|
}
|
|
}
|
|
return m?r:"0";
|
|
}
|
|
|
|
// (public) -this
|
|
function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
|
|
|
|
// (public) |this|
|
|
function bnAbs() { return (this.s<0)?this.negate():this; }
|
|
|
|
// (public) return + if this > a, - if this < a, 0 if equal
|
|
function bnCompareTo(a) {
|
|
var r = this.s-a.s;
|
|
if(r != 0) return r;
|
|
var i = this.t;
|
|
r = i-a.t;
|
|
if(r != 0) return (this.s<0)?-r:r;
|
|
while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
|
|
return 0;
|
|
}
|
|
|
|
// returns bit length of the integer x
|
|
function nbits(x) {
|
|
var r = 1, t;
|
|
if((t=x>>>16) != 0) { x = t; r += 16; }
|
|
if((t=x>>8) != 0) { x = t; r += 8; }
|
|
if((t=x>>4) != 0) { x = t; r += 4; }
|
|
if((t=x>>2) != 0) { x = t; r += 2; }
|
|
if((t=x>>1) != 0) { x = t; r += 1; }
|
|
return r;
|
|
}
|
|
|
|
// (public) return the number of bits in "this"
|
|
function bnBitLength() {
|
|
if(this.t <= 0) return 0;
|
|
return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
|
|
}
|
|
|
|
// (protected) r = this << n*DB
|
|
function bnpDLShiftTo(n,r) {
|
|
var i;
|
|
for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
|
|
for(i = n-1; i >= 0; --i) r[i] = 0;
|
|
r.t = this.t+n;
|
|
r.s = this.s;
|
|
}
|
|
|
|
// (protected) r = this >> n*DB
|
|
function bnpDRShiftTo(n,r) {
|
|
for(var i = n; i < this.t; ++i) r[i-n] = this[i];
|
|
r.t = Math.max(this.t-n,0);
|
|
r.s = this.s;
|
|
}
|
|
|
|
// (protected) r = this << n
|
|
function bnpLShiftTo(n,r) {
|
|
var bs = n%this.DB;
|
|
var cbs = this.DB-bs;
|
|
var bm = (1<<cbs)-1;
|
|
var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;
|
|
for(i = this.t-1; i >= 0; --i) {
|
|
r[i+ds+1] = (this[i]>>cbs)|c;
|
|
c = (this[i]&bm)<<bs;
|
|
}
|
|
for(i = ds-1; i >= 0; --i) r[i] = 0;
|
|
r[ds] = c;
|
|
r.t = this.t+ds+1;
|
|
r.s = this.s;
|
|
r.clamp();
|
|
}
|
|
|
|
// (protected) r = this >> n
|
|
function bnpRShiftTo(n,r) {
|
|
r.s = this.s;
|
|
var ds = Math.floor(n/this.DB);
|
|
if(ds >= this.t) { r.t = 0; return; }
|
|
var bs = n%this.DB;
|
|
var cbs = this.DB-bs;
|
|
var bm = (1<<bs)-1;
|
|
r[0] = this[ds]>>bs;
|
|
for(var i = ds+1; i < this.t; ++i) {
|
|
r[i-ds-1] |= (this[i]&bm)<<cbs;
|
|
r[i-ds] = this[i]>>bs;
|
|
}
|
|
if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;
|
|
r.t = this.t-ds;
|
|
r.clamp();
|
|
}
|
|
|
|
// (protected) r = this - a
|
|
function bnpSubTo(a,r) {
|
|
var i = 0, c = 0, m = Math.min(a.t,this.t);
|
|
while(i < m) {
|
|
c += this[i]-a[i];
|
|
r[i++] = c&this.DM;
|
|
c >>= this.DB;
|
|
}
|
|
if(a.t < this.t) {
|
|
c -= a.s;
|
|
while(i < this.t) {
|
|
c += this[i];
|
|
r[i++] = c&this.DM;
|
|
c >>= this.DB;
|
|
}
|
|
c += this.s;
|
|
}
|
|
else {
|
|
c += this.s;
|
|
while(i < a.t) {
|
|
c -= a[i];
|
|
r[i++] = c&this.DM;
|
|
c >>= this.DB;
|
|
}
|
|
c -= a.s;
|
|
}
|
|
r.s = (c<0)?-1:0;
|
|
if(c < -1) r[i++] = this.DV+c;
|
|
else if(c > 0) r[i++] = c;
|
|
r.t = i;
|
|
r.clamp();
|
|
}
|
|
|
|
// (protected) r = this * a, r != this,a (HAC 14.12)
|
|
// "this" should be the larger one if appropriate.
|
|
function bnpMultiplyTo(a,r) {
|
|
var x = this.abs(), y = a.abs();
|
|
var i = x.t;
|
|
r.t = i+y.t;
|
|
while(--i >= 0) r[i] = 0;
|
|
for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
|
|
r.s = 0;
|
|
r.clamp();
|
|
if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
|
|
}
|
|
|
|
// (protected) r = this^2, r != this (HAC 14.16)
|
|
function bnpSquareTo(r) {
|
|
var x = this.abs();
|
|
var i = r.t = 2*x.t;
|
|
while(--i >= 0) r[i] = 0;
|
|
for(i = 0; i < x.t-1; ++i) {
|
|
var c = x.am(i,x[i],r,2*i,0,1);
|
|
if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
|
|
r[i+x.t] -= x.DV;
|
|
r[i+x.t+1] = 1;
|
|
}
|
|
}
|
|
if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);
|
|
r.s = 0;
|
|
r.clamp();
|
|
}
|
|
|
|
// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
|
|
// r != q, this != m. q or r may be null.
|
|
function bnpDivRemTo(m,q,r) {
|
|
var pm = m.abs();
|
|
if(pm.t <= 0) return;
|
|
var pt = this.abs();
|
|
if(pt.t < pm.t) {
|
|
if(q != null) q.fromInt(0);
|
|
if(r != null) this.copyTo(r);
|
|
return;
|
|
}
|
|
if(r == null) r = nbi();
|
|
var y = nbi(), ts = this.s, ms = m.s;
|
|
var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus
|
|
if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
|
|
else { pm.copyTo(y); pt.copyTo(r); }
|
|
var ys = y.t;
|
|
var y0 = y[ys-1];
|
|
if(y0 == 0) return;
|
|
var yt = y0*(1<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);
|
|
var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;
|
|
var i = r.t, j = i-ys, t = (q==null)?nbi():q;
|
|
y.dlShiftTo(j,t);
|
|
if(r.compareTo(t) >= 0) {
|
|
r[r.t++] = 1;
|
|
r.subTo(t,r);
|
|
}
|
|
BigInteger.ONE.dlShiftTo(ys,t);
|
|
t.subTo(y,y); // "negative" y so we can replace sub with am later
|
|
while(y.t < ys) y[y.t++] = 0;
|
|
while(--j >= 0) {
|
|
// Estimate quotient digit
|
|
var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);
|
|
if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
|
|
y.dlShiftTo(j,t);
|
|
r.subTo(t,r);
|
|
while(r[i] < --qd) r.subTo(t,r);
|
|
}
|
|
}
|
|
if(q != null) {
|
|
r.drShiftTo(ys,q);
|
|
if(ts != ms) BigInteger.ZERO.subTo(q,q);
|
|
}
|
|
r.t = ys;
|
|
r.clamp();
|
|
if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
|
|
if(ts < 0) BigInteger.ZERO.subTo(r,r);
|
|
}
|
|
|
|
// (public) this mod a
|
|
function bnMod(a) {
|
|
var r = nbi();
|
|
this.abs().divRemTo(a,null,r);
|
|
if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
|
|
return r;
|
|
}
|
|
|
|
// Modular reduction using "classic" algorithm
|
|
function Classic(m) { this.m = m; }
|
|
function cConvert(x) {
|
|
if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
|
|
else return x;
|
|
}
|
|
function cRevert(x) { return x; }
|
|
function cReduce(x) { x.divRemTo(this.m,null,x); }
|
|
function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
|
|
function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
|
|
|
|
Classic.prototype.convert = cConvert;
|
|
Classic.prototype.revert = cRevert;
|
|
Classic.prototype.reduce = cReduce;
|
|
Classic.prototype.mulTo = cMulTo;
|
|
Classic.prototype.sqrTo = cSqrTo;
|
|
|
|
// (protected) return "-1/this % 2^DB"; useful for Mont. reduction
|
|
// justification:
|
|
// xy == 1 (mod m)
|
|
// xy = 1+km
|
|
// xy(2-xy) = (1+km)(1-km)
|
|
// x[y(2-xy)] = 1-k^2m^2
|
|
// x[y(2-xy)] == 1 (mod m^2)
|
|
// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
|
|
// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
|
|
// JS multiply "overflows" differently from C/C++, so care is needed here.
|
|
function bnpInvDigit() {
|
|
if(this.t < 1) return 0;
|
|
var x = this[0];
|
|
if((x&1) == 0) return 0;
|
|
var y = x&3; // y == 1/x mod 2^2
|
|
y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
|
|
y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
|
|
y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
|
|
// last step - calculate inverse mod DV directly;
|
|
// assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
|
|
y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits
|
|
// we really want the negative inverse, and -DV < y < DV
|
|
return (y>0)?this.DV-y:-y;
|
|
}
|
|
|
|
// Montgomery reduction
|
|
function Montgomery(m) {
|
|
this.m = m;
|
|
this.mp = m.invDigit();
|
|
this.mpl = this.mp&0x7fff;
|
|
this.mph = this.mp>>15;
|
|
this.um = (1<<(m.DB-15))-1;
|
|
this.mt2 = 2*m.t;
|
|
}
|
|
|
|
// xR mod m
|
|
function montConvert(x) {
|
|
var r = nbi();
|
|
x.abs().dlShiftTo(this.m.t,r);
|
|
r.divRemTo(this.m,null,r);
|
|
if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
|
|
return r;
|
|
}
|
|
|
|
// x/R mod m
|
|
function montRevert(x) {
|
|
var r = nbi();
|
|
x.copyTo(r);
|
|
this.reduce(r);
|
|
return r;
|
|
}
|
|
|
|
// x = x/R mod m (HAC 14.32)
|
|
function montReduce(x) {
|
|
while(x.t <= this.mt2) // pad x so am has enough room later
|
|
x[x.t++] = 0;
|
|
for(var i = 0; i < this.m.t; ++i) {
|
|
// faster way of calculating u0 = x[i]*mp mod DV
|
|
var j = x[i]&0x7fff;
|
|
var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;
|
|
// use am to combine the multiply-shift-add into one call
|
|
j = i+this.m.t;
|
|
x[j] += this.m.am(0,u0,x,i,0,this.m.t);
|
|
// propagate carry
|
|
while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }
|
|
}
|
|
x.clamp();
|
|
x.drShiftTo(this.m.t,x);
|
|
if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
|
|
}
|
|
|
|
// r = "x^2/R mod m"; x != r
|
|
function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
|
|
|
|
// r = "xy/R mod m"; x,y != r
|
|
function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
|
|
|
|
Montgomery.prototype.convert = montConvert;
|
|
Montgomery.prototype.revert = montRevert;
|
|
Montgomery.prototype.reduce = montReduce;
|
|
Montgomery.prototype.mulTo = montMulTo;
|
|
Montgomery.prototype.sqrTo = montSqrTo;
|
|
|
|
// (protected) true iff this is even
|
|
function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
|
|
|
|
// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
|
|
function bnpExp(e,z) {
|
|
if(e > 0xffffffff || e < 1) return BigInteger.ONE;
|
|
var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
|
|
g.copyTo(r);
|
|
while(--i >= 0) {
|
|
z.sqrTo(r,r2);
|
|
if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
|
|
else { var t = r; r = r2; r2 = t; }
|
|
}
|
|
return z.revert(r);
|
|
}
|
|
|
|
// (public) this^e % m, 0 <= e < 2^32
|
|
function bnModPowInt(e,m) {
|
|
var z;
|
|
if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
|
|
return this.exp(e,z);
|
|
}
|
|
|
|
// protected
|
|
BigInteger.prototype.copyTo = bnpCopyTo;
|
|
BigInteger.prototype.fromInt = bnpFromInt;
|
|
BigInteger.prototype.fromString = bnpFromString;
|
|
BigInteger.prototype.clamp = bnpClamp;
|
|
BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
|
|
BigInteger.prototype.drShiftTo = bnpDRShiftTo;
|
|
BigInteger.prototype.lShiftTo = bnpLShiftTo;
|
|
BigInteger.prototype.rShiftTo = bnpRShiftTo;
|
|
BigInteger.prototype.subTo = bnpSubTo;
|
|
BigInteger.prototype.multiplyTo = bnpMultiplyTo;
|
|
BigInteger.prototype.squareTo = bnpSquareTo;
|
|
BigInteger.prototype.divRemTo = bnpDivRemTo;
|
|
BigInteger.prototype.invDigit = bnpInvDigit;
|
|
BigInteger.prototype.isEven = bnpIsEven;
|
|
BigInteger.prototype.exp = bnpExp;
|
|
|
|
// public
|
|
BigInteger.prototype.toString = bnToString;
|
|
BigInteger.prototype.negate = bnNegate;
|
|
BigInteger.prototype.abs = bnAbs;
|
|
BigInteger.prototype.compareTo = bnCompareTo;
|
|
BigInteger.prototype.bitLength = bnBitLength;
|
|
BigInteger.prototype.mod = bnMod;
|
|
BigInteger.prototype.modPowInt = bnModPowInt;
|
|
|
|
// "constants"
|
|
BigInteger.ZERO = nbv(0);
|
|
BigInteger.ONE = nbv(1);
|
|
|
|
// jsbn2 stuff
|
|
|
|
// (protected) convert from radix string
|
|
function bnpFromRadix(s,b) {
|
|
this.fromInt(0);
|
|
if(b == null) b = 10;
|
|
var cs = this.chunkSize(b);
|
|
var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
|
|
for(var i = 0; i < s.length; ++i) {
|
|
var x = intAt(s,i);
|
|
if(x < 0) {
|
|
if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
|
|
continue;
|
|
}
|
|
w = b*w+x;
|
|
if(++j >= cs) {
|
|
this.dMultiply(d);
|
|
this.dAddOffset(w,0);
|
|
j = 0;
|
|
w = 0;
|
|
}
|
|
}
|
|
if(j > 0) {
|
|
this.dMultiply(Math.pow(b,j));
|
|
this.dAddOffset(w,0);
|
|
}
|
|
if(mi) BigInteger.ZERO.subTo(this,this);
|
|
}
|
|
|
|
// (protected) return x s.t. r^x < DV
|
|
function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }
|
|
|
|
// (public) 0 if this == 0, 1 if this > 0
|
|
function bnSigNum() {
|
|
if(this.s < 0) return -1;
|
|
else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
|
|
else return 1;
|
|
}
|
|
|
|
// (protected) this *= n, this >= 0, 1 < n < DV
|
|
function bnpDMultiply(n) {
|
|
this[this.t] = this.am(0,n-1,this,0,0,this.t);
|
|
++this.t;
|
|
this.clamp();
|
|
}
|
|
|
|
// (protected) this += n << w words, this >= 0
|
|
function bnpDAddOffset(n,w) {
|
|
if(n == 0) return;
|
|
while(this.t <= w) this[this.t++] = 0;
|
|
this[w] += n;
|
|
while(this[w] >= this.DV) {
|
|
this[w] -= this.DV;
|
|
if(++w >= this.t) this[this.t++] = 0;
|
|
++this[w];
|
|
}
|
|
}
|
|
|
|
// (protected) convert to radix string
|
|
function bnpToRadix(b) {
|
|
if(b == null) b = 10;
|
|
if(this.signum() == 0 || b < 2 || b > 36) return "0";
|
|
var cs = this.chunkSize(b);
|
|
var a = Math.pow(b,cs);
|
|
var d = nbv(a), y = nbi(), z = nbi(), r = "";
|
|
this.divRemTo(d,y,z);
|
|
while(y.signum() > 0) {
|
|
r = (a+z.intValue()).toString(b).substr(1) + r;
|
|
y.divRemTo(d,y,z);
|
|
}
|
|
return z.intValue().toString(b) + r;
|
|
}
|
|
|
|
// (public) return value as integer
|
|
function bnIntValue() {
|
|
if(this.s < 0) {
|
|
if(this.t == 1) return this[0]-this.DV;
|
|
else if(this.t == 0) return -1;
|
|
}
|
|
else if(this.t == 1) return this[0];
|
|
else if(this.t == 0) return 0;
|
|
// assumes 16 < DB < 32
|
|
return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0];
|
|
}
|
|
|
|
// (protected) r = this + a
|
|
function bnpAddTo(a,r) {
|
|
var i = 0, c = 0, m = Math.min(a.t,this.t);
|
|
while(i < m) {
|
|
c += this[i]+a[i];
|
|
r[i++] = c&this.DM;
|
|
c >>= this.DB;
|
|
}
|
|
if(a.t < this.t) {
|
|
c += a.s;
|
|
while(i < this.t) {
|
|
c += this[i];
|
|
r[i++] = c&this.DM;
|
|
c >>= this.DB;
|
|
}
|
|
c += this.s;
|
|
}
|
|
else {
|
|
c += this.s;
|
|
while(i < a.t) {
|
|
c += a[i];
|
|
r[i++] = c&this.DM;
|
|
c >>= this.DB;
|
|
}
|
|
c += a.s;
|
|
}
|
|
r.s = (c<0)?-1:0;
|
|
if(c > 0) r[i++] = c;
|
|
else if(c < -1) r[i++] = this.DV+c;
|
|
r.t = i;
|
|
r.clamp();
|
|
}
|
|
|
|
BigInteger.prototype.fromRadix = bnpFromRadix;
|
|
BigInteger.prototype.chunkSize = bnpChunkSize;
|
|
BigInteger.prototype.signum = bnSigNum;
|
|
BigInteger.prototype.dMultiply = bnpDMultiply;
|
|
BigInteger.prototype.dAddOffset = bnpDAddOffset;
|
|
BigInteger.prototype.toRadix = bnpToRadix;
|
|
BigInteger.prototype.intValue = bnIntValue;
|
|
BigInteger.prototype.addTo = bnpAddTo;
|
|
|
|
//======= end jsbn =======
|
|
|
|
// Emscripten wrapper
|
|
var Wrapper = {
|
|
abs: function(l, h) {
|
|
var x = new goog.math.Long(l, h);
|
|
var ret;
|
|
if (x.isNegative()) {
|
|
ret = x.negate();
|
|
} else {
|
|
ret = x;
|
|
}
|
|
HEAP32[tempDoublePtr>>2] = ret.low_;
|
|
HEAP32[tempDoublePtr+4>>2] = ret.high_;
|
|
},
|
|
ensureTemps: function() {
|
|
if (Wrapper.ensuredTemps) return;
|
|
Wrapper.ensuredTemps = true;
|
|
Wrapper.two32 = new BigInteger();
|
|
Wrapper.two32.fromString('4294967296', 10);
|
|
Wrapper.two64 = new BigInteger();
|
|
Wrapper.two64.fromString('18446744073709551616', 10);
|
|
Wrapper.temp1 = new BigInteger();
|
|
Wrapper.temp2 = new BigInteger();
|
|
},
|
|
lh2bignum: function(l, h) {
|
|
var a = new BigInteger();
|
|
a.fromString(h.toString(), 10);
|
|
var b = new BigInteger();
|
|
a.multiplyTo(Wrapper.two32, b);
|
|
var c = new BigInteger();
|
|
c.fromString(l.toString(), 10);
|
|
var d = new BigInteger();
|
|
c.addTo(b, d);
|
|
return d;
|
|
},
|
|
stringify: function(l, h, unsigned) {
|
|
var ret = new goog.math.Long(l, h).toString();
|
|
if (unsigned && ret[0] == '-') {
|
|
// unsign slowly using jsbn bignums
|
|
Wrapper.ensureTemps();
|
|
var bignum = new BigInteger();
|
|
bignum.fromString(ret, 10);
|
|
ret = new BigInteger();
|
|
Wrapper.two64.addTo(bignum, ret);
|
|
ret = ret.toString(10);
|
|
}
|
|
return ret;
|
|
},
|
|
fromString: function(str, base, min, max, unsigned) {
|
|
Wrapper.ensureTemps();
|
|
var bignum = new BigInteger();
|
|
bignum.fromString(str, base);
|
|
var bigmin = new BigInteger();
|
|
bigmin.fromString(min, 10);
|
|
var bigmax = new BigInteger();
|
|
bigmax.fromString(max, 10);
|
|
if (unsigned && bignum.compareTo(BigInteger.ZERO) < 0) {
|
|
var temp = new BigInteger();
|
|
bignum.addTo(Wrapper.two64, temp);
|
|
bignum = temp;
|
|
}
|
|
var error = false;
|
|
if (bignum.compareTo(bigmin) < 0) {
|
|
bignum = bigmin;
|
|
error = true;
|
|
} else if (bignum.compareTo(bigmax) > 0) {
|
|
bignum = bigmax;
|
|
error = true;
|
|
}
|
|
var ret = goog.math.Long.fromString(bignum.toString()); // min-max checks should have clamped this to a range goog.math.Long can handle well
|
|
HEAP32[tempDoublePtr>>2] = ret.low_;
|
|
HEAP32[tempDoublePtr+4>>2] = ret.high_;
|
|
if (error) throw 'range error';
|
|
}
|
|
};
|
|
return Wrapper;
|
|
})();
|
|
|
|
//======= end closure i64 code =======
|
|
|
|
|
|
|
|
// === Auto-generated postamble setup entry stuff ===
|
|
|
|
if (memoryInitializer) {
|
|
if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) {
|
|
var data = Module['readBinary'](memoryInitializer);
|
|
HEAPU8.set(data, STATIC_BASE);
|
|
} else {
|
|
addRunDependency('memory initializer');
|
|
Browser.asyncLoad(memoryInitializer, function(data) {
|
|
HEAPU8.set(data, STATIC_BASE);
|
|
removeRunDependency('memory initializer');
|
|
}, function(data) {
|
|
throw 'could not load memory initializer ' + memoryInitializer;
|
|
});
|
|
}
|
|
}
|
|
|
|
function ExitStatus(status) {
|
|
this.name = "ExitStatus";
|
|
this.message = "Program terminated with exit(" + status + ")";
|
|
this.status = status;
|
|
};
|
|
ExitStatus.prototype = new Error();
|
|
ExitStatus.prototype.constructor = ExitStatus;
|
|
|
|
var initialStackTop;
|
|
var preloadStartTime = null;
|
|
var calledMain = false;
|
|
|
|
dependenciesFulfilled = function runCaller() {
|
|
// If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
|
|
if (!Module['calledRun'] && shouldRunNow) run();
|
|
if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled
|
|
}
|
|
|
|
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 || [];
|
|
|
|
if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {
|
|
Module.printErr('preload time: ' + (Date.now() - preloadStartTime) + ' ms');
|
|
}
|
|
|
|
ensureInitRuntime();
|
|
|
|
var argc = args.length+1;
|
|
function pad() {
|
|
for (var i = 0; i < 4-1; i++) {
|
|
argv.push(0);
|
|
}
|
|
}
|
|
var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_NORMAL) ];
|
|
pad();
|
|
for (var i = 0; i < argc-1; i = i + 1) {
|
|
argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL));
|
|
pad();
|
|
}
|
|
argv.push(0);
|
|
argv = allocate(argv, 'i32', ALLOC_NORMAL);
|
|
|
|
initialStackTop = STACKTOP;
|
|
|
|
try {
|
|
|
|
var ret = Module['_main'](argc, argv, 0);
|
|
|
|
|
|
// if we're not running an evented main loop, it's time to exit
|
|
if (!Module['noExitRuntime']) {
|
|
exit(ret);
|
|
}
|
|
}
|
|
catch(e) {
|
|
if (e instanceof ExitStatus) {
|
|
// exit() throws this once it's done to make sure execution
|
|
// has been stopped completely
|
|
return;
|
|
} else if (e == 'SimulateInfiniteLoop') {
|
|
// running an evented main loop, don't immediately exit
|
|
Module['noExitRuntime'] = true;
|
|
return;
|
|
} else {
|
|
if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
|
|
throw e;
|
|
}
|
|
} finally {
|
|
calledMain = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
function run(args) {
|
|
args = args || Module['arguments'];
|
|
|
|
if (preloadStartTime === null) preloadStartTime = Date.now();
|
|
|
|
if (runDependencies > 0) {
|
|
Module.printErr('run() called, but dependencies remain, so not running');
|
|
return;
|
|
}
|
|
|
|
preRun();
|
|
|
|
if (runDependencies > 0) return; // a preRun added a dependency, run will be called later
|
|
if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame
|
|
|
|
function doRun() {
|
|
if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening
|
|
Module['calledRun'] = true;
|
|
|
|
ensureInitRuntime();
|
|
|
|
preMain();
|
|
|
|
if (Module['_main'] && shouldRunNow) {
|
|
Module['callMain'](args);
|
|
}
|
|
|
|
postRun();
|
|
}
|
|
|
|
if (Module['setStatus']) {
|
|
Module['setStatus']('Running...');
|
|
setTimeout(function() {
|
|
setTimeout(function() {
|
|
Module['setStatus']('');
|
|
}, 1);
|
|
if (!ABORT) doRun();
|
|
}, 1);
|
|
} else {
|
|
doRun();
|
|
}
|
|
}
|
|
Module['run'] = Module.run = run;
|
|
|
|
function exit(status) {
|
|
ABORT = true;
|
|
EXITSTATUS = status;
|
|
STACKTOP = initialStackTop;
|
|
|
|
// exit the runtime
|
|
exitRuntime();
|
|
|
|
// TODO We should handle this differently based on environment.
|
|
// In the browser, the best we can do is throw an exception
|
|
// to halt execution, but in node we could process.exit and
|
|
// I'd imagine SM shell would have something equivalent.
|
|
// This would let us set a proper exit status (which
|
|
// would be great for checking test exit statuses).
|
|
// https://github.com/kripken/emscripten/issues/1371
|
|
|
|
// throw an exception to halt the current execution
|
|
throw new ExitStatus(status);
|
|
}
|
|
Module['exit'] = Module.exit = exit;
|
|
|
|
function abort(text) {
|
|
if (text) {
|
|
Module.print(text);
|
|
Module.printErr(text);
|
|
}
|
|
|
|
ABORT = true;
|
|
EXITSTATUS = 1;
|
|
|
|
throw 'abort() at ' + stackTrace();
|
|
}
|
|
Module['abort'] = Module.abort = abort;
|
|
|
|
// {{PRE_RUN_ADDITIONS}}
|
|
|
|
if (Module['preInit']) {
|
|
if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
|
|
while (Module['preInit'].length > 0) {
|
|
Module['preInit'].pop()();
|
|
}
|
|
}
|
|
|
|
// shouldRunNow refers to calling main(), not run().
|
|
var shouldRunNow = false;
|
|
if (Module['noInitialRun']) {
|
|
shouldRunNow = false;
|
|
}
|
|
|
|
Module["noExitRuntime"] = true;
|
|
|
|
run();
|
|
|
|
// {{POST_RUN_ADDITIONS}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// {{MODULE_ADDITIONS}}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* libde265.js HEVC/H.265 decoder
|
|
* (c)2014 struktur AG, http://www.struktur.de, opensource@struktur.de
|
|
*
|
|
* This file is part of libde265.js
|
|
* https://github.com/strukturag/libde265.js
|
|
*
|
|
* libde265.js is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as
|
|
* published by the Free Software Foundation, either version 3 of
|
|
* the License, or (at your option) any later version.
|
|
*
|
|
* libde265.js is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with libde265.js. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
// don't pollute the global namespace
|
|
delete this['Module'];
|
|
|
|
/**
|
|
* Public API.
|
|
*/
|
|
var libde265 = {
|
|
/** @expose */
|
|
DE265_OK: 0,
|
|
/** @expose */
|
|
DE265_ERROR_NO_SUCH_FILE: 1,
|
|
//DE265_ERROR_NO_STARTCODE: 2, obsolete
|
|
/** @expose */
|
|
DE265_ERROR_EOF: 3,
|
|
/** @expose */
|
|
DE265_ERROR_COEFFICIENT_OUT_OF_IMAGE_BOUNDS: 4,
|
|
/** @expose */
|
|
DE265_ERROR_CHECKSUM_MISMATCH: 5,
|
|
/** @expose */
|
|
DE265_ERROR_CTB_OUTSIDE_IMAGE_AREA: 6,
|
|
/** @expose */
|
|
DE265_ERROR_OUT_OF_MEMORY: 7,
|
|
/** @expose */
|
|
DE265_ERROR_CODED_PARAMETER_OUT_OF_RANGE: 8,
|
|
/** @expose */
|
|
DE265_ERROR_IMAGE_BUFFER_FULL: 9,
|
|
/** @expose */
|
|
DE265_ERROR_CANNOT_START_THREADPOOL: 10,
|
|
/** @expose */
|
|
DE265_ERROR_LIBRARY_INITIALIZATION_FAILED: 11,
|
|
/** @expose */
|
|
DE265_ERROR_LIBRARY_NOT_INITIALIZED: 12,
|
|
/** @expose */
|
|
DE265_ERROR_WAITING_FOR_INPUT_DATA: 13,
|
|
/** @expose */
|
|
DE265_ERROR_CANNOT_PROCESS_SEI: 14,
|
|
/** @expose */
|
|
DE265_ERROR_PARAMETER_PARSING: 15,
|
|
/** @expose */
|
|
DE265_ERROR_NO_INITIAL_SLICE_HEADER: 16,
|
|
/** @expose */
|
|
DE265_ERROR_PREMATURE_END_OF_SLICE: 17,
|
|
/** @expose */
|
|
DE265_ERROR_UNSPECIFIED_DECODING_ERROR: 18,
|
|
|
|
// --- errors that should become obsolete in later libde265 versions ---
|
|
|
|
/** @expose */
|
|
DE265_ERROR_MAX_THREAD_CONTEXTS_EXCEEDED: 500,
|
|
/** @expose */
|
|
DE265_ERROR_MAX_NUMBER_OF_SLICES_EXCEEDED: 501,
|
|
//DE265_ERROR_SCALING_LIST_NOT_IMPLEMENTED: 502, obsolete
|
|
/** @expose */
|
|
DE265_ERROR_NOT_IMPLEMENTED_YET: 502,
|
|
|
|
// --- warnings ---
|
|
|
|
/** @expose */
|
|
DE265_WARNING_NO_WPP_CANNOT_USE_MULTITHREADING: 1000,
|
|
/** @expose */
|
|
DE265_WARNING_WARNING_BUFFER_FULL: 1001,
|
|
/** @expose */
|
|
DE265_WARNING_PREMATURE_END_OF_SLICE_SEGMENT: 1002,
|
|
/** @expose */
|
|
DE265_WARNING_INCORRECT_ENTRY_POINT_OFFSET: 1003,
|
|
/** @expose */
|
|
DE265_WARNING_CTB_OUTSIDE_IMAGE_AREA: 1004,
|
|
/** @expose */
|
|
DE265_WARNING_SPS_HEADER_INVALID: 1005,
|
|
/** @expose */
|
|
DE265_WARNING_PPS_HEADER_INVALID: 1006,
|
|
/** @expose */
|
|
DE265_WARNING_SLICEHEADER_INVALID: 1007,
|
|
/** @expose */
|
|
DE265_WARNING_INCORRECT_MOTION_VECTOR_SCALING: 1008,
|
|
/** @expose */
|
|
DE265_WARNING_NONEXISTING_PPS_REFERENCED: 1009,
|
|
/** @expose */
|
|
DE265_WARNING_NONEXISTING_SPS_REFERENCED: 1010,
|
|
/** @expose */
|
|
DE265_WARNING_BOTH_PREDFLAGS_ZERO: 1011,
|
|
/** @expose */
|
|
DE265_WARNING_NONEXISTING_REFERENCE_PICTURE_ACCESSED: 1012,
|
|
/** @expose */
|
|
DE265_WARNING_NUMMVP_NOT_EQUAL_TO_NUMMVQ: 1013,
|
|
/** @expose */
|
|
DE265_WARNING_NUMBER_OF_SHORT_TERM_REF_PIC_SETS_OUT_OF_RANGE: 1014,
|
|
/** @expose */
|
|
DE265_WARNING_SHORT_TERM_REF_PIC_SET_OUT_OF_RANGE: 1015,
|
|
/** @expose */
|
|
DE265_WARNING_FAULTY_REFERENCE_PICTURE_LIST: 1016,
|
|
/** @expose */
|
|
DE265_WARNING_EOSS_BIT_NOT_SET: 1017,
|
|
/** @expose */
|
|
DE265_WARNING_MAX_NUM_REF_PICS_EXCEEDED: 1018,
|
|
/** @expose */
|
|
DE265_WARNING_INVALID_CHROMA_FORMAT: 1019,
|
|
/** @expose */
|
|
DE265_WARNING_SLICE_SEGMENT_ADDRESS_INVALID: 1020,
|
|
/** @expose */
|
|
DE265_WARNING_DEPENDENT_SLICE_WITH_ADDRESS_ZERO: 1021,
|
|
/** @expose */
|
|
DE265_WARNING_NUMBER_OF_THREADS_LIMITED_TO_MAXIMUM: 1022,
|
|
/** @expose */
|
|
DE265_NON_EXISTING_LT_REFERENCE_CANDIDATE_IN_SLICE_HEADER: 1023,
|
|
/** @expose */
|
|
DE265_WARNING_CANNOT_APPLY_SAO_OUT_OF_MEMORY: 1024,
|
|
/** @expose */
|
|
DE265_WARNING_SPS_MISSING_CANNOT_DECODE_SEI: 1025,
|
|
/** @expose */
|
|
DE265_WARNING_COLLOCATED_MOTION_VECTOR_OUTSIDE_IMAGE_AREA: 1026,
|
|
|
|
/** @expose */
|
|
de265_get_version: cwrap('de265_get_version', 'string'),
|
|
/** @expose */
|
|
de265_get_version_number: cwrap('de265_get_version_number', 'number'),
|
|
/** @expose */
|
|
de265_get_error_text: cwrap('de265_get_error_text', 'string', ['number']),
|
|
/** @expose */
|
|
de265_isOK: cwrap('de265_isOK', 'number', ['number']),
|
|
/** @expose */
|
|
de265_set_verbosity: cwrap('de265_set_verbosity', 'number', ['number']),
|
|
|
|
/** @expose */
|
|
de265_chroma_mono: 0,
|
|
/** @expose */
|
|
de265_chroma_420: 1,
|
|
/** @expose */
|
|
de265_chroma_422: 2,
|
|
/** @expose */
|
|
de265_chroma_444: 3,
|
|
|
|
/** @expose */
|
|
de265_get_image_width: cwrap('de265_get_image_width', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_get_image_height: cwrap('de265_get_image_height', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_get_chroma_format: cwrap('de265_get_chroma_format', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_bits_per_pixel: cwrap('de265_get_bits_per_pixel', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_get_image_plane: cwrap('de265_get_image_plane', 'number', ['number', 'number', 'number']),
|
|
/** @expose */
|
|
de265_get_image_plane_user_data: cwrap('de265_get_image_plane_user_data', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_get_image_PTS: cwrap('de265_get_image_PTS', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_image_user_data: cwrap('de265_get_image_user_data', 'number', ['number']),
|
|
/** @expose */
|
|
de265_set_image_user_data: cwrap('de265_set_image_user_data', 'number', ['number', 'number']),
|
|
// de265_get_image_NAL_header
|
|
|
|
/** @expose */
|
|
de265_new_decoder: cwrap('de265_new_decoder', 'number'),
|
|
// de265_start_worker_threads
|
|
/** @expose */
|
|
de265_free_decoder: cwrap('de265_free_decoder', 'number', ['number']),
|
|
/** @expose */
|
|
de265_push_data: cwrap('de265_push_data', 'number', ['number', 'array', 'number', 'number', 'number']),
|
|
/** @expose */
|
|
de265_push_end_of_NAL: cwrap('de265_push_end_of_NAL', 'number', ['number']),
|
|
/** @expose */
|
|
de265_push_end_of_frame: cwrap('de265_push_end_of_frame', 'number', ['number']),
|
|
/** @expose */
|
|
de265_push_NAL: cwrap('de265_push_NAL', 'number', ['number', 'array', 'number', 'number', 'number']),
|
|
/** @expose */
|
|
de265_flush_data: cwrap('de265_flush_data', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_number_of_input_bytes_pending: cwrap('de265_get_number_of_input_bytes_pending', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_number_of_NAL_units_pending: cwrap('de265_get_number_of_NAL_units_pending', 'number', ['number']),
|
|
/** @expose */
|
|
de265_decode: cwrap('de265_decode', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_reset: cwrap('de265_reset', 'number', ['number']),
|
|
/** @expose */
|
|
de265_peek_next_picture: cwrap('de265_peek_next_picture', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_next_picture: cwrap('de265_get_next_picture', 'number', ['number']),
|
|
/** @expose */
|
|
de265_release_next_picture: cwrap('de265_release_next_picture', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_warning: cwrap('de265_get_warning', 'number', ['number']),
|
|
|
|
// de265_set_image_allocation_functions
|
|
// de265_get_default_image_allocation_functions
|
|
// de265_set_image_plane
|
|
|
|
/** @expose */
|
|
de265_get_highest_TID: cwrap('de265_get_highest_TID', 'number', ['number']),
|
|
/** @expose */
|
|
de265_get_current_TID: cwrap('de265_get_current_TID', 'number', ['number']),
|
|
/** @expose */
|
|
de265_set_limit_TID: cwrap('de265_set_limit_TID', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_set_framerate_ratio: cwrap('de265_set_framerate_ratio', 'number', ['number', 'number']),
|
|
/** @expose */
|
|
de265_change_framerate: cwrap('de265_change_framerate', 'number', ['number', 'number']),
|
|
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_BOOL_SEI_CHECK_HASH: 0, // (bool) Perform SEI hash check on decoded pictures.
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_DUMP_SPS_HEADERS: 1, // (int) Dump headers to specified file-descriptor.
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_DUMP_VPS_HEADERS: 2,
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_DUMP_PPS_HEADERS: 3,
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_DUMP_SLICE_HEADERS: 4,
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_ACCELERATION_CODE: 5, // (int) enum de265_acceleration, default: AUTO
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_SUPPRESS_FAULTY_PICTURES: 6, // (bool) do not output frames with decoding errors, default: no (output all images)
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_DISABLE_DEBLOCKING: 7, // (bool) disable deblocking
|
|
/** @expose */
|
|
DE265_DECODER_PARAM_DISABLE_SAO: 8, // (bool) disable SAO filter
|
|
|
|
/** @expose */
|
|
de265_acceleration_SCALAR: 0, // only fallback implementation
|
|
/** @expose */
|
|
de265_acceleration_MMX : 10,
|
|
/** @expose */
|
|
de265_acceleration_SSE : 20,
|
|
/** @expose */
|
|
de265_acceleration_SSE2 : 30,
|
|
/** @expose */
|
|
de265_acceleration_SSE4 : 40,
|
|
/** @expose */
|
|
de265_acceleration_AVX : 50, // not implemented yet
|
|
/** @expose */
|
|
de265_acceleration_AVX2 : 60, // not implemented yet
|
|
/** @expose */
|
|
de265_acceleration_ARM : 70,
|
|
/** @expose */
|
|
de265_acceleration_NEON : 80,
|
|
/** @expose */
|
|
de265_acceleration_AUTO : 10000,
|
|
|
|
/** @expose */
|
|
de265_set_parameter_bool: cwrap('de265_set_parameter_bool', 'number', ['number', 'number', 'number']),
|
|
/** @expose */
|
|
de265_set_parameter_int: cwrap('de265_set_parameter_int', 'number', ['number', 'number', 'number']),
|
|
/** @expose */
|
|
de265_get_parameter_bool: cwrap('de265_get_parameter_bool', 'number', ['number', 'number'])
|
|
};
|
|
|
|
/**
|
|
* A decoded image
|
|
*
|
|
* @constructor
|
|
*/
|
|
var Image = function(decoder, img) {
|
|
this.decoder = decoder;
|
|
this.img = img;
|
|
this.width = null;
|
|
this.height = null;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Image.prototype.free = function() {
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Image.prototype.get_width = function() {
|
|
if (this.width === null) {
|
|
this.width = libde265.de265_get_image_width(this.img, 0);
|
|
}
|
|
return this.width;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Image.prototype.get_height = function() {
|
|
if (this.height === null) {
|
|
this.height = libde265.de265_get_image_height(this.img, 0);
|
|
}
|
|
return this.height;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Image.prototype.display = function(imageData, callback) {
|
|
var w = this.get_width();
|
|
var h = this.get_height();
|
|
var chroma = libde265.de265_get_chroma_format(this.img);
|
|
var stride = _malloc(4);
|
|
var y = libde265.de265_get_image_plane(this.img, 0, stride);
|
|
var stridey = getValue(stride, "i32");
|
|
var bppy = libde265.de265_get_bits_per_pixel(this.img, 0);
|
|
var u = libde265.de265_get_image_plane(this.img, 1, stride);
|
|
var strideu = getValue(stride, "i32");
|
|
var bppu = libde265.de265_get_bits_per_pixel(this.img, 1);
|
|
var v = libde265.de265_get_image_plane(this.img, 2, stride);
|
|
var stridev = getValue(stride, "i32");
|
|
var bppv = libde265.de265_get_bits_per_pixel(this.img, 2);
|
|
_free(stride);
|
|
|
|
this.decoder.convert_yuv2rgb(chroma, y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, imageData, callback);
|
|
};
|
|
|
|
function worker_func() {
|
|
self.addEventListener("message", function(e) {
|
|
var data = e.data;
|
|
switch (data["cmd"]) {
|
|
case "start":
|
|
break;
|
|
|
|
case "stop":
|
|
this.postMessage({"cmd": "stopped"});
|
|
self.close();
|
|
break;
|
|
|
|
case "convert":
|
|
var img = _do_convert_yuv2rgb(data["data"]["chroma"], data["data"]["y"], data["data"]["u"], data["data"]["v"], data["data"]["w"], data["data"]["h"], data["data"]["stridey"], data["data"]["strideu"], data["data"]["stridev"], data["data"]["bppy"], data["data"]["bppu"], data["data"]["bppv"]);
|
|
this.postMessage({"cmd": "converted", "data": {"image": img}});
|
|
break;
|
|
|
|
default:
|
|
// ignore unknown commands
|
|
break;
|
|
}
|
|
}, 0);
|
|
}
|
|
|
|
var worker_blob_url = null;
|
|
|
|
var WorkerConverter = function() {
|
|
this.callbacks = [];
|
|
if (worker_blob_url === null) {
|
|
// load worker from inplace blob so we don't have to depend
|
|
// on additional external files
|
|
var worker_func_data = worker_func.toString();
|
|
var worker_func_name = worker_func.name;
|
|
if (!worker_func_name) {
|
|
// Get name of function for older browsers and IE.
|
|
// See http://stackoverflow.com/a/17923727/608954
|
|
worker_func_name = /^function\s+([\w\$]+)\s*\(/.exec(worker_func_data)[1];
|
|
}
|
|
var blob = new Blob([
|
|
"(function() {\n",
|
|
_do_convert_yuv420.toString() + ";\n",
|
|
_do_convert_yuv2rgb.toString() + ";\n",
|
|
worker_func_data + ";\n",
|
|
worker_func_name + "();\n",
|
|
"}).call(this);"
|
|
], {"type": "text/javascript"});
|
|
|
|
worker_blob_url = window.URL.createObjectURL(blob);
|
|
}
|
|
|
|
var that = this;
|
|
this.worker = new Worker(worker_blob_url);
|
|
this.worker.addEventListener('message', function(e) {
|
|
switch (e.data["cmd"]) {
|
|
case "converted":
|
|
var cb = that.callbacks[0];
|
|
that.callbacks = that.callbacks.splice(1);
|
|
cb(e.data["data"]["image"]);
|
|
break;
|
|
|
|
case "stopped":
|
|
that.callbacks = null;
|
|
that = null;
|
|
break;
|
|
|
|
default:
|
|
// ignore unknown commands
|
|
break;
|
|
}
|
|
}, false);
|
|
this.worker.postMessage({"cmd": "start"});
|
|
};
|
|
|
|
WorkerConverter.prototype.destroy = function() {
|
|
if (this.worker) {
|
|
this.worker.postMessage({"cmd": "stop"});
|
|
this.worker = null;
|
|
}
|
|
};
|
|
|
|
WorkerConverter.prototype.convert = function(chroma, y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, imageData, callback) {
|
|
var msg = {
|
|
"cmd": "convert",
|
|
"data": {
|
|
"chroma": chroma,
|
|
"y": new Uint8Array(y),
|
|
"u": new Uint8Array(u),
|
|
"v": new Uint8Array(v),
|
|
"w": w,
|
|
"h": h,
|
|
"stridey": stridey,
|
|
"strideu": strideu,
|
|
"stridev": stridev,
|
|
"bppy": bppy,
|
|
"bppu": bppu,
|
|
"bppv": bppv
|
|
}
|
|
};
|
|
this.callbacks.push(function(data) {
|
|
if (imageData.data.set) {
|
|
imageData.data.set(data);
|
|
} else {
|
|
var dest = imageData.data;
|
|
var cnt = dest.length;
|
|
for (var i=0; i<cnt; i++) {
|
|
dest[i] = data[i];
|
|
}
|
|
}
|
|
callback(imageData);
|
|
});
|
|
this.worker.postMessage(msg);
|
|
};
|
|
|
|
var LocalConverter = function() {
|
|
};
|
|
|
|
LocalConverter.prototype.destroy = function() {
|
|
};
|
|
|
|
LocalConverter.prototype.convert = function(chroma, y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, imageData, callback) {
|
|
_do_convert_yuv2rgb(chroma,
|
|
y, u, v,
|
|
w, h,
|
|
stridey, strideu, stridev,
|
|
bppy, bppu, bppv,
|
|
imageData.data);
|
|
|
|
callback(imageData);
|
|
};
|
|
|
|
/**
|
|
* The HEVC/H.265 decoder
|
|
*
|
|
* @constructor
|
|
*/
|
|
var Decoder = function() {
|
|
this.image_callback = null;
|
|
this.more = _malloc(2);
|
|
this.stop = false;
|
|
this.ctx = libde265.de265_new_decoder();
|
|
if (typeof Worker !== "undefined" && typeof Uint8ClampedArray !== "undefined" && typeof Blob !== "undefined") {
|
|
this.converter = new WorkerConverter();
|
|
} else {
|
|
this.converter = new LocalConverter();
|
|
}
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.free = function() {
|
|
if (this.converter) {
|
|
this.converter.destroy();
|
|
this.converter = null;
|
|
}
|
|
libde265.de265_free_decoder(this.ctx);
|
|
this.ctx = null;
|
|
_free(this.more);
|
|
this.more = null;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.set_image_callback = function(callback) {
|
|
this.image_callback = callback;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.reset = function() {
|
|
libde265.de265_reset(this.ctx);
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.push_data = function(data, pts) {
|
|
pts = pts || 0;
|
|
return libde265.de265_push_data(this.ctx, data, data.length, pts, 0);
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.flush = function() {
|
|
this.stop = true;
|
|
return libde265.de265_flush_data(this.ctx);
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.has_more = function() {
|
|
return !this.stop || getValue(this.more, "i16") !== 0;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.set_framerate_ratio = function(ratio) {
|
|
libde265.de265_set_framerate_ratio(this.ctx, ratio);
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.disable_filters = function(disable) {
|
|
libde265.de265_set_parameter_bool(this.ctx, libde265.DE265_DECODER_PARAM_DISABLE_DEBLOCKING, !!disable);
|
|
libde265.de265_set_parameter_bool(this.ctx, libde265.DE265_DECODER_PARAM_DISABLE_SAO, !!disable);
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
Decoder.prototype.decode = function(callback) {
|
|
var err;
|
|
setValue(this.more, 1, "i16");
|
|
while (getValue(this.more, "i16") !== 0) {
|
|
err = libde265.de265_decode(this.ctx, this.more);
|
|
if (!libde265.de265_isOK(err)) {
|
|
setValue(this.more, 0, "i16");
|
|
break;
|
|
}
|
|
|
|
var img = libde265.de265_get_next_picture(this.ctx);
|
|
if (img) {
|
|
if (this.image_callback) {
|
|
this.image_callback(new Image(this, img));
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
callback(err);
|
|
return;
|
|
};
|
|
|
|
function _do_convert_yuv420(y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, dest) {
|
|
var yval;
|
|
var uval;
|
|
var vval;
|
|
var xpos = 0;
|
|
var ypos = 0;
|
|
var w2 = w >> 1;
|
|
var maxi = w2*h;
|
|
var yoffset = 0;
|
|
var uoffset = 0;
|
|
var voffset = 0;
|
|
var x2;
|
|
var i2;
|
|
for (var i=0; i<maxi; i++) {
|
|
i2 = i << 1;
|
|
x2 = (xpos << 1);
|
|
yval = 1.164 * (y[yoffset + x2] - 16);
|
|
|
|
uval = u[uoffset + xpos] - 128;
|
|
vval = v[voffset + xpos] - 128;
|
|
dest[(i2<<2)+0] = yval + 1.596 * vval;
|
|
dest[(i2<<2)+1] = yval - 0.813 * vval - 0.391 * uval;
|
|
dest[(i2<<2)+2] = yval + 2.018 * uval;
|
|
dest[(i2<<2)+3] = 0xff;
|
|
|
|
yval = 1.164 * (y[yoffset + x2 + 1] - 16);
|
|
dest[((i2+1)<<2)+0] = yval + 1.596 * vval;
|
|
dest[((i2+1)<<2)+1] = yval - 0.813 * vval - 0.391 * uval;
|
|
dest[((i2+1)<<2)+2] = yval + 2.018 * uval;
|
|
dest[((i2+1)<<2)+3] = 0xff;
|
|
|
|
xpos++;
|
|
if (xpos === w2) {
|
|
xpos = 0;
|
|
ypos++;
|
|
yoffset += stridey;
|
|
uoffset = ((ypos >> 1) * strideu);
|
|
voffset = ((ypos >> 1) * stridev);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _do_convert_yuv2rgb(chroma, y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, dest) {
|
|
if (!dest) {
|
|
dest = new Uint8ClampedArray(w*h*4);
|
|
}
|
|
// NOTE: we can't use libde265 constants here as the function can also be
|
|
// run inside the Worker where "libde265" is not available.
|
|
switch (chroma) {
|
|
case 0: /* libde265.de265_chroma_mono */
|
|
// TODO(fancycode): implement me
|
|
console.log("Chroma format not implemented yet", chroma, bppy, bppu, bppv);
|
|
break;
|
|
case 1: /* libde265.de265_chroma_420 */
|
|
if (bppy !== 8 || bppu !== 8 || bppv !== 8) {
|
|
// TODO(fancycode): implement me
|
|
console.log("Chroma format not implemented yet", chroma, bppy, bppu, bppv);
|
|
} else {
|
|
_do_convert_yuv420(y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, dest);
|
|
}
|
|
break;
|
|
case 2: /* libde265.de265_chroma_422 */
|
|
// TODO(fancycode): implement me
|
|
console.log("Chroma format not implemented yet", chroma, bppy, bppu, bppv);
|
|
break;
|
|
case 3: /* libde265.de265_chroma_444 */
|
|
// TODO(fancycode): implement me
|
|
console.log("Chroma format not implemented yet", chroma, bppy, bppu, bppv);
|
|
break;
|
|
default:
|
|
console.log("Unsupported chroma format", chroma, bppy, bppu, bppv);
|
|
break;
|
|
}
|
|
return dest;
|
|
}
|
|
|
|
Decoder.prototype.convert_yuv2rgb = function(chroma, y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, imageData, callback) {
|
|
y = HEAPU8.subarray(y, y+(h*stridey));
|
|
u = HEAPU8.subarray(u, u+(h*strideu));
|
|
v = HEAPU8.subarray(v, v+(h*stridev));
|
|
this.converter.convert(chroma, y, u, v, w, h, stridey, strideu, stridev, bppy, bppu, bppv, imageData, callback);
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
libde265.Decoder = Decoder;
|
|
|
|
/**
|
|
* A simple raw bitstream player interface.
|
|
*
|
|
* @constructor
|
|
*/
|
|
var RawPlayer = function(canvas) {
|
|
this.canvas = canvas;
|
|
this.ctx = canvas.getContext("2d");
|
|
this.status_cb = null;
|
|
this.error_cb = null;
|
|
this.ratio = null;
|
|
this.filters = false;
|
|
this._reset();
|
|
};
|
|
|
|
RawPlayer.prototype._reset = function() {
|
|
this.start = null;
|
|
this.frames = 0;
|
|
this.image_data = null;
|
|
this.running = false;
|
|
this.pending_image_data = null;
|
|
};
|
|
|
|
/** @expose */
|
|
RawPlayer.prototype.set_status_callback = function(callback) {
|
|
this.status_cb = callback;
|
|
};
|
|
|
|
RawPlayer.prototype._set_status = function() {
|
|
if (this.status_cb) {
|
|
this.status_cb.apply(this.status_cb, arguments);
|
|
}
|
|
};
|
|
|
|
/** @expose */
|
|
RawPlayer.prototype.set_error_callback = function(callback) {
|
|
this.error_cb = callback;
|
|
};
|
|
|
|
RawPlayer.prototype._set_error = function(error, message) {
|
|
if (this.error_cb) {
|
|
this.error_cb(error, message);
|
|
}
|
|
};
|
|
|
|
RawPlayer.prototype._display_image = function(image) {
|
|
if (!this.start) {
|
|
this.start = new Date();
|
|
this._set_status("playing");
|
|
} else {
|
|
this.frames += 1;
|
|
var duration = (new Date()) - this.start;
|
|
if (duration > 1000) {
|
|
this._set_status("fps", this.frames / (duration * 0.001));
|
|
}
|
|
}
|
|
|
|
var w = image.get_width();
|
|
var h = image.get_height();
|
|
if (w != this.canvas.width || h != this.canvas.height || !this.image_data) {
|
|
this.canvas.width = w;
|
|
this.canvas.height = h;
|
|
this.image_data = this.ctx.createImageData(w, h);
|
|
var image_data = this.image_data.data;
|
|
for (var i=0; i<w*h; i++) {
|
|
image_data[i*4+3] = 255;
|
|
}
|
|
}
|
|
|
|
var that = this;
|
|
image.display(this.image_data, function(display_image_data) {
|
|
if (window.requestAnimationFrame) {
|
|
that.pending_image_data = display_image_data;
|
|
window.requestAnimationFrame(function() {
|
|
if (that.pending_image_data) {
|
|
that.ctx.putImageData(that.pending_image_data, 0, 0);
|
|
that.pending_image_data = null;
|
|
}
|
|
});
|
|
} else {
|
|
that.ctx.putImageData(display_image_data, 0, 0);
|
|
}
|
|
});
|
|
};
|
|
|
|
RawPlayer.prototype._handle_onload = function(request, event) {
|
|
var that = this;
|
|
this._set_status("initializing");
|
|
|
|
var decoder = new Decoder();
|
|
decoder.set_image_callback(function(image) {
|
|
that._display_image(image);
|
|
image.free();
|
|
});
|
|
|
|
var data = request.response;
|
|
var pos = 0;
|
|
var remaining = data.byteLength;
|
|
var ratio = null;
|
|
var filters = false;
|
|
|
|
var decode = function() {
|
|
if (!that.running) {
|
|
return;
|
|
}
|
|
|
|
var err;
|
|
if (remaining === 0) {
|
|
err = decoder.flush();
|
|
} else {
|
|
var l = 4096;
|
|
if (l > remaining) {
|
|
l = remaining;
|
|
}
|
|
var tmp = new Uint8Array(data, pos, l);
|
|
err = decoder.push_data(tmp);
|
|
pos += l;
|
|
remaining -= l;
|
|
}
|
|
if (!libde265.de265_isOK(err)) {
|
|
that._set_error(err, libde265.de265_get_error_text(err));
|
|
return;
|
|
}
|
|
|
|
if (that.ratio !== ratio) {
|
|
decoder.set_framerate_ratio(that.ratio);
|
|
ratio = that.ratio;
|
|
}
|
|
|
|
if (that.filters !== filters) {
|
|
decoder.disable_filters(that.filters);
|
|
filters = that.filters;
|
|
}
|
|
|
|
decoder.decode(function(err) {
|
|
switch(err) {
|
|
case libde265.DE265_ERROR_WAITING_FOR_INPUT_DATA:
|
|
setTimeout(decode, 0);
|
|
return;
|
|
|
|
default:
|
|
if (!libde265.de265_isOK(err)) {
|
|
that._set_error(err, libde265.de265_get_error_text(err));
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (remaining > 0 || decoder.has_more()) {
|
|
setTimeout(decode, 0);
|
|
return;
|
|
}
|
|
|
|
decoder.free();
|
|
that.stop();
|
|
});
|
|
};
|
|
|
|
setTimeout(decode, 0);
|
|
};
|
|
|
|
/** @expose */
|
|
RawPlayer.prototype.playback = function(url) {
|
|
this._reset();
|
|
var request = new XMLHttpRequest();
|
|
request.open("get", url, true);
|
|
request.responseType = "arraybuffer";
|
|
var that = this;
|
|
request.onload = function(event) {
|
|
that._handle_onload(request, event);
|
|
};
|
|
this._set_status("loading");
|
|
this.running = true;
|
|
request.send();
|
|
};
|
|
|
|
/** @expose */
|
|
RawPlayer.prototype.stop = function() {
|
|
this._set_status("stopped");
|
|
this._reset();
|
|
};
|
|
|
|
/** @expose */
|
|
RawPlayer.prototype.set_framerate_ratio = function(ratio) {
|
|
this.ratio = ratio;
|
|
};
|
|
|
|
/** @expose */
|
|
RawPlayer.prototype.disable_filters = function(disable) {
|
|
this.filters = disable;
|
|
};
|
|
|
|
/**
|
|
* @expose
|
|
*/
|
|
libde265.RawPlayer = RawPlayer;
|
|
|
|
var root = this;
|
|
|
|
if (typeof exports !== 'undefined') {
|
|
if (typeof module !== 'undefined' && module.exports) {
|
|
/** @expose */
|
|
exports = module.exports = libde265;
|
|
}
|
|
/** @expose */
|
|
exports.libde265 = libde265;
|
|
} else {
|
|
/** @expose */
|
|
root.libde265 = libde265;
|
|
}
|
|
|
|
if (typeof define === "function" && define.amd) {
|
|
/** @expose */
|
|
define([], function() {
|
|
return libde265;
|
|
});
|
|
}
|
|
|
|
// NOTE: wrapped inside "(function() {" block from pre.js
|
|
}).call(this);
|
|
|
|
|