1var EXPECTED_OUTPUT = 'sizes: 100000,25906\nok.\n'; 2var Module = { 3 arguments: [1], 4 print: function(x) {Module.printBuffer += x + '\n';}, 5 preRun: [function() {Module.printBuffer = ''}], 6 postRun: [function() { 7 assertEquals(EXPECTED_OUTPUT, Module.printBuffer); 8 }], 9}; 10// The Module object: Our interface to the outside world. We import 11// and export values on it, and do the work to get that through 12// closure compiler if necessary. There are various ways Module can be used: 13// 1. Not defined. We create it here 14// 2. A function parameter, function(Module) { ..generated code.. } 15// 3. pre-run appended it, var Module = {}; ..generated code.. 16// 4. External script tag defines var Module. 17// We need to do an eval in order to handle the closure compiler 18// case, where this code here is minified but Module was defined 19// elsewhere (e.g. case 4 above). We also need to check if Module 20// already exists (e.g. case 3 above). 21// Note that if you want to run closure, and also to use Module 22// after the generated code, you will need to define var Module = {}; 23// before the code. Then that object will be used in the code, and you 24// can continue to use Module afterwards as well. 25var Module; 26if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {}; 27 28// Sometimes an existing Module object exists with properties 29// meant to overwrite the default module functionality. Here 30// we collect those properties and reapply _after_ we configure 31// the current environment's defaults to avoid having to be so 32// defensive during initialization. 33var moduleOverrides = {}; 34for (var key in Module) { 35 if (Module.hasOwnProperty(key)) { 36 moduleOverrides[key] = Module[key]; 37 } 38} 39 40// The environment setup code below is customized to use Module. 41// *** Environment setup code *** 42var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; 43var ENVIRONMENT_IS_WEB = typeof window === 'object'; 44var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; 45var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; 46 47if (ENVIRONMENT_IS_NODE) { 48 // Expose functionality in the same simple way that the shells work 49 // Note that we pollute the global namespace here, otherwise we break in node 50 if (!Module['print']) Module['print'] = function print(x) { 51 process['stdout'].write(x + '\n'); 52 }; 53 if (!Module['printErr']) Module['printErr'] = function printErr(x) { 54 process['stderr'].write(x + '\n'); 55 }; 56 57 var nodeFS = require('fs'); 58 var nodePath = require('path'); 59 60 Module['read'] = function read(filename, binary) { 61 filename = nodePath['normalize'](filename); 62 var ret = nodeFS['readFileSync'](filename); 63 // The path is absolute if the normalized version is the same as the resolved. 64 if (!ret && filename != nodePath['resolve'](filename)) { 65 filename = path.join(__dirname, '..', 'src', filename); 66 ret = nodeFS['readFileSync'](filename); 67 } 68 if (ret && !binary) ret = ret.toString(); 69 return ret; 70 }; 71 72 Module['readBinary'] = function readBinary(filename) { return Module['read'](filename, true) }; 73 74 Module['load'] = function load(f) { 75 globalEval(read(f)); 76 }; 77 78 Module['arguments'] = process['argv'].slice(2); 79 80 module['exports'] = Module; 81} 82else if (ENVIRONMENT_IS_SHELL) { 83 if (!Module['print']) Module['print'] = print; 84 if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm 85 86 if (typeof read != 'undefined') { 87 Module['read'] = read; 88 } else { 89 Module['read'] = function read() { throw 'no read() available (jsc?)' }; 90 } 91 92 Module['readBinary'] = function readBinary(f) { 93 return read(f, 'binary'); 94 }; 95 96 if (typeof scriptArgs != 'undefined') { 97 Module['arguments'] = scriptArgs; 98 } else if (typeof arguments != 'undefined') { 99 Module['arguments'] = arguments; 100 } 101 102 this['Module'] = Module; 103 104 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) 105} 106else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { 107 Module['read'] = function read(url) { 108 var xhr = new XMLHttpRequest(); 109 xhr.open('GET', url, false); 110 xhr.send(null); 111 return xhr.responseText; 112 }; 113 114 if (typeof arguments != 'undefined') { 115 Module['arguments'] = arguments; 116 } 117 118 if (typeof console !== 'undefined') { 119 if (!Module['print']) Module['print'] = function print(x) { 120 console.log(x); 121 }; 122 if (!Module['printErr']) Module['printErr'] = function printErr(x) { 123 console.log(x); 124 }; 125 } else { 126 // Probably a worker, and without console.log. We can do very little here... 127 var TRY_USE_DUMP = false; 128 if (!Module['print']) Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) { 129 dump(x); 130 }) : (function(x) { 131 // self.postMessage(x); // enable this if you want stdout to be sent as messages 132 })); 133 } 134 135 if (ENVIRONMENT_IS_WEB) { 136 window['Module'] = Module; 137 } else { 138 Module['load'] = importScripts; 139 } 140} 141else { 142 // Unreachable because SHELL is dependant on the others 143 throw 'Unknown runtime environment. Where are we?'; 144} 145 146function globalEval(x) { 147 eval.call(null, x); 148} 149if (!Module['load'] == 'undefined' && Module['read']) { 150 Module['load'] = function load(f) { 151 globalEval(Module['read'](f)); 152 }; 153} 154if (!Module['print']) { 155 Module['print'] = function(){}; 156} 157if (!Module['printErr']) { 158 Module['printErr'] = Module['print']; 159} 160if (!Module['arguments']) { 161 Module['arguments'] = []; 162} 163// *** Environment setup code *** 164 165// Closure helpers 166Module.print = Module['print']; 167Module.printErr = Module['printErr']; 168 169// Callbacks 170Module['preRun'] = []; 171Module['postRun'] = []; 172 173// Merge back in the overrides 174for (var key in moduleOverrides) { 175 if (moduleOverrides.hasOwnProperty(key)) { 176 Module[key] = moduleOverrides[key]; 177 } 178} 179 180 181 182// === Auto-generated preamble library stuff === 183 184//======================================== 185// Runtime code shared with compiler 186//======================================== 187 188var Runtime = { 189 stackSave: function () { 190 return STACKTOP; 191 }, 192 stackRestore: function (stackTop) { 193 STACKTOP = stackTop; 194 }, 195 forceAlign: function (target, quantum) { 196 quantum = quantum || 4; 197 if (quantum == 1) return target; 198 if (isNumber(target) && isNumber(quantum)) { 199 return Math.ceil(target/quantum)*quantum; 200 } else if (isNumber(quantum) && isPowerOfTwo(quantum)) { 201 return '(((' +target + ')+' + (quantum-1) + ')&' + -quantum + ')'; 202 } 203 return 'Math.ceil((' + target + ')/' + quantum + ')*' + quantum; 204 }, 205 isNumberType: function (type) { 206 return type in Runtime.INT_TYPES || type in Runtime.FLOAT_TYPES; 207 }, 208 isPointerType: function isPointerType(type) { 209 return type[type.length-1] == '*'; 210}, 211 isStructType: function isStructType(type) { 212 if (isPointerType(type)) return false; 213 if (isArrayType(type)) return true; 214 if (/<?\{ ?[^}]* ?\}>?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types 215 // See comment in isStructPointerType() 216 return type[0] == '%'; 217}, 218 INT_TYPES: {"i1":0,"i8":0,"i16":0,"i32":0,"i64":0}, 219 FLOAT_TYPES: {"float":0,"double":0}, 220 or64: function (x, y) { 221 var l = (x | 0) | (y | 0); 222 var h = (Math.round(x / 4294967296) | Math.round(y / 4294967296)) * 4294967296; 223 return l + h; 224 }, 225 and64: function (x, y) { 226 var l = (x | 0) & (y | 0); 227 var h = (Math.round(x / 4294967296) & Math.round(y / 4294967296)) * 4294967296; 228 return l + h; 229 }, 230 xor64: function (x, y) { 231 var l = (x | 0) ^ (y | 0); 232 var h = (Math.round(x / 4294967296) ^ Math.round(y / 4294967296)) * 4294967296; 233 return l + h; 234 }, 235 getNativeTypeSize: function (type) { 236 switch (type) { 237 case 'i1': case 'i8': return 1; 238 case 'i16': return 2; 239 case 'i32': return 4; 240 case 'i64': return 8; 241 case 'float': return 4; 242 case 'double': return 8; 243 default: { 244 if (type[type.length-1] === '*') { 245 return Runtime.QUANTUM_SIZE; // A pointer 246 } else if (type[0] === 'i') { 247 var bits = parseInt(type.substr(1)); 248 assert(bits % 8 === 0); 249 return bits/8; 250 } else { 251 return 0; 252 } 253 } 254 } 255 }, 256 getNativeFieldSize: function (type) { 257 return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE); 258 }, 259 dedup: function dedup(items, ident) { 260 var seen = {}; 261 if (ident) { 262 return items.filter(function(item) { 263 if (seen[item[ident]]) return false; 264 seen[item[ident]] = true; 265 return true; 266 }); 267 } else { 268 return items.filter(function(item) { 269 if (seen[item]) return false; 270 seen[item] = true; 271 return true; 272 }); 273 } 274}, 275 set: function set() { 276 var args = typeof arguments[0] === 'object' ? arguments[0] : arguments; 277 var ret = {}; 278 for (var i = 0; i < args.length; i++) { 279 ret[args[i]] = 0; 280 } 281 return ret; 282}, 283 STACK_ALIGN: 8, 284 getAlignSize: function (type, size, vararg) { 285 // we align i64s and doubles on 64-bit boundaries, unlike x86 286 if (!vararg && (type == 'i64' || type == 'double')) return 8; 287 if (!type) return Math.min(size, 8); // align structures internally to 64 bits 288 return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); 289 }, 290 calculateStructAlignment: function calculateStructAlignment(type) { 291 type.flatSize = 0; 292 type.alignSize = 0; 293 var diffs = []; 294 var prev = -1; 295 var index = 0; 296 type.flatIndexes = type.fields.map(function(field) { 297 index++; 298 var size, alignSize; 299 if (Runtime.isNumberType(field) || Runtime.isPointerType(field)) { 300 size = Runtime.getNativeTypeSize(field); // pack char; char; in structs, also char[X]s. 301 alignSize = Runtime.getAlignSize(field, size); 302 } else if (Runtime.isStructType(field)) { 303 if (field[1] === '0') { 304 // this is [0 x something]. When inside another structure like here, it must be at the end, 305 // and it adds no size 306 // XXX this happens in java-nbody for example... assert(index === type.fields.length, 'zero-length in the middle!'); 307 size = 0; 308 if (Types.types[field]) { 309 alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize); 310 } else { 311 alignSize = type.alignSize || QUANTUM_SIZE; 312 } 313 } else { 314 size = Types.types[field].flatSize; 315 alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize); 316 } 317 } else if (field[0] == 'b') { 318 // bN, large number field, like a [N x i8] 319 size = field.substr(1)|0; 320 alignSize = 1; 321 } else if (field[0] === '<') { 322 // vector type 323 size = alignSize = Types.types[field].flatSize; // fully aligned 324 } else if (field[0] === 'i') { 325 // illegal integer field, that could not be legalized because it is an internal structure field 326 // it is ok to have such fields, if we just use them as markers of field size and nothing more complex 327 size = alignSize = parseInt(field.substr(1))/8; 328 assert(size % 1 === 0, 'cannot handle non-byte-size field ' + field); 329 } else { 330 assert(false, 'invalid type for calculateStructAlignment'); 331 } 332 if (type.packed) alignSize = 1; 333 type.alignSize = Math.max(type.alignSize, alignSize); 334 var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory 335 type.flatSize = curr + size; 336 if (prev >= 0) { 337 diffs.push(curr-prev); 338 } 339 prev = curr; 340 return curr; 341 }); 342 if (type.name_ && type.name_[0] === '[') { 343 // arrays have 2 elements, so we get the proper difference. then we scale here. that way we avoid 344 // allocating a potentially huge array for [999999 x i8] etc. 345 type.flatSize = parseInt(type.name_.substr(1))*type.flatSize/2; 346 } 347 type.flatSize = Runtime.alignMemory(type.flatSize, type.alignSize); 348 if (diffs.length == 0) { 349 type.flatFactor = type.flatSize; 350 } else if (Runtime.dedup(diffs).length == 1) { 351 type.flatFactor = diffs[0]; 352 } 353 type.needsFlattening = (type.flatFactor != 1); 354 return type.flatIndexes; 355 }, 356 generateStructInfo: function (struct, typeName, offset) { 357 var type, alignment; 358 if (typeName) { 359 offset = offset || 0; 360 type = (typeof Types === 'undefined' ? Runtime.typeInfo : Types.types)[typeName]; 361 if (!type) return null; 362 if (type.fields.length != struct.length) { 363 printErr('Number of named fields must match the type for ' + typeName + ': possibly duplicate struct names. Cannot return structInfo'); 364 return null; 365 } 366 alignment = type.flatIndexes; 367 } else { 368 var type = { fields: struct.map(function(item) { return item[0] }) }; 369 alignment = Runtime.calculateStructAlignment(type); 370 } 371 var ret = { 372 __size__: type.flatSize 373 }; 374 if (typeName) { 375 struct.forEach(function(item, i) { 376 if (typeof item === 'string') { 377 ret[item] = alignment[i] + offset; 378 } else { 379 // embedded struct 380 var key; 381 for (var k in item) key = k; 382 ret[key] = Runtime.generateStructInfo(item[key], type.fields[i], alignment[i]); 383 } 384 }); 385 } else { 386 struct.forEach(function(item, i) { 387 ret[item[1]] = alignment[i]; 388 }); 389 } 390 return ret; 391 }, 392 dynCall: function (sig, ptr, args) { 393 if (args && args.length) { 394 if (!args.splice) args = Array.prototype.slice.call(args); 395 args.splice(0, 0, ptr); 396 return Module['dynCall_' + sig].apply(null, args); 397 } else { 398 return Module['dynCall_' + sig].call(null, ptr); 399 } 400 }, 401 functionPointers: [], 402 addFunction: function (func) { 403 for (var i = 0; i < Runtime.functionPointers.length; i++) { 404 if (!Runtime.functionPointers[i]) { 405 Runtime.functionPointers[i] = func; 406 return 2*(1 + i); 407 } 408 } 409 throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.'; 410 }, 411 removeFunction: function (index) { 412 Runtime.functionPointers[(index-2)/2] = null; 413 }, 414 getAsmConst: function (code, numArgs) { 415 // code is a constant string on the heap, so we can cache these 416 if (!Runtime.asmConstCache) Runtime.asmConstCache = {}; 417 var func = Runtime.asmConstCache[code]; 418 if (func) return func; 419 var args = []; 420 for (var i = 0; i < numArgs; i++) { 421 args.push(String.fromCharCode(36) + i); // $0, $1 etc 422 } 423 var source = Pointer_stringify(code); 424 if (source[0] === '"') { 425 // tolerate EM_ASM("..code..") even though EM_ASM(..code..) is correct 426 if (source.indexOf('"', 1) === source.length-1) { 427 source = source.substr(1, source.length-2); 428 } else { 429 // something invalid happened, e.g. EM_ASM("..code($0)..", input) 430 abort('invalid EM_ASM input |' + source + '|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)'); 431 } 432 } 433 try { 434 var evalled = eval('(function(' + args.join(',') + '){ ' + source + ' })'); // new Function does not allow upvars in node 435 } catch(e) { 436 Module.printErr('error in executing inline EM_ASM code: ' + e + ' on: \n\n' + source + '\n\nwith args |' + args + '| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)'); 437 throw e; 438 } 439 return Runtime.asmConstCache[code] = evalled; 440 }, 441 warnOnce: function (text) { 442 if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {}; 443 if (!Runtime.warnOnce.shown[text]) { 444 Runtime.warnOnce.shown[text] = 1; 445 Module.printErr(text); 446 } 447 }, 448 funcWrappers: {}, 449 getFuncWrapper: function (func, sig) { 450 assert(sig); 451 if (!Runtime.funcWrappers[func]) { 452 Runtime.funcWrappers[func] = function dynCall_wrapper() { 453 return Runtime.dynCall(sig, func, arguments); 454 }; 455 } 456 return Runtime.funcWrappers[func]; 457 }, 458 UTF8Processor: function () { 459 var buffer = []; 460 var needed = 0; 461 this.processCChar = function (code) { 462 code = code & 0xFF; 463 464 if (buffer.length == 0) { 465 if ((code & 0x80) == 0x00) { // 0xxxxxxx 466 return String.fromCharCode(code); 467 } 468 buffer.push(code); 469 if ((code & 0xE0) == 0xC0) { // 110xxxxx 470 needed = 1; 471 } else if ((code & 0xF0) == 0xE0) { // 1110xxxx 472 needed = 2; 473 } else { // 11110xxx 474 needed = 3; 475 } 476 return ''; 477 } 478 479 if (needed) { 480 buffer.push(code); 481 needed--; 482 if (needed > 0) return ''; 483 } 484 485 var c1 = buffer[0]; 486 var c2 = buffer[1]; 487 var c3 = buffer[2]; 488 var c4 = buffer[3]; 489 var ret; 490 if (buffer.length == 2) { 491 ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F)); 492 } else if (buffer.length == 3) { 493 ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); 494 } else { 495 // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae 496 var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) | 497 ((c3 & 0x3F) << 6) | (c4 & 0x3F); 498 ret = String.fromCharCode( 499 Math.floor((codePoint - 0x10000) / 0x400) + 0xD800, 500 (codePoint - 0x10000) % 0x400 + 0xDC00); 501 } 502 buffer.length = 0; 503 return ret; 504 } 505 this.processJSString = function processJSString(string) { 506 /* TODO: use TextEncoder when present, 507 var encoder = new TextEncoder(); 508 encoder['encoding'] = "utf-8"; 509 var utf8Array = encoder['encode'](aMsg.data); 510 */ 511 string = unescape(encodeURIComponent(string)); 512 var ret = []; 513 for (var i = 0; i < string.length; i++) { 514 ret.push(string.charCodeAt(i)); 515 } 516 return ret; 517 } 518 }, 519 getCompilerSetting: function (name) { 520 throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work'; 521 }, 522 stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+7)&-8); return ret; }, 523 staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = (((STATICTOP)+7)&-8); return ret; }, 524 dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = (((DYNAMICTOP)+7)&-8); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; }, 525 alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 8))*(quantum ? quantum : 8); return ret; }, 526 makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*(+4294967296))) : ((+((low>>>0)))+((+((high|0)))*(+4294967296)))); return ret; }, 527 GLOBAL_BASE: 8, 528 QUANTUM_SIZE: 4, 529 __dummy__: 0 530} 531 532 533Module['Runtime'] = Runtime; 534 535 536 537 538 539 540 541 542 543//======================================== 544// Runtime essentials 545//======================================== 546 547var __THREW__ = 0; // Used in checking for thrown exceptions. 548 549var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort() 550var EXITSTATUS = 0; 551 552var undef = 0; 553// tempInt is used for 32-bit signed values or smaller. tempBigInt is used 554// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt 555var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD, tempDouble, tempFloat; 556var tempI64, tempI64b; 557var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9; 558 559function assert(condition, text) { 560 if (!condition) { 561 abort('Assertion failed: ' + text); 562 } 563} 564 565var globalScope = this; 566 567// C calling interface. A convenient way to call C functions (in C files, or 568// defined with extern "C"). 569// 570// Note: LLVM optimizations can inline and remove functions, after which you will not be 571// able to call them. Closure can also do so. To avoid that, add your function to 572// the exports using something like 573// 574// -s EXPORTED_FUNCTIONS='["_main", "_myfunc"]' 575// 576// @param ident The name of the C function (note that C++ functions will be name-mangled - use extern "C") 577// @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and 578// 'array' for JavaScript arrays and typed arrays; note that arrays are 8-bit). 579// @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, 580// except that 'array' is not possible (there is no way for us to know the length of the array) 581// @param args An array of the arguments to the function, as native JS values (as in returnType) 582// Note that string arguments will be stored on the stack (the JS string will become a C string on the stack). 583// @return The return value, as a native JS value (as in returnType) 584function ccall(ident, returnType, argTypes, args) { 585 return ccallFunc(getCFunc(ident), returnType, argTypes, args); 586} 587Module["ccall"] = ccall; 588 589// Returns the C function with a specified identifier (for C++, you need to do manual name mangling) 590function getCFunc(ident) { 591 try { 592 var func = Module['_' + ident]; // closure exported function 593 if (!func) func = eval('_' + ident); // explicit lookup 594 } catch(e) { 595 } 596 assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); 597 return func; 598} 599 600// Internal function that does a C call using a function, not an identifier 601function ccallFunc(func, returnType, argTypes, args) { 602 var stack = 0; 603 function toC(value, type) { 604 if (type == 'string') { 605 if (value === null || value === undefined || value === 0) return 0; // null string 606 value = intArrayFromString(value); 607 type = 'array'; 608 } 609 if (type == 'array') { 610 if (!stack) stack = Runtime.stackSave(); 611 var ret = Runtime.stackAlloc(value.length); 612 writeArrayToMemory(value, ret); 613 return ret; 614 } 615 return value; 616 } 617 function fromC(value, type) { 618 if (type == 'string') { 619 return Pointer_stringify(value); 620 } 621 assert(type != 'array'); 622 return value; 623 } 624 var i = 0; 625 var cArgs = args ? args.map(function(arg) { 626 return toC(arg, argTypes[i++]); 627 }) : []; 628 var ret = fromC(func.apply(null, cArgs), returnType); 629 if (stack) Runtime.stackRestore(stack); 630 return ret; 631} 632 633// Returns a native JS wrapper for a C function. This is similar to ccall, but 634// returns a function you can call repeatedly in a normal way. For example: 635// 636// var my_function = cwrap('my_c_function', 'number', ['number', 'number']); 637// alert(my_function(5, 22)); 638// alert(my_function(99, 12)); 639// 640function cwrap(ident, returnType, argTypes) { 641 var func = getCFunc(ident); 642 return function() { 643 return ccallFunc(func, returnType, argTypes, Array.prototype.slice.call(arguments)); 644 } 645} 646Module["cwrap"] = cwrap; 647 648// Sets a value in memory in a dynamic way at run-time. Uses the 649// type data. This is the same as makeSetValue, except that 650// makeSetValue is done at compile-time and generates the needed 651// code then, whereas this function picks the right code at 652// run-time. 653// Note that setValue and getValue only do *aligned* writes and reads! 654// Note that ccall uses JS types as for defining types, while setValue and 655// getValue need LLVM types ('i8', 'i32') - this is a lower-level operation 656function setValue(ptr, value, type, noSafe) { 657 type = type || 'i8'; 658 if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit 659 switch(type) { 660 case 'i1': HEAP8[(ptr)]=value; break; 661 case 'i8': HEAP8[(ptr)]=value; break; 662 case 'i16': HEAP16[((ptr)>>1)]=value; break; 663 case 'i32': HEAP32[((ptr)>>2)]=value; break; 664 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; 665 case 'float': HEAPF32[((ptr)>>2)]=value; break; 666 case 'double': HEAPF64[((ptr)>>3)]=value; break; 667 default: abort('invalid type for setValue: ' + type); 668 } 669} 670Module['setValue'] = setValue; 671 672// Parallel to setValue. 673function getValue(ptr, type, noSafe) { 674 type = type || 'i8'; 675 if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit 676 switch(type) { 677 case 'i1': return HEAP8[(ptr)]; 678 case 'i8': return HEAP8[(ptr)]; 679 case 'i16': return HEAP16[((ptr)>>1)]; 680 case 'i32': return HEAP32[((ptr)>>2)]; 681 case 'i64': return HEAP32[((ptr)>>2)]; 682 case 'float': return HEAPF32[((ptr)>>2)]; 683 case 'double': return HEAPF64[((ptr)>>3)]; 684 default: abort('invalid type for setValue: ' + type); 685 } 686 return null; 687} 688Module['getValue'] = getValue; 689 690var ALLOC_NORMAL = 0; // Tries to use _malloc() 691var ALLOC_STACK = 1; // Lives for the duration of the current function call 692var ALLOC_STATIC = 2; // Cannot be freed 693var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk 694var ALLOC_NONE = 4; // Do not allocate 695Module['ALLOC_NORMAL'] = ALLOC_NORMAL; 696Module['ALLOC_STACK'] = ALLOC_STACK; 697Module['ALLOC_STATIC'] = ALLOC_STATIC; 698Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC; 699Module['ALLOC_NONE'] = ALLOC_NONE; 700 701// allocate(): This is for internal use. You can use it yourself as well, but the interface 702// is a little tricky (see docs right below). The reason is that it is optimized 703// for multiple syntaxes to save space in generated code. So you should 704// normally not use allocate(), and instead allocate memory using _malloc(), 705// initialize it with setValue(), and so forth. 706// @slab: An array of data, or a number. If a number, then the size of the block to allocate, 707// in *bytes* (note that this is sometimes confusing: the next parameter does not 708// affect this!) 709// @types: Either an array of types, one for each byte (or 0 if no type at that position), 710// or a single type which is used for the entire block. This only matters if there 711// is initial data - if @slab is a number, then this does not matter at all and is 712// ignored. 713// @allocator: How to allocate memory, see ALLOC_* 714function allocate(slab, types, allocator, ptr) { 715 var zeroinit, size; 716 if (typeof slab === 'number') { 717 zeroinit = true; 718 size = slab; 719 } else { 720 zeroinit = false; 721 size = slab.length; 722 } 723 724 var singleType = typeof types === 'string' ? types : null; 725 726 var ret; 727 if (allocator == ALLOC_NONE) { 728 ret = ptr; 729 } else { 730 ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length)); 731 } 732 733 if (zeroinit) { 734 var ptr = ret, stop; 735 assert((ret & 3) == 0); 736 stop = ret + (size & ~3); 737 for (; ptr < stop; ptr += 4) { 738 HEAP32[((ptr)>>2)]=0; 739 } 740 stop = ret + size; 741 while (ptr < stop) { 742 HEAP8[((ptr++)|0)]=0; 743 } 744 return ret; 745 } 746 747 if (singleType === 'i8') { 748 if (slab.subarray || slab.slice) { 749 HEAPU8.set(slab, ret); 750 } else { 751 HEAPU8.set(new Uint8Array(slab), ret); 752 } 753 return ret; 754 } 755 756 var i = 0, type, typeSize, previousType; 757 while (i < size) { 758 var curr = slab[i]; 759 760 if (typeof curr === 'function') { 761 curr = Runtime.getFunctionIndex(curr); 762 } 763 764 type = singleType || types[i]; 765 if (type === 0) { 766 i++; 767 continue; 768 } 769 770 if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later 771 772 setValue(ret+i, curr, type); 773 774 // no need to look up size unless type changes, so cache it 775 if (previousType !== type) { 776 typeSize = Runtime.getNativeTypeSize(type); 777 previousType = type; 778 } 779 i += typeSize; 780 } 781 782 return ret; 783} 784Module['allocate'] = allocate; 785 786function Pointer_stringify(ptr, /* optional */ length) { 787 // TODO: use TextDecoder 788 // Find the length, and check for UTF while doing so 789 var hasUtf = false; 790 var t; 791 var i = 0; 792 while (1) { 793 t = HEAPU8[(((ptr)+(i))|0)]; 794 if (t >= 128) hasUtf = true; 795 else if (t == 0 && !length) break; 796 i++; 797 if (length && i == length) break; 798 } 799 if (!length) length = i; 800 801 var ret = ''; 802 803 if (!hasUtf) { 804 var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack 805 var curr; 806 while (length > 0) { 807 curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK))); 808 ret = ret ? ret + curr : curr; 809 ptr += MAX_CHUNK; 810 length -= MAX_CHUNK; 811 } 812 return ret; 813 } 814 815 var utf8 = new Runtime.UTF8Processor(); 816 for (i = 0; i < length; i++) { 817 t = HEAPU8[(((ptr)+(i))|0)]; 818 ret += utf8.processCChar(t); 819 } 820 return ret; 821} 822Module['Pointer_stringify'] = Pointer_stringify; 823 824// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns 825// a copy of that string as a Javascript String object. 826function UTF16ToString(ptr) { 827 var i = 0; 828 829 var str = ''; 830 while (1) { 831 var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; 832 if (codeUnit == 0) 833 return str; 834 ++i; 835 // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. 836 str += String.fromCharCode(codeUnit); 837 } 838} 839Module['UTF16ToString'] = UTF16ToString; 840 841// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', 842// null-terminated and encoded in UTF16LE form. The copy will require at most (str.length*2+1)*2 bytes of space in the HEAP. 843function stringToUTF16(str, outPtr) { 844 for(var i = 0; i < str.length; ++i) { 845 // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. 846 var codeUnit = str.charCodeAt(i); // possibly a lead surrogate 847 HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit; 848 } 849 // Null-terminate the pointer to the HEAP. 850 HEAP16[(((outPtr)+(str.length*2))>>1)]=0; 851} 852Module['stringToUTF16'] = stringToUTF16; 853 854// Given a pointer 'ptr' to a null-terminated UTF32LE-encoded string in the emscripten HEAP, returns 855// a copy of that string as a Javascript String object. 856function UTF32ToString(ptr) { 857 var i = 0; 858 859 var str = ''; 860 while (1) { 861 var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; 862 if (utf32 == 0) 863 return str; 864 ++i; 865 // 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. 866 if (utf32 >= 0x10000) { 867 var ch = utf32 - 0x10000; 868 str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); 869 } else { 870 str += String.fromCharCode(utf32); 871 } 872 } 873} 874Module['UTF32ToString'] = UTF32ToString; 875 876// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', 877// null-terminated and encoded in UTF32LE form. The copy will require at most (str.length+1)*4 bytes of space in the HEAP, 878// 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. 879function stringToUTF32(str, outPtr) { 880 var iChar = 0; 881 for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) { 882 // 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. 883 var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate 884 if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) { 885 var trailSurrogate = str.charCodeAt(++iCodeUnit); 886 codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF); 887 } 888 HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit; 889 ++iChar; 890 } 891 // Null-terminate the pointer to the HEAP. 892 HEAP32[(((outPtr)+(iChar*4))>>2)]=0; 893} 894Module['stringToUTF32'] = stringToUTF32; 895 896function demangle(func) { 897 var i = 3; 898 // params, etc. 899 var basicTypes = { 900 'v': 'void', 901 'b': 'bool', 902 'c': 'char', 903 's': 'short', 904 'i': 'int', 905 'l': 'long', 906 'f': 'float', 907 'd': 'double', 908 'w': 'wchar_t', 909 'a': 'signed char', 910 'h': 'unsigned char', 911 't': 'unsigned short', 912 'j': 'unsigned int', 913 'm': 'unsigned long', 914 'x': 'long long', 915 'y': 'unsigned long long', 916 'z': '...' 917 }; 918 var subs = []; 919 var first = true; 920 function dump(x) { 921 //return; 922 if (x) Module.print(x); 923 Module.print(func); 924 var pre = ''; 925 for (var a = 0; a < i; a++) pre += ' '; 926 Module.print (pre + '^'); 927 } 928 function parseNested() { 929 i++; 930 if (func[i] === 'K') i++; // ignore const 931 var parts = []; 932 while (func[i] !== 'E') { 933 if (func[i] === 'S') { // substitution 934 i++; 935 var next = func.indexOf('_', i); 936 var num = func.substring(i, next) || 0; 937 parts.push(subs[num] || '?'); 938 i = next+1; 939 continue; 940 } 941 if (func[i] === 'C') { // constructor 942 parts.push(parts[parts.length-1]); 943 i += 2; 944 continue; 945 } 946 var size = parseInt(func.substr(i)); 947 var pre = size.toString().length; 948 if (!size || !pre) { i--; break; } // counter i++ below us 949 var curr = func.substr(i + pre, size); 950 parts.push(curr); 951 subs.push(curr); 952 i += pre + size; 953 } 954 i++; // skip E 955 return parts; 956 } 957 function parse(rawList, limit, allowVoid) { // main parser 958 limit = limit || Infinity; 959 var ret = '', list = []; 960 function flushList() { 961 return '(' + list.join(', ') + ')'; 962 } 963 var name; 964 if (func[i] === 'N') { 965 // namespaced N-E 966 name = parseNested().join('::'); 967 limit--; 968 if (limit === 0) return rawList ? [name] : name; 969 } else { 970 // not namespaced 971 if (func[i] === 'K' || (first && func[i] === 'L')) i++; // ignore const and first 'L' 972 var size = parseInt(func.substr(i)); 973 if (size) { 974 var pre = size.toString().length; 975 name = func.substr(i + pre, size); 976 i += pre + size; 977 } 978 } 979 first = false; 980 if (func[i] === 'I') { 981 i++; 982 var iList = parse(true); 983 var iRet = parse(true, 1, true); 984 ret += iRet[0] + ' ' + name + '<' + iList.join(', ') + '>'; 985 } else { 986 ret = name; 987 } 988 paramLoop: while (i < func.length && limit-- > 0) { 989 //dump('paramLoop'); 990 var c = func[i++]; 991 if (c in basicTypes) { 992 list.push(basicTypes[c]); 993 } else { 994 switch (c) { 995 case 'P': list.push(parse(true, 1, true)[0] + '*'); break; // pointer 996 case 'R': list.push(parse(true, 1, true)[0] + '&'); break; // reference 997 case 'L': { // literal 998 i++; // skip basic type 999 var end = func.indexOf('E', i); 1000 var size = end - i; 1001 list.push(func.substr(i, size)); 1002 i += size + 2; // size + 'EE' 1003 break; 1004 } 1005 case 'A': { // array 1006 var size = parseInt(func.substr(i)); 1007 i += size.toString().length; 1008 if (func[i] !== '_') throw '?'; 1009 i++; // skip _ 1010 list.push(parse(true, 1, true)[0] + ' [' + size + ']'); 1011 break; 1012 } 1013 case 'E': break paramLoop; 1014 default: ret += '?' + c; break paramLoop; 1015 } 1016 } 1017 } 1018 if (!allowVoid && list.length === 1 && list[0] === 'void') list = []; // avoid (void) 1019 if (rawList) { 1020 if (ret) { 1021 list.push(ret + '?'); 1022 } 1023 return list; 1024 } else { 1025 return ret + flushList(); 1026 } 1027 } 1028 try { 1029 // Special-case the entry point, since its name differs from other name mangling. 1030 if (func == 'Object._main' || func == '_main') { 1031 return 'main()'; 1032 } 1033 if (typeof func === 'number') func = Pointer_stringify(func); 1034 if (func[0] !== '_') return func; 1035 if (func[1] !== '_') return func; // C function 1036 if (func[2] !== 'Z') return func; 1037 switch (func[3]) { 1038 case 'n': return 'operator new()'; 1039 case 'd': return 'operator delete()'; 1040 } 1041 return parse(); 1042 } catch(e) { 1043 return func; 1044 } 1045} 1046 1047function demangleAll(text) { 1048 return text.replace(/__Z[\w\d_]+/g, function(x) { var y = demangle(x); return x === y ? x : (x + ' [' + y + ']') }); 1049} 1050 1051function stackTrace() { 1052 var stack = new Error().stack; 1053 return stack ? demangleAll(stack) : '(no stack trace available)'; // Stack trace is not available at least on IE10 and Safari 6. 1054} 1055 1056// Memory management 1057 1058var PAGE_SIZE = 4096; 1059function alignMemoryPage(x) { 1060 return (x+4095)&-4096; 1061} 1062 1063var HEAP; 1064var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; 1065 1066var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area 1067var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area 1068var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk 1069 1070function enlargeMemory() { 1071 abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.'); 1072} 1073 1074var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880; 1075var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 134217728; 1076var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152; 1077 1078var totalMemory = 4096; 1079while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) { 1080 if (totalMemory < 16*1024*1024) { 1081 totalMemory *= 2; 1082 } else { 1083 totalMemory += 16*1024*1024 1084 } 1085} 1086if (totalMemory !== TOTAL_MEMORY) { 1087 Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be more reasonable'); 1088 TOTAL_MEMORY = totalMemory; 1089} 1090 1091// Initialize the runtime's memory 1092// check for full engine support (use string 'subarray' to avoid closure compiler confusion) 1093assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']), 1094 'JS engine does not provide full typed array support'); 1095 1096var buffer = new ArrayBuffer(TOTAL_MEMORY); 1097HEAP8 = new Int8Array(buffer); 1098HEAP16 = new Int16Array(buffer); 1099HEAP32 = new Int32Array(buffer); 1100HEAPU8 = new Uint8Array(buffer); 1101HEAPU16 = new Uint16Array(buffer); 1102HEAPU32 = new Uint32Array(buffer); 1103HEAPF32 = new Float32Array(buffer); 1104HEAPF64 = new Float64Array(buffer); 1105 1106// Endianness check (note: assumes compiler arch was little-endian) 1107HEAP32[0] = 255; 1108assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system'); 1109 1110Module['HEAP'] = HEAP; 1111Module['HEAP8'] = HEAP8; 1112Module['HEAP16'] = HEAP16; 1113Module['HEAP32'] = HEAP32; 1114Module['HEAPU8'] = HEAPU8; 1115Module['HEAPU16'] = HEAPU16; 1116Module['HEAPU32'] = HEAPU32; 1117Module['HEAPF32'] = HEAPF32; 1118Module['HEAPF64'] = HEAPF64; 1119 1120function callRuntimeCallbacks(callbacks) { 1121 while(callbacks.length > 0) { 1122 var callback = callbacks.shift(); 1123 if (typeof callback == 'function') { 1124 callback(); 1125 continue; 1126 } 1127 var func = callback.func; 1128 if (typeof func === 'number') { 1129 if (callback.arg === undefined) { 1130 Runtime.dynCall('v', func); 1131 } else { 1132 Runtime.dynCall('vi', func, [callback.arg]); 1133 } 1134 } else { 1135 func(callback.arg === undefined ? null : callback.arg); 1136 } 1137 } 1138} 1139 1140var __ATPRERUN__ = []; // functions called before the runtime is initialized 1141var __ATINIT__ = []; // functions called during startup 1142var __ATMAIN__ = []; // functions called when main() is to be run 1143var __ATEXIT__ = []; // functions called during shutdown 1144var __ATPOSTRUN__ = []; // functions called after the runtime has exited 1145 1146var runtimeInitialized = false; 1147 1148function preRun() { 1149 // compatibility - merge in anything from Module['preRun'] at this time 1150 if (Module['preRun']) { 1151 if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; 1152 while (Module['preRun'].length) { 1153 addOnPreRun(Module['preRun'].shift()); 1154 } 1155 } 1156 callRuntimeCallbacks(__ATPRERUN__); 1157} 1158 1159function ensureInitRuntime() { 1160 if (runtimeInitialized) return; 1161 runtimeInitialized = true; 1162 callRuntimeCallbacks(__ATINIT__); 1163} 1164 1165function preMain() { 1166 callRuntimeCallbacks(__ATMAIN__); 1167} 1168 1169function exitRuntime() { 1170 callRuntimeCallbacks(__ATEXIT__); 1171} 1172 1173function postRun() { 1174 // compatibility - merge in anything from Module['postRun'] at this time 1175 if (Module['postRun']) { 1176 if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; 1177 while (Module['postRun'].length) { 1178 addOnPostRun(Module['postRun'].shift()); 1179 } 1180 } 1181 callRuntimeCallbacks(__ATPOSTRUN__); 1182} 1183 1184function addOnPreRun(cb) { 1185 __ATPRERUN__.unshift(cb); 1186} 1187Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun; 1188 1189function addOnInit(cb) { 1190 __ATINIT__.unshift(cb); 1191} 1192Module['addOnInit'] = Module.addOnInit = addOnInit; 1193 1194function addOnPreMain(cb) { 1195 __ATMAIN__.unshift(cb); 1196} 1197Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain; 1198 1199function addOnExit(cb) { 1200 __ATEXIT__.unshift(cb); 1201} 1202Module['addOnExit'] = Module.addOnExit = addOnExit; 1203 1204function addOnPostRun(cb) { 1205 __ATPOSTRUN__.unshift(cb); 1206} 1207Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun; 1208 1209// Tools 1210 1211// This processes a JS string into a C-line array of numbers, 0-terminated. 1212// For LLVM-originating strings, see parser.js:parseLLVMString function 1213function intArrayFromString(stringy, dontAddNull, length /* optional */) { 1214 var ret = (new Runtime.UTF8Processor()).processJSString(stringy); 1215 if (length) { 1216 ret.length = length; 1217 } 1218 if (!dontAddNull) { 1219 ret.push(0); 1220 } 1221 return ret; 1222} 1223Module['intArrayFromString'] = intArrayFromString; 1224 1225function intArrayToString(array) { 1226 var ret = []; 1227 for (var i = 0; i < array.length; i++) { 1228 var chr = array[i]; 1229 if (chr > 0xFF) { 1230 chr &= 0xFF; 1231 } 1232 ret.push(String.fromCharCode(chr)); 1233 } 1234 return ret.join(''); 1235} 1236Module['intArrayToString'] = intArrayToString; 1237 1238// Write a Javascript array to somewhere in the heap 1239function writeStringToMemory(string, buffer, dontAddNull) { 1240 var array = intArrayFromString(string, dontAddNull); 1241 var i = 0; 1242 while (i < array.length) { 1243 var chr = array[i]; 1244 HEAP8[(((buffer)+(i))|0)]=chr; 1245 i = i + 1; 1246 } 1247} 1248Module['writeStringToMemory'] = writeStringToMemory; 1249 1250function writeArrayToMemory(array, buffer) { 1251 for (var i = 0; i < array.length; i++) { 1252 HEAP8[(((buffer)+(i))|0)]=array[i]; 1253 } 1254} 1255Module['writeArrayToMemory'] = writeArrayToMemory; 1256 1257function writeAsciiToMemory(str, buffer, dontAddNull) { 1258 for (var i = 0; i < str.length; i++) { 1259 HEAP8[(((buffer)+(i))|0)]=str.charCodeAt(i); 1260 } 1261 if (!dontAddNull) HEAP8[(((buffer)+(str.length))|0)]=0; 1262} 1263Module['writeAsciiToMemory'] = writeAsciiToMemory; 1264 1265function unSign(value, bits, ignore) { 1266 if (value >= 0) { 1267 return value; 1268 } 1269 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 1270 : Math.pow(2, bits) + value; 1271} 1272function reSign(value, bits, ignore) { 1273 if (value <= 0) { 1274 return value; 1275 } 1276 var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32 1277 : Math.pow(2, bits-1); 1278 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 1279 // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors 1280 // TODO: In i64 mode 1, resign the two parts separately and safely 1281 value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts 1282 } 1283 return value; 1284} 1285 1286// check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 ) 1287if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) { 1288 var ah = a >>> 16; 1289 var al = a & 0xffff; 1290 var bh = b >>> 16; 1291 var bl = b & 0xffff; 1292 return (al*bl + ((ah*bl + al*bh) << 16))|0; 1293}; 1294Math.imul = Math['imul']; 1295 1296 1297var Math_abs = Math.abs; 1298var Math_cos = Math.cos; 1299var Math_sin = Math.sin; 1300var Math_tan = Math.tan; 1301var Math_acos = Math.acos; 1302var Math_asin = Math.asin; 1303var Math_atan = Math.atan; 1304var Math_atan2 = Math.atan2; 1305var Math_exp = Math.exp; 1306var Math_log = Math.log; 1307var Math_sqrt = Math.sqrt; 1308var Math_ceil = Math.ceil; 1309var Math_floor = Math.floor; 1310var Math_pow = Math.pow; 1311var Math_imul = Math.imul; 1312var Math_fround = Math.fround; 1313var Math_min = Math.min; 1314 1315// A counter of dependencies for calling run(). If we need to 1316// do asynchronous work before running, increment this and 1317// decrement it. Incrementing must happen in a place like 1318// PRE_RUN_ADDITIONS (used by emcc to add file preloading). 1319// Note that you can add dependencies in preRun, even though 1320// it happens right before run - run will be postponed until 1321// the dependencies are met. 1322var runDependencies = 0; 1323var runDependencyWatcher = null; 1324var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled 1325 1326function addRunDependency(id) { 1327 runDependencies++; 1328 if (Module['monitorRunDependencies']) { 1329 Module['monitorRunDependencies'](runDependencies); 1330 } 1331} 1332Module['addRunDependency'] = addRunDependency; 1333function removeRunDependency(id) { 1334 runDependencies--; 1335 if (Module['monitorRunDependencies']) { 1336 Module['monitorRunDependencies'](runDependencies); 1337 } 1338 if (runDependencies == 0) { 1339 if (runDependencyWatcher !== null) { 1340 clearInterval(runDependencyWatcher); 1341 runDependencyWatcher = null; 1342 } 1343 if (dependenciesFulfilled) { 1344 var callback = dependenciesFulfilled; 1345 dependenciesFulfilled = null; 1346 callback(); // can add another dependenciesFulfilled 1347 } 1348 } 1349} 1350Module['removeRunDependency'] = removeRunDependency; 1351 1352Module["preloadedImages"] = {}; // maps url to image data 1353Module["preloadedAudios"] = {}; // maps url to audio data 1354 1355 1356var memoryInitializer = null; 1357 1358// === Body === 1359 1360 1361 1362 1363 1364STATIC_BASE = 8; 1365 1366STATICTOP = STATIC_BASE + Runtime.alignMemory(14963); 1367/* global initializers */ __ATINIT__.push(); 1368 1369 1370/* memory initializer */ allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,105,122,101,115,58,32,37,100,44,37,100,10,0,0,0,100,101,99,111,109,112,114,101,115,115,101,100,83,105,122,101,32,61,61,32,115,105,122,101,0,0,0,0,0,0,0,0,47,116,109,112,47,101,109,115,99,114,105,112,116,101,110,95,116,101,109,112,47,122,108,105,98,46,99,0,0,0,0,0,100,111,105,116,0,0,0,0,115,116,114,99,109,112,40,98,117,102,102,101,114,44,32,98,117,102,102,101,114,51,41,32,61,61,32,48,0,0,0,0,101,114,114,111,114,58,32,37,100,92,110,0,0,0,0,0,111,107,46,0,0,0,0,0,49,46,50,46,53,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,4,0,8,0,4,0,2,0,0,0,4,0,5,0,16,0,8,0,2,0,0,0,4,0,6,0,32,0,32,0,2,0,0,0,4,0,4,0,16,0,16,0,3,0,0,0,8,0,16,0,32,0,32,0,3,0,0,0,8,0,16,0,128,0,128,0,3,0,0,0,8,0,32,0,128,0,0,1,3,0,0,0,32,0,128,0,2,1,0,4,3,0,0,0,32,0,2,1,2,1,0,16,3,0,0,0,0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,112,4,0,0,104,9,0,0,1,1,0,0,30,1,0,0,15,0,0,0,0,0,0,0,240,8,0,0,88,10,0,0,0,0,0,0,30,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,96,11,0,0,0,0,0,0,19,0,0,0,7,0,0,0,0,0,0,0,12,0,8,0,140,0,8,0,76,0,8,0,204,0,8,0,44,0,8,0,172,0,8,0,108,0,8,0,236,0,8,0,28,0,8,0,156,0,8,0,92,0,8,0,220,0,8,0,60,0,8,0,188,0,8,0,124,0,8,0,252,0,8,0,2,0,8,0,130,0,8,0,66,0,8,0,194,0,8,0,34,0,8,0,162,0,8,0,98,0,8,0,226,0,8,0,18,0,8,0,146,0,8,0,82,0,8,0,210,0,8,0,50,0,8,0,178,0,8,0,114,0,8,0,242,0,8,0,10,0,8,0,138,0,8,0,74,0,8,0,202,0,8,0,42,0,8,0,170,0,8,0,106,0,8,0,234,0,8,0,26,0,8,0,154,0,8,0,90,0,8,0,218,0,8,0,58,0,8,0,186,0,8,0,122,0,8,0,250,0,8,0,6,0,8,0,134,0,8,0,70,0,8,0,198,0,8,0,38,0,8,0,166,0,8,0,102,0,8,0,230,0,8,0,22,0,8,0,150,0,8,0,86,0,8,0,214,0,8,0,54,0,8,0,182,0,8,0,118,0,8,0,246,0,8,0,14,0,8,0,142,0,8,0,78,0,8,0,206,0,8,0,46,0,8,0,174,0,8,0,110,0,8,0,238,0,8,0,30,0,8,0,158,0,8,0,94,0,8,0,222,0,8,0,62,0,8,0,190,0,8,0,126,0,8,0,254,0,8,0,1,0,8,0,129,0,8,0,65,0,8,0,193,0,8,0,33,0,8,0,161,0,8,0,97,0,8,0,225,0,8,0,17,0,8,0,145,0,8,0,81,0,8,0,209,0,8,0,49,0,8,0,177,0,8,0,113,0,8,0,241,0,8,0,9,0,8,0,137,0,8,0,73,0,8,0,201,0,8,0,41,0,8,0,169,0,8,0,105,0,8,0,233,0,8,0,25,0,8,0,153,0,8,0,89,0,8,0,217,0,8,0,57,0,8,0,185,0,8,0,121,0,8,0,249,0,8,0,5,0,8,0,133,0,8,0,69,0,8,0,197,0,8,0,37,0,8,0,165,0,8,0,101,0,8,0,229,0,8,0,21,0,8,0,149,0,8,0,85,0,8,0,213,0,8,0,53,0,8,0,181,0,8,0,117,0,8,0,245,0,8,0,13,0,8,0,141,0,8,0,77,0,8,0,205,0,8,0,45,0,8,0,173,0,8,0,109,0,8,0,237,0,8,0,29,0,8,0,157,0,8,0,93,0,8,0,221,0,8,0,61,0,8,0,189,0,8,0,125,0,8,0,253,0,8,0,19,0,9,0,19,1,9,0,147,0,9,0,147,1,9,0,83,0,9,0,83,1,9,0,211,0,9,0,211,1,9,0,51,0,9,0,51,1,9,0,179,0,9,0,179,1,9,0,115,0,9,0,115,1,9,0,243,0,9,0,243,1,9,0,11,0,9,0,11,1,9,0,139,0,9,0,139,1,9,0,75,0,9,0,75,1,9,0,203,0,9,0,203,1,9,0,43,0,9,0,43,1,9,0,171,0,9,0,171,1,9,0,107,0,9,0,107,1,9,0,235,0,9,0,235,1,9,0,27,0,9,0,27,1,9,0,155,0,9,0,155,1,9,0,91,0,9,0,91,1,9,0,219,0,9,0,219,1,9,0,59,0,9,0,59,1,9,0,187,0,9,0,187,1,9,0,123,0,9,0,123,1,9,0,251,0,9,0,251,1,9,0,7,0,9,0,7,1,9,0,135,0,9,0,135,1,9,0,71,0,9,0,71,1,9,0,199,0,9,0,199,1,9,0,39,0,9,0,39,1,9,0,167,0,9,0,167,1,9,0,103,0,9,0,103,1,9,0,231,0,9,0,231,1,9,0,23,0,9,0,23,1,9,0,151,0,9,0,151,1,9,0,87,0,9,0,87,1,9,0,215,0,9,0,215,1,9,0,55,0,9,0,55,1,9,0,183,0,9,0,183,1,9,0,119,0,9,0,119,1,9,0,247,0,9,0,247,1,9,0,15,0,9,0,15,1,9,0,143,0,9,0,143,1,9,0,79,0,9,0,79,1,9,0,207,0,9,0,207,1,9,0,47,0,9,0,47,1,9,0,175,0,9,0,175,1,9,0,111,0,9,0,111,1,9,0,239,0,9,0,239,1,9,0,31,0,9,0,31,1,9,0,159,0,9,0,159,1,9,0,95,0,9,0,95,1,9,0,223,0,9,0,223,1,9,0,63,0,9,0,63,1,9,0,191,0,9,0,191,1,9,0,127,0,9,0,127,1,9,0,255,0,9,0,255,1,9,0,0,0,7,0,64,0,7,0,32,0,7,0,96,0,7,0,16,0,7,0,80,0,7,0,48,0,7,0,112,0,7,0,8,0,7,0,72,0,7,0,40,0,7,0,104,0,7,0,24,0,7,0,88,0,7,0,56,0,7,0,120,0,7,0,4,0,7,0,68,0,7,0,36,0,7,0,100,0,7,0,20,0,7,0,84,0,7,0,52,0,7,0,116,0,7,0,3,0,8,0,131,0,8,0,67,0,8,0,195,0,8,0,35,0,8,0,163,0,8,0,99,0,8,0,227,0,8,0,0,0,5,0,16,0,5,0,8,0,5,0,24,0,5,0,4,0,5,0,20,0,5,0,12,0,5,0,28,0,5,0,2,0,5,0,18,0,5,0,10,0,5,0,26,0,5,0,6,0,5,0,22,0,5,0,14,0,5,0,30,0,5,0,1,0,5,0,17,0,5,0,9,0,5,0,25,0,5,0,5,0,5,0,21,0,5,0,13,0,5,0,29,0,5,0,3,0,5,0,19,0,5,0,11,0,5,0,27,0,5,0,7,0,5,0,23,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,10,0,0,0,12,0,0,0,14,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,28,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,160,0,0,0,192,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,8,0,0,0,9,0,0,0,9,0,0,0,10,0,0,0,10,0,0,0,11,0,0,0,11,0,0,0,12,0,0,0,12,0,0,0,13,0,0,0,13,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,6,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,48,0,0,0,64,0,0,0,96,0,0,0,128,0,0,0,192,0,0,0,0,1,0,0,128,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,6,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,48,0,0,0,64,0,0,0,96,0,0,16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,7,0,0,0,0,0,0,0,49,46,50,46,53,0,0,0,110,101,101,100,32,100,105,99,116,105,111,110,97,114,121,0,115,116,114,101,97,109,32,101,110,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,102,105,108,101,32,101,114,114,111,114,0,0,0,0,0,0,115,116,114,101,97,109,32,101,114,114,111,114,0,0,0,0,100,97,116,97,32,101,114,114,111,114,0,0,0,0,0,0,105,110,115,117,102,102,105,99,105,101,110,116,32,109,101,109,111,114,121,0,0,0,0,0,98,117,102,102,101,114,32,101,114,114,111,114,0,0,0,0,105,110,99,111,109,112,97,116,105,98,108,101,32,118,101,114,115,105,111,110,0,0,0,0,184,11,0,0,200,11,0,0,216,11,0,0,224,11,0,0,240,11,0,0,0,12,0,0,16,12,0,0,40,12,0,0,56,12,0,0,216,11,0,0,0,0,0,0,150,48,7,119,44,97,14,238,186,81,9,153,25,196,109,7,143,244,106,112,53,165,99,233,163,149,100,158,50,136,219,14,164,184,220,121,30,233,213,224,136,217,210,151,43,76,182,9,189,124,177,126,7,45,184,231,145,29,191,144,100,16,183,29,242,32,176,106,72,113,185,243,222,65,190,132,125,212,218,26,235,228,221,109,81,181,212,244,199,133,211,131,86,152,108,19,192,168,107,100,122,249,98,253,236,201,101,138,79,92,1,20,217,108,6,99,99,61,15,250,245,13,8,141,200,32,110,59,94,16,105,76,228,65,96,213,114,113,103,162,209,228,3,60,71,212,4,75,253,133,13,210,107,181,10,165,250,168,181,53,108,152,178,66,214,201,187,219,64,249,188,172,227,108,216,50,117,92,223,69,207,13,214,220,89,61,209,171,172,48,217,38,58,0,222,81,128,81,215,200,22,97,208,191,181,244,180,33,35,196,179,86,153,149,186,207,15,165,189,184,158,184,2,40,8,136,5,95,178,217,12,198,36,233,11,177,135,124,111,47,17,76,104,88,171,29,97,193,61,45,102,182,144,65,220,118,6,113,219,1,188,32,210,152,42,16,213,239,137,133,177,113,31,181,182,6,165,228,191,159,51,212,184,232,162,201,7,120,52,249,0,15,142,168,9,150,24,152,14,225,187,13,106,127,45,61,109,8,151,108,100,145,1,92,99,230,244,81,107,107,98,97,108,28,216,48,101,133,78,0,98,242,237,149,6,108,123,165,1,27,193,244,8,130,87,196,15,245,198,217,176,101,80,233,183,18,234,184,190,139,124,136,185,252,223,29,221,98,73,45,218,21,243,124,211,140,101,76,212,251,88,97,178,77,206,81,181,58,116,0,188,163,226,48,187,212,65,165,223,74,215,149,216,61,109,196,209,164,251,244,214,211,106,233,105,67,252,217,110,52,70,136,103,173,208,184,96,218,115,45,4,68,229,29,3,51,95,76,10,170,201,124,13,221,60,113,5,80,170,65,2,39,16,16,11,190,134,32,12,201,37,181,104,87,179,133,111,32,9,212,102,185,159,228,97,206,14,249,222,94,152,201,217,41,34,152,208,176,180,168,215,199,23,61,179,89,129,13,180,46,59,92,189,183,173,108,186,192,32,131,184,237,182,179,191,154,12,226,182,3,154,210,177,116,57,71,213,234,175,119,210,157,21,38,219,4,131,22,220,115,18,11,99,227,132,59,100,148,62,106,109,13,168,90,106,122,11,207,14,228,157,255,9,147,39,174,0,10,177,158,7,125,68,147,15,240,210,163,8,135,104,242,1,30,254,194,6,105,93,87,98,247,203,103,101,128,113,54,108,25,231,6,107,110,118,27,212,254,224,43,211,137,90,122,218,16,204,74,221,103,111,223,185,249,249,239,190,142,67,190,183,23,213,142,176,96,232,163,214,214,126,147,209,161,196,194,216,56,82,242,223,79,241,103,187,209,103,87,188,166,221,6,181,63,75,54,178,72,218,43,13,216,76,27,10,175,246,74,3,54,96,122,4,65,195,239,96,223,85,223,103,168,239,142,110,49,121,190,105,70,140,179,97,203,26,131,102,188,160,210,111,37,54,226,104,82,149,119,12,204,3,71,11,187,185,22,2,34,47,38,5,85,190,59,186,197,40,11,189,178,146,90,180,43,4,106,179,92,167,255,215,194,49,207,208,181,139,158,217,44,29,174,222,91,176,194,100,155,38,242,99,236,156,163,106,117,10,147,109,2,169,6,9,156,63,54,14,235,133,103,7,114,19,87,0,5,130,74,191,149,20,122,184,226,174,43,177,123,56,27,182,12,155,142,210,146,13,190,213,229,183,239,220,124,33,223,219,11,212,210,211,134,66,226,212,241,248,179,221,104,110,131,218,31,205,22,190,129,91,38,185,246,225,119,176,111,119,71,183,24,230,90,8,136,112,106,15,255,202,59,6,102,92,11,1,17,255,158,101,143,105,174,98,248,211,255,107,97,69,207,108,22,120,226,10,160,238,210,13,215,84,131,4,78,194,179,3,57,97,38,103,167,247,22,96,208,77,71,105,73,219,119,110,62,74,106,209,174,220,90,214,217,102,11,223,64,240,59,216,55,83,174,188,169,197,158,187,222,127,207,178,71,233,255,181,48,28,242,189,189,138,194,186,202,48,147,179,83,166,163,180,36,5,54,208,186,147,6,215,205,41,87,222,84,191,103,217,35,46,122,102,179,184,74,97,196,2,27,104,93,148,43,111,42,55,190,11,180,161,142,12,195,27,223,5,90,141,239,2,45,0,0,0,0,65,49,27,25,130,98,54,50,195,83,45,43,4,197,108,100,69,244,119,125,134,167,90,86,199,150,65,79,8,138,217,200,73,187,194,209,138,232,239,250,203,217,244,227,12,79,181,172,77,126,174,181,142,45,131,158,207,28,152,135,81,18,194,74,16,35,217,83,211,112,244,120,146,65,239,97,85,215,174,46,20,230,181,55,215,181,152,28,150,132,131,5,89,152,27,130,24,169,0,155,219,250,45,176,154,203,54,169,93,93,119,230,28,108,108,255,223,63,65,212,158,14,90,205,162,36,132,149,227,21,159,140,32,70,178,167,97,119,169,190,166,225,232,241,231,208,243,232,36,131,222,195,101,178,197,218,170,174,93,93,235,159,70,68,40,204,107,111,105,253,112,118,174,107,49,57,239,90,42,32,44,9,7,11,109,56,28,18,243,54,70,223,178,7,93,198,113,84,112,237,48,101,107,244,247,243,42,187,182,194,49,162,117,145,28,137,52,160,7,144,251,188,159,23,186,141,132,14,121,222,169,37,56,239,178,60,255,121,243,115,190,72,232,106,125,27,197,65,60,42,222,88,5,79,121,240,68,126,98,233,135,45,79,194,198,28,84,219,1,138,21,148,64,187,14,141,131,232,35,166,194,217,56,191,13,197,160,56,76,244,187,33,143,167,150,10,206,150,141,19,9,0,204,92,72,49,215,69,139,98,250,110,202,83,225,119,84,93,187,186,21,108,160,163,214,63,141,136,151,14,150,145,80,152,215,222,17,169,204,199,210,250,225,236,147,203,250,245,92,215,98,114,29,230,121,107,222,181,84,64,159,132,79,89,88,18,14,22,25,35,21,15,218,112,56,36,155,65,35,61,167,107,253,101,230,90,230,124,37,9,203,87,100,56,208,78,163,174,145,1,226,159,138,24,33,204,167,51,96,253,188,42,175,225,36,173,238,208,63,180,45,131,18,159,108,178,9,134,171,36,72,201,234,21,83,208,41,70,126,251,104,119,101,226,246,121,63,47,183,72,36,54,116,27,9,29,53,42,18,4,242,188,83,75,179,141,72,82,112,222,101,121,49,239,126,96,254,243,230,231,191,194,253,254,124,145,208,213,61,160,203,204,250,54,138,131,187,7,145,154,120,84,188,177,57,101,167,168,75,152,131,59,10,169,152,34,201,250,181,9,136,203,174,16,79,93,239,95,14,108,244,70,205,63,217,109,140,14,194,116,67,18,90,243,2,35,65,234,193,112,108,193,128,65,119,216,71,215,54,151,6,230,45,142,197,181,0,165,132,132,27,188,26,138,65,113,91,187,90,104,152,232,119,67,217,217,108,90,30,79,45,21,95,126,54,12,156,45,27,39,221,28,0,62,18,0,152,185,83,49,131,160,144,98,174,139,209,83,181,146,22,197,244,221,87,244,239,196,148,167,194,239,213,150,217,246,233,188,7,174,168,141,28,183,107,222,49,156,42,239,42,133,237,121,107,202,172,72,112,211,111,27,93,248,46,42,70,225,225,54,222,102,160,7,197,127,99,84,232,84,34,101,243,77,229,243,178,2,164,194,169,27,103,145,132,48,38,160,159,41,184,174,197,228,249,159,222,253,58,204,243,214,123,253,232,207,188,107,169,128,253,90,178,153,62,9,159,178,127,56,132,171,176,36,28,44,241,21,7,53,50,70,42,30,115,119,49,7,180,225,112,72,245,208,107,81,54,131,70,122,119,178,93,99,78,215,250,203,15,230,225,210,204,181,204,249,141,132,215,224,74,18,150,175,11,35,141,182,200,112,160,157,137,65,187,132,70,93,35,3,7,108,56,26,196,63,21,49,133,14,14,40,66,152,79,103,3,169,84,126,192,250,121,85,129,203,98,76,31,197,56,129,94,244,35,152,157,167,14,179,220,150,21,170,27,0,84,229,90,49,79,252,153,98,98,215,216,83,121,206,23,79,225,73,86,126,250,80,149,45,215,123,212,28,204,98,19,138,141,45,82,187,150,52,145,232,187,31,208,217,160,6,236,243,126,94,173,194,101,71,110,145,72,108,47,160,83,117,232,54,18,58,169,7,9,35,106,84,36,8,43,101,63,17,228,121,167,150,165,72,188,143,102,27,145,164,39,42,138,189,224,188,203,242,161,141,208,235,98,222,253,192,35,239,230,217,189,225,188,20,252,208,167,13,63,131,138,38,126,178,145,63,185,36,208,112,248,21,203,105,59,70,230,66,122,119,253,91,181,107,101,220,244,90,126,197,55,9,83,238,118,56,72,247,177,174,9,184,240,159,18,161,51,204,63,138,114,253,36,147,0,0,0,0,55,106,194,1,110,212,132,3,89,190,70,2,220,168,9,7,235,194,203,6,178,124,141,4,133,22,79,5,184,81,19,14,143,59,209,15,214,133,151,13,225,239,85,12,100,249,26,9,83,147,216,8,10,45,158,10,61,71,92,11,112,163,38,28,71,201,228,29,30,119,162,31,41,29,96,30,172,11,47,27,155,97,237,26,194,223,171,24,245,181,105,25,200,242,53,18,255,152,247,19,166,38,177,17,145,76,115,16,20,90,60,21,35,48,254,20,122,142,184,22,77,228,122,23,224,70,77,56,215,44,143,57,142,146,201,59,185,248,11,58,60,238,68,63,11,132,134,62,82,58,192,60,101,80,2,61,88,23,94,54,111,125,156,55,54,195,218,53,1,169,24,52,132,191,87,49,179,213,149,48,234,107,211,50,221,1,17,51,144,229,107,36,167,143,169,37,254,49,239,39,201,91,45,38,76,77,98,35,123,39,160,34,34,153,230,32,21,243,36,33,40,180,120,42,31,222,186,43,70,96,252,41,113,10,62,40,244,28,113,45,195,118,179,44,154,200,245,46,173,162,55,47,192,141,154,112,247,231,88,113,174,89,30,115,153,51,220,114,28,37,147,119,43,79,81,118,114,241,23,116,69,155,213,117,120,220,137,126,79,182,75,127,22,8,13,125,33,98,207,124,164,116,128,121,147,30,66,120,202,160,4,122,253,202,198,123,176,46,188,108,135,68,126,109,222,250,56,111,233,144,250,110,108,134,181,107,91,236,119,106,2,82,49,104,53,56,243,105,8,127,175,98,63,21,109,99,102,171,43,97,81,193,233,96,212,215,166,101,227,189,100,100,186,3,34,102,141,105,224,103,32,203,215,72,23,161,21,73,78,31,83,75,121,117,145,74,252,99,222,79,203,9,28,78,146,183,90,76,165,221,152,77,152,154,196,70,175,240,6,71,246,78,64,69,193,36,130,68,68,50,205,65,115,88,15,64,42,230,73,66,29,140,139,67,80,104,241,84,103,2,51,85,62,188,117,87,9,214,183,86,140,192,248,83,187,170,58,82,226,20,124,80,213,126,190,81,232,57,226,90,223,83,32,91,134,237,102,89,177,135,164,88,52,145,235,93,3,251,41,92,90,69,111,94,109,47,173,95,128,27,53,225,183,113,247,224,238,207,177,226,217,165,115,227,92,179,60,230,107,217,254,231,50,103,184,229,5,13,122,228,56,74,38,239,15,32,228,238,86,158,162,236,97,244,96,237,228,226,47,232,211,136,237,233,138,54,171,235,189,92,105,234,240,184,19,253,199,210,209,252,158,108,151,254,169,6,85,255,44,16,26,250,27,122,216,251,66,196,158,249,117,174,92,248,72,233,0,243,127,131,194,242,38,61,132,240,17,87,70,241,148,65,9,244,163,43,203,245,250,149,141,247,205,255,79,246,96,93,120,217,87,55,186,216,14,137,252,218,57,227,62,219,188,245,113,222,139,159,179,223,210,33,245,221,229,75,55,220,216,12,107,215,239,102,169,214,182,216,239,212,129,178,45,213,4,164,98,208,51,206,160,209,106,112,230,211,93,26,36,210,16,254,94,197,39,148,156,196,126,42,218,198,73,64,24,199,204,86,87,194,251,60,149,195,162,130,211,193,149,232,17,192,168,175,77,203,159,197,143,202,198,123,201,200,241,17,11,201,116,7,68,204,67,109,134,205,26,211,192,207,45,185,2,206,64,150,175,145,119,252,109,144,46,66,43,146,25,40,233,147,156,62,166,150,171,84,100,151,242,234,34,149,197,128,224,148,248,199,188,159,207,173,126,158,150,19,56,156,161,121,250,157,36,111,181,152,19,5,119,153,74,187,49,155,125,209,243,154,48,53,137,141,7,95,75,140,94,225,13,142,105,139,207,143,236,157,128,138,219,247,66,139,130,73,4,137,181,35,198,136,136,100,154,131,191,14,88,130,230,176,30,128,209,218,220,129,84,204,147,132,99,166,81,133,58,24,23,135,13,114,213,134,160,208,226,169,151,186,32,168,206,4,102,170,249,110,164,171,124,120,235,174,75,18,41,175,18,172,111,173,37,198,173,172,24,129,241,167,47,235,51,166,118,85,117,164,65,63,183,165,196,41,248,160,243,67,58,161,170,253,124,163,157,151,190,162,208,115,196,181,231,25,6,180,190,167,64,182,137,205,130,183,12,219,205,178,59,177,15,179,98,15,73,177,85,101,139,176,104,34,215,187,95,72,21,186,6,246,83,184,49,156,145,185,180,138,222,188,131,224,28,189,218,94,90,191,237,52,152,190,0,0,0,0,101,103,188,184,139,200,9,170,238,175,181,18,87,151,98,143,50,240,222,55,220,95,107,37,185,56,215,157,239,40,180,197,138,79,8,125,100,224,189,111,1,135,1,215,184,191,214,74,221,216,106,242,51,119,223,224,86,16,99,88,159,87,25,80,250,48,165,232,20,159,16,250,113,248,172,66,200,192,123,223,173,167,199,103,67,8,114,117,38,111,206,205,112,127,173,149,21,24,17,45,251,183,164,63,158,208,24,135,39,232,207,26,66,143,115,162,172,32,198,176,201,71,122,8,62,175,50,160,91,200,142,24,181,103,59,10,208,0,135,178,105,56,80,47,12,95,236,151,226,240,89,133,135,151,229,61,209,135,134,101,180,224,58,221,90,79,143,207,63,40,51,119,134,16,228,234,227,119,88,82,13,216,237,64,104,191,81,248,161,248,43,240,196,159,151,72,42,48,34,90,79,87,158,226,246,111,73,127,147,8,245,199,125,167,64,213,24,192,252,109,78,208,159,53,43,183,35,141,197,24,150,159,160,127,42,39,25,71,253,186,124,32,65,2,146,143,244,16,247,232,72,168,61,88,20,155,88,63,168,35,182,144,29,49,211,247,161,137,106,207,118,20,15,168,202,172,225,7,127,190,132,96,195,6,210,112,160,94,183,23,28,230,89,184,169,244,60,223,21,76,133,231,194,209,224,128,126,105,14,47,203,123,107,72,119,195,162,15,13,203,199,104,177,115,41,199,4,97,76,160,184,217,245,152,111,68,144,255,211,252,126,80,102,238,27,55,218,86,77,39,185,14,40,64,5,182,198,239,176,164,163,136,12,28,26,176,219,129,127,215,103,57,145,120,210,43,244,31,110,147,3,247,38,59,102,144,154,131,136,63,47,145,237,88,147,41,84,96,68,180,49,7,248,12,223,168,77,30,186,207,241,166,236,223,146,254,137,184,46,70,103,23,155,84,2,112,39,236,187,72,240,113,222,47,76,201,48,128,249,219,85,231,69,99,156,160,63,107,249,199,131,211,23,104,54,193,114,15,138,121,203,55,93,228,174,80,225,92,64,255,84,78,37,152,232,246,115,136,139,174,22,239,55,22,248,64,130,4,157,39,62,188,36,31,233,33,65,120,85,153,175,215,224,139,202,176,92,51,59,182,89,237,94,209,229,85,176,126,80,71,213,25,236,255,108,33,59,98,9,70,135,218,231,233,50,200,130,142,142,112,212,158,237,40,177,249,81,144,95,86,228,130,58,49,88,58,131,9,143,167,230,110,51,31,8,193,134,13,109,166,58,181,164,225,64,189,193,134,252,5,47,41,73,23,74,78,245,175,243,118,34,50,150,17,158,138,120,190,43,152,29,217,151,32,75,201,244,120,46,174,72,192,192,1,253,210,165,102,65,106,28,94,150,247,121,57,42,79,151,150,159,93,242,241,35,229,5,25,107,77,96,126,215,245,142,209,98,231,235,182,222,95,82,142,9,194,55,233,181,122,217,70,0,104,188,33,188,208,234,49,223,136,143,86,99,48,97,249,214,34,4,158,106,154,189,166,189,7,216,193,1,191,54,110,180,173,83,9,8,21,154,78,114,29,255,41,206,165,17,134,123,183,116,225,199,15,205,217,16,146,168,190,172,42,70,17,25,56,35,118,165,128,117,102,198,216,16,1,122,96,254,174,207,114,155,201,115,202,34,241,164,87,71,150,24,239,169,57,173,253,204,94,17,69,6,238,77,118,99,137,241,206,141,38,68,220,232,65,248,100,81,121,47,249,52,30,147,65,218,177,38,83,191,214,154,235,233,198,249,179,140,161,69,11,98,14,240,25,7,105,76,161,190,81,155,60,219,54,39,132,53,153,146,150,80,254,46,46,153,185,84,38,252,222,232,158,18,113,93,140,119,22,225,52,206,46,54,169,171,73,138,17,69,230,63,3,32,129,131,187,118,145,224,227,19,246,92,91,253,89,233,73,152,62,85,241,33,6,130,108,68,97,62,212,170,206,139,198,207,169,55,126,56,65,127,214,93,38,195,110,179,137,118,124,214,238,202,196,111,214,29,89,10,177,161,225,228,30,20,243,129,121,168,75,215,105,203,19,178,14,119,171,92,161,194,185,57,198,126,1,128,254,169,156,229,153,21,36,11,54,160,54,110,81,28,142,167,22,102,134,194,113,218,62,44,222,111,44,73,185,211,148,240,129,4,9,149,230,184,177,123,73,13,163,30,46,177,27,72,62,210,67,45,89,110,251,195,246,219,233,166,145,103,81,31,169,176,204,122,206,12,116,148,97,185,102,241,6,5,222,0,0,0,0,119,7,48,150,238,14,97,44,153,9,81,186,7,109,196,25,112,106,244,143,233,99,165,53,158,100,149,163,14,219,136,50,121,220,184,164,224,213,233,30,151,210,217,136,9,182,76,43,126,177,124,189,231,184,45,7,144,191,29,145,29,183,16,100,106,176,32,242,243,185,113,72,132,190,65,222,26,218,212,125,109,221,228,235,244,212,181,81,131,211,133,199,19,108,152,86,100,107,168,192,253,98,249,122,138,101,201,236,20,1,92,79,99,6,108,217,250,15,61,99,141,8,13,245,59,110,32,200,76,105,16,94,213,96,65,228,162,103,113,114,60,3,228,209,75,4,212,71,210,13,133,253,165,10,181,107,53,181,168,250,66,178,152,108,219,187,201,214,172,188,249,64,50,216,108,227,69,223,92,117,220,214,13,207,171,209,61,89,38,217,48,172,81,222,0,58,200,215,81,128,191,208,97,22,33,180,244,181,86,179,196,35,207,186,149,153,184,189,165,15,40,2,184,158,95,5,136,8,198,12,217,178,177,11,233,36,47,111,124,135,88,104,76,17,193,97,29,171,182,102,45,61,118,220,65,144,1,219,113,6,152,210,32,188,239,213,16,42,113,177,133,137,6,182,181,31,159,191,228,165,232,184,212,51,120,7,201,162,15,0,249,52,150,9,168,142,225,14,152,24,127,106,13,187,8,109,61,45,145,100,108,151,230,99,92,1,107,107,81,244,28,108,97,98,133,101,48,216,242,98,0,78,108,6,149,237,27,1,165,123,130,8,244,193,245,15,196,87,101,176,217,198,18,183,233,80,139,190,184,234,252,185,136,124,98,221,29,223,21,218,45,73,140,211,124,243,251,212,76,101,77,178,97,88,58,181,81,206,163,188,0,116,212,187,48,226,74,223,165,65,61,216,149,215,164,209,196,109,211,214,244,251,67,105,233,106,52,110,217,252,173,103,136,70,218,96,184,208,68,4,45,115,51,3,29,229,170,10,76,95,221,13,124,201,80,5,113,60,39,2,65,170,190,11,16,16,201,12,32,134,87,104,181,37,32,111,133,179,185,102,212,9,206,97,228,159,94,222,249,14,41,217,201,152,176,208,152,34,199,215,168,180,89,179,61,23,46,180,13,129,183,189,92,59,192,186,108,173,237,184,131,32,154,191,179,182,3,182,226,12,116,177,210,154,234,213,71,57,157,210,119,175,4,219,38,21,115,220,22,131,227,99,11,18,148,100,59,132,13,109,106,62,122,106,90,168,228,14,207,11,147,9,255,157,10,0,174,39,125,7,158,177,240,15,147,68,135,8,163,210,30,1,242,104,105,6,194,254,247,98,87,93,128,101,103,203,25,108,54,113,110,107,6,231,254,212,27,118,137,211,43,224,16,218,122,90,103,221,74,204,249,185,223,111,142,190,239,249,23,183,190,67,96,176,142,213,214,214,163,232,161,209,147,126,56,216,194,196,79,223,242,82,209,187,103,241,166,188,87,103,63,181,6,221,72,178,54,75,216,13,43,218,175,10,27,76,54,3,74,246,65,4,122,96,223,96,239,195,168,103,223,85,49,110,142,239,70,105,190,121,203,97,179,140,188,102,131,26,37,111,210,160,82,104,226,54,204,12,119,149,187,11,71,3,34,2,22,185,85,5,38,47,197,186,59,190,178,189,11,40,43,180,90,146,92,179,106,4,194,215,255,167,181,208,207,49,44,217,158,139,91,222,174,29,155,100,194,176,236,99,242,38,117,106,163,156,2,109,147,10,156,9,6,169,235,14,54,63,114,7,103,133,5,0,87,19,149,191,74,130,226,184,122,20,123,177,43,174,12,182,27,56,146,210,142,155,229,213,190,13,124,220,239,183,11,219,223,33,134,211,210,212,241,212,226,66,104,221,179,248,31,218,131,110,129,190,22,205,246,185,38,91,111,176,119,225,24,183,71,119,136,8,90,230,255,15,106,112,102,6,59,202,17,1,11,92,143,101,158,255,248,98,174,105,97,107,255,211,22,108,207,69,160,10,226,120,215,13,210,238,78,4,131,84,57,3,179,194,167,103,38,97,208,96,22,247,73,105,71,77,62,110,119,219,174,209,106,74,217,214,90,220,64,223,11,102,55,216,59,240,169,188,174,83,222,187,158,197,71,178,207,127,48,181,255,233,189,189,242,28,202,186,194,138,83,179,147,48,36,180,163,166,186,208,54,5,205,215,6,147,84,222,87,41,35,217,103,191,179,102,122,46,196,97,74,184,93,104,27,2,42,111,43,148,180,11,190,55,195,12,142,161,90,5,223,27,45,2,239,141,0,0,0,0,25,27,49,65,50,54,98,130,43,45,83,195,100,108,197,4,125,119,244,69,86,90,167,134,79,65,150,199,200,217,138,8,209,194,187,73,250,239,232,138,227,244,217,203,172,181,79,12,181,174,126,77,158,131,45,142,135,152,28,207,74,194,18,81,83,217,35,16,120,244,112,211,97,239,65,146,46,174,215,85,55,181,230,20,28,152,181,215,5,131,132,150,130,27,152,89,155,0,169,24,176,45,250,219,169,54,203,154,230,119,93,93,255,108,108,28,212,65,63,223,205,90,14,158,149,132,36,162,140,159,21,227,167,178,70,32,190,169,119,97,241,232,225,166,232,243,208,231,195,222,131,36,218,197,178,101,93,93,174,170,68,70,159,235,111,107,204,40,118,112,253,105,57,49,107,174,32,42,90,239,11,7,9,44,18,28,56,109,223,70,54,243,198,93,7,178,237,112,84,113,244,107,101,48,187,42,243,247,162,49,194,182,137,28,145,117,144,7,160,52,23,159,188,251,14,132,141,186,37,169,222,121,60,178,239,56,115,243,121,255,106,232,72,190,65,197,27,125,88,222,42,60,240,121,79,5,233,98,126,68,194,79,45,135,219,84,28,198,148,21,138,1,141,14,187,64,166,35,232,131,191,56,217,194,56,160,197,13,33,187,244,76,10,150,167,143,19,141,150,206,92,204,0,9,69,215,49,72,110,250,98,139,119,225,83,202,186,187,93,84,163,160,108,21,136,141,63,214,145,150,14,151,222,215,152,80,199,204,169,17,236,225,250,210,245,250,203,147,114,98,215,92,107,121,230,29,64,84,181,222,89,79,132,159,22,14,18,88,15,21,35,25,36,56,112,218,61,35,65,155,101,253,107,167,124,230,90,230,87,203,9,37,78,208,56,100,1,145,174,163,24,138,159,226,51,167,204,33,42,188,253,96,173,36,225,175,180,63,208,238,159,18,131,45,134,9,178,108,201,72,36,171,208,83,21,234,251,126,70,41,226,101,119,104,47,63,121,246,54,36,72,183,29,9,27,116,4,18,42,53,75,83,188,242,82,72,141,179,121,101,222,112,96,126,239,49,231,230,243,254,254,253,194,191,213,208,145,124,204,203,160,61,131,138,54,250,154,145,7,187,177,188,84,120,168,167,101,57,59,131,152,75,34,152,169,10,9,181,250,201,16,174,203,136,95,239,93,79,70,244,108,14,109,217,63,205,116,194,14,140,243,90,18,67,234,65,35,2,193,108,112,193,216,119,65,128,151,54,215,71,142,45,230,6,165,0,181,197,188,27,132,132,113,65,138,26,104,90,187,91,67,119,232,152,90,108,217,217,21,45,79,30,12,54,126,95,39,27,45,156,62,0,28,221,185,152,0,18,160,131,49,83,139,174,98,144,146,181,83,209,221,244,197,22,196,239,244,87,239,194,167,148,246,217,150,213,174,7,188,233,183,28,141,168,156,49,222,107,133,42,239,42,202,107,121,237,211,112,72,172,248,93,27,111,225,70,42,46,102,222,54,225,127,197,7,160,84,232,84,99,77,243,101,34,2,178,243,229,27,169,194,164,48,132,145,103,41,159,160,38,228,197,174,184,253,222,159,249,214,243,204,58,207,232,253,123,128,169,107,188,153,178,90,253,178,159,9,62,171,132,56,127,44,28,36,176,53,7,21,241,30,42,70,50,7,49,119,115,72,112,225,180,81,107,208,245,122,70,131,54,99,93,178,119,203,250,215,78,210,225,230,15,249,204,181,204,224,215,132,141,175,150,18,74,182,141,35,11,157,160,112,200,132,187,65,137,3,35,93,70,26,56,108,7,49,21,63,196,40,14,14,133,103,79,152,66,126,84,169,3,85,121,250,192,76,98,203,129,129,56,197,31,152,35,244,94,179,14,167,157,170,21,150,220,229,84,0,27,252,79,49,90,215,98,98,153,206,121,83,216,73,225,79,23,80,250,126,86,123,215,45,149,98,204,28,212,45,141,138,19,52,150,187,82,31,187,232,145,6,160,217,208,94,126,243,236,71,101,194,173,108,72,145,110,117,83,160,47,58,18,54,232,35,9,7,169,8,36,84,106,17,63,101,43,150,167,121,228,143,188,72,165,164,145,27,102,189,138,42,39,242,203,188,224,235,208,141,161,192,253,222,98,217,230,239,35,20,188,225,189,13,167,208,252,38,138,131,63,63,145,178,126,112,208,36,185,105,203,21,248,66,230,70,59,91,253,119,122,220,101,107,181,197,126,90,244,238,83,9,55,247,72,56,118,184,9,174,177,161,18,159,240,138,63,204,51,147,36,253,114,0,0,0,0,1,194,106,55,3,132,212,110,2,70,190,89,7,9,168,220,6,203,194,235,4,141,124,178,5,79,22,133,14,19,81,184,15,209,59,143,13,151,133,214,12,85,239,225,9,26,249,100,8,216,147,83,10,158,45,10,11,92,71,61,28,38,163,112,29,228,201,71,31,162,119,30,30,96,29,41,27,47,11,172,26,237,97,155,24,171,223,194,25,105,181,245,18,53,242,200,19,247,152,255,17,177,38,166,16,115,76,145,21,60,90,20,20,254,48,35,22,184,142,122,23,122,228,77,56,77,70,224,57,143,44,215,59,201,146,142,58,11,248,185,63,68,238,60,62,134,132,11,60,192,58,82,61,2,80,101,54,94,23,88,55,156,125,111,53,218,195,54,52,24,169,1,49,87,191,132,48,149,213,179,50,211,107,234,51,17,1,221,36,107,229,144,37,169,143,167,39,239,49,254,38,45,91,201,35,98,77,76,34,160,39,123,32,230,153,34,33,36,243,21,42,120,180,40,43,186,222,31,41,252,96,70,40,62,10,113,45,113,28,244,44,179,118,195,46,245,200,154,47,55,162,173,112,154,141,192,113,88,231,247,115,30,89,174,114,220,51,153,119,147,37,28,118,81,79,43,116,23,241,114,117,213,155,69,126,137,220,120,127,75,182,79,125,13,8,22,124,207,98,33,121,128,116,164,120,66,30,147,122,4,160,202,123,198,202,253,108,188,46,176,109,126,68,135,111,56,250,222,110,250,144,233,107,181,134,108,106,119,236,91,104,49,82,2,105,243,56,53,98,175,127,8,99,109,21,63,97,43,171,102,96,233,193,81,101,166,215,212,100,100,189,227,102,34,3,186,103,224,105,141,72,215,203,32,73,21,161,23,75,83,31,78,74,145,117,121,79,222,99,252,78,28,9,203,76,90,183,146,77,152,221,165,70,196,154,152,71,6,240,175,69,64,78,246,68,130,36,193,65,205,50,68,64,15,88,115,66,73,230,42,67,139,140,29,84,241,104,80,85,51,2,103,87,117,188,62,86,183,214,9,83,248,192,140,82,58,170,187,80,124,20,226,81,190,126,213,90,226,57,232,91,32,83,223,89,102,237,134,88,164,135,177,93,235,145,52,92,41,251,3,94,111,69,90,95,173,47,109,225,53,27,128,224,247,113,183,226,177,207,238,227,115,165,217,230,60,179,92,231,254,217,107,229,184,103,50,228,122,13,5,239,38,74,56,238,228,32,15,236,162,158,86,237,96,244,97,232,47,226,228,233,237,136,211,235,171,54,138,234,105,92,189,253,19,184,240,252,209,210,199,254,151,108,158,255,85,6,169,250,26,16,44,251,216,122,27,249,158,196,66,248,92,174,117,243,0,233,72,242,194,131,127,240,132,61,38,241,70,87,17,244,9,65,148,245,203,43,163,247,141,149,250,246,79,255,205,217,120,93,96,216,186,55,87,218,252,137,14,219,62,227,57,222,113,245,188,223,179,159,139,221,245,33,210,220,55,75,229,215,107,12,216,214,169,102,239,212,239,216,182,213,45,178,129,208,98,164,4,209,160,206,51,211,230,112,106,210,36,26,93,197,94,254,16,196,156,148,39,198,218,42,126,199,24,64,73,194,87,86,204,195,149,60,251,193,211,130,162,192,17,232,149,203,77,175,168,202,143,197,159,200,201,123,198,201,11,17,241,204,68,7,116,205,134,109,67,207,192,211,26,206,2,185,45,145,175,150,64,144,109,252,119,146,43,66,46,147,233,40,25,150,166,62,156,151,100,84,171,149,34,234,242,148,224,128,197,159,188,199,248,158,126,173,207,156,56,19,150,157,250,121,161,152,181,111,36,153,119,5,19,155,49,187,74,154,243,209,125,141,137,53,48,140,75,95,7,142,13,225,94,143,207,139,105,138,128,157,236,139,66,247,219,137,4,73,130,136,198,35,181,131,154,100,136,130,88,14,191,128,30,176,230,129,220,218,209,132,147,204,84,133,81,166,99,135,23,24,58,134,213,114,13,169,226,208,160,168,32,186,151,170,102,4,206,171,164,110,249], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); 1371/* memory initializer */ allocate([174,235,120,124,175,41,18,75,173,111,172,18,172,173,198,37,167,241,129,24,166,51,235,47,164,117,85,118,165,183,63,65,160,248,41,196,161,58,67,243,163,124,253,170,162,190,151,157,181,196,115,208,180,6,25,231,182,64,167,190,183,130,205,137,178,205,219,12,179,15,177,59,177,73,15,98,176,139,101,85,187,215,34,104,186,21,72,95,184,83,246,6,185,145,156,49,188,222,138,180,189,28,224,131,191,90,94,218,190,152,52,237,0,0,0,0,184,188,103,101,170,9,200,139,18,181,175,238,143,98,151,87,55,222,240,50,37,107,95,220,157,215,56,185,197,180,40,239,125,8,79,138,111,189,224,100,215,1,135,1,74,214,191,184,242,106,216,221,224,223,119,51,88,99,16,86,80,25,87,159,232,165,48,250,250,16,159,20,66,172,248,113,223,123,192,200,103,199,167,173,117,114,8,67,205,206,111,38,149,173,127,112,45,17,24,21,63,164,183,251,135,24,208,158,26,207,232,39,162,115,143,66,176,198,32,172,8,122,71,201,160,50,175,62,24,142,200,91,10,59,103,181,178,135,0,208,47,80,56,105,151,236,95,12,133,89,240,226,61,229,151,135,101,134,135,209,221,58,224,180,207,143,79,90,119,51,40,63,234,228,16,134,82,88,119,227,64,237,216,13,248,81,191,104,240,43,248,161,72,151,159,196,90,34,48,42,226,158,87,79,127,73,111,246,199,245,8,147,213,64,167,125,109,252,192,24,53,159,208,78,141,35,183,43,159,150,24,197,39,42,127,160,186,253,71,25,2,65,32,124,16,244,143,146,168,72,232,247,155,20,88,61,35,168,63,88,49,29,144,182,137,161,247,211,20,118,207,106,172,202,168,15,190,127,7,225,6,195,96,132,94,160,112,210,230,28,23,183,244,169,184,89,76,21,223,60,209,194,231,133,105,126,128,224,123,203,47,14,195,119,72,107,203,13,15,162,115,177,104,199,97,4,199,41,217,184,160,76,68,111,152,245,252,211,255,144,238,102,80,126,86,218,55,27,14,185,39,77,182,5,64,40,164,176,239,198,28,12,136,163,129,219,176,26,57,103,215,127,43,210,120,145,147,110,31,244,59,38,247,3,131,154,144,102,145,47,63,136,41,147,88,237,180,68,96,84,12,248,7,49,30,77,168,223,166,241,207,186,254,146,223,236,70,46,184,137,84,155,23,103,236,39,112,2,113,240,72,187,201,76,47,222,219,249,128,48,99,69,231,85,107,63,160,156,211,131,199,249,193,54,104,23,121,138,15,114,228,93,55,203,92,225,80,174,78,84,255,64,246,232,152,37,174,139,136,115,22,55,239,22,4,130,64,248,188,62,39,157,33,233,31,36,153,85,120,65,139,224,215,175,51,92,176,202,237,89,182,59,85,229,209,94,71,80,126,176,255,236,25,213,98,59,33,108,218,135,70,9,200,50,233,231,112,142,142,130,40,237,158,212,144,81,249,177,130,228,86,95,58,88,49,58,167,143,9,131,31,51,110,230,13,134,193,8,181,58,166,109,189,64,225,164,5,252,134,193,23,73,41,47,175,245,78,74,50,34,118,243,138,158,17,150,152,43,190,120,32,151,217,29,120,244,201,75,192,72,174,46,210,253,1,192,106,65,102,165,247,150,94,28,79,42,57,121,93,159,150,151,229,35,241,242,77,107,25,5,245,215,126,96,231,98,209,142,95,222,182,235,194,9,142,82,122,181,233,55,104,0,70,217,208,188,33,188,136,223,49,234,48,99,86,143,34,214,249,97,154,106,158,4,7,189,166,189,191,1,193,216,173,180,110,54,21,8,9,83,29,114,78,154,165,206,41,255,183,123,134,17,15,199,225,116,146,16,217,205,42,172,190,168,56,25,17,70,128,165,118,35,216,198,102,117,96,122,1,16,114,207,174,254,202,115,201,155,87,164,241,34,239,24,150,71,253,173,57,169,69,17,94,204,118,77,238,6,206,241,137,99,220,68,38,141,100,248,65,232,249,47,121,81,65,147,30,52,83,38,177,218,235,154,214,191,179,249,198,233,11,69,161,140,25,240,14,98,161,76,105,7,60,155,81,190,132,39,54,219,150,146,153,53,46,46,254,80,38,84,185,153,158,232,222,252,140,93,113,18,52,225,22,119,169,54,46,206,17,138,73,171,3,63,230,69,187,131,129,32,227,224,145,118,91,92,246,19,73,233,89,253,241,85,62,152,108,130,6,33,212,62,97,68,198,139,206,170,126,55,169,207,214,127,65,56,110,195,38,93,124,118,137,179,196,202,238,214,89,29,214,111,225,161,177,10,243,20,30,228,75,168,121,129,19,203,105,215,171,119,14,178,185,194,161,92,1,126,198,57,156,169,254,128,36,21,153,229,54,160,54,11,142,28,81,110,134,102,22,167,62,218,113,194,44,111,222,44,148,211,185,73,9,4,129,240,177,184,230,149,163,13,73,123,27,177,46,30,67,210,62,72,251,110,89,45,233,219,246,195,81,103,145,166,204,176,169,31,116,12,206,122,102,185,97,148,222,5,6,241,16,0,17,0,18,0,0,0,8,0,7,0,9,0,6,0,10,0,5,0,11,0,4,0,12,0,3,0,13,0,2,0,14,0,1,0,15,0,0,0,105,110,99,111,114,114,101,99,116,32,104,101,97,100,101,114,32,99,104,101,99,107,0,0,117,110,107,110,111,119,110,32,99,111,109,112,114,101,115,115,105,111,110,32,109,101,116,104,111,100,0,0,0,0,0,0,105,110,118,97,108,105,100,32,119,105,110,100,111,119,32,115,105,122,101,0,0,0,0,0,117,110,107,110,111,119,110,32,104,101,97,100,101,114,32,102,108,97,103,115,32,115,101,116,0,0,0,0,0,0,0,0,104,101,97,100,101,114,32,99,114,99,32,109,105,115,109,97,116,99,104,0,0,0,0,0,105,110,118,97,108,105,100,32,98,108,111,99,107,32,116,121,112,101,0,0,0,0,0,0,105,110,118,97,108,105,100,32,115,116,111,114,101,100,32,98,108,111,99,107,32,108,101,110,103,116,104,115,0,0,0,0,116,111,111,32,109,97,110,121,32,108,101,110,103,116,104,32,111,114,32,100,105,115,116,97,110,99,101,32,115,121,109,98,111,108,115,0,0,0,0,0,105,110,118,97,108,105,100,32,99,111,100,101,32,108,101,110,103,116,104,115,32,115,101,116,0,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,98,105,116,32,108,101,110,103,116,104,32,114,101,112,101,97,116,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,99,111,100,101,32,45,45,32,109,105,115,115,105,110,103,32,101,110,100,45,111,102,45,98,108,111,99,107,0,0,0,0,105,110,118,97,108,105,100,32,108,105,116,101,114,97,108,47,108,101,110,103,116,104,115,32,115,101,116,0,0,0,0,0,105,110,118,97,108,105,100,32,100,105,115,116,97,110,99,101,115,32,115,101,116,0,0,0,105,110,118,97,108,105,100,32,108,105,116,101,114,97,108,47,108,101,110,103,116,104,32,99,111,100,101,0,0,0,0,0,105,110,118,97,108,105,100,32,100,105,115,116,97,110,99,101,32,99,111,100,101,0,0,0,105,110,118,97,108,105,100,32,100,105,115,116,97,110,99,101,32,116,111,111,32,102,97,114,32,98,97,99,107,0,0,0,105,110,99,111,114,114,101,99,116,32,100,97,116,97,32,99,104,101,99,107,0,0,0,0,105,110,99,111,114,114,101,99,116,32,108,101,110,103,116,104,32,99,104,101,99,107,0,0,96,7,0,0,0,8,80,0,0,8,16,0,20,8,115,0,18,7,31,0,0,8,112,0,0,8,48,0,0,9,192,0,16,7,10,0,0,8,96,0,0,8,32,0,0,9,160,0,0,8,0,0,0,8,128,0,0,8,64,0,0,9,224,0,16,7,6,0,0,8,88,0,0,8,24,0,0,9,144,0,19,7,59,0,0,8,120,0,0,8,56,0,0,9,208,0,17,7,17,0,0,8,104,0,0,8,40,0,0,9,176,0,0,8,8,0,0,8,136,0,0,8,72,0,0,9,240,0,16,7,4,0,0,8,84,0,0,8,20,0,21,8,227,0,19,7,43,0,0,8,116,0,0,8,52,0,0,9,200,0,17,7,13,0,0,8,100,0,0,8,36,0,0,9,168,0,0,8,4,0,0,8,132,0,0,8,68,0,0,9,232,0,16,7,8,0,0,8,92,0,0,8,28,0,0,9,152,0,20,7,83,0,0,8,124,0,0,8,60,0,0,9,216,0,18,7,23,0,0,8,108,0,0,8,44,0,0,9,184,0,0,8,12,0,0,8,140,0,0,8,76,0,0,9,248,0,16,7,3,0,0,8,82,0,0,8,18,0,21,8,163,0,19,7,35,0,0,8,114,0,0,8,50,0,0,9,196,0,17,7,11,0,0,8,98,0,0,8,34,0,0,9,164,0,0,8,2,0,0,8,130,0,0,8,66,0,0,9,228,0,16,7,7,0,0,8,90,0,0,8,26,0,0,9,148,0,20,7,67,0,0,8,122,0,0,8,58,0,0,9,212,0,18,7,19,0,0,8,106,0,0,8,42,0,0,9,180,0,0,8,10,0,0,8,138,0,0,8,74,0,0,9,244,0,16,7,5,0,0,8,86,0,0,8,22,0,64,8,0,0,19,7,51,0,0,8,118,0,0,8,54,0,0,9,204,0,17,7,15,0,0,8,102,0,0,8,38,0,0,9,172,0,0,8,6,0,0,8,134,0,0,8,70,0,0,9,236,0,16,7,9,0,0,8,94,0,0,8,30,0,0,9,156,0,20,7,99,0,0,8,126,0,0,8,62,0,0,9,220,0,18,7,27,0,0,8,110,0,0,8,46,0,0,9,188,0,0,8,14,0,0,8,142,0,0,8,78,0,0,9,252,0,96,7,0,0,0,8,81,0,0,8,17,0,21,8,131,0,18,7,31,0,0,8,113,0,0,8,49,0,0,9,194,0,16,7,10,0,0,8,97,0,0,8,33,0,0,9,162,0,0,8,1,0,0,8,129,0,0,8,65,0,0,9,226,0,16,7,6,0,0,8,89,0,0,8,25,0,0,9,146,0,19,7,59,0,0,8,121,0,0,8,57,0,0,9,210,0,17,7,17,0,0,8,105,0,0,8,41,0,0,9,178,0,0,8,9,0,0,8,137,0,0,8,73,0,0,9,242,0,16,7,4,0,0,8,85,0,0,8,21,0,16,8,2,1,19,7,43,0,0,8,117,0,0,8,53,0,0,9,202,0,17,7,13,0,0,8,101,0,0,8,37,0,0,9,170,0,0,8,5,0,0,8,133,0,0,8,69,0,0,9,234,0,16,7,8,0,0,8,93,0,0,8,29,0,0,9,154,0,20,7,83,0,0,8,125,0,0,8,61,0,0,9,218,0,18,7,23,0,0,8,109,0,0,8,45,0,0,9,186,0,0,8,13,0,0,8,141,0,0,8,77,0,0,9,250,0,16,7,3,0,0,8,83,0,0,8,19,0,21,8,195,0,19,7,35,0,0,8,115,0,0,8,51,0,0,9,198,0,17,7,11,0,0,8,99,0,0,8,35,0,0,9,166,0,0,8,3,0,0,8,131,0,0,8,67,0,0,9,230,0,16,7,7,0,0,8,91,0,0,8,27,0,0,9,150,0,20,7,67,0,0,8,123,0,0,8,59,0,0,9,214,0,18,7,19,0,0,8,107,0,0,8,43,0,0,9,182,0,0,8,11,0,0,8,139,0,0,8,75,0,0,9,246,0,16,7,5,0,0,8,87,0,0,8,23,0,64,8,0,0,19,7,51,0,0,8,119,0,0,8,55,0,0,9,206,0,17,7,15,0,0,8,103,0,0,8,39,0,0,9,174,0,0,8,7,0,0,8,135,0,0,8,71,0,0,9,238,0,16,7,9,0,0,8,95,0,0,8,31,0,0,9,158,0,20,7,99,0,0,8,127,0,0,8,63,0,0,9,222,0,18,7,27,0,0,8,111,0,0,8,47,0,0,9,190,0,0,8,15,0,0,8,143,0,0,8,79,0,0,9,254,0,96,7,0,0,0,8,80,0,0,8,16,0,20,8,115,0,18,7,31,0,0,8,112,0,0,8,48,0,0,9,193,0,16,7,10,0,0,8,96,0,0,8,32,0,0,9,161,0,0,8,0,0,0,8,128,0,0,8,64,0,0,9,225,0,16,7,6,0,0,8,88,0,0,8,24,0,0,9,145,0,19,7,59,0,0,8,120,0,0,8,56,0,0,9,209,0,17,7,17,0,0,8,104,0,0,8,40,0,0,9,177,0,0,8,8,0,0,8,136,0,0,8,72,0,0,9,241,0,16,7,4,0,0,8,84,0,0,8,20,0,21,8,227,0,19,7,43,0,0,8,116,0,0,8,52,0,0,9,201,0,17,7,13,0,0,8,100,0,0,8,36,0,0,9,169,0,0,8,4,0,0,8,132,0,0,8,68,0,0,9,233,0,16,7,8,0,0,8,92,0,0,8,28,0,0,9,153,0,20,7,83,0,0,8,124,0,0,8,60,0,0,9,217,0,18,7,23,0,0,8,108,0,0,8,44,0,0,9,185,0,0,8,12,0,0,8,140,0,0,8,76,0,0,9,249,0,16,7,3,0,0,8,82,0,0,8,18,0,21,8,163,0,19,7,35,0,0,8,114,0,0,8,50,0,0,9,197,0,17,7,11,0,0,8,98,0,0,8,34,0,0,9,165,0,0,8,2,0,0,8,130,0,0,8,66,0,0,9,229,0,16,7,7,0,0,8,90,0,0,8,26,0,0,9,149,0,20,7,67,0,0,8,122,0,0,8,58,0,0,9,213,0,18,7,19,0,0,8,106,0,0,8,42,0,0,9,181,0,0,8,10,0,0,8,138,0,0,8,74,0,0,9,245,0,16,7,5,0,0,8,86,0,0,8,22,0,64,8,0,0,19,7,51,0,0,8,118,0,0,8,54,0,0,9,205,0,17,7,15,0,0,8,102,0,0,8,38,0,0,9,173,0,0,8,6,0,0,8,134,0,0,8,70,0,0,9,237,0,16,7,9,0,0,8,94,0,0,8,30,0,0,9,157,0,20,7,99,0,0,8,126,0,0,8,62,0,0,9,221,0,18,7,27,0,0,8,110,0,0,8,46,0,0,9,189,0,0,8,14,0,0,8,142,0,0,8,78,0,0,9,253,0,96,7,0,0,0,8,81,0,0,8,17,0,21,8,131,0,18,7,31,0,0,8,113,0,0,8,49,0,0,9,195,0,16,7,10,0,0,8,97,0,0,8,33,0,0,9,163,0,0,8,1,0,0,8,129,0,0,8,65,0,0,9,227,0,16,7,6,0,0,8,89,0,0,8,25,0,0,9,147,0,19,7,59,0,0,8,121,0,0,8,57,0,0,9,211,0,17,7,17,0,0,8,105,0,0,8,41,0,0,9,179,0,0,8,9,0,0,8,137,0,0,8,73,0,0,9,243,0,16,7,4,0,0,8,85,0,0,8,21,0,16,8,2,1,19,7,43,0,0,8,117,0,0,8,53,0,0,9,203,0,17,7,13,0,0,8,101,0,0,8,37,0,0,9,171,0,0,8,5,0,0,8,133,0,0,8,69,0,0,9,235,0,16,7,8,0,0,8,93,0,0,8,29,0,0,9,155,0,20,7,83,0,0,8,125,0,0,8,61,0,0,9,219,0,18,7,23,0,0,8,109,0,0,8,45,0,0,9,187,0,0,8,13,0,0,8,141,0,0,8,77,0,0,9,251,0,16,7,3,0,0,8,83,0,0,8,19,0,21,8,195,0,19,7,35,0,0,8,115,0,0,8,51,0,0,9,199,0,17,7,11,0,0,8,99,0,0,8,35,0,0,9,167,0,0,8,3,0,0,8,131,0,0,8,67,0,0,9,231,0,16,7,7,0,0,8,91,0,0,8,27,0,0,9,151,0,20,7,67,0,0,8,123,0,0,8,59,0,0,9,215,0,18,7,19,0,0,8,107,0,0,8,43,0,0,9,183,0,0,8,11,0,0,8,139,0,0,8,75,0,0,9,247,0,16,7,5,0,0,8,87,0,0,8,23,0,64,8,0,0,19,7,51,0,0,8,119,0,0,8,55,0,0,9,207,0,17,7,15,0,0,8,103,0,0,8,39,0,0,9,175,0,0,8,7,0,0,8,135,0,0,8,71,0,0,9,239,0,16,7,9,0,0,8,95,0,0,8,31,0,0,9,159,0,20,7,99,0,0,8,127,0,0,8,63,0,0,9,223,0,18,7,27,0,0,8,111,0,0,8,47,0,0,9,191,0,0,8,15,0,0,8,143,0,0,8,79,0,0,9,255,0,16,5,1,0,23,5,1,1,19,5,17,0,27,5,1,16,17,5,5,0,25,5,1,4,21,5,65,0,29,5,1,64,16,5,3,0,24,5,1,2,20,5,33,0,28,5,1,32,18,5,9,0,26,5,1,8,22,5,129,0,64,5,0,0,16,5,2,0,23,5,129,1,19,5,25,0,27,5,1,24,17,5,7,0,25,5,1,6,21,5,97,0,29,5,1,96,16,5,4,0,24,5,1,3,20,5,49,0,28,5,1,48,18,5,13,0,26,5,1,12,22,5,193,0,64,5,0,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,13,0,15,0,17,0,19,0,23,0,27,0,31,0,35,0,43,0,51,0,59,0,67,0,83,0,99,0,115,0,131,0,163,0,195,0,227,0,2,1,0,0,0,0,0,0,16,0,16,0,16,0,16,0,16,0,16,0,16,0,16,0,17,0,17,0,17,0,17,0,18,0,18,0,18,0,18,0,19,0,19,0,19,0,19,0,20,0,20,0,20,0,20,0,21,0,21,0,21,0,21,0,16,0,73,0,195,0,0,0,1,0,2,0,3,0,4,0,5,0,7,0,9,0,13,0,17,0,25,0,33,0,49,0,65,0,97,0,129,0,193,0,1,1,129,1,1,2,1,3,1,4,1,6,1,8,1,12,1,16,1,24,1,32,1,48,1,64,1,96,0,0,0,0,16,0,16,0,16,0,16,0,17,0,17,0,18,0,18,0,19,0,19,0,20,0,20,0,21,0,21,0,22,0,22,0,23,0,23,0,24,0,24,0,25,0,25,0,26,0,26,0,27,0,27,0,28,0,28,0,29,0,29,0,64,0,64,0,105,110,118,97,108,105,100,32,100,105,115,116,97,110,99,101,32,116,111,111,32,102,97,114,32,98,97,99,107,0,0,0,105,110,118,97,108,105,100,32,100,105,115,116,97,110,99,101,32,99,111,100,101,0,0,0,105,110,118,97,108,105,100,32,108,105,116,101,114,97,108,47,108,101,110,103,116,104,32,99,111,100,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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_NONE, Runtime.GLOBAL_BASE+10240); 1372 1373 1374 1375 1376var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8); 1377 1378assert(tempDoublePtr % 8 == 0); 1379 1380function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much 1381 1382 HEAP8[tempDoublePtr] = HEAP8[ptr]; 1383 1384 HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; 1385 1386 HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; 1387 1388 HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; 1389 1390} 1391 1392function copyTempDouble(ptr) { 1393 1394 HEAP8[tempDoublePtr] = HEAP8[ptr]; 1395 1396 HEAP8[tempDoublePtr+1] = HEAP8[ptr+1]; 1397 1398 HEAP8[tempDoublePtr+2] = HEAP8[ptr+2]; 1399 1400 HEAP8[tempDoublePtr+3] = HEAP8[ptr+3]; 1401 1402 HEAP8[tempDoublePtr+4] = HEAP8[ptr+4]; 1403 1404 HEAP8[tempDoublePtr+5] = HEAP8[ptr+5]; 1405 1406 HEAP8[tempDoublePtr+6] = HEAP8[ptr+6]; 1407 1408 HEAP8[tempDoublePtr+7] = HEAP8[ptr+7]; 1409 1410} 1411 1412 1413 1414 1415 1416 1417 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}; 1418 1419 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"}; 1420 1421 1422 var ___errno_state=0;function ___setErrNo(value) { 1423 // For convenient setting and returning of errno. 1424 HEAP32[((___errno_state)>>2)]=value; 1425 return value; 1426 } 1427 1428 var PATH={splitPath:function (filename) { 1429 var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; 1430 return splitPathRe.exec(filename).slice(1); 1431 },normalizeArray:function (parts, allowAboveRoot) { 1432 // if the path tries to go above the root, `up` ends up > 0 1433 var up = 0; 1434 for (var i = parts.length - 1; i >= 0; i--) { 1435 var last = parts[i]; 1436 if (last === '.') { 1437 parts.splice(i, 1); 1438 } else if (last === '..') { 1439 parts.splice(i, 1); 1440 up++; 1441 } else if (up) { 1442 parts.splice(i, 1); 1443 up--; 1444 } 1445 } 1446 // if the path is allowed to go above the root, restore leading ..s 1447 if (allowAboveRoot) { 1448 for (; up--; up) { 1449 parts.unshift('..'); 1450 } 1451 } 1452 return parts; 1453 },normalize:function (path) { 1454 var isAbsolute = path.charAt(0) === '/', 1455 trailingSlash = path.substr(-1) === '/'; 1456 // Normalize the path 1457 path = PATH.normalizeArray(path.split('/').filter(function(p) { 1458 return !!p; 1459 }), !isAbsolute).join('/'); 1460 if (!path && !isAbsolute) { 1461 path = '.'; 1462 } 1463 if (path && trailingSlash) { 1464 path += '/'; 1465 } 1466 return (isAbsolute ? '/' : '') + path; 1467 },dirname:function (path) { 1468 var result = PATH.splitPath(path), 1469 root = result[0], 1470 dir = result[1]; 1471 if (!root && !dir) { 1472 // No dirname whatsoever 1473 return '.'; 1474 } 1475 if (dir) { 1476 // It has a dirname, strip trailing slash 1477 dir = dir.substr(0, dir.length - 1); 1478 } 1479 return root + dir; 1480 },basename:function (path) { 1481 // EMSCRIPTEN return '/'' for '/', not an empty string 1482 if (path === '/') return '/'; 1483 var lastSlash = path.lastIndexOf('/'); 1484 if (lastSlash === -1) return path; 1485 return path.substr(lastSlash+1); 1486 },extname:function (path) { 1487 return PATH.splitPath(path)[3]; 1488 },join:function () { 1489 var paths = Array.prototype.slice.call(arguments, 0); 1490 return PATH.normalize(paths.join('/')); 1491 },join2:function (l, r) { 1492 return PATH.normalize(l + '/' + r); 1493 },resolve:function () { 1494 var resolvedPath = '', 1495 resolvedAbsolute = false; 1496 for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { 1497 var path = (i >= 0) ? arguments[i] : FS.cwd(); 1498 // Skip empty and invalid entries 1499 if (typeof path !== 'string') { 1500 throw new TypeError('Arguments to path.resolve must be strings'); 1501 } else if (!path) { 1502 continue; 1503 } 1504 resolvedPath = path + '/' + resolvedPath; 1505 resolvedAbsolute = path.charAt(0) === '/'; 1506 } 1507 // At this point the path should be resolved to a full absolute path, but 1508 // handle relative paths to be safe (might happen when process.cwd() fails) 1509 resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) { 1510 return !!p; 1511 }), !resolvedAbsolute).join('/'); 1512 return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; 1513 },relative:function (from, to) { 1514 from = PATH.resolve(from).substr(1); 1515 to = PATH.resolve(to).substr(1); 1516 function trim(arr) { 1517 var start = 0; 1518 for (; start < arr.length; start++) { 1519 if (arr[start] !== '') break; 1520 } 1521 var end = arr.length - 1; 1522 for (; end >= 0; end--) { 1523 if (arr[end] !== '') break; 1524 } 1525 if (start > end) return []; 1526 return arr.slice(start, end - start + 1); 1527 } 1528 var fromParts = trim(from.split('/')); 1529 var toParts = trim(to.split('/')); 1530 var length = Math.min(fromParts.length, toParts.length); 1531 var samePartsLength = length; 1532 for (var i = 0; i < length; i++) { 1533 if (fromParts[i] !== toParts[i]) { 1534 samePartsLength = i; 1535 break; 1536 } 1537 } 1538 var outputParts = []; 1539 for (var i = samePartsLength; i < fromParts.length; i++) { 1540 outputParts.push('..'); 1541 } 1542 outputParts = outputParts.concat(toParts.slice(samePartsLength)); 1543 return outputParts.join('/'); 1544 }}; 1545 1546 var TTY={ttys:[],init:function () { 1547 // https://github.com/kripken/emscripten/pull/1555 1548 // if (ENVIRONMENT_IS_NODE) { 1549 // // currently, FS.init does not distinguish if process.stdin is a file or TTY 1550 // // device, it always assumes it's a TTY device. because of this, we're forcing 1551 // // process.stdin to UTF8 encoding to at least make stdin reading compatible 1552 // // with text files until FS.init can be refactored. 1553 // process['stdin']['setEncoding']('utf8'); 1554 // } 1555 },shutdown:function () { 1556 // https://github.com/kripken/emscripten/pull/1555 1557 // if (ENVIRONMENT_IS_NODE) { 1558 // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? 1559 // // 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 1560 // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? 1561 // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle 1562 // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call 1563 // process['stdin']['pause'](); 1564 // } 1565 },register:function (dev, ops) { 1566 TTY.ttys[dev] = { input: [], output: [], ops: ops }; 1567 FS.registerDevice(dev, TTY.stream_ops); 1568 },stream_ops:{open:function (stream) { 1569 var tty = TTY.ttys[stream.node.rdev]; 1570 if (!tty) { 1571 throw new FS.ErrnoError(ERRNO_CODES.ENODEV); 1572 } 1573 stream.tty = tty; 1574 stream.seekable = false; 1575 },close:function (stream) { 1576 // flush any pending line data 1577 if (stream.tty.output.length) { 1578 stream.tty.ops.put_char(stream.tty, 10); 1579 } 1580 },read:function (stream, buffer, offset, length, pos /* ignored */) { 1581 if (!stream.tty || !stream.tty.ops.get_char) { 1582 throw new FS.ErrnoError(ERRNO_CODES.ENXIO); 1583 } 1584 var bytesRead = 0; 1585 for (var i = 0; i < length; i++) { 1586 var result; 1587 try { 1588 result = stream.tty.ops.get_char(stream.tty); 1589 } catch (e) { 1590 throw new FS.ErrnoError(ERRNO_CODES.EIO); 1591 } 1592 if (result === undefined && bytesRead === 0) { 1593 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); 1594 } 1595 if (result === null || result === undefined) break; 1596 bytesRead++; 1597 buffer[offset+i] = result; 1598 } 1599 if (bytesRead) { 1600 stream.node.timestamp = Date.now(); 1601 } 1602 return bytesRead; 1603 },write:function (stream, buffer, offset, length, pos) { 1604 if (!stream.tty || !stream.tty.ops.put_char) { 1605 throw new FS.ErrnoError(ERRNO_CODES.ENXIO); 1606 } 1607 for (var i = 0; i < length; i++) { 1608 try { 1609 stream.tty.ops.put_char(stream.tty, buffer[offset+i]); 1610 } catch (e) { 1611 throw new FS.ErrnoError(ERRNO_CODES.EIO); 1612 } 1613 } 1614 if (length) { 1615 stream.node.timestamp = Date.now(); 1616 } 1617 return i; 1618 }},default_tty_ops:{get_char:function (tty) { 1619 if (!tty.input.length) { 1620 var result = null; 1621 if (ENVIRONMENT_IS_NODE) { 1622 result = process['stdin']['read'](); 1623 if (!result) { 1624 if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) { 1625 return null; // EOF 1626 } 1627 return undefined; // no data available 1628 } 1629 } else if (typeof window != 'undefined' && 1630 typeof window.prompt == 'function') { 1631 // Browser. 1632 result = window.prompt('Input: '); // returns null on cancel 1633 if (result !== null) { 1634 result += '\n'; 1635 } 1636 } else if (typeof readline == 'function') { 1637 // Command line. 1638 result = readline(); 1639 if (result !== null) { 1640 result += '\n'; 1641 } 1642 } 1643 if (!result) { 1644 return null; 1645 } 1646 tty.input = intArrayFromString(result, true); 1647 } 1648 return tty.input.shift(); 1649 },put_char:function (tty, val) { 1650 if (val === null || val === 10) { 1651 Module['print'](tty.output.join('')); 1652 tty.output = []; 1653 } else { 1654 tty.output.push(TTY.utf8.processCChar(val)); 1655 } 1656 }},default_tty1_ops:{put_char:function (tty, val) { 1657 if (val === null || val === 10) { 1658 Module['printErr'](tty.output.join('')); 1659 tty.output = []; 1660 } else { 1661 tty.output.push(TTY.utf8.processCChar(val)); 1662 } 1663 }}}; 1664 1665 var MEMFS={ops_table:null,CONTENT_OWNING:1,CONTENT_FLEXIBLE:2,CONTENT_FIXED:3,mount:function (mount) { 1666 return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); 1667 },createNode:function (parent, name, mode, dev) { 1668 if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { 1669 // no supported 1670 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 1671 } 1672 if (!MEMFS.ops_table) { 1673 MEMFS.ops_table = { 1674 dir: { 1675 node: { 1676 getattr: MEMFS.node_ops.getattr, 1677 setattr: MEMFS.node_ops.setattr, 1678 lookup: MEMFS.node_ops.lookup, 1679 mknod: MEMFS.node_ops.mknod, 1680 rename: MEMFS.node_ops.rename, 1681 unlink: MEMFS.node_ops.unlink, 1682 rmdir: MEMFS.node_ops.rmdir, 1683 readdir: MEMFS.node_ops.readdir, 1684 symlink: MEMFS.node_ops.symlink 1685 }, 1686 stream: { 1687 llseek: MEMFS.stream_ops.llseek 1688 } 1689 }, 1690 file: { 1691 node: { 1692 getattr: MEMFS.node_ops.getattr, 1693 setattr: MEMFS.node_ops.setattr 1694 }, 1695 stream: { 1696 llseek: MEMFS.stream_ops.llseek, 1697 read: MEMFS.stream_ops.read, 1698 write: MEMFS.stream_ops.write, 1699 allocate: MEMFS.stream_ops.allocate, 1700 mmap: MEMFS.stream_ops.mmap 1701 } 1702 }, 1703 link: { 1704 node: { 1705 getattr: MEMFS.node_ops.getattr, 1706 setattr: MEMFS.node_ops.setattr, 1707 readlink: MEMFS.node_ops.readlink 1708 }, 1709 stream: {} 1710 }, 1711 chrdev: { 1712 node: { 1713 getattr: MEMFS.node_ops.getattr, 1714 setattr: MEMFS.node_ops.setattr 1715 }, 1716 stream: FS.chrdev_stream_ops 1717 }, 1718 }; 1719 } 1720 var node = FS.createNode(parent, name, mode, dev); 1721 if (FS.isDir(node.mode)) { 1722 node.node_ops = MEMFS.ops_table.dir.node; 1723 node.stream_ops = MEMFS.ops_table.dir.stream; 1724 node.contents = {}; 1725 } else if (FS.isFile(node.mode)) { 1726 node.node_ops = MEMFS.ops_table.file.node; 1727 node.stream_ops = MEMFS.ops_table.file.stream; 1728 node.contents = []; 1729 node.contentMode = MEMFS.CONTENT_FLEXIBLE; 1730 } else if (FS.isLink(node.mode)) { 1731 node.node_ops = MEMFS.ops_table.link.node; 1732 node.stream_ops = MEMFS.ops_table.link.stream; 1733 } else if (FS.isChrdev(node.mode)) { 1734 node.node_ops = MEMFS.ops_table.chrdev.node; 1735 node.stream_ops = MEMFS.ops_table.chrdev.stream; 1736 } 1737 node.timestamp = Date.now(); 1738 // add the new node to the parent 1739 if (parent) { 1740 parent.contents[name] = node; 1741 } 1742 return node; 1743 },ensureFlexible:function (node) { 1744 if (node.contentMode !== MEMFS.CONTENT_FLEXIBLE) { 1745 var contents = node.contents; 1746 node.contents = Array.prototype.slice.call(contents); 1747 node.contentMode = MEMFS.CONTENT_FLEXIBLE; 1748 } 1749 },node_ops:{getattr:function (node) { 1750 var attr = {}; 1751 // device numbers reuse inode numbers. 1752 attr.dev = FS.isChrdev(node.mode) ? node.id : 1; 1753 attr.ino = node.id; 1754 attr.mode = node.mode; 1755 attr.nlink = 1; 1756 attr.uid = 0; 1757 attr.gid = 0; 1758 attr.rdev = node.rdev; 1759 if (FS.isDir(node.mode)) { 1760 attr.size = 4096; 1761 } else if (FS.isFile(node.mode)) { 1762 attr.size = node.contents.length; 1763 } else if (FS.isLink(node.mode)) { 1764 attr.size = node.link.length; 1765 } else { 1766 attr.size = 0; 1767 } 1768 attr.atime = new Date(node.timestamp); 1769 attr.mtime = new Date(node.timestamp); 1770 attr.ctime = new Date(node.timestamp); 1771 // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), 1772 // but this is not required by the standard. 1773 attr.blksize = 4096; 1774 attr.blocks = Math.ceil(attr.size / attr.blksize); 1775 return attr; 1776 },setattr:function (node, attr) { 1777 if (attr.mode !== undefined) { 1778 node.mode = attr.mode; 1779 } 1780 if (attr.timestamp !== undefined) { 1781 node.timestamp = attr.timestamp; 1782 } 1783 if (attr.size !== undefined) { 1784 MEMFS.ensureFlexible(node); 1785 var contents = node.contents; 1786 if (attr.size < contents.length) contents.length = attr.size; 1787 else while (attr.size > contents.length) contents.push(0); 1788 } 1789 },lookup:function (parent, name) { 1790 throw FS.genericErrors[ERRNO_CODES.ENOENT]; 1791 },mknod:function (parent, name, mode, dev) { 1792 return MEMFS.createNode(parent, name, mode, dev); 1793 },rename:function (old_node, new_dir, new_name) { 1794 // if we're overwriting a directory at new_name, make sure it's empty. 1795 if (FS.isDir(old_node.mode)) { 1796 var new_node; 1797 try { 1798 new_node = FS.lookupNode(new_dir, new_name); 1799 } catch (e) { 1800 } 1801 if (new_node) { 1802 for (var i in new_node.contents) { 1803 throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); 1804 } 1805 } 1806 } 1807 // do the internal rewiring 1808 delete old_node.parent.contents[old_node.name]; 1809 old_node.name = new_name; 1810 new_dir.contents[new_name] = old_node; 1811 old_node.parent = new_dir; 1812 },unlink:function (parent, name) { 1813 delete parent.contents[name]; 1814 },rmdir:function (parent, name) { 1815 var node = FS.lookupNode(parent, name); 1816 for (var i in node.contents) { 1817 throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); 1818 } 1819 delete parent.contents[name]; 1820 },readdir:function (node) { 1821 var entries = ['.', '..'] 1822 for (var key in node.contents) { 1823 if (!node.contents.hasOwnProperty(key)) { 1824 continue; 1825 } 1826 entries.push(key); 1827 } 1828 return entries; 1829 },symlink:function (parent, newname, oldpath) { 1830 var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); 1831 node.link = oldpath; 1832 return node; 1833 },readlink:function (node) { 1834 if (!FS.isLink(node.mode)) { 1835 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 1836 } 1837 return node.link; 1838 }},stream_ops:{read:function (stream, buffer, offset, length, position) { 1839 var contents = stream.node.contents; 1840 if (position >= contents.length) 1841 return 0; 1842 var size = Math.min(contents.length - position, length); 1843 assert(size >= 0); 1844 if (size > 8 && contents.subarray) { // non-trivial, and typed array 1845 buffer.set(contents.subarray(position, position + size), offset); 1846 } else 1847 { 1848 for (var i = 0; i < size; i++) { 1849 buffer[offset + i] = contents[position + i]; 1850 } 1851 } 1852 return size; 1853 },write:function (stream, buffer, offset, length, position, canOwn) { 1854 var node = stream.node; 1855 node.timestamp = Date.now(); 1856 var contents = node.contents; 1857 if (length && contents.length === 0 && position === 0 && buffer.subarray) { 1858 // just replace it with the new data 1859 if (canOwn && offset === 0) { 1860 node.contents = buffer; // this could be a subarray of Emscripten HEAP, or allocated from some other source. 1861 node.contentMode = (buffer.buffer === HEAP8.buffer) ? MEMFS.CONTENT_OWNING : MEMFS.CONTENT_FIXED; 1862 } else { 1863 node.contents = new Uint8Array(buffer.subarray(offset, offset+length)); 1864 node.contentMode = MEMFS.CONTENT_FIXED; 1865 } 1866 return length; 1867 } 1868 MEMFS.ensureFlexible(node); 1869 var contents = node.contents; 1870 while (contents.length < position) contents.push(0); 1871 for (var i = 0; i < length; i++) { 1872 contents[position + i] = buffer[offset + i]; 1873 } 1874 return length; 1875 },llseek:function (stream, offset, whence) { 1876 var position = offset; 1877 if (whence === 1) { // SEEK_CUR. 1878 position += stream.position; 1879 } else if (whence === 2) { // SEEK_END. 1880 if (FS.isFile(stream.node.mode)) { 1881 position += stream.node.contents.length; 1882 } 1883 } 1884 if (position < 0) { 1885 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 1886 } 1887 stream.ungotten = []; 1888 stream.position = position; 1889 return position; 1890 },allocate:function (stream, offset, length) { 1891 MEMFS.ensureFlexible(stream.node); 1892 var contents = stream.node.contents; 1893 var limit = offset + length; 1894 while (limit > contents.length) contents.push(0); 1895 },mmap:function (stream, buffer, offset, length, position, prot, flags) { 1896 if (!FS.isFile(stream.node.mode)) { 1897 throw new FS.ErrnoError(ERRNO_CODES.ENODEV); 1898 } 1899 var ptr; 1900 var allocated; 1901 var contents = stream.node.contents; 1902 // Only make a new copy when MAP_PRIVATE is specified. 1903 if ( !(flags & 2) && 1904 (contents.buffer === buffer || contents.buffer === buffer.buffer) ) { 1905 // We can't emulate MAP_SHARED when the file is not backed by the buffer 1906 // we're mapping to (e.g. the HEAP buffer). 1907 allocated = false; 1908 ptr = contents.byteOffset; 1909 } else { 1910 // Try to avoid unnecessary slices. 1911 if (position > 0 || position + length < contents.length) { 1912 if (contents.subarray) { 1913 contents = contents.subarray(position, position + length); 1914 } else { 1915 contents = Array.prototype.slice.call(contents, position, position + length); 1916 } 1917 } 1918 allocated = true; 1919 ptr = _malloc(length); 1920 if (!ptr) { 1921 throw new FS.ErrnoError(ERRNO_CODES.ENOMEM); 1922 } 1923 buffer.set(contents, ptr); 1924 } 1925 return { ptr: ptr, allocated: allocated }; 1926 }}}; 1927 1928 var IDBFS={dbs:{},indexedDB:function () { 1929 return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; 1930 },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function (mount) { 1931 // reuse all of the core MEMFS functionality 1932 return MEMFS.mount.apply(null, arguments); 1933 },syncfs:function (mount, populate, callback) { 1934 IDBFS.getLocalSet(mount, function(err, local) { 1935 if (err) return callback(err); 1936 1937 IDBFS.getRemoteSet(mount, function(err, remote) { 1938 if (err) return callback(err); 1939 1940 var src = populate ? remote : local; 1941 var dst = populate ? local : remote; 1942 1943 IDBFS.reconcile(src, dst, callback); 1944 }); 1945 }); 1946 },getDB:function (name, callback) { 1947 // check the cache first 1948 var db = IDBFS.dbs[name]; 1949 if (db) { 1950 return callback(null, db); 1951 } 1952 1953 var req; 1954 try { 1955 req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); 1956 } catch (e) { 1957 return callback(e); 1958 } 1959 req.onupgradeneeded = function(e) { 1960 var db = e.target.result; 1961 var transaction = e.target.transaction; 1962 1963 var fileStore; 1964 1965 if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { 1966 fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); 1967 } else { 1968 fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); 1969 } 1970 1971 fileStore.createIndex('timestamp', 'timestamp', { unique: false }); 1972 }; 1973 req.onsuccess = function() { 1974 db = req.result; 1975 1976 // add to the cache 1977 IDBFS.dbs[name] = db; 1978 callback(null, db); 1979 }; 1980 req.onerror = function() { 1981 callback(this.error); 1982 }; 1983 },getLocalSet:function (mount, callback) { 1984 var entries = {}; 1985 1986 function isRealDir(p) { 1987 return p !== '.' && p !== '..'; 1988 }; 1989 function toAbsolute(root) { 1990 return function(p) { 1991 return PATH.join2(root, p); 1992 } 1993 }; 1994 1995 var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); 1996 1997 while (check.length) { 1998 var path = check.pop(); 1999 var stat; 2000 2001 try { 2002 stat = FS.stat(path); 2003 } catch (e) { 2004 return callback(e); 2005 } 2006 2007 if (FS.isDir(stat.mode)) { 2008 check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path))); 2009 } 2010 2011 entries[path] = { timestamp: stat.mtime }; 2012 } 2013 2014 return callback(null, { type: 'local', entries: entries }); 2015 },getRemoteSet:function (mount, callback) { 2016 var entries = {}; 2017 2018 IDBFS.getDB(mount.mountpoint, function(err, db) { 2019 if (err) return callback(err); 2020 2021 var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly'); 2022 transaction.onerror = function() { callback(this.error); }; 2023 2024 var store = transaction.objectStore(IDBFS.DB_STORE_NAME); 2025 var index = store.index('timestamp'); 2026 2027 index.openKeyCursor().onsuccess = function(event) { 2028 var cursor = event.target.result; 2029 2030 if (!cursor) { 2031 return callback(null, { type: 'remote', db: db, entries: entries }); 2032 } 2033 2034 entries[cursor.primaryKey] = { timestamp: cursor.key }; 2035 2036 cursor.continue(); 2037 }; 2038 }); 2039 },loadLocalEntry:function (path, callback) { 2040 var stat, node; 2041 2042 try { 2043 var lookup = FS.lookupPath(path); 2044 node = lookup.node; 2045 stat = FS.stat(path); 2046 } catch (e) { 2047 return callback(e); 2048 } 2049 2050 if (FS.isDir(stat.mode)) { 2051 return callback(null, { timestamp: stat.mtime, mode: stat.mode }); 2052 } else if (FS.isFile(stat.mode)) { 2053 return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents }); 2054 } else { 2055 return callback(new Error('node type not supported')); 2056 } 2057 },storeLocalEntry:function (path, entry, callback) { 2058 try { 2059 if (FS.isDir(entry.mode)) { 2060 FS.mkdir(path, entry.mode); 2061 } else if (FS.isFile(entry.mode)) { 2062 FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true }); 2063 } else { 2064 return callback(new Error('node type not supported')); 2065 } 2066 2067 FS.utime(path, entry.timestamp, entry.timestamp); 2068 } catch (e) { 2069 return callback(e); 2070 } 2071 2072 callback(null); 2073 },removeLocalEntry:function (path, callback) { 2074 try { 2075 var lookup = FS.lookupPath(path); 2076 var stat = FS.stat(path); 2077 2078 if (FS.isDir(stat.mode)) { 2079 FS.rmdir(path); 2080 } else if (FS.isFile(stat.mode)) { 2081 FS.unlink(path); 2082 } 2083 } catch (e) { 2084 return callback(e); 2085 } 2086 2087 callback(null); 2088 },loadRemoteEntry:function (store, path, callback) { 2089 var req = store.get(path); 2090 req.onsuccess = function(event) { callback(null, event.target.result); }; 2091 req.onerror = function() { callback(this.error); }; 2092 },storeRemoteEntry:function (store, path, entry, callback) { 2093 var req = store.put(entry, path); 2094 req.onsuccess = function() { callback(null); }; 2095 req.onerror = function() { callback(this.error); }; 2096 },removeRemoteEntry:function (store, path, callback) { 2097 var req = store.delete(path); 2098 req.onsuccess = function() { callback(null); }; 2099 req.onerror = function() { callback(this.error); }; 2100 },reconcile:function (src, dst, callback) { 2101 var total = 0; 2102 2103 var create = []; 2104 Object.keys(src.entries).forEach(function (key) { 2105 var e = src.entries[key]; 2106 var e2 = dst.entries[key]; 2107 if (!e2 || e.timestamp > e2.timestamp) { 2108 create.push(key); 2109 total++; 2110 } 2111 }); 2112 2113 var remove = []; 2114 Object.keys(dst.entries).forEach(function (key) { 2115 var e = dst.entries[key]; 2116 var e2 = src.entries[key]; 2117 if (!e2) { 2118 remove.push(key); 2119 total++; 2120 } 2121 }); 2122 2123 if (!total) { 2124 return callback(null); 2125 } 2126 2127 var errored = false; 2128 var completed = 0; 2129 var db = src.type === 'remote' ? src.db : dst.db; 2130 var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite'); 2131 var store = transaction.objectStore(IDBFS.DB_STORE_NAME); 2132 2133 function done(err) { 2134 if (err) { 2135 if (!done.errored) { 2136 done.errored = true; 2137 return callback(err); 2138 } 2139 return; 2140 } 2141 if (++completed >= total) { 2142 return callback(null); 2143 } 2144 }; 2145 2146 transaction.onerror = function() { done(this.error); }; 2147 2148 // sort paths in ascending order so directory entries are created 2149 // before the files inside them 2150 create.sort().forEach(function (path) { 2151 if (dst.type === 'local') { 2152 IDBFS.loadRemoteEntry(store, path, function (err, entry) { 2153 if (err) return done(err); 2154 IDBFS.storeLocalEntry(path, entry, done); 2155 }); 2156 } else { 2157 IDBFS.loadLocalEntry(path, function (err, entry) { 2158 if (err) return done(err); 2159 IDBFS.storeRemoteEntry(store, path, entry, done); 2160 }); 2161 } 2162 }); 2163 2164 // sort paths in descending order so files are deleted before their 2165 // parent directories 2166 remove.sort().reverse().forEach(function(path) { 2167 if (dst.type === 'local') { 2168 IDBFS.removeLocalEntry(path, done); 2169 } else { 2170 IDBFS.removeRemoteEntry(store, path, done); 2171 } 2172 }); 2173 }}; 2174 2175 var NODEFS={isWindows:false,staticInit:function () { 2176 NODEFS.isWindows = !!process.platform.match(/^win/); 2177 },mount:function (mount) { 2178 assert(ENVIRONMENT_IS_NODE); 2179 return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); 2180 },createNode:function (parent, name, mode, dev) { 2181 if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { 2182 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 2183 } 2184 var node = FS.createNode(parent, name, mode); 2185 node.node_ops = NODEFS.node_ops; 2186 node.stream_ops = NODEFS.stream_ops; 2187 return node; 2188 },getMode:function (path) { 2189 var stat; 2190 try { 2191 stat = fs.lstatSync(path); 2192 if (NODEFS.isWindows) { 2193 // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so 2194 // propagate write bits to execute bits. 2195 stat.mode = stat.mode | ((stat.mode & 146) >> 1); 2196 } 2197 } catch (e) { 2198 if (!e.code) throw e; 2199 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2200 } 2201 return stat.mode; 2202 },realPath:function (node) { 2203 var parts = []; 2204 while (node.parent !== node) { 2205 parts.push(node.name); 2206 node = node.parent; 2207 } 2208 parts.push(node.mount.opts.root); 2209 parts.reverse(); 2210 return PATH.join.apply(null, parts); 2211 },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) { 2212 if (flags in NODEFS.flagsToPermissionStringMap) { 2213 return NODEFS.flagsToPermissionStringMap[flags]; 2214 } else { 2215 return flags; 2216 } 2217 },node_ops:{getattr:function (node) { 2218 var path = NODEFS.realPath(node); 2219 var stat; 2220 try { 2221 stat = fs.lstatSync(path); 2222 } catch (e) { 2223 if (!e.code) throw e; 2224 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2225 } 2226 // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096. 2227 // See http://support.microsoft.com/kb/140365 2228 if (NODEFS.isWindows && !stat.blksize) { 2229 stat.blksize = 4096; 2230 } 2231 if (NODEFS.isWindows && !stat.blocks) { 2232 stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0; 2233 } 2234 return { 2235 dev: stat.dev, 2236 ino: stat.ino, 2237 mode: stat.mode, 2238 nlink: stat.nlink, 2239 uid: stat.uid, 2240 gid: stat.gid, 2241 rdev: stat.rdev, 2242 size: stat.size, 2243 atime: stat.atime, 2244 mtime: stat.mtime, 2245 ctime: stat.ctime, 2246 blksize: stat.blksize, 2247 blocks: stat.blocks 2248 }; 2249 },setattr:function (node, attr) { 2250 var path = NODEFS.realPath(node); 2251 try { 2252 if (attr.mode !== undefined) { 2253 fs.chmodSync(path, attr.mode); 2254 // update the common node structure mode as well 2255 node.mode = attr.mode; 2256 } 2257 if (attr.timestamp !== undefined) { 2258 var date = new Date(attr.timestamp); 2259 fs.utimesSync(path, date, date); 2260 } 2261 if (attr.size !== undefined) { 2262 fs.truncateSync(path, attr.size); 2263 } 2264 } catch (e) { 2265 if (!e.code) throw e; 2266 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2267 } 2268 },lookup:function (parent, name) { 2269 var path = PATH.join2(NODEFS.realPath(parent), name); 2270 var mode = NODEFS.getMode(path); 2271 return NODEFS.createNode(parent, name, mode); 2272 },mknod:function (parent, name, mode, dev) { 2273 var node = NODEFS.createNode(parent, name, mode, dev); 2274 // create the backing node for this in the fs root as well 2275 var path = NODEFS.realPath(node); 2276 try { 2277 if (FS.isDir(node.mode)) { 2278 fs.mkdirSync(path, node.mode); 2279 } else { 2280 fs.writeFileSync(path, '', { mode: node.mode }); 2281 } 2282 } catch (e) { 2283 if (!e.code) throw e; 2284 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2285 } 2286 return node; 2287 },rename:function (oldNode, newDir, newName) { 2288 var oldPath = NODEFS.realPath(oldNode); 2289 var newPath = PATH.join2(NODEFS.realPath(newDir), newName); 2290 try { 2291 fs.renameSync(oldPath, newPath); 2292 } catch (e) { 2293 if (!e.code) throw e; 2294 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2295 } 2296 },unlink:function (parent, name) { 2297 var path = PATH.join2(NODEFS.realPath(parent), name); 2298 try { 2299 fs.unlinkSync(path); 2300 } catch (e) { 2301 if (!e.code) throw e; 2302 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2303 } 2304 },rmdir:function (parent, name) { 2305 var path = PATH.join2(NODEFS.realPath(parent), name); 2306 try { 2307 fs.rmdirSync(path); 2308 } catch (e) { 2309 if (!e.code) throw e; 2310 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2311 } 2312 },readdir:function (node) { 2313 var path = NODEFS.realPath(node); 2314 try { 2315 return fs.readdirSync(path); 2316 } catch (e) { 2317 if (!e.code) throw e; 2318 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2319 } 2320 },symlink:function (parent, newName, oldPath) { 2321 var newPath = PATH.join2(NODEFS.realPath(parent), newName); 2322 try { 2323 fs.symlinkSync(oldPath, newPath); 2324 } catch (e) { 2325 if (!e.code) throw e; 2326 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2327 } 2328 },readlink:function (node) { 2329 var path = NODEFS.realPath(node); 2330 try { 2331 return fs.readlinkSync(path); 2332 } catch (e) { 2333 if (!e.code) throw e; 2334 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2335 } 2336 }},stream_ops:{open:function (stream) { 2337 var path = NODEFS.realPath(stream.node); 2338 try { 2339 if (FS.isFile(stream.node.mode)) { 2340 stream.nfd = fs.openSync(path, NODEFS.flagsToPermissionString(stream.flags)); 2341 } 2342 } catch (e) { 2343 if (!e.code) throw e; 2344 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2345 } 2346 },close:function (stream) { 2347 try { 2348 if (FS.isFile(stream.node.mode) && stream.nfd) { 2349 fs.closeSync(stream.nfd); 2350 } 2351 } catch (e) { 2352 if (!e.code) throw e; 2353 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2354 } 2355 },read:function (stream, buffer, offset, length, position) { 2356 // FIXME this is terrible. 2357 var nbuffer = new Buffer(length); 2358 var res; 2359 try { 2360 res = fs.readSync(stream.nfd, nbuffer, 0, length, position); 2361 } catch (e) { 2362 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2363 } 2364 if (res > 0) { 2365 for (var i = 0; i < res; i++) { 2366 buffer[offset + i] = nbuffer[i]; 2367 } 2368 } 2369 return res; 2370 },write:function (stream, buffer, offset, length, position) { 2371 // FIXME this is terrible. 2372 var nbuffer = new Buffer(buffer.subarray(offset, offset + length)); 2373 var res; 2374 try { 2375 res = fs.writeSync(stream.nfd, nbuffer, 0, length, position); 2376 } catch (e) { 2377 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2378 } 2379 return res; 2380 },llseek:function (stream, offset, whence) { 2381 var position = offset; 2382 if (whence === 1) { // SEEK_CUR. 2383 position += stream.position; 2384 } else if (whence === 2) { // SEEK_END. 2385 if (FS.isFile(stream.node.mode)) { 2386 try { 2387 var stat = fs.fstatSync(stream.nfd); 2388 position += stat.size; 2389 } catch (e) { 2390 throw new FS.ErrnoError(ERRNO_CODES[e.code]); 2391 } 2392 } 2393 } 2394 2395 if (position < 0) { 2396 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 2397 } 2398 2399 stream.position = position; 2400 return position; 2401 }}}; 2402 2403 var _stdin=allocate(1, "i32*", ALLOC_STATIC); 2404 2405 var _stdout=allocate(1, "i32*", ALLOC_STATIC); 2406 2407 var _stderr=allocate(1, "i32*", ALLOC_STATIC); 2408 2409 function _fflush(stream) { 2410 // int fflush(FILE *stream); 2411 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html 2412 // we don't currently perform any user-space buffering of data 2413 }var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},handleFSError:function (e) { 2414 if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace(); 2415 return ___setErrNo(e.errno); 2416 },lookupPath:function (path, opts) { 2417 path = PATH.resolve(FS.cwd(), path); 2418 opts = opts || {}; 2419 2420 var defaults = { 2421 follow_mount: true, 2422 recurse_count: 0 2423 }; 2424 for (var key in defaults) { 2425 if (opts[key] === undefined) { 2426 opts[key] = defaults[key]; 2427 } 2428 } 2429 2430 if (opts.recurse_count > 8) { // max recursive lookup of 8 2431 throw new FS.ErrnoError(ERRNO_CODES.ELOOP); 2432 } 2433 2434 // split the path 2435 var parts = PATH.normalizeArray(path.split('/').filter(function(p) { 2436 return !!p; 2437 }), false); 2438 2439 // start at the root 2440 var current = FS.root; 2441 var current_path = '/'; 2442 2443 for (var i = 0; i < parts.length; i++) { 2444 var islast = (i === parts.length-1); 2445 if (islast && opts.parent) { 2446 // stop resolving 2447 break; 2448 } 2449 2450 current = FS.lookupNode(current, parts[i]); 2451 current_path = PATH.join2(current_path, parts[i]); 2452 2453 // jump to the mount's root node if this is a mountpoint 2454 if (FS.isMountpoint(current)) { 2455 if (!islast || (islast && opts.follow_mount)) { 2456 current = current.mounted.root; 2457 } 2458 } 2459 2460 // by default, lookupPath will not follow a symlink if it is the final path component. 2461 // setting opts.follow = true will override this behavior. 2462 if (!islast || opts.follow) { 2463 var count = 0; 2464 while (FS.isLink(current.mode)) { 2465 var link = FS.readlink(current_path); 2466 current_path = PATH.resolve(PATH.dirname(current_path), link); 2467 2468 var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); 2469 current = lookup.node; 2470 2471 if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). 2472 throw new FS.ErrnoError(ERRNO_CODES.ELOOP); 2473 } 2474 } 2475 } 2476 } 2477 2478 return { path: current_path, node: current }; 2479 },getPath:function (node) { 2480 var path; 2481 while (true) { 2482 if (FS.isRoot(node)) { 2483 var mount = node.mount.mountpoint; 2484 if (!path) return mount; 2485 return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path; 2486 } 2487 path = path ? node.name + '/' + path : node.name; 2488 node = node.parent; 2489 } 2490 },hashName:function (parentid, name) { 2491 var hash = 0; 2492 2493 2494 for (var i = 0; i < name.length; i++) { 2495 hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; 2496 } 2497 return ((parentid + hash) >>> 0) % FS.nameTable.length; 2498 },hashAddNode:function (node) { 2499 var hash = FS.hashName(node.parent.id, node.name); 2500 node.name_next = FS.nameTable[hash]; 2501 FS.nameTable[hash] = node; 2502 },hashRemoveNode:function (node) { 2503 var hash = FS.hashName(node.parent.id, node.name); 2504 if (FS.nameTable[hash] === node) { 2505 FS.nameTable[hash] = node.name_next; 2506 } else { 2507 var current = FS.nameTable[hash]; 2508 while (current) { 2509 if (current.name_next === node) { 2510 current.name_next = node.name_next; 2511 break; 2512 } 2513 current = current.name_next; 2514 } 2515 } 2516 },lookupNode:function (parent, name) { 2517 var err = FS.mayLookup(parent); 2518 if (err) { 2519 throw new FS.ErrnoError(err); 2520 } 2521 var hash = FS.hashName(parent.id, name); 2522 for (var node = FS.nameTable[hash]; node; node = node.name_next) { 2523 var nodeName = node.name; 2524 if (node.parent.id === parent.id && nodeName === name) { 2525 return node; 2526 } 2527 } 2528 // if we failed to find it in the cache, call into the VFS 2529 return FS.lookup(parent, name); 2530 },createNode:function (parent, name, mode, rdev) { 2531 if (!FS.FSNode) { 2532 FS.FSNode = function(parent, name, mode, rdev) { 2533 if (!parent) { 2534 parent = this; // root node sets parent to itself 2535 } 2536 this.parent = parent; 2537 this.mount = parent.mount; 2538 this.mounted = null; 2539 this.id = FS.nextInode++; 2540 this.name = name; 2541 this.mode = mode; 2542 this.node_ops = {}; 2543 this.stream_ops = {}; 2544 this.rdev = rdev; 2545 }; 2546 2547 FS.FSNode.prototype = {}; 2548 2549 // compatibility 2550 var readMode = 292 | 73; 2551 var writeMode = 146; 2552 2553 // NOTE we must use Object.defineProperties instead of individual calls to 2554 // Object.defineProperty in order to make closure compiler happy 2555 Object.defineProperties(FS.FSNode.prototype, { 2556 read: { 2557 get: function() { return (this.mode & readMode) === readMode; }, 2558 set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; } 2559 }, 2560 write: { 2561 get: function() { return (this.mode & writeMode) === writeMode; }, 2562 set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; } 2563 }, 2564 isFolder: { 2565 get: function() { return FS.isDir(this.mode); }, 2566 }, 2567 isDevice: { 2568 get: function() { return FS.isChrdev(this.mode); }, 2569 }, 2570 }); 2571 } 2572 2573 var node = new FS.FSNode(parent, name, mode, rdev); 2574 2575 FS.hashAddNode(node); 2576 2577 return node; 2578 },destroyNode:function (node) { 2579 FS.hashRemoveNode(node); 2580 },isRoot:function (node) { 2581 return node === node.parent; 2582 },isMountpoint:function (node) { 2583 return !!node.mounted; 2584 },isFile:function (mode) { 2585 return (mode & 61440) === 32768; 2586 },isDir:function (mode) { 2587 return (mode & 61440) === 16384; 2588 },isLink:function (mode) { 2589 return (mode & 61440) === 40960; 2590 },isChrdev:function (mode) { 2591 return (mode & 61440) === 8192; 2592 },isBlkdev:function (mode) { 2593 return (mode & 61440) === 24576; 2594 },isFIFO:function (mode) { 2595 return (mode & 61440) === 4096; 2596 },isSocket:function (mode) { 2597 return (mode & 49152) === 49152; 2598 },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) { 2599 var flags = FS.flagModes[str]; 2600 if (typeof flags === 'undefined') { 2601 throw new Error('Unknown file open mode: ' + str); 2602 } 2603 return flags; 2604 },flagsToPermissionString:function (flag) { 2605 var accmode = flag & 2097155; 2606 var perms = ['r', 'w', 'rw'][accmode]; 2607 if ((flag & 512)) { 2608 perms += 'w'; 2609 } 2610 return perms; 2611 },nodePermissions:function (node, perms) { 2612 if (FS.ignorePermissions) { 2613 return 0; 2614 } 2615 // return 0 if any user, group or owner bits are set. 2616 if (perms.indexOf('r') !== -1 && !(node.mode & 292)) { 2617 return ERRNO_CODES.EACCES; 2618 } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) { 2619 return ERRNO_CODES.EACCES; 2620 } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) { 2621 return ERRNO_CODES.EACCES; 2622 } 2623 return 0; 2624 },mayLookup:function (dir) { 2625 return FS.nodePermissions(dir, 'x'); 2626 },mayCreate:function (dir, name) { 2627 try { 2628 var node = FS.lookupNode(dir, name); 2629 return ERRNO_CODES.EEXIST; 2630 } catch (e) { 2631 } 2632 return FS.nodePermissions(dir, 'wx'); 2633 },mayDelete:function (dir, name, isdir) { 2634 var node; 2635 try { 2636 node = FS.lookupNode(dir, name); 2637 } catch (e) { 2638 return e.errno; 2639 } 2640 var err = FS.nodePermissions(dir, 'wx'); 2641 if (err) { 2642 return err; 2643 } 2644 if (isdir) { 2645 if (!FS.isDir(node.mode)) { 2646 return ERRNO_CODES.ENOTDIR; 2647 } 2648 if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { 2649 return ERRNO_CODES.EBUSY; 2650 } 2651 } else { 2652 if (FS.isDir(node.mode)) { 2653 return ERRNO_CODES.EISDIR; 2654 } 2655 } 2656 return 0; 2657 },mayOpen:function (node, flags) { 2658 if (!node) { 2659 return ERRNO_CODES.ENOENT; 2660 } 2661 if (FS.isLink(node.mode)) { 2662 return ERRNO_CODES.ELOOP; 2663 } else if (FS.isDir(node.mode)) { 2664 if ((flags & 2097155) !== 0 || // opening for write 2665 (flags & 512)) { 2666 return ERRNO_CODES.EISDIR; 2667 } 2668 } 2669 return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); 2670 },MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) { 2671 fd_start = fd_start || 0; 2672 fd_end = fd_end || FS.MAX_OPEN_FDS; 2673 for (var fd = fd_start; fd <= fd_end; fd++) { 2674 if (!FS.streams[fd]) { 2675 return fd; 2676 } 2677 } 2678 throw new FS.ErrnoError(ERRNO_CODES.EMFILE); 2679 },getStream:function (fd) { 2680 return FS.streams[fd]; 2681 },createStream:function (stream, fd_start, fd_end) { 2682 if (!FS.FSStream) { 2683 FS.FSStream = function(){}; 2684 FS.FSStream.prototype = {}; 2685 // compatibility 2686 Object.defineProperties(FS.FSStream.prototype, { 2687 object: { 2688 get: function() { return this.node; }, 2689 set: function(val) { this.node = val; } 2690 }, 2691 isRead: { 2692 get: function() { return (this.flags & 2097155) !== 1; } 2693 }, 2694 isWrite: { 2695 get: function() { return (this.flags & 2097155) !== 0; } 2696 }, 2697 isAppend: { 2698 get: function() { return (this.flags & 1024); } 2699 } 2700 }); 2701 } 2702 if (0) { 2703 // reuse the object 2704 stream.__proto__ = FS.FSStream.prototype; 2705 } else { 2706 var newStream = new FS.FSStream(); 2707 for (var p in stream) { 2708 newStream[p] = stream[p]; 2709 } 2710 stream = newStream; 2711 } 2712 var fd = FS.nextfd(fd_start, fd_end); 2713 stream.fd = fd; 2714 FS.streams[fd] = stream; 2715 return stream; 2716 },closeStream:function (fd) { 2717 FS.streams[fd] = null; 2718 },getStreamFromPtr:function (ptr) { 2719 return FS.streams[ptr - 1]; 2720 },getPtrForStream:function (stream) { 2721 return stream ? stream.fd + 1 : 0; 2722 },chrdev_stream_ops:{open:function (stream) { 2723 var device = FS.getDevice(stream.node.rdev); 2724 // override node's stream ops with the device's 2725 stream.stream_ops = device.stream_ops; 2726 // forward the open call 2727 if (stream.stream_ops.open) { 2728 stream.stream_ops.open(stream); 2729 } 2730 },llseek:function () { 2731 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); 2732 }},major:function (dev) { 2733 return ((dev) >> 8); 2734 },minor:function (dev) { 2735 return ((dev) & 0xff); 2736 },makedev:function (ma, mi) { 2737 return ((ma) << 8 | (mi)); 2738 },registerDevice:function (dev, ops) { 2739 FS.devices[dev] = { stream_ops: ops }; 2740 },getDevice:function (dev) { 2741 return FS.devices[dev]; 2742 },getMounts:function (mount) { 2743 var mounts = []; 2744 var check = [mount]; 2745 2746 while (check.length) { 2747 var m = check.pop(); 2748 2749 mounts.push(m); 2750 2751 check.push.apply(check, m.mounts); 2752 } 2753 2754 return mounts; 2755 },syncfs:function (populate, callback) { 2756 if (typeof(populate) === 'function') { 2757 callback = populate; 2758 populate = false; 2759 } 2760 2761 var mounts = FS.getMounts(FS.root.mount); 2762 var completed = 0; 2763 2764 function done(err) { 2765 if (err) { 2766 if (!done.errored) { 2767 done.errored = true; 2768 return callback(err); 2769 } 2770 return; 2771 } 2772 if (++completed >= mounts.length) { 2773 callback(null); 2774 } 2775 }; 2776 2777 // sync all mounts 2778 mounts.forEach(function (mount) { 2779 if (!mount.type.syncfs) { 2780 return done(null); 2781 } 2782 mount.type.syncfs(mount, populate, done); 2783 }); 2784 },mount:function (type, opts, mountpoint) { 2785 var root = mountpoint === '/'; 2786 var pseudo = !mountpoint; 2787 var node; 2788 2789 if (root && FS.root) { 2790 throw new FS.ErrnoError(ERRNO_CODES.EBUSY); 2791 } else if (!root && !pseudo) { 2792 var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); 2793 2794 mountpoint = lookup.path; // use the absolute path 2795 node = lookup.node; 2796 2797 if (FS.isMountpoint(node)) { 2798 throw new FS.ErrnoError(ERRNO_CODES.EBUSY); 2799 } 2800 2801 if (!FS.isDir(node.mode)) { 2802 throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); 2803 } 2804 } 2805 2806 var mount = { 2807 type: type, 2808 opts: opts, 2809 mountpoint: mountpoint, 2810 mounts: [] 2811 }; 2812 2813 // create a root node for the fs 2814 var mountRoot = type.mount(mount); 2815 mountRoot.mount = mount; 2816 mount.root = mountRoot; 2817 2818 if (root) { 2819 FS.root = mountRoot; 2820 } else if (node) { 2821 // set as a mountpoint 2822 node.mounted = mount; 2823 2824 // add the new mount to the current mount's children 2825 if (node.mount) { 2826 node.mount.mounts.push(mount); 2827 } 2828 } 2829 2830 return mountRoot; 2831 },unmount:function (mountpoint) { 2832 var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); 2833 2834 if (!FS.isMountpoint(lookup.node)) { 2835 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 2836 } 2837 2838 // destroy the nodes for this mount, and all its child mounts 2839 var node = lookup.node; 2840 var mount = node.mounted; 2841 var mounts = FS.getMounts(mount); 2842 2843 Object.keys(FS.nameTable).forEach(function (hash) { 2844 var current = FS.nameTable[hash]; 2845 2846 while (current) { 2847 var next = current.name_next; 2848 2849 if (mounts.indexOf(current.mount) !== -1) { 2850 FS.destroyNode(current); 2851 } 2852 2853 current = next; 2854 } 2855 }); 2856 2857 // no longer a mountpoint 2858 node.mounted = null; 2859 2860 // remove this mount from the child mounts 2861 var idx = node.mount.mounts.indexOf(mount); 2862 assert(idx !== -1); 2863 node.mount.mounts.splice(idx, 1); 2864 },lookup:function (parent, name) { 2865 return parent.node_ops.lookup(parent, name); 2866 },mknod:function (path, mode, dev) { 2867 var lookup = FS.lookupPath(path, { parent: true }); 2868 var parent = lookup.node; 2869 var name = PATH.basename(path); 2870 var err = FS.mayCreate(parent, name); 2871 if (err) { 2872 throw new FS.ErrnoError(err); 2873 } 2874 if (!parent.node_ops.mknod) { 2875 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 2876 } 2877 return parent.node_ops.mknod(parent, name, mode, dev); 2878 },create:function (path, mode) { 2879 mode = mode !== undefined ? mode : 438 /* 0666 */; 2880 mode &= 4095; 2881 mode |= 32768; 2882 return FS.mknod(path, mode, 0); 2883 },mkdir:function (path, mode) { 2884 mode = mode !== undefined ? mode : 511 /* 0777 */; 2885 mode &= 511 | 512; 2886 mode |= 16384; 2887 return FS.mknod(path, mode, 0); 2888 },mkdev:function (path, mode, dev) { 2889 if (typeof(dev) === 'undefined') { 2890 dev = mode; 2891 mode = 438 /* 0666 */; 2892 } 2893 mode |= 8192; 2894 return FS.mknod(path, mode, dev); 2895 },symlink:function (oldpath, newpath) { 2896 var lookup = FS.lookupPath(newpath, { parent: true }); 2897 var parent = lookup.node; 2898 var newname = PATH.basename(newpath); 2899 var err = FS.mayCreate(parent, newname); 2900 if (err) { 2901 throw new FS.ErrnoError(err); 2902 } 2903 if (!parent.node_ops.symlink) { 2904 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 2905 } 2906 return parent.node_ops.symlink(parent, newname, oldpath); 2907 },rename:function (old_path, new_path) { 2908 var old_dirname = PATH.dirname(old_path); 2909 var new_dirname = PATH.dirname(new_path); 2910 var old_name = PATH.basename(old_path); 2911 var new_name = PATH.basename(new_path); 2912 // parents must exist 2913 var lookup, old_dir, new_dir; 2914 try { 2915 lookup = FS.lookupPath(old_path, { parent: true }); 2916 old_dir = lookup.node; 2917 lookup = FS.lookupPath(new_path, { parent: true }); 2918 new_dir = lookup.node; 2919 } catch (e) { 2920 throw new FS.ErrnoError(ERRNO_CODES.EBUSY); 2921 } 2922 // need to be part of the same mount 2923 if (old_dir.mount !== new_dir.mount) { 2924 throw new FS.ErrnoError(ERRNO_CODES.EXDEV); 2925 } 2926 // source must exist 2927 var old_node = FS.lookupNode(old_dir, old_name); 2928 // old path should not be an ancestor of the new path 2929 var relative = PATH.relative(old_path, new_dirname); 2930 if (relative.charAt(0) !== '.') { 2931 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 2932 } 2933 // new path should not be an ancestor of the old path 2934 relative = PATH.relative(new_path, old_dirname); 2935 if (relative.charAt(0) !== '.') { 2936 throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY); 2937 } 2938 // see if the new path already exists 2939 var new_node; 2940 try { 2941 new_node = FS.lookupNode(new_dir, new_name); 2942 } catch (e) { 2943 // not fatal 2944 } 2945 // early out if nothing needs to change 2946 if (old_node === new_node) { 2947 return; 2948 } 2949 // we'll need to delete the old entry 2950 var isdir = FS.isDir(old_node.mode); 2951 var err = FS.mayDelete(old_dir, old_name, isdir); 2952 if (err) { 2953 throw new FS.ErrnoError(err); 2954 } 2955 // need delete permissions if we'll be overwriting. 2956 // need create permissions if new doesn't already exist. 2957 err = new_node ? 2958 FS.mayDelete(new_dir, new_name, isdir) : 2959 FS.mayCreate(new_dir, new_name); 2960 if (err) { 2961 throw new FS.ErrnoError(err); 2962 } 2963 if (!old_dir.node_ops.rename) { 2964 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 2965 } 2966 if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { 2967 throw new FS.ErrnoError(ERRNO_CODES.EBUSY); 2968 } 2969 // if we are going to change the parent, check write permissions 2970 if (new_dir !== old_dir) { 2971 err = FS.nodePermissions(old_dir, 'w'); 2972 if (err) { 2973 throw new FS.ErrnoError(err); 2974 } 2975 } 2976 // remove the node from the lookup hash 2977 FS.hashRemoveNode(old_node); 2978 // do the underlying fs rename 2979 try { 2980 old_dir.node_ops.rename(old_node, new_dir, new_name); 2981 } catch (e) { 2982 throw e; 2983 } finally { 2984 // add the node back to the hash (in case node_ops.rename 2985 // changed its name) 2986 FS.hashAddNode(old_node); 2987 } 2988 },rmdir:function (path) { 2989 var lookup = FS.lookupPath(path, { parent: true }); 2990 var parent = lookup.node; 2991 var name = PATH.basename(path); 2992 var node = FS.lookupNode(parent, name); 2993 var err = FS.mayDelete(parent, name, true); 2994 if (err) { 2995 throw new FS.ErrnoError(err); 2996 } 2997 if (!parent.node_ops.rmdir) { 2998 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 2999 } 3000 if (FS.isMountpoint(node)) { 3001 throw new FS.ErrnoError(ERRNO_CODES.EBUSY); 3002 } 3003 parent.node_ops.rmdir(parent, name); 3004 FS.destroyNode(node); 3005 },readdir:function (path) { 3006 var lookup = FS.lookupPath(path, { follow: true }); 3007 var node = lookup.node; 3008 if (!node.node_ops.readdir) { 3009 throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); 3010 } 3011 return node.node_ops.readdir(node); 3012 },unlink:function (path) { 3013 var lookup = FS.lookupPath(path, { parent: true }); 3014 var parent = lookup.node; 3015 var name = PATH.basename(path); 3016 var node = FS.lookupNode(parent, name); 3017 var err = FS.mayDelete(parent, name, false); 3018 if (err) { 3019 // POSIX says unlink should set EPERM, not EISDIR 3020 if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM; 3021 throw new FS.ErrnoError(err); 3022 } 3023 if (!parent.node_ops.unlink) { 3024 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 3025 } 3026 if (FS.isMountpoint(node)) { 3027 throw new FS.ErrnoError(ERRNO_CODES.EBUSY); 3028 } 3029 parent.node_ops.unlink(parent, name); 3030 FS.destroyNode(node); 3031 },readlink:function (path) { 3032 var lookup = FS.lookupPath(path); 3033 var link = lookup.node; 3034 if (!link.node_ops.readlink) { 3035 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3036 } 3037 return link.node_ops.readlink(link); 3038 },stat:function (path, dontFollow) { 3039 var lookup = FS.lookupPath(path, { follow: !dontFollow }); 3040 var node = lookup.node; 3041 if (!node.node_ops.getattr) { 3042 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 3043 } 3044 return node.node_ops.getattr(node); 3045 },lstat:function (path) { 3046 return FS.stat(path, true); 3047 },chmod:function (path, mode, dontFollow) { 3048 var node; 3049 if (typeof path === 'string') { 3050 var lookup = FS.lookupPath(path, { follow: !dontFollow }); 3051 node = lookup.node; 3052 } else { 3053 node = path; 3054 } 3055 if (!node.node_ops.setattr) { 3056 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 3057 } 3058 node.node_ops.setattr(node, { 3059 mode: (mode & 4095) | (node.mode & ~4095), 3060 timestamp: Date.now() 3061 }); 3062 },lchmod:function (path, mode) { 3063 FS.chmod(path, mode, true); 3064 },fchmod:function (fd, mode) { 3065 var stream = FS.getStream(fd); 3066 if (!stream) { 3067 throw new FS.ErrnoError(ERRNO_CODES.EBADF); 3068 } 3069 FS.chmod(stream.node, mode); 3070 },chown:function (path, uid, gid, dontFollow) { 3071 var node; 3072 if (typeof path === 'string') { 3073 var lookup = FS.lookupPath(path, { follow: !dontFollow }); 3074 node = lookup.node; 3075 } else { 3076 node = path; 3077 } 3078 if (!node.node_ops.setattr) { 3079 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 3080 } 3081 node.node_ops.setattr(node, { 3082 timestamp: Date.now() 3083 // we ignore the uid / gid for now 3084 }); 3085 },lchown:function (path, uid, gid) { 3086 FS.chown(path, uid, gid, true); 3087 },fchown:function (fd, uid, gid) { 3088 var stream = FS.getStream(fd); 3089 if (!stream) { 3090 throw new FS.ErrnoError(ERRNO_CODES.EBADF); 3091 } 3092 FS.chown(stream.node, uid, gid); 3093 },truncate:function (path, len) { 3094 if (len < 0) { 3095 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3096 } 3097 var node; 3098 if (typeof path === 'string') { 3099 var lookup = FS.lookupPath(path, { follow: true }); 3100 node = lookup.node; 3101 } else { 3102 node = path; 3103 } 3104 if (!node.node_ops.setattr) { 3105 throw new FS.ErrnoError(ERRNO_CODES.EPERM); 3106 } 3107 if (FS.isDir(node.mode)) { 3108 throw new FS.ErrnoError(ERRNO_CODES.EISDIR); 3109 } 3110 if (!FS.isFile(node.mode)) { 3111 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3112 } 3113 var err = FS.nodePermissions(node, 'w'); 3114 if (err) { 3115 throw new FS.ErrnoError(err); 3116 } 3117 node.node_ops.setattr(node, { 3118 size: len, 3119 timestamp: Date.now() 3120 }); 3121 },ftruncate:function (fd, len) { 3122 var stream = FS.getStream(fd); 3123 if (!stream) { 3124 throw new FS.ErrnoError(ERRNO_CODES.EBADF); 3125 } 3126 if ((stream.flags & 2097155) === 0) { 3127 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3128 } 3129 FS.truncate(stream.node, len); 3130 },utime:function (path, atime, mtime) { 3131 var lookup = FS.lookupPath(path, { follow: true }); 3132 var node = lookup.node; 3133 node.node_ops.setattr(node, { 3134 timestamp: Math.max(atime, mtime) 3135 }); 3136 },open:function (path, flags, mode, fd_start, fd_end) { 3137 flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; 3138 mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; 3139 if ((flags & 64)) { 3140 mode = (mode & 4095) | 32768; 3141 } else { 3142 mode = 0; 3143 } 3144 var node; 3145 if (typeof path === 'object') { 3146 node = path; 3147 } else { 3148 path = PATH.normalize(path); 3149 try { 3150 var lookup = FS.lookupPath(path, { 3151 follow: !(flags & 131072) 3152 }); 3153 node = lookup.node; 3154 } catch (e) { 3155 // ignore 3156 } 3157 } 3158 // perhaps we need to create the node 3159 if ((flags & 64)) { 3160 if (node) { 3161 // if O_CREAT and O_EXCL are set, error out if the node already exists 3162 if ((flags & 128)) { 3163 throw new FS.ErrnoError(ERRNO_CODES.EEXIST); 3164 } 3165 } else { 3166 // node doesn't exist, try to create it 3167 node = FS.mknod(path, mode, 0); 3168 } 3169 } 3170 if (!node) { 3171 throw new FS.ErrnoError(ERRNO_CODES.ENOENT); 3172 } 3173 // can't truncate a device 3174 if (FS.isChrdev(node.mode)) { 3175 flags &= ~512; 3176 } 3177 // check permissions 3178 var err = FS.mayOpen(node, flags); 3179 if (err) { 3180 throw new FS.ErrnoError(err); 3181 } 3182 // do truncation if necessary 3183 if ((flags & 512)) { 3184 FS.truncate(node, 0); 3185 } 3186 // we've already handled these, don't pass down to the underlying vfs 3187 flags &= ~(128 | 512); 3188 3189 // register the stream with the filesystem 3190 var stream = FS.createStream({ 3191 node: node, 3192 path: FS.getPath(node), // we want the absolute path to the node 3193 flags: flags, 3194 seekable: true, 3195 position: 0, 3196 stream_ops: node.stream_ops, 3197 // used by the file family libc calls (fopen, fwrite, ferror, etc.) 3198 ungotten: [], 3199 error: false 3200 }, fd_start, fd_end); 3201 // call the new stream's open function 3202 if (stream.stream_ops.open) { 3203 stream.stream_ops.open(stream); 3204 } 3205 if (Module['logReadFiles'] && !(flags & 1)) { 3206 if (!FS.readFiles) FS.readFiles = {}; 3207 if (!(path in FS.readFiles)) { 3208 FS.readFiles[path] = 1; 3209 Module['printErr']('read file: ' + path); 3210 } 3211 } 3212 return stream; 3213 },close:function (stream) { 3214 try { 3215 if (stream.stream_ops.close) { 3216 stream.stream_ops.close(stream); 3217 } 3218 } catch (e) { 3219 throw e; 3220 } finally { 3221 FS.closeStream(stream.fd); 3222 } 3223 },llseek:function (stream, offset, whence) { 3224 if (!stream.seekable || !stream.stream_ops.llseek) { 3225 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); 3226 } 3227 return stream.stream_ops.llseek(stream, offset, whence); 3228 },read:function (stream, buffer, offset, length, position) { 3229 if (length < 0 || position < 0) { 3230 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3231 } 3232 if ((stream.flags & 2097155) === 1) { 3233 throw new FS.ErrnoError(ERRNO_CODES.EBADF); 3234 } 3235 if (FS.isDir(stream.node.mode)) { 3236 throw new FS.ErrnoError(ERRNO_CODES.EISDIR); 3237 } 3238 if (!stream.stream_ops.read) { 3239 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3240 } 3241 var seeking = true; 3242 if (typeof position === 'undefined') { 3243 position = stream.position; 3244 seeking = false; 3245 } else if (!stream.seekable) { 3246 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); 3247 } 3248 var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); 3249 if (!seeking) stream.position += bytesRead; 3250 return bytesRead; 3251 },write:function (stream, buffer, offset, length, position, canOwn) { 3252 if (length < 0 || position < 0) { 3253 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3254 } 3255 if ((stream.flags & 2097155) === 0) { 3256 throw new FS.ErrnoError(ERRNO_CODES.EBADF); 3257 } 3258 if (FS.isDir(stream.node.mode)) { 3259 throw new FS.ErrnoError(ERRNO_CODES.EISDIR); 3260 } 3261 if (!stream.stream_ops.write) { 3262 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3263 } 3264 var seeking = true; 3265 if (typeof position === 'undefined') { 3266 position = stream.position; 3267 seeking = false; 3268 } else if (!stream.seekable) { 3269 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE); 3270 } 3271 if (stream.flags & 1024) { 3272 // seek to the end before writing in append mode 3273 FS.llseek(stream, 0, 2); 3274 } 3275 var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); 3276 if (!seeking) stream.position += bytesWritten; 3277 return bytesWritten; 3278 },allocate:function (stream, offset, length) { 3279 if (offset < 0 || length <= 0) { 3280 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 3281 } 3282 if ((stream.flags & 2097155) === 0) { 3283 throw new FS.ErrnoError(ERRNO_CODES.EBADF); 3284 } 3285 if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) { 3286 throw new FS.ErrnoError(ERRNO_CODES.ENODEV); 3287 } 3288 if (!stream.stream_ops.allocate) { 3289 throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); 3290 } 3291 stream.stream_ops.allocate(stream, offset, length); 3292 },mmap:function (stream, buffer, offset, length, position, prot, flags) { 3293 // TODO if PROT is PROT_WRITE, make sure we have write access 3294 if ((stream.flags & 2097155) === 1) { 3295 throw new FS.ErrnoError(ERRNO_CODES.EACCES); 3296 } 3297 if (!stream.stream_ops.mmap) { 3298 throw new FS.ErrnoError(ERRNO_CODES.ENODEV); 3299 } 3300 return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags); 3301 },ioctl:function (stream, cmd, arg) { 3302 if (!stream.stream_ops.ioctl) { 3303 throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); 3304 } 3305 return stream.stream_ops.ioctl(stream, cmd, arg); 3306 },readFile:function (path, opts) { 3307 opts = opts || {}; 3308 opts.flags = opts.flags || 'r'; 3309 opts.encoding = opts.encoding || 'binary'; 3310 if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { 3311 throw new Error('Invalid encoding type "' + opts.encoding + '"'); 3312 } 3313 var ret; 3314 var stream = FS.open(path, opts.flags); 3315 var stat = FS.stat(path); 3316 var length = stat.size; 3317 var buf = new Uint8Array(length); 3318 FS.read(stream, buf, 0, length, 0); 3319 if (opts.encoding === 'utf8') { 3320 ret = ''; 3321 var utf8 = new Runtime.UTF8Processor(); 3322 for (var i = 0; i < length; i++) { 3323 ret += utf8.processCChar(buf[i]); 3324 } 3325 } else if (opts.encoding === 'binary') { 3326 ret = buf; 3327 } 3328 FS.close(stream); 3329 return ret; 3330 },writeFile:function (path, data, opts) { 3331 opts = opts || {}; 3332 opts.flags = opts.flags || 'w'; 3333 opts.encoding = opts.encoding || 'utf8'; 3334 if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { 3335 throw new Error('Invalid encoding type "' + opts.encoding + '"'); 3336 } 3337 var stream = FS.open(path, opts.flags, opts.mode); 3338 if (opts.encoding === 'utf8') { 3339 var utf8 = new Runtime.UTF8Processor(); 3340 var buf = new Uint8Array(utf8.processJSString(data)); 3341 FS.write(stream, buf, 0, buf.length, 0, opts.canOwn); 3342 } else if (opts.encoding === 'binary') { 3343 FS.write(stream, data, 0, data.length, 0, opts.canOwn); 3344 } 3345 FS.close(stream); 3346 },cwd:function () { 3347 return FS.currentPath; 3348 },chdir:function (path) { 3349 var lookup = FS.lookupPath(path, { follow: true }); 3350 if (!FS.isDir(lookup.node.mode)) { 3351 throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR); 3352 } 3353 var err = FS.nodePermissions(lookup.node, 'x'); 3354 if (err) { 3355 throw new FS.ErrnoError(err); 3356 } 3357 FS.currentPath = lookup.path; 3358 },createDefaultDirectories:function () { 3359 FS.mkdir('/tmp'); 3360 },createDefaultDevices:function () { 3361 // create /dev 3362 FS.mkdir('/dev'); 3363 // setup /dev/null 3364 FS.registerDevice(FS.makedev(1, 3), { 3365 read: function() { return 0; }, 3366 write: function() { return 0; } 3367 }); 3368 FS.mkdev('/dev/null', FS.makedev(1, 3)); 3369 // setup /dev/tty and /dev/tty1 3370 // stderr needs to print output using Module['printErr'] 3371 // so we register a second tty just for it. 3372 TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); 3373 TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); 3374 FS.mkdev('/dev/tty', FS.makedev(5, 0)); 3375 FS.mkdev('/dev/tty1', FS.makedev(6, 0)); 3376 // we're not going to emulate the actual shm device, 3377 // just create the tmp dirs that reside in it commonly 3378 FS.mkdir('/dev/shm'); 3379 FS.mkdir('/dev/shm/tmp'); 3380 },createStandardStreams:function () { 3381 // TODO deprecate the old functionality of a single 3382 // input / output callback and that utilizes FS.createDevice 3383 // and instead require a unique set of stream ops 3384 3385 // by default, we symlink the standard streams to the 3386 // default tty devices. however, if the standard streams 3387 // have been overwritten we create a unique device for 3388 // them instead. 3389 if (Module['stdin']) { 3390 FS.createDevice('/dev', 'stdin', Module['stdin']); 3391 } else { 3392 FS.symlink('/dev/tty', '/dev/stdin'); 3393 } 3394 if (Module['stdout']) { 3395 FS.createDevice('/dev', 'stdout', null, Module['stdout']); 3396 } else { 3397 FS.symlink('/dev/tty', '/dev/stdout'); 3398 } 3399 if (Module['stderr']) { 3400 FS.createDevice('/dev', 'stderr', null, Module['stderr']); 3401 } else { 3402 FS.symlink('/dev/tty1', '/dev/stderr'); 3403 } 3404 3405 // open default streams for the stdin, stdout and stderr devices 3406 var stdin = FS.open('/dev/stdin', 'r'); 3407 HEAP32[((_stdin)>>2)]=FS.getPtrForStream(stdin); 3408 assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')'); 3409 3410 var stdout = FS.open('/dev/stdout', 'w'); 3411 HEAP32[((_stdout)>>2)]=FS.getPtrForStream(stdout); 3412 assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')'); 3413 3414 var stderr = FS.open('/dev/stderr', 'w'); 3415 HEAP32[((_stderr)>>2)]=FS.getPtrForStream(stderr); 3416 assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')'); 3417 },ensureErrnoError:function () { 3418 if (FS.ErrnoError) return; 3419 FS.ErrnoError = function ErrnoError(errno) { 3420 this.errno = errno; 3421 for (var key in ERRNO_CODES) { 3422 if (ERRNO_CODES[key] === errno) { 3423 this.code = key; 3424 break; 3425 } 3426 } 3427 this.message = ERRNO_MESSAGES[errno]; 3428 }; 3429 FS.ErrnoError.prototype = new Error(); 3430 FS.ErrnoError.prototype.constructor = FS.ErrnoError; 3431 // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) 3432 [ERRNO_CODES.ENOENT].forEach(function(code) { 3433 FS.genericErrors[code] = new FS.ErrnoError(code); 3434 FS.genericErrors[code].stack = '<generic error, no stack>'; 3435 }); 3436 },staticInit:function () { 3437 FS.ensureErrnoError(); 3438 3439 FS.nameTable = new Array(4096); 3440 3441 FS.mount(MEMFS, {}, '/'); 3442 3443 FS.createDefaultDirectories(); 3444 FS.createDefaultDevices(); 3445 },init:function (input, output, error) { 3446 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)'); 3447 FS.init.initialized = true; 3448 3449 FS.ensureErrnoError(); 3450 3451 // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here 3452 Module['stdin'] = input || Module['stdin']; 3453 Module['stdout'] = output || Module['stdout']; 3454 Module['stderr'] = error || Module['stderr']; 3455 3456 FS.createStandardStreams(); 3457 },quit:function () { 3458 FS.init.initialized = false; 3459 for (var i = 0; i < FS.streams.length; i++) { 3460 var stream = FS.streams[i]; 3461 if (!stream) { 3462 continue; 3463 } 3464 FS.close(stream); 3465 } 3466 },getMode:function (canRead, canWrite) { 3467 var mode = 0; 3468 if (canRead) mode |= 292 | 73; 3469 if (canWrite) mode |= 146; 3470 return mode; 3471 },joinPath:function (parts, forceRelative) { 3472 var path = PATH.join.apply(null, parts); 3473 if (forceRelative && path[0] == '/') path = path.substr(1); 3474 return path; 3475 },absolutePath:function (relative, base) { 3476 return PATH.resolve(base, relative); 3477 },standardizePath:function (path) { 3478 return PATH.normalize(path); 3479 },findObject:function (path, dontResolveLastLink) { 3480 var ret = FS.analyzePath(path, dontResolveLastLink); 3481 if (ret.exists) { 3482 return ret.object; 3483 } else { 3484 ___setErrNo(ret.error); 3485 return null; 3486 } 3487 },analyzePath:function (path, dontResolveLastLink) { 3488 // operate from within the context of the symlink's target 3489 try { 3490 var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); 3491 path = lookup.path; 3492 } catch (e) { 3493 } 3494 var ret = { 3495 isRoot: false, exists: false, error: 0, name: null, path: null, object: null, 3496 parentExists: false, parentPath: null, parentObject: null 3497 }; 3498 try { 3499 var lookup = FS.lookupPath(path, { parent: true }); 3500 ret.parentExists = true; 3501 ret.parentPath = lookup.path; 3502 ret.parentObject = lookup.node; 3503 ret.name = PATH.basename(path); 3504 lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); 3505 ret.exists = true; 3506 ret.path = lookup.path; 3507 ret.object = lookup.node; 3508 ret.name = lookup.node.name; 3509 ret.isRoot = lookup.path === '/'; 3510 } catch (e) { 3511 ret.error = e.errno; 3512 }; 3513 return ret; 3514 },createFolder:function (parent, name, canRead, canWrite) { 3515 var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); 3516 var mode = FS.getMode(canRead, canWrite); 3517 return FS.mkdir(path, mode); 3518 },createPath:function (parent, path, canRead, canWrite) { 3519 parent = typeof parent === 'string' ? parent : FS.getPath(parent); 3520 var parts = path.split('/').reverse(); 3521 while (parts.length) { 3522 var part = parts.pop(); 3523 if (!part) continue; 3524 var current = PATH.join2(parent, part); 3525 try { 3526 FS.mkdir(current); 3527 } catch (e) { 3528 // ignore EEXIST 3529 } 3530 parent = current; 3531 } 3532 return current; 3533 },createFile:function (parent, name, properties, canRead, canWrite) { 3534 var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); 3535 var mode = FS.getMode(canRead, canWrite); 3536 return FS.create(path, mode); 3537 },createDataFile:function (parent, name, data, canRead, canWrite, canOwn) { 3538 var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent; 3539 var mode = FS.getMode(canRead, canWrite); 3540 var node = FS.create(path, mode); 3541 if (data) { 3542 if (typeof data === 'string') { 3543 var arr = new Array(data.length); 3544 for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); 3545 data = arr; 3546 } 3547 // make sure we can write to the file 3548 FS.chmod(node, mode | 146); 3549 var stream = FS.open(node, 'w'); 3550 FS.write(stream, data, 0, data.length, 0, canOwn); 3551 FS.close(stream); 3552 FS.chmod(node, mode); 3553 } 3554 return node; 3555 },createDevice:function (parent, name, input, output) { 3556 var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); 3557 var mode = FS.getMode(!!input, !!output); 3558 if (!FS.createDevice.major) FS.createDevice.major = 64; 3559 var dev = FS.makedev(FS.createDevice.major++, 0); 3560 // Create a fake device that a set of stream ops to emulate 3561 // the old behavior. 3562 FS.registerDevice(dev, { 3563 open: function(stream) { 3564 stream.seekable = false; 3565 }, 3566 close: function(stream) { 3567 // flush any pending line data 3568 if (output && output.buffer && output.buffer.length) { 3569 output(10); 3570 } 3571 }, 3572 read: function(stream, buffer, offset, length, pos /* ignored */) { 3573 var bytesRead = 0; 3574 for (var i = 0; i < length; i++) { 3575 var result; 3576 try { 3577 result = input(); 3578 } catch (e) { 3579 throw new FS.ErrnoError(ERRNO_CODES.EIO); 3580 } 3581 if (result === undefined && bytesRead === 0) { 3582 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); 3583 } 3584 if (result === null || result === undefined) break; 3585 bytesRead++; 3586 buffer[offset+i] = result; 3587 } 3588 if (bytesRead) { 3589 stream.node.timestamp = Date.now(); 3590 } 3591 return bytesRead; 3592 }, 3593 write: function(stream, buffer, offset, length, pos) { 3594 for (var i = 0; i < length; i++) { 3595 try { 3596 output(buffer[offset+i]); 3597 } catch (e) { 3598 throw new FS.ErrnoError(ERRNO_CODES.EIO); 3599 } 3600 } 3601 if (length) { 3602 stream.node.timestamp = Date.now(); 3603 } 3604 return i; 3605 } 3606 }); 3607 return FS.mkdev(path, mode, dev); 3608 },createLink:function (parent, name, target, canRead, canWrite) { 3609 var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name); 3610 return FS.symlink(target, path); 3611 },forceLoadFile:function (obj) { 3612 if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; 3613 var success = true; 3614 if (typeof XMLHttpRequest !== 'undefined') { 3615 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."); 3616 } else if (Module['read']) { 3617 // Command-line. 3618 try { 3619 // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as 3620 // read() will try to parse UTF8. 3621 obj.contents = intArrayFromString(Module['read'](obj.url), true); 3622 } catch (e) { 3623 success = false; 3624 } 3625 } else { 3626 throw new Error('Cannot load without read() or XMLHttpRequest.'); 3627 } 3628 if (!success) ___setErrNo(ERRNO_CODES.EIO); 3629 return success; 3630 },createLazyFile:function (parent, name, url, canRead, canWrite) { 3631 // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse. 3632 function LazyUint8Array() { 3633 this.lengthKnown = false; 3634 this.chunks = []; // Loaded chunks. Index is the chunk number 3635 } 3636 LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { 3637 if (idx > this.length-1 || idx < 0) { 3638 return undefined; 3639 } 3640 var chunkOffset = idx % this.chunkSize; 3641 var chunkNum = Math.floor(idx / this.chunkSize); 3642 return this.getter(chunkNum)[chunkOffset]; 3643 } 3644 LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) { 3645 this.getter = getter; 3646 } 3647 LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { 3648 // Find length 3649 var xhr = new XMLHttpRequest(); 3650 xhr.open('HEAD', url, false); 3651 xhr.send(null); 3652 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); 3653 var datalength = Number(xhr.getResponseHeader("Content-length")); 3654 var header; 3655 var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; 3656 var chunkSize = 1024*1024; // Chunk size in bytes 3657 3658 if (!hasByteServing) chunkSize = datalength; 3659 3660 // Function to get a range from the remote URL. 3661 var doXHR = (function(from, to) { 3662 if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); 3663 if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); 3664 3665 // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. 3666 var xhr = new XMLHttpRequest(); 3667 xhr.open('GET', url, false); 3668 if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); 3669 3670 // Some hints to the browser that we want binary data. 3671 if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer'; 3672 if (xhr.overrideMimeType) { 3673 xhr.overrideMimeType('text/plain; charset=x-user-defined'); 3674 } 3675 3676 xhr.send(null); 3677 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); 3678 if (xhr.response !== undefined) { 3679 return new Uint8Array(xhr.response || []); 3680 } else { 3681 return intArrayFromString(xhr.responseText || '', true); 3682 } 3683 }); 3684 var lazyArray = this; 3685 lazyArray.setDataGetter(function(chunkNum) { 3686 var start = chunkNum * chunkSize; 3687 var end = (chunkNum+1) * chunkSize - 1; // including this byte 3688 end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block 3689 if (typeof(lazyArray.chunks[chunkNum]) === "undefined") { 3690 lazyArray.chunks[chunkNum] = doXHR(start, end); 3691 } 3692 if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!"); 3693 return lazyArray.chunks[chunkNum]; 3694 }); 3695 3696 this._length = datalength; 3697 this._chunkSize = chunkSize; 3698 this.lengthKnown = true; 3699 } 3700 if (typeof XMLHttpRequest !== 'undefined') { 3701 if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; 3702 var lazyArray = new LazyUint8Array(); 3703 Object.defineProperty(lazyArray, "length", { 3704 get: function() { 3705 if(!this.lengthKnown) { 3706 this.cacheLength(); 3707 } 3708 return this._length; 3709 } 3710 }); 3711 Object.defineProperty(lazyArray, "chunkSize", { 3712 get: function() { 3713 if(!this.lengthKnown) { 3714 this.cacheLength(); 3715 } 3716 return this._chunkSize; 3717 } 3718 }); 3719 3720 var properties = { isDevice: false, contents: lazyArray }; 3721 } else { 3722 var properties = { isDevice: false, url: url }; 3723 } 3724 3725 var node = FS.createFile(parent, name, properties, canRead, canWrite); 3726 // This is a total hack, but I want to get this lazy file code out of the 3727 // core of MEMFS. If we want to keep this lazy file concept I feel it should 3728 // be its own thin LAZYFS proxying calls to MEMFS. 3729 if (properties.contents) { 3730 node.contents = properties.contents; 3731 } else if (properties.url) { 3732 node.contents = null; 3733 node.url = properties.url; 3734 } 3735 // override each stream op with one that tries to force load the lazy file first 3736 var stream_ops = {}; 3737 var keys = Object.keys(node.stream_ops); 3738 keys.forEach(function(key) { 3739 var fn = node.stream_ops[key]; 3740 stream_ops[key] = function forceLoadLazyFile() { 3741 if (!FS.forceLoadFile(node)) { 3742 throw new FS.ErrnoError(ERRNO_CODES.EIO); 3743 } 3744 return fn.apply(null, arguments); 3745 }; 3746 }); 3747 // use a custom read function 3748 stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) { 3749 if (!FS.forceLoadFile(node)) { 3750 throw new FS.ErrnoError(ERRNO_CODES.EIO); 3751 } 3752 var contents = stream.node.contents; 3753 if (position >= contents.length) 3754 return 0; 3755 var size = Math.min(contents.length - position, length); 3756 assert(size >= 0); 3757 if (contents.slice) { // normal array 3758 for (var i = 0; i < size; i++) { 3759 buffer[offset + i] = contents[position + i]; 3760 } 3761 } else { 3762 for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR 3763 buffer[offset + i] = contents.get(position + i); 3764 } 3765 } 3766 return size; 3767 }; 3768 node.stream_ops = stream_ops; 3769 return node; 3770 },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) { 3771 Browser.init(); 3772 // TODO we should allow people to just pass in a complete filename instead 3773 // of parent and name being that we just join them anyways 3774 var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent; 3775 function processData(byteArray) { 3776 function finish(byteArray) { 3777 if (!dontCreateFile) { 3778 FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); 3779 } 3780 if (onload) onload(); 3781 removeRunDependency('cp ' + fullname); 3782 } 3783 var handled = false; 3784 Module['preloadPlugins'].forEach(function(plugin) { 3785 if (handled) return; 3786 if (plugin['canHandle'](fullname)) { 3787 plugin['handle'](byteArray, fullname, finish, function() { 3788 if (onerror) onerror(); 3789 removeRunDependency('cp ' + fullname); 3790 }); 3791 handled = true; 3792 } 3793 }); 3794 if (!handled) finish(byteArray); 3795 } 3796 addRunDependency('cp ' + fullname); 3797 if (typeof url == 'string') { 3798 Browser.asyncLoad(url, function(byteArray) { 3799 processData(byteArray); 3800 }, onerror); 3801 } else { 3802 processData(url); 3803 } 3804 },indexedDB:function () { 3805 return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; 3806 },DB_NAME:function () { 3807 return 'EM_FS_' + window.location.pathname; 3808 },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function (paths, onload, onerror) { 3809 onload = onload || function(){}; 3810 onerror = onerror || function(){}; 3811 var indexedDB = FS.indexedDB(); 3812 try { 3813 var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); 3814 } catch (e) { 3815 return onerror(e); 3816 } 3817 openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { 3818 console.log('creating db'); 3819 var db = openRequest.result; 3820 db.createObjectStore(FS.DB_STORE_NAME); 3821 }; 3822 openRequest.onsuccess = function openRequest_onsuccess() { 3823 var db = openRequest.result; 3824 var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite'); 3825 var files = transaction.objectStore(FS.DB_STORE_NAME); 3826 var ok = 0, fail = 0, total = paths.length; 3827 function finish() { 3828 if (fail == 0) onload(); else onerror(); 3829 } 3830 paths.forEach(function(path) { 3831 var putRequest = files.put(FS.analyzePath(path).object.contents, path); 3832 putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() }; 3833 putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() }; 3834 }); 3835 transaction.onerror = onerror; 3836 }; 3837 openRequest.onerror = onerror; 3838 },loadFilesFromDB:function (paths, onload, onerror) { 3839 onload = onload || function(){}; 3840 onerror = onerror || function(){}; 3841 var indexedDB = FS.indexedDB(); 3842 try { 3843 var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); 3844 } catch (e) { 3845 return onerror(e); 3846 } 3847 openRequest.onupgradeneeded = onerror; // no database to load from 3848 openRequest.onsuccess = function openRequest_onsuccess() { 3849 var db = openRequest.result; 3850 try { 3851 var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly'); 3852 } catch(e) { 3853 onerror(e); 3854 return; 3855 } 3856 var files = transaction.objectStore(FS.DB_STORE_NAME); 3857 var ok = 0, fail = 0, total = paths.length; 3858 function finish() { 3859 if (fail == 0) onload(); else onerror(); 3860 } 3861 paths.forEach(function(path) { 3862 var getRequest = files.get(path); 3863 getRequest.onsuccess = function getRequest_onsuccess() { 3864 if (FS.analyzePath(path).exists) { 3865 FS.unlink(path); 3866 } 3867 FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true); 3868 ok++; 3869 if (ok + fail == total) finish(); 3870 }; 3871 getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() }; 3872 }); 3873 transaction.onerror = onerror; 3874 }; 3875 openRequest.onerror = onerror; 3876 }}; 3877 3878 3879 3880 3881 function _mkport() { throw 'TODO' }var SOCKFS={mount:function (mount) { 3882 return FS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); 3883 },createSocket:function (family, type, protocol) { 3884 var streaming = type == 1; 3885 if (protocol) { 3886 assert(streaming == (protocol == 6)); // if SOCK_STREAM, must be tcp 3887 } 3888 3889 // create our internal socket structure 3890 var sock = { 3891 family: family, 3892 type: type, 3893 protocol: protocol, 3894 server: null, 3895 peers: {}, 3896 pending: [], 3897 recv_queue: [], 3898 sock_ops: SOCKFS.websocket_sock_ops 3899 }; 3900 3901 // create the filesystem node to store the socket structure 3902 var name = SOCKFS.nextname(); 3903 var node = FS.createNode(SOCKFS.root, name, 49152, 0); 3904 node.sock = sock; 3905 3906 // and the wrapping stream that enables library functions such 3907 // as read and write to indirectly interact with the socket 3908 var stream = FS.createStream({ 3909 path: name, 3910 node: node, 3911 flags: FS.modeStringToFlags('r+'), 3912 seekable: false, 3913 stream_ops: SOCKFS.stream_ops 3914 }); 3915 3916 // map the new stream to the socket structure (sockets have a 1:1 3917 // relationship with a stream) 3918 sock.stream = stream; 3919 3920 return sock; 3921 },getSocket:function (fd) { 3922 var stream = FS.getStream(fd); 3923 if (!stream || !FS.isSocket(stream.node.mode)) { 3924 return null; 3925 } 3926 return stream.node.sock; 3927 },stream_ops:{poll:function (stream) { 3928 var sock = stream.node.sock; 3929 return sock.sock_ops.poll(sock); 3930 },ioctl:function (stream, request, varargs) { 3931 var sock = stream.node.sock; 3932 return sock.sock_ops.ioctl(sock, request, varargs); 3933 },read:function (stream, buffer, offset, length, position /* ignored */) { 3934 var sock = stream.node.sock; 3935 var msg = sock.sock_ops.recvmsg(sock, length); 3936 if (!msg) { 3937 // socket is closed 3938 return 0; 3939 } 3940 buffer.set(msg.buffer, offset); 3941 return msg.buffer.length; 3942 },write:function (stream, buffer, offset, length, position /* ignored */) { 3943 var sock = stream.node.sock; 3944 return sock.sock_ops.sendmsg(sock, buffer, offset, length); 3945 },close:function (stream) { 3946 var sock = stream.node.sock; 3947 sock.sock_ops.close(sock); 3948 }},nextname:function () { 3949 if (!SOCKFS.nextname.current) { 3950 SOCKFS.nextname.current = 0; 3951 } 3952 return 'socket[' + (SOCKFS.nextname.current++) + ']'; 3953 },websocket_sock_ops:{createPeer:function (sock, addr, port) { 3954 var ws; 3955 3956 if (typeof addr === 'object') { 3957 ws = addr; 3958 addr = null; 3959 port = null; 3960 } 3961 3962 if (ws) { 3963 // for sockets that've already connected (e.g. we're the server) 3964 // we can inspect the _socket property for the address 3965 if (ws._socket) { 3966 addr = ws._socket.remoteAddress; 3967 port = ws._socket.remotePort; 3968 } 3969 // if we're just now initializing a connection to the remote, 3970 // inspect the url property 3971 else { 3972 var result = /ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url); 3973 if (!result) { 3974 throw new Error('WebSocket URL must be in the format ws(s)://address:port'); 3975 } 3976 addr = result[1]; 3977 port = parseInt(result[2], 10); 3978 } 3979 } else { 3980 // create the actual websocket object and connect 3981 try { 3982 // runtimeConfig gets set to true if WebSocket runtime configuration is available. 3983 var runtimeConfig = (Module['websocket'] && ('object' === typeof Module['websocket'])); 3984 3985 // The default value is 'ws://' the replace is needed because the compiler replaces "//" comments with '#' 3986 // comments without checking context, so we'd end up with ws:#, the replace swaps the "#" for "//" again. 3987 var url = 'ws:#'.replace('#', '//'); 3988 3989 if (runtimeConfig) { 3990 if ('string' === typeof Module['websocket']['url']) { 3991 url = Module['websocket']['url']; // Fetch runtime WebSocket URL config. 3992 } 3993 } 3994 3995 if (url === 'ws://' || url === 'wss://') { // Is the supplied URL config just a prefix, if so complete it. 3996 url = url + addr + ':' + port; 3997 } 3998 3999 // Make the WebSocket subprotocol (Sec-WebSocket-Protocol) default to binary if no configuration is set. 4000 var subProtocols = 'binary'; // The default value is 'binary' 4001 4002 if (runtimeConfig) { 4003 if ('string' === typeof Module['websocket']['subprotocol']) { 4004 subProtocols = Module['websocket']['subprotocol']; // Fetch runtime WebSocket subprotocol config. 4005 } 4006 } 4007 4008 // The regex trims the string (removes spaces at the beginning and end, then splits the string by 4009 // <any space>,<any space> into an Array. Whitespace removal is important for Websockify and ws. 4010 subProtocols = subProtocols.replace(/^ +| +$/g,"").split(/ *, */); 4011 4012 // The node ws library API for specifying optional subprotocol is slightly different than the browser's. 4013 var opts = ENVIRONMENT_IS_NODE ? {'protocol': subProtocols.toString()} : subProtocols; 4014 4015 // If node we use the ws library. 4016 var WebSocket = ENVIRONMENT_IS_NODE ? require('ws') : window['WebSocket']; 4017 ws = new WebSocket(url, opts); 4018 ws.binaryType = 'arraybuffer'; 4019 } catch (e) { 4020 throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH); 4021 } 4022 } 4023 4024 4025 var peer = { 4026 addr: addr, 4027 port: port, 4028 socket: ws, 4029 dgram_send_queue: [] 4030 }; 4031 4032 SOCKFS.websocket_sock_ops.addPeer(sock, peer); 4033 SOCKFS.websocket_sock_ops.handlePeerEvents(sock, peer); 4034 4035 // if this is a bound dgram socket, send the port number first to allow 4036 // us to override the ephemeral port reported to us by remotePort on the 4037 // remote end. 4038 if (sock.type === 2 && typeof sock.sport !== 'undefined') { 4039 peer.dgram_send_queue.push(new Uint8Array([ 4040 255, 255, 255, 255, 4041 'p'.charCodeAt(0), 'o'.charCodeAt(0), 'r'.charCodeAt(0), 't'.charCodeAt(0), 4042 ((sock.sport & 0xff00) >> 8) , (sock.sport & 0xff) 4043 ])); 4044 } 4045 4046 return peer; 4047 },getPeer:function (sock, addr, port) { 4048 return sock.peers[addr + ':' + port]; 4049 },addPeer:function (sock, peer) { 4050 sock.peers[peer.addr + ':' + peer.port] = peer; 4051 },removePeer:function (sock, peer) { 4052 delete sock.peers[peer.addr + ':' + peer.port]; 4053 },handlePeerEvents:function (sock, peer) { 4054 var first = true; 4055 4056 var handleOpen = function () { 4057 try { 4058 var queued = peer.dgram_send_queue.shift(); 4059 while (queued) { 4060 peer.socket.send(queued); 4061 queued = peer.dgram_send_queue.shift(); 4062 } 4063 } catch (e) { 4064 // not much we can do here in the way of proper error handling as we've already 4065 // lied and said this data was sent. shut it down. 4066 peer.socket.close(); 4067 } 4068 }; 4069 4070 function handleMessage(data) { 4071 assert(typeof data !== 'string' && data.byteLength !== undefined); // must receive an ArrayBuffer 4072 data = new Uint8Array(data); // make a typed array view on the array buffer 4073 4074 4075 // if this is the port message, override the peer's port with it 4076 var wasfirst = first; 4077 first = false; 4078 if (wasfirst && 4079 data.length === 10 && 4080 data[0] === 255 && data[1] === 255 && data[2] === 255 && data[3] === 255 && 4081 data[4] === 'p'.charCodeAt(0) && data[5] === 'o'.charCodeAt(0) && data[6] === 'r'.charCodeAt(0) && data[7] === 't'.charCodeAt(0)) { 4082 // update the peer's port and it's key in the peer map 4083 var newport = ((data[8] << 8) | data[9]); 4084 SOCKFS.websocket_sock_ops.removePeer(sock, peer); 4085 peer.port = newport; 4086 SOCKFS.websocket_sock_ops.addPeer(sock, peer); 4087 return; 4088 } 4089 4090 sock.recv_queue.push({ addr: peer.addr, port: peer.port, data: data }); 4091 }; 4092 4093 if (ENVIRONMENT_IS_NODE) { 4094 peer.socket.on('open', handleOpen); 4095 peer.socket.on('message', function(data, flags) { 4096 if (!flags.binary) { 4097 return; 4098 } 4099 handleMessage((new Uint8Array(data)).buffer); // copy from node Buffer -> ArrayBuffer 4100 }); 4101 peer.socket.on('error', function() { 4102 // don't throw 4103 }); 4104 } else { 4105 peer.socket.onopen = handleOpen; 4106 peer.socket.onmessage = function peer_socket_onmessage(event) { 4107 handleMessage(event.data); 4108 }; 4109 } 4110 },poll:function (sock) { 4111 if (sock.type === 1 && sock.server) { 4112 // listen sockets should only say they're available for reading 4113 // if there are pending clients. 4114 return sock.pending.length ? (64 | 1) : 0; 4115 } 4116 4117 var mask = 0; 4118 var dest = sock.type === 1 ? // we only care about the socket state for connection-based sockets 4119 SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport) : 4120 null; 4121 4122 if (sock.recv_queue.length || 4123 !dest || // connection-less sockets are always ready to read 4124 (dest && dest.socket.readyState === dest.socket.CLOSING) || 4125 (dest && dest.socket.readyState === dest.socket.CLOSED)) { // let recv return 0 once closed 4126 mask |= (64 | 1); 4127 } 4128 4129 if (!dest || // connection-less sockets are always ready to write 4130 (dest && dest.socket.readyState === dest.socket.OPEN)) { 4131 mask |= 4; 4132 } 4133 4134 if ((dest && dest.socket.readyState === dest.socket.CLOSING) || 4135 (dest && dest.socket.readyState === dest.socket.CLOSED)) { 4136 mask |= 16; 4137 } 4138 4139 return mask; 4140 },ioctl:function (sock, request, arg) { 4141 switch (request) { 4142 case 21531: 4143 var bytes = 0; 4144 if (sock.recv_queue.length) { 4145 bytes = sock.recv_queue[0].data.length; 4146 } 4147 HEAP32[((arg)>>2)]=bytes; 4148 return 0; 4149 default: 4150 return ERRNO_CODES.EINVAL; 4151 } 4152 },close:function (sock) { 4153 // if we've spawned a listen server, close it 4154 if (sock.server) { 4155 try { 4156 sock.server.close(); 4157 } catch (e) { 4158 } 4159 sock.server = null; 4160 } 4161 // close any peer connections 4162 var peers = Object.keys(sock.peers); 4163 for (var i = 0; i < peers.length; i++) { 4164 var peer = sock.peers[peers[i]]; 4165 try { 4166 peer.socket.close(); 4167 } catch (e) { 4168 } 4169 SOCKFS.websocket_sock_ops.removePeer(sock, peer); 4170 } 4171 return 0; 4172 },bind:function (sock, addr, port) { 4173 if (typeof sock.saddr !== 'undefined' || typeof sock.sport !== 'undefined') { 4174 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already bound 4175 } 4176 sock.saddr = addr; 4177 sock.sport = port || _mkport(); 4178 // in order to emulate dgram sockets, we need to launch a listen server when 4179 // binding on a connection-less socket 4180 // note: this is only required on the server side 4181 if (sock.type === 2) { 4182 // close the existing server if it exists 4183 if (sock.server) { 4184 sock.server.close(); 4185 sock.server = null; 4186 } 4187 // swallow error operation not supported error that occurs when binding in the 4188 // browser where this isn't supported 4189 try { 4190 sock.sock_ops.listen(sock, 0); 4191 } catch (e) { 4192 if (!(e instanceof FS.ErrnoError)) throw e; 4193 if (e.errno !== ERRNO_CODES.EOPNOTSUPP) throw e; 4194 } 4195 } 4196 },connect:function (sock, addr, port) { 4197 if (sock.server) { 4198 throw new FS.ErrnoError(ERRNO_CODS.EOPNOTSUPP); 4199 } 4200 4201 // TODO autobind 4202 // if (!sock.addr && sock.type == 2) { 4203 // } 4204 4205 // early out if we're already connected / in the middle of connecting 4206 if (typeof sock.daddr !== 'undefined' && typeof sock.dport !== 'undefined') { 4207 var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); 4208 if (dest) { 4209 if (dest.socket.readyState === dest.socket.CONNECTING) { 4210 throw new FS.ErrnoError(ERRNO_CODES.EALREADY); 4211 } else { 4212 throw new FS.ErrnoError(ERRNO_CODES.EISCONN); 4213 } 4214 } 4215 } 4216 4217 // add the socket to our peer list and set our 4218 // destination address / port to match 4219 var peer = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); 4220 sock.daddr = peer.addr; 4221 sock.dport = peer.port; 4222 4223 // always "fail" in non-blocking mode 4224 throw new FS.ErrnoError(ERRNO_CODES.EINPROGRESS); 4225 },listen:function (sock, backlog) { 4226 if (!ENVIRONMENT_IS_NODE) { 4227 throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); 4228 } 4229 if (sock.server) { 4230 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already listening 4231 } 4232 var WebSocketServer = require('ws').Server; 4233 var host = sock.saddr; 4234 sock.server = new WebSocketServer({ 4235 host: host, 4236 port: sock.sport 4237 // TODO support backlog 4238 }); 4239 4240 sock.server.on('connection', function(ws) { 4241 if (sock.type === 1) { 4242 var newsock = SOCKFS.createSocket(sock.family, sock.type, sock.protocol); 4243 4244 // create a peer on the new socket 4245 var peer = SOCKFS.websocket_sock_ops.createPeer(newsock, ws); 4246 newsock.daddr = peer.addr; 4247 newsock.dport = peer.port; 4248 4249 // push to queue for accept to pick up 4250 sock.pending.push(newsock); 4251 } else { 4252 // create a peer on the listen socket so calling sendto 4253 // with the listen socket and an address will resolve 4254 // to the correct client 4255 SOCKFS.websocket_sock_ops.createPeer(sock, ws); 4256 } 4257 }); 4258 sock.server.on('closed', function() { 4259 sock.server = null; 4260 }); 4261 sock.server.on('error', function() { 4262 // don't throw 4263 }); 4264 },accept:function (listensock) { 4265 if (!listensock.server) { 4266 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 4267 } 4268 var newsock = listensock.pending.shift(); 4269 newsock.stream.flags = listensock.stream.flags; 4270 return newsock; 4271 },getname:function (sock, peer) { 4272 var addr, port; 4273 if (peer) { 4274 if (sock.daddr === undefined || sock.dport === undefined) { 4275 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); 4276 } 4277 addr = sock.daddr; 4278 port = sock.dport; 4279 } else { 4280 // TODO saddr and sport will be set for bind()'d UDP sockets, but what 4281 // should we be returning for TCP sockets that've been connect()'d? 4282 addr = sock.saddr || 0; 4283 port = sock.sport || 0; 4284 } 4285 return { addr: addr, port: port }; 4286 },sendmsg:function (sock, buffer, offset, length, addr, port) { 4287 if (sock.type === 2) { 4288 // connection-less sockets will honor the message address, 4289 // and otherwise fall back to the bound destination address 4290 if (addr === undefined || port === undefined) { 4291 addr = sock.daddr; 4292 port = sock.dport; 4293 } 4294 // if there was no address to fall back to, error out 4295 if (addr === undefined || port === undefined) { 4296 throw new FS.ErrnoError(ERRNO_CODES.EDESTADDRREQ); 4297 } 4298 } else { 4299 // connection-based sockets will only use the bound 4300 addr = sock.daddr; 4301 port = sock.dport; 4302 } 4303 4304 // find the peer for the destination address 4305 var dest = SOCKFS.websocket_sock_ops.getPeer(sock, addr, port); 4306 4307 // early out if not connected with a connection-based socket 4308 if (sock.type === 1) { 4309 if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { 4310 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); 4311 } else if (dest.socket.readyState === dest.socket.CONNECTING) { 4312 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); 4313 } 4314 } 4315 4316 // create a copy of the incoming data to send, as the WebSocket API 4317 // doesn't work entirely with an ArrayBufferView, it'll just send 4318 // the entire underlying buffer 4319 var data; 4320 if (buffer instanceof Array || buffer instanceof ArrayBuffer) { 4321 data = buffer.slice(offset, offset + length); 4322 } else { // ArrayBufferView 4323 data = buffer.buffer.slice(buffer.byteOffset + offset, buffer.byteOffset + offset + length); 4324 } 4325 4326 // if we're emulating a connection-less dgram socket and don't have 4327 // a cached connection, queue the buffer to send upon connect and 4328 // lie, saying the data was sent now. 4329 if (sock.type === 2) { 4330 if (!dest || dest.socket.readyState !== dest.socket.OPEN) { 4331 // if we're not connected, open a new connection 4332 if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { 4333 dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); 4334 } 4335 dest.dgram_send_queue.push(data); 4336 return length; 4337 } 4338 } 4339 4340 try { 4341 // send the actual data 4342 dest.socket.send(data); 4343 return length; 4344 } catch (e) { 4345 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); 4346 } 4347 },recvmsg:function (sock, length) { 4348 // http://pubs.opengroup.org/onlinepubs/7908799/xns/recvmsg.html 4349 if (sock.type === 1 && sock.server) { 4350 // tcp servers should not be recv()'ing on the listen socket 4351 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); 4352 } 4353 4354 var queued = sock.recv_queue.shift(); 4355 if (!queued) { 4356 if (sock.type === 1) { 4357 var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); 4358 4359 if (!dest) { 4360 // if we have a destination address but are not connected, error out 4361 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN); 4362 } 4363 else if (dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { 4364 // return null if the socket has closed 4365 return null; 4366 } 4367 else { 4368 // else, our socket is in a valid state but truly has nothing available 4369 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); 4370 } 4371 } else { 4372 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN); 4373 } 4374 } 4375 4376 // queued.data will be an ArrayBuffer if it's unadulterated, but if it's 4377 // requeued TCP data it'll be an ArrayBufferView 4378 var queuedLength = queued.data.byteLength || queued.data.length; 4379 var queuedOffset = queued.data.byteOffset || 0; 4380 var queuedBuffer = queued.data.buffer || queued.data; 4381 var bytesRead = Math.min(length, queuedLength); 4382 var res = { 4383 buffer: new Uint8Array(queuedBuffer, queuedOffset, bytesRead), 4384 addr: queued.addr, 4385 port: queued.port 4386 }; 4387 4388 4389 // push back any unread data for TCP connections 4390 if (sock.type === 1 && bytesRead < queuedLength) { 4391 var bytesRemaining = queuedLength - bytesRead; 4392 queued.data = new Uint8Array(queuedBuffer, queuedOffset + bytesRead, bytesRemaining); 4393 sock.recv_queue.unshift(queued); 4394 } 4395 4396 return res; 4397 }}};function _send(fd, buf, len, flags) { 4398 var sock = SOCKFS.getSocket(fd); 4399 if (!sock) { 4400 ___setErrNo(ERRNO_CODES.EBADF); 4401 return -1; 4402 } 4403 // TODO honor flags 4404 return _write(fd, buf, len); 4405 } 4406 4407 function _pwrite(fildes, buf, nbyte, offset) { 4408 // ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); 4409 // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html 4410 var stream = FS.getStream(fildes); 4411 if (!stream) { 4412 ___setErrNo(ERRNO_CODES.EBADF); 4413 return -1; 4414 } 4415 try { 4416 var slab = HEAP8; 4417 return FS.write(stream, slab, buf, nbyte, offset); 4418 } catch (e) { 4419 FS.handleFSError(e); 4420 return -1; 4421 } 4422 }function _write(fildes, buf, nbyte) { 4423 // ssize_t write(int fildes, const void *buf, size_t nbyte); 4424 // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html 4425 var stream = FS.getStream(fildes); 4426 if (!stream) { 4427 ___setErrNo(ERRNO_CODES.EBADF); 4428 return -1; 4429 } 4430 4431 4432 try { 4433 var slab = HEAP8; 4434 return FS.write(stream, slab, buf, nbyte); 4435 } catch (e) { 4436 FS.handleFSError(e); 4437 return -1; 4438 } 4439 } 4440 4441 function _fileno(stream) { 4442 // int fileno(FILE *stream); 4443 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html 4444 stream = FS.getStreamFromPtr(stream); 4445 if (!stream) return -1; 4446 return stream.fd; 4447 }function _fwrite(ptr, size, nitems, stream) { 4448 // size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); 4449 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html 4450 var bytesToWrite = nitems * size; 4451 if (bytesToWrite == 0) return 0; 4452 var fd = _fileno(stream); 4453 var bytesWritten = _write(fd, ptr, bytesToWrite); 4454 if (bytesWritten == -1) { 4455 var streamObj = FS.getStreamFromPtr(stream); 4456 if (streamObj) streamObj.error = true; 4457 return 0; 4458 } else { 4459 return Math.floor(bytesWritten / size); 4460 } 4461 } 4462 4463 4464 4465 Module["_strlen"] = _strlen; 4466 4467 function __reallyNegative(x) { 4468 return x < 0 || (x === 0 && (1/x) === -Infinity); 4469 }function __formatString(format, varargs) { 4470 var textIndex = format; 4471 var argIndex = 0; 4472 function getNextArg(type) { 4473 // NOTE: Explicitly ignoring type safety. Otherwise this fails: 4474 // int x = 4; printf("%c\n", (char)x); 4475 var ret; 4476 if (type === 'double') { 4477 ret = HEAPF64[(((varargs)+(argIndex))>>3)]; 4478 } else if (type == 'i64') { 4479 ret = [HEAP32[(((varargs)+(argIndex))>>2)], 4480 HEAP32[(((varargs)+(argIndex+4))>>2)]]; 4481 4482 } else { 4483 type = 'i32'; // varargs are always i32, i64, or double 4484 ret = HEAP32[(((varargs)+(argIndex))>>2)]; 4485 } 4486 argIndex += Runtime.getNativeFieldSize(type); 4487 return ret; 4488 } 4489 4490 var ret = []; 4491 var curr, next, currArg; 4492 while(1) { 4493 var startTextIndex = textIndex; 4494 curr = HEAP8[(textIndex)]; 4495 if (curr === 0) break; 4496 next = HEAP8[((textIndex+1)|0)]; 4497 if (curr == 37) { 4498 // Handle flags. 4499 var flagAlwaysSigned = false; 4500 var flagLeftAlign = false; 4501 var flagAlternative = false; 4502 var flagZeroPad = false; 4503 var flagPadSign = false; 4504 flagsLoop: while (1) { 4505 switch (next) { 4506 case 43: 4507 flagAlwaysSigned = true; 4508 break; 4509 case 45: 4510 flagLeftAlign = true; 4511 break; 4512 case 35: 4513 flagAlternative = true; 4514 break; 4515 case 48: 4516 if (flagZeroPad) { 4517 break flagsLoop; 4518 } else { 4519 flagZeroPad = true; 4520 break; 4521 } 4522 case 32: 4523 flagPadSign = true; 4524 break; 4525 default: 4526 break flagsLoop; 4527 } 4528 textIndex++; 4529 next = HEAP8[((textIndex+1)|0)]; 4530 } 4531 4532 // Handle width. 4533 var width = 0; 4534 if (next == 42) { 4535 width = getNextArg('i32'); 4536 textIndex++; 4537 next = HEAP8[((textIndex+1)|0)]; 4538 } else { 4539 while (next >= 48 && next <= 57) { 4540 width = width * 10 + (next - 48); 4541 textIndex++; 4542 next = HEAP8[((textIndex+1)|0)]; 4543 } 4544 } 4545 4546 // Handle precision. 4547 var precisionSet = false, precision = -1; 4548 if (next == 46) { 4549 precision = 0; 4550 precisionSet = true; 4551 textIndex++; 4552 next = HEAP8[((textIndex+1)|0)]; 4553 if (next == 42) { 4554 precision = getNextArg('i32'); 4555 textIndex++; 4556 } else { 4557 while(1) { 4558 var precisionChr = HEAP8[((textIndex+1)|0)]; 4559 if (precisionChr < 48 || 4560 precisionChr > 57) break; 4561 precision = precision * 10 + (precisionChr - 48); 4562 textIndex++; 4563 } 4564 } 4565 next = HEAP8[((textIndex+1)|0)]; 4566 } 4567 if (precision < 0) { 4568 precision = 6; // Standard default. 4569 precisionSet = false; 4570 } 4571 4572 // Handle integer sizes. WARNING: These assume a 32-bit architecture! 4573 var argSize; 4574 switch (String.fromCharCode(next)) { 4575 case 'h': 4576 var nextNext = HEAP8[((textIndex+2)|0)]; 4577 if (nextNext == 104) { 4578 textIndex++; 4579 argSize = 1; // char (actually i32 in varargs) 4580 } else { 4581 argSize = 2; // short (actually i32 in varargs) 4582 } 4583 break; 4584 case 'l': 4585 var nextNext = HEAP8[((textIndex+2)|0)]; 4586 if (nextNext == 108) { 4587 textIndex++; 4588 argSize = 8; // long long 4589 } else { 4590 argSize = 4; // long 4591 } 4592 break; 4593 case 'L': // long long 4594 case 'q': // int64_t 4595 case 'j': // intmax_t 4596 argSize = 8; 4597 break; 4598 case 'z': // size_t 4599 case 't': // ptrdiff_t 4600 case 'I': // signed ptrdiff_t or unsigned size_t 4601 argSize = 4; 4602 break; 4603 default: 4604 argSize = null; 4605 } 4606 if (argSize) textIndex++; 4607 next = HEAP8[((textIndex+1)|0)]; 4608 4609 // Handle type specifier. 4610 switch (String.fromCharCode(next)) { 4611 case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': { 4612 // Integer. 4613 var signed = next == 100 || next == 105; 4614 argSize = argSize || 4; 4615 var currArg = getNextArg('i' + (argSize * 8)); 4616 var argText; 4617 // Flatten i64-1 [low, high] into a (slightly rounded) double 4618 if (argSize == 8) { 4619 currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 117); 4620 } 4621 // Truncate to requested size. 4622 if (argSize <= 4) { 4623 var limit = Math.pow(256, argSize) - 1; 4624 currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8); 4625 } 4626 // Format the number. 4627 var currAbsArg = Math.abs(currArg); 4628 var prefix = ''; 4629 if (next == 100 || next == 105) { 4630 argText = reSign(currArg, 8 * argSize, 1).toString(10); 4631 } else if (next == 117) { 4632 argText = unSign(currArg, 8 * argSize, 1).toString(10); 4633 currArg = Math.abs(currArg); 4634 } else if (next == 111) { 4635 argText = (flagAlternative ? '0' : '') + currAbsArg.toString(8); 4636 } else if (next == 120 || next == 88) { 4637 prefix = (flagAlternative && currArg != 0) ? '0x' : ''; 4638 if (currArg < 0) { 4639 // Represent negative numbers in hex as 2's complement. 4640 currArg = -currArg; 4641 argText = (currAbsArg - 1).toString(16); 4642 var buffer = []; 4643 for (var i = 0; i < argText.length; i++) { 4644 buffer.push((0xF - parseInt(argText[i], 16)).toString(16)); 4645 } 4646 argText = buffer.join(''); 4647 while (argText.length < argSize * 2) argText = 'f' + argText; 4648 } else { 4649 argText = currAbsArg.toString(16); 4650 } 4651 if (next == 88) { 4652 prefix = prefix.toUpperCase(); 4653 argText = argText.toUpperCase(); 4654 } 4655 } else if (next == 112) { 4656 if (currAbsArg === 0) { 4657 argText = '(nil)'; 4658 } else { 4659 prefix = '0x'; 4660 argText = currAbsArg.toString(16); 4661 } 4662 } 4663 if (precisionSet) { 4664 while (argText.length < precision) { 4665 argText = '0' + argText; 4666 } 4667 } 4668 4669 // Add sign if needed 4670 if (currArg >= 0) { 4671 if (flagAlwaysSigned) { 4672 prefix = '+' + prefix; 4673 } else if (flagPadSign) { 4674 prefix = ' ' + prefix; 4675 } 4676 } 4677 4678 // Move sign to prefix so we zero-pad after the sign 4679 if (argText.charAt(0) == '-') { 4680 prefix = '-' + prefix; 4681 argText = argText.substr(1); 4682 } 4683 4684 // Add padding. 4685 while (prefix.length + argText.length < width) { 4686 if (flagLeftAlign) { 4687 argText += ' '; 4688 } else { 4689 if (flagZeroPad) { 4690 argText = '0' + argText; 4691 } else { 4692 prefix = ' ' + prefix; 4693 } 4694 } 4695 } 4696 4697 // Insert the result into the buffer. 4698 argText = prefix + argText; 4699 argText.split('').forEach(function(chr) { 4700 ret.push(chr.charCodeAt(0)); 4701 }); 4702 break; 4703 } 4704 case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': { 4705 // Float. 4706 var currArg = getNextArg('double'); 4707 var argText; 4708 if (isNaN(currArg)) { 4709 argText = 'nan'; 4710 flagZeroPad = false; 4711 } else if (!isFinite(currArg)) { 4712 argText = (currArg < 0 ? '-' : '') + 'inf'; 4713 flagZeroPad = false; 4714 } else { 4715 var isGeneral = false; 4716 var effectivePrecision = Math.min(precision, 20); 4717 4718 // Convert g/G to f/F or e/E, as per: 4719 // http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html 4720 if (next == 103 || next == 71) { 4721 isGeneral = true; 4722 precision = precision || 1; 4723 var exponent = parseInt(currArg.toExponential(effectivePrecision).split('e')[1], 10); 4724 if (precision > exponent && exponent >= -4) { 4725 next = ((next == 103) ? 'f' : 'F').charCodeAt(0); 4726 precision -= exponent + 1; 4727 } else { 4728 next = ((next == 103) ? 'e' : 'E').charCodeAt(0); 4729 precision--; 4730 } 4731 effectivePrecision = Math.min(precision, 20); 4732 } 4733 4734 if (next == 101 || next == 69) { 4735 argText = currArg.toExponential(effectivePrecision); 4736 // Make sure the exponent has at least 2 digits. 4737 if (/[eE][-+]\d$/.test(argText)) { 4738 argText = argText.slice(0, -1) + '0' + argText.slice(-1); 4739 } 4740 } else if (next == 102 || next == 70) { 4741 argText = currArg.toFixed(effectivePrecision); 4742 if (currArg === 0 && __reallyNegative(currArg)) { 4743 argText = '-' + argText; 4744 } 4745 } 4746 4747 var parts = argText.split('e'); 4748 if (isGeneral && !flagAlternative) { 4749 // Discard trailing zeros and periods. 4750 while (parts[0].length > 1 && parts[0].indexOf('.') != -1 && 4751 (parts[0].slice(-1) == '0' || parts[0].slice(-1) == '.')) { 4752 parts[0] = parts[0].slice(0, -1); 4753 } 4754 } else { 4755 // Make sure we have a period in alternative mode. 4756 if (flagAlternative && argText.indexOf('.') == -1) parts[0] += '.'; 4757 // Zero pad until required precision. 4758 while (precision > effectivePrecision++) parts[0] += '0'; 4759 } 4760 argText = parts[0] + (parts.length > 1 ? 'e' + parts[1] : ''); 4761 4762 // Capitalize 'E' if needed. 4763 if (next == 69) argText = argText.toUpperCase(); 4764 4765 // Add sign. 4766 if (currArg >= 0) { 4767 if (flagAlwaysSigned) { 4768 argText = '+' + argText; 4769 } else if (flagPadSign) { 4770 argText = ' ' + argText; 4771 } 4772 } 4773 } 4774 4775 // Add padding. 4776 while (argText.length < width) { 4777 if (flagLeftAlign) { 4778 argText += ' '; 4779 } else { 4780 if (flagZeroPad && (argText[0] == '-' || argText[0] == '+')) { 4781 argText = argText[0] + '0' + argText.slice(1); 4782 } else { 4783 argText = (flagZeroPad ? '0' : ' ') + argText; 4784 } 4785 } 4786 } 4787 4788 // Adjust case. 4789 if (next < 97) argText = argText.toUpperCase(); 4790 4791 // Insert the result into the buffer. 4792 argText.split('').forEach(function(chr) { 4793 ret.push(chr.charCodeAt(0)); 4794 }); 4795 break; 4796 } 4797 case 's': { 4798 // String. 4799 var arg = getNextArg('i8*'); 4800 var argLength = arg ? _strlen(arg) : '(null)'.length; 4801 if (precisionSet) argLength = Math.min(argLength, precision); 4802 if (!flagLeftAlign) { 4803 while (argLength < width--) { 4804 ret.push(32); 4805 } 4806 } 4807 if (arg) { 4808 for (var i = 0; i < argLength; i++) { 4809 ret.push(HEAPU8[((arg++)|0)]); 4810 } 4811 } else { 4812 ret = ret.concat(intArrayFromString('(null)'.substr(0, argLength), true)); 4813 } 4814 if (flagLeftAlign) { 4815 while (argLength < width--) { 4816 ret.push(32); 4817 } 4818 } 4819 break; 4820 } 4821 case 'c': { 4822 // Character. 4823 if (flagLeftAlign) ret.push(getNextArg('i8')); 4824 while (--width > 0) { 4825 ret.push(32); 4826 } 4827 if (!flagLeftAlign) ret.push(getNextArg('i8')); 4828 break; 4829 } 4830 case 'n': { 4831 // Write the length written so far to the next parameter. 4832 var ptr = getNextArg('i32*'); 4833 HEAP32[((ptr)>>2)]=ret.length; 4834 break; 4835 } 4836 case '%': { 4837 // Literal percent sign. 4838 ret.push(curr); 4839 break; 4840 } 4841 default: { 4842 // Unknown specifiers remain untouched. 4843 for (var i = startTextIndex; i < textIndex + 2; i++) { 4844 ret.push(HEAP8[(i)]); 4845 } 4846 } 4847 } 4848 textIndex += 2; 4849 // TODO: Support a/A (hex float) and m (last error) specifiers. 4850 // TODO: Support %1${specifier} for arg selection. 4851 } else { 4852 ret.push(curr); 4853 textIndex += 1; 4854 } 4855 } 4856 return ret; 4857 }function _fprintf(stream, format, varargs) { 4858 // int fprintf(FILE *restrict stream, const char *restrict format, ...); 4859 // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html 4860 var result = __formatString(format, varargs); 4861 var stack = Runtime.stackSave(); 4862 var ret = _fwrite(allocate(result, 'i8', ALLOC_STACK), 1, result.length, stream); 4863 Runtime.stackRestore(stack); 4864 return ret; 4865 }function _printf(format, varargs) { 4866 // int printf(const char *restrict format, ...); 4867 // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html 4868 var stdout = HEAP32[((_stdout)>>2)]; 4869 return _fprintf(stdout, format, varargs); 4870 } 4871 4872 4873 function _fputs(s, stream) { 4874 // int fputs(const char *restrict s, FILE *restrict stream); 4875 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fputs.html 4876 var fd = _fileno(stream); 4877 return _write(fd, s, _strlen(s)); 4878 } 4879 4880 function _fputc(c, stream) { 4881 // int fputc(int c, FILE *stream); 4882 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fputc.html 4883 var chr = unSign(c & 0xFF); 4884 HEAP8[((_fputc.ret)|0)]=chr; 4885 var fd = _fileno(stream); 4886 var ret = _write(fd, _fputc.ret, 1); 4887 if (ret == -1) { 4888 var streamObj = FS.getStreamFromPtr(stream); 4889 if (streamObj) streamObj.error = true; 4890 return -1; 4891 } else { 4892 return chr; 4893 } 4894 }function _puts(s) { 4895 // int puts(const char *s); 4896 // http://pubs.opengroup.org/onlinepubs/000095399/functions/puts.html 4897 // NOTE: puts() always writes an extra newline. 4898 var stdout = HEAP32[((_stdout)>>2)]; 4899 var ret = _fputs(s, stdout); 4900 if (ret < 0) { 4901 return ret; 4902 } else { 4903 var newlineRet = _fputc(10, stdout); 4904 return (newlineRet < 0) ? -1 : ret + 1; 4905 } 4906 } 4907 4908 function _sysconf(name) { 4909 // long sysconf(int name); 4910 // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html 4911 switch(name) { 4912 case 30: return PAGE_SIZE; 4913 case 132: 4914 case 133: 4915 case 12: 4916 case 137: 4917 case 138: 4918 case 15: 4919 case 235: 4920 case 16: 4921 case 17: 4922 case 18: 4923 case 19: 4924 case 20: 4925 case 149: 4926 case 13: 4927 case 10: 4928 case 236: 4929 case 153: 4930 case 9: 4931 case 21: 4932 case 22: 4933 case 159: 4934 case 154: 4935 case 14: 4936 case 77: 4937 case 78: 4938 case 139: 4939 case 80: 4940 case 81: 4941 case 79: 4942 case 82: 4943 case 68: 4944 case 67: 4945 case 164: 4946 case 11: 4947 case 29: 4948 case 47: 4949 case 48: 4950 case 95: 4951 case 52: 4952 case 51: 4953 case 46: 4954 return 200809; 4955 case 27: 4956 case 246: 4957 case 127: 4958 case 128: 4959 case 23: 4960 case 24: 4961 case 160: 4962 case 161: 4963 case 181: 4964 case 182: 4965 case 242: 4966 case 183: 4967 case 184: 4968 case 243: 4969 case 244: 4970 case 245: 4971 case 165: 4972 case 178: 4973 case 179: 4974 case 49: 4975 case 50: 4976 case 168: 4977 case 169: 4978 case 175: 4979 case 170: 4980 case 171: 4981 case 172: 4982 case 97: 4983 case 76: 4984 case 32: 4985 case 173: 4986 case 35: 4987 return -1; 4988 case 176: 4989 case 177: 4990 case 7: 4991 case 155: 4992 case 8: 4993 case 157: 4994 case 125: 4995 case 126: 4996 case 92: 4997 case 93: 4998 case 129: 4999 case 130: 5000 case 131: 5001 case 94: 5002 case 91: 5003 return 1; 5004 case 74: 5005 case 60: 5006 case 69: 5007 case 70: 5008 case 4: 5009 return 1024; 5010 case 31: 5011 case 42: 5012 case 72: 5013 return 32; 5014 case 87: 5015 case 26: 5016 case 33: 5017 return 2147483647; 5018 case 34: 5019 case 1: 5020 return 47839; 5021 case 38: 5022 case 36: 5023 return 99; 5024 case 43: 5025 case 37: 5026 return 2048; 5027 case 0: return 2097152; 5028 case 3: return 65536; 5029 case 28: return 32768; 5030 case 44: return 32767; 5031 case 75: return 16384; 5032 case 39: return 1000; 5033 case 89: return 700; 5034 case 71: return 256; 5035 case 40: return 255; 5036 case 2: return 100; 5037 case 180: return 64; 5038 case 25: return 20; 5039 case 5: return 16; 5040 case 6: return 6; 5041 case 73: return 4; 5042 case 84: return 1; 5043 } 5044 ___setErrNo(ERRNO_CODES.EINVAL); 5045 return -1; 5046 } 5047 5048 5049 Module["_memset"] = _memset; 5050 5051 function ___errno_location() { 5052 return ___errno_state; 5053 } 5054 5055 function _abort() { 5056 Module['abort'](); 5057 } 5058 5059 var Browser={mainLoop:{scheduler:null,method:"",shouldPause:false,paused:false,queue:[],pause:function () { 5060 Browser.mainLoop.shouldPause = true; 5061 },resume:function () { 5062 if (Browser.mainLoop.paused) { 5063 Browser.mainLoop.paused = false; 5064 Browser.mainLoop.scheduler(); 5065 } 5066 Browser.mainLoop.shouldPause = false; 5067 },updateStatus:function () { 5068 if (Module['setStatus']) { 5069 var message = Module['statusMessage'] || 'Please wait...'; 5070 var remaining = Browser.mainLoop.remainingBlockers; 5071 var expected = Browser.mainLoop.expectedBlockers; 5072 if (remaining) { 5073 if (remaining < expected) { 5074 Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')'); 5075 } else { 5076 Module['setStatus'](message); 5077 } 5078 } else { 5079 Module['setStatus'](''); 5080 } 5081 } 5082 }},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () { 5083 if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers 5084 5085 if (Browser.initted || ENVIRONMENT_IS_WORKER) return; 5086 Browser.initted = true; 5087 5088 try { 5089 new Blob(); 5090 Browser.hasBlobConstructor = true; 5091 } catch(e) { 5092 Browser.hasBlobConstructor = false; 5093 console.log("warning: no blob constructor, cannot create blobs with mimetypes"); 5094 } 5095 Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null)); 5096 Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined; 5097 if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') { 5098 console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."); 5099 Module.noImageDecoding = true; 5100 } 5101 5102 // Support for plugins that can process preloaded files. You can add more of these to 5103 // your app by creating and appending to Module.preloadPlugins. 5104 // 5105 // Each plugin is asked if it can handle a file based on the file's name. If it can, 5106 // it is given the file's raw data. When it is done, it calls a callback with the file's 5107 // (possibly modified) data. For example, a plugin might decompress a file, or it 5108 // might create some side data structure for use later (like an Image element, etc.). 5109 5110 var imagePlugin = {}; 5111 imagePlugin['canHandle'] = function imagePlugin_canHandle(name) { 5112 return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); 5113 }; 5114 imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) { 5115 var b = null; 5116 if (Browser.hasBlobConstructor) { 5117 try { 5118 b = new Blob([byteArray], { type: Browser.getMimetype(name) }); 5119 if (b.size !== byteArray.length) { // Safari bug #118630 5120 // Safari's Blob can only take an ArrayBuffer 5121 b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) }); 5122 } 5123 } catch(e) { 5124 Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder'); 5125 } 5126 } 5127 if (!b) { 5128 var bb = new Browser.BlobBuilder(); 5129 bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range 5130 b = bb.getBlob(); 5131 } 5132 var url = Browser.URLObject.createObjectURL(b); 5133 var img = new Image(); 5134 img.onload = function img_onload() { 5135 assert(img.complete, 'Image ' + name + ' could not be decoded'); 5136 var canvas = document.createElement('canvas'); 5137 canvas.width = img.width; 5138 canvas.height = img.height; 5139 var ctx = canvas.getContext('2d'); 5140 ctx.drawImage(img, 0, 0); 5141 Module["preloadedImages"][name] = canvas; 5142 Browser.URLObject.revokeObjectURL(url); 5143 if (onload) onload(byteArray); 5144 }; 5145 img.onerror = function img_onerror(event) { 5146 console.log('Image ' + url + ' could not be decoded'); 5147 if (onerror) onerror(); 5148 }; 5149 img.src = url; 5150 }; 5151 Module['preloadPlugins'].push(imagePlugin); 5152 5153 var audioPlugin = {}; 5154 audioPlugin['canHandle'] = function audioPlugin_canHandle(name) { 5155 return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 }; 5156 }; 5157 audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) { 5158 var done = false; 5159 function finish(audio) { 5160 if (done) return; 5161 done = true; 5162 Module["preloadedAudios"][name] = audio; 5163 if (onload) onload(byteArray); 5164 } 5165 function fail() { 5166 if (done) return; 5167 done = true; 5168 Module["preloadedAudios"][name] = new Audio(); // empty shim 5169 if (onerror) onerror(); 5170 } 5171 if (Browser.hasBlobConstructor) { 5172 try { 5173 var b = new Blob([byteArray], { type: Browser.getMimetype(name) }); 5174 } catch(e) { 5175 return fail(); 5176 } 5177 var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! 5178 var audio = new Audio(); 5179 audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 5180 audio.onerror = function audio_onerror(event) { 5181 if (done) return; 5182 console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach'); 5183 function encode64(data) { 5184 var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 5185 var PAD = '='; 5186 var ret = ''; 5187 var leftchar = 0; 5188 var leftbits = 0; 5189 for (var i = 0; i < data.length; i++) { 5190 leftchar = (leftchar << 8) | data[i]; 5191 leftbits += 8; 5192 while (leftbits >= 6) { 5193 var curr = (leftchar >> (leftbits-6)) & 0x3f; 5194 leftbits -= 6; 5195 ret += BASE[curr]; 5196 } 5197 } 5198 if (leftbits == 2) { 5199 ret += BASE[(leftchar&3) << 4]; 5200 ret += PAD + PAD; 5201 } else if (leftbits == 4) { 5202 ret += BASE[(leftchar&0xf) << 2]; 5203 ret += PAD; 5204 } 5205 return ret; 5206 } 5207 audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray); 5208 finish(audio); // we don't wait for confirmation this worked - but it's worth trying 5209 }; 5210 audio.src = url; 5211 // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror 5212 Browser.safeSetTimeout(function() { 5213 finish(audio); // try to use it even though it is not necessarily ready to play 5214 }, 10000); 5215 } else { 5216 return fail(); 5217 } 5218 }; 5219 Module['preloadPlugins'].push(audioPlugin); 5220 5221 // Canvas event setup 5222 5223 var canvas = Module['canvas']; 5224 5225 // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module 5226 // Module['forcedAspectRatio'] = 4 / 3; 5227 5228 canvas.requestPointerLock = canvas['requestPointerLock'] || 5229 canvas['mozRequestPointerLock'] || 5230 canvas['webkitRequestPointerLock'] || 5231 canvas['msRequestPointerLock'] || 5232 function(){}; 5233 canvas.exitPointerLock = document['exitPointerLock'] || 5234 document['mozExitPointerLock'] || 5235 document['webkitExitPointerLock'] || 5236 document['msExitPointerLock'] || 5237 function(){}; // no-op if function does not exist 5238 canvas.exitPointerLock = canvas.exitPointerLock.bind(document); 5239 5240 function pointerLockChange() { 5241 Browser.pointerLock = document['pointerLockElement'] === canvas || 5242 document['mozPointerLockElement'] === canvas || 5243 document['webkitPointerLockElement'] === canvas || 5244 document['msPointerLockElement'] === canvas; 5245 } 5246 5247 document.addEventListener('pointerlockchange', pointerLockChange, false); 5248 document.addEventListener('mozpointerlockchange', pointerLockChange, false); 5249 document.addEventListener('webkitpointerlockchange', pointerLockChange, false); 5250 document.addEventListener('mspointerlockchange', pointerLockChange, false); 5251 5252 if (Module['elementPointerLock']) { 5253 canvas.addEventListener("click", function(ev) { 5254 if (!Browser.pointerLock && canvas.requestPointerLock) { 5255 canvas.requestPointerLock(); 5256 ev.preventDefault(); 5257 } 5258 }, false); 5259 } 5260 },createContext:function (canvas, useWebGL, setInModule, webGLContextAttributes) { 5261 var ctx; 5262 var errorInfo = '?'; 5263 function onContextCreationError(event) { 5264 errorInfo = event.statusMessage || errorInfo; 5265 } 5266 try { 5267 if (useWebGL) { 5268 var contextAttributes = { 5269 antialias: false, 5270 alpha: false 5271 }; 5272 5273 if (webGLContextAttributes) { 5274 for (var attribute in webGLContextAttributes) { 5275 contextAttributes[attribute] = webGLContextAttributes[attribute]; 5276 } 5277 } 5278 5279 5280 canvas.addEventListener('webglcontextcreationerror', onContextCreationError, false); 5281 try { 5282 ['experimental-webgl', 'webgl'].some(function(webglId) { 5283 return ctx = canvas.getContext(webglId, contextAttributes); 5284 }); 5285 } finally { 5286 canvas.removeEventListener('webglcontextcreationerror', onContextCreationError, false); 5287 } 5288 } else { 5289 ctx = canvas.getContext('2d'); 5290 } 5291 if (!ctx) throw ':('; 5292 } catch (e) { 5293 Module.print('Could not create canvas: ' + [errorInfo, e]); 5294 return null; 5295 } 5296 if (useWebGL) { 5297 // Set the background of the WebGL canvas to black 5298 canvas.style.backgroundColor = "black"; 5299 5300 // Warn on context loss 5301 canvas.addEventListener('webglcontextlost', function(event) { 5302 alert('WebGL context lost. You will need to reload the page.'); 5303 }, false); 5304 } 5305 if (setInModule) { 5306 GLctx = Module.ctx = ctx; 5307 Module.useWebGL = useWebGL; 5308 Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() }); 5309 Browser.init(); 5310 } 5311 return ctx; 5312 },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) { 5313 Browser.lockPointer = lockPointer; 5314 Browser.resizeCanvas = resizeCanvas; 5315 if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; 5316 if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; 5317 5318 var canvas = Module['canvas']; 5319 function fullScreenChange() { 5320 Browser.isFullScreen = false; 5321 var canvasContainer = canvas.parentNode; 5322 if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || 5323 document['mozFullScreenElement'] || document['mozFullscreenElement'] || 5324 document['fullScreenElement'] || document['fullscreenElement'] || 5325 document['msFullScreenElement'] || document['msFullscreenElement'] || 5326 document['webkitCurrentFullScreenElement']) === canvasContainer) { 5327 canvas.cancelFullScreen = document['cancelFullScreen'] || 5328 document['mozCancelFullScreen'] || 5329 document['webkitCancelFullScreen'] || 5330 document['msExitFullscreen'] || 5331 document['exitFullscreen'] || 5332 function() {}; 5333 canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document); 5334 if (Browser.lockPointer) canvas.requestPointerLock(); 5335 Browser.isFullScreen = true; 5336 if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize(); 5337 } else { 5338 5339 // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen 5340 canvasContainer.parentNode.insertBefore(canvas, canvasContainer); 5341 canvasContainer.parentNode.removeChild(canvasContainer); 5342 5343 if (Browser.resizeCanvas) Browser.setWindowedCanvasSize(); 5344 } 5345 if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen); 5346 Browser.updateCanvasDimensions(canvas); 5347 } 5348 5349 if (!Browser.fullScreenHandlersInstalled) { 5350 Browser.fullScreenHandlersInstalled = true; 5351 document.addEventListener('fullscreenchange', fullScreenChange, false); 5352 document.addEventListener('mozfullscreenchange', fullScreenChange, false); 5353 document.addEventListener('webkitfullscreenchange', fullScreenChange, false); 5354 document.addEventListener('MSFullscreenChange', fullScreenChange, false); 5355 } 5356 5357 // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root 5358 var canvasContainer = document.createElement("div"); 5359 canvas.parentNode.insertBefore(canvasContainer, canvas); 5360 canvasContainer.appendChild(canvas); 5361 5362 // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size) 5363 canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] || 5364 canvasContainer['mozRequestFullScreen'] || 5365 canvasContainer['msRequestFullscreen'] || 5366 (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null); 5367 canvasContainer.requestFullScreen(); 5368 },requestAnimationFrame:function requestAnimationFrame(func) { 5369 if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js) 5370 setTimeout(func, 1000/60); 5371 } else { 5372 if (!window.requestAnimationFrame) { 5373 window.requestAnimationFrame = window['requestAnimationFrame'] || 5374 window['mozRequestAnimationFrame'] || 5375 window['webkitRequestAnimationFrame'] || 5376 window['msRequestAnimationFrame'] || 5377 window['oRequestAnimationFrame'] || 5378 window['setTimeout']; 5379 } 5380 window.requestAnimationFrame(func); 5381 } 5382 },safeCallback:function (func) { 5383 return function() { 5384 if (!ABORT) return func.apply(null, arguments); 5385 }; 5386 },safeRequestAnimationFrame:function (func) { 5387 return Browser.requestAnimationFrame(function() { 5388 if (!ABORT) func(); 5389 }); 5390 },safeSetTimeout:function (func, timeout) { 5391 return setTimeout(function() { 5392 if (!ABORT) func(); 5393 }, timeout); 5394 },safeSetInterval:function (func, timeout) { 5395 return setInterval(function() { 5396 if (!ABORT) func(); 5397 }, timeout); 5398 },getMimetype:function (name) { 5399 return { 5400 'jpg': 'image/jpeg', 5401 'jpeg': 'image/jpeg', 5402 'png': 'image/png', 5403 'bmp': 'image/bmp', 5404 'ogg': 'audio/ogg', 5405 'wav': 'audio/wav', 5406 'mp3': 'audio/mpeg' 5407 }[name.substr(name.lastIndexOf('.')+1)]; 5408 },getUserMedia:function (func) { 5409 if(!window.getUserMedia) { 5410 window.getUserMedia = navigator['getUserMedia'] || 5411 navigator['mozGetUserMedia']; 5412 } 5413 window.getUserMedia(func); 5414 },getMovementX:function (event) { 5415 return event['movementX'] || 5416 event['mozMovementX'] || 5417 event['webkitMovementX'] || 5418 0; 5419 },getMovementY:function (event) { 5420 return event['movementY'] || 5421 event['mozMovementY'] || 5422 event['webkitMovementY'] || 5423 0; 5424 },getMouseWheelDelta:function (event) { 5425 return Math.max(-1, Math.min(1, event.type === 'DOMMouseScroll' ? event.detail : -event.wheelDelta)); 5426 },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup 5427 if (Browser.pointerLock) { 5428 // When the pointer is locked, calculate the coordinates 5429 // based on the movement of the mouse. 5430 // Workaround for Firefox bug 764498 5431 if (event.type != 'mousemove' && 5432 ('mozMovementX' in event)) { 5433 Browser.mouseMovementX = Browser.mouseMovementY = 0; 5434 } else { 5435 Browser.mouseMovementX = Browser.getMovementX(event); 5436 Browser.mouseMovementY = Browser.getMovementY(event); 5437 } 5438 5439 // check if SDL is available 5440 if (typeof SDL != "undefined") { 5441 Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; 5442 Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; 5443 } else { 5444 // just add the mouse delta to the current absolut mouse position 5445 // FIXME: ideally this should be clamped against the canvas size and zero 5446 Browser.mouseX += Browser.mouseMovementX; 5447 Browser.mouseY += Browser.mouseMovementY; 5448 } 5449 } else { 5450 // Otherwise, calculate the movement based on the changes 5451 // in the coordinates. 5452 var rect = Module["canvas"].getBoundingClientRect(); 5453 var x, y; 5454 5455 // Neither .scrollX or .pageXOffset are defined in a spec, but 5456 // we prefer .scrollX because it is currently in a spec draft. 5457 // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/) 5458 var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset); 5459 var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset); 5460 if (event.type == 'touchstart' || 5461 event.type == 'touchend' || 5462 event.type == 'touchmove') { 5463 var t = event.touches.item(0); 5464 if (t) { 5465 x = t.pageX - (scrollX + rect.left); 5466 y = t.pageY - (scrollY + rect.top); 5467 } else { 5468 return; 5469 } 5470 } else { 5471 x = event.pageX - (scrollX + rect.left); 5472 y = event.pageY - (scrollY + rect.top); 5473 } 5474 5475 // the canvas might be CSS-scaled compared to its backbuffer; 5476 // SDL-using content will want mouse coordinates in terms 5477 // of backbuffer units. 5478 var cw = Module["canvas"].width; 5479 var ch = Module["canvas"].height; 5480 x = x * (cw / rect.width); 5481 y = y * (ch / rect.height); 5482 5483 Browser.mouseMovementX = x - Browser.mouseX; 5484 Browser.mouseMovementY = y - Browser.mouseY; 5485 Browser.mouseX = x; 5486 Browser.mouseY = y; 5487 } 5488 },xhrLoad:function (url, onload, onerror) { 5489 var xhr = new XMLHttpRequest(); 5490 xhr.open('GET', url, true); 5491 xhr.responseType = 'arraybuffer'; 5492 xhr.onload = function xhr_onload() { 5493 if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 5494 onload(xhr.response); 5495 } else { 5496 onerror(); 5497 } 5498 }; 5499 xhr.onerror = onerror; 5500 xhr.send(null); 5501 },asyncLoad:function (url, onload, onerror, noRunDep) { 5502 Browser.xhrLoad(url, function(arrayBuffer) { 5503 assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).'); 5504 onload(new Uint8Array(arrayBuffer)); 5505 if (!noRunDep) removeRunDependency('al ' + url); 5506 }, function(event) { 5507 if (onerror) { 5508 onerror(); 5509 } else { 5510 throw 'Loading data file "' + url + '" failed.'; 5511 } 5512 }); 5513 if (!noRunDep) addRunDependency('al ' + url); 5514 },resizeListeners:[],updateResizeListeners:function () { 5515 var canvas = Module['canvas']; 5516 Browser.resizeListeners.forEach(function(listener) { 5517 listener(canvas.width, canvas.height); 5518 }); 5519 },setCanvasSize:function (width, height, noUpdates) { 5520 var canvas = Module['canvas']; 5521 Browser.updateCanvasDimensions(canvas, width, height); 5522 if (!noUpdates) Browser.updateResizeListeners(); 5523 },windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function () { 5524 // check if SDL is available 5525 if (typeof SDL != "undefined") { 5526 var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; 5527 flags = flags | 0x00800000; // set SDL_FULLSCREEN flag 5528 HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags 5529 } 5530 Browser.updateResizeListeners(); 5531 },setWindowedCanvasSize:function () { 5532 // check if SDL is available 5533 if (typeof SDL != "undefined") { 5534 var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]; 5535 flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag 5536 HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags 5537 } 5538 Browser.updateResizeListeners(); 5539 },updateCanvasDimensions:function (canvas, wNative, hNative) { 5540 if (wNative && hNative) { 5541 canvas.widthNative = wNative; 5542 canvas.heightNative = hNative; 5543 } else { 5544 wNative = canvas.widthNative; 5545 hNative = canvas.heightNative; 5546 } 5547 var w = wNative; 5548 var h = hNative; 5549 if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) { 5550 if (w/h < Module['forcedAspectRatio']) { 5551 w = Math.round(h * Module['forcedAspectRatio']); 5552 } else { 5553 h = Math.round(w / Module['forcedAspectRatio']); 5554 } 5555 } 5556 if (((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] || 5557 document['mozFullScreenElement'] || document['mozFullscreenElement'] || 5558 document['fullScreenElement'] || document['fullscreenElement'] || 5559 document['msFullScreenElement'] || document['msFullscreenElement'] || 5560 document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) { 5561 var factor = Math.min(screen.width / w, screen.height / h); 5562 w = Math.round(w * factor); 5563 h = Math.round(h * factor); 5564 } 5565 if (Browser.resizeCanvas) { 5566 if (canvas.width != w) canvas.width = w; 5567 if (canvas.height != h) canvas.height = h; 5568 if (typeof canvas.style != 'undefined') { 5569 canvas.style.removeProperty( "width"); 5570 canvas.style.removeProperty("height"); 5571 } 5572 } else { 5573 if (canvas.width != wNative) canvas.width = wNative; 5574 if (canvas.height != hNative) canvas.height = hNative; 5575 if (typeof canvas.style != 'undefined') { 5576 if (w != wNative || h != hNative) { 5577 canvas.style.setProperty( "width", w + "px", "important"); 5578 canvas.style.setProperty("height", h + "px", "important"); 5579 } else { 5580 canvas.style.removeProperty( "width"); 5581 canvas.style.removeProperty("height"); 5582 } 5583 } 5584 } 5585 }}; 5586 5587 function _sbrk(bytes) { 5588 // Implement a Linux-like 'memory area' for our 'process'. 5589 // Changes the size of the memory area by |bytes|; returns the 5590 // address of the previous top ('break') of the memory area 5591 // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP 5592 var self = _sbrk; 5593 if (!self.called) { 5594 DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned 5595 self.called = true; 5596 assert(Runtime.dynamicAlloc); 5597 self.alloc = Runtime.dynamicAlloc; 5598 Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') }; 5599 } 5600 var ret = DYNAMICTOP; 5601 if (bytes != 0) self.alloc(bytes); 5602 return ret; // Previous break location. 5603 } 5604 5605 function ___assert_fail(condition, filename, line, func) { 5606 ABORT = true; 5607 throw 'Assertion failed: ' + Pointer_stringify(condition) + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + stackTrace(); 5608 } 5609 5610 function _time(ptr) { 5611 var ret = Math.floor(Date.now()/1000); 5612 if (ptr) { 5613 HEAP32[((ptr)>>2)]=ret; 5614 } 5615 return ret; 5616 } 5617 5618 function _llvm_bswap_i32(x) { 5619 return ((x&0xff)<<24) | (((x>>8)&0xff)<<16) | (((x>>16)&0xff)<<8) | (x>>>24); 5620 } 5621 5622 5623 5624 function _emscripten_memcpy_big(dest, src, num) { 5625 HEAPU8.set(HEAPU8.subarray(src, src+num), dest); 5626 return dest; 5627 } 5628 Module["_memcpy"] = _memcpy; 5629FS.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; 5630___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0; 5631__ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor(); 5632if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); NODEFS.staticInit(); } 5633__ATINIT__.push({ func: function() { SOCKFS.root = FS.mount(SOCKFS, {}, null); } }); 5634_fputc.ret = allocate([0], "i8", ALLOC_STATIC); 5635Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) }; 5636 Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) }; 5637 Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) }; 5638 Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() }; 5639 Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() }; 5640 Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() } 5641STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP); 5642 5643staticSealed = true; // seal the static portion of memory 5644 5645STACK_MAX = STACK_BASE + 5242880; 5646 5647DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX); 5648 5649assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack"); 5650 5651 5652var Math_min = Math.min; 5653function invoke_iiii(index,a1,a2,a3) { 5654 try { 5655 return Module["dynCall_iiii"](index,a1,a2,a3); 5656 } catch(e) { 5657 if (typeof e !== 'number' && e !== 'longjmp') throw e; 5658 asm["setThrew"](1, 0); 5659 } 5660} 5661 5662function invoke_vii(index,a1,a2) { 5663 try { 5664 Module["dynCall_vii"](index,a1,a2); 5665 } catch(e) { 5666 if (typeof e !== 'number' && e !== 'longjmp') throw e; 5667 asm["setThrew"](1, 0); 5668 } 5669} 5670 5671function invoke_iii(index,a1,a2) { 5672 try { 5673 return Module["dynCall_iii"](index,a1,a2); 5674 } catch(e) { 5675 if (typeof e !== 'number' && e !== 'longjmp') throw e; 5676 asm["setThrew"](1, 0); 5677 } 5678} 5679 5680function asmPrintInt(x, y) { 5681 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); 5682} 5683function asmPrintFloat(x, y) { 5684 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); 5685} 5686// EMSCRIPTEN_START_ASM 5687var asm = (function(global, env, buffer) { 5688 'use asm'; 5689 var HEAP8 = new global.Int8Array(buffer); 5690 var HEAP16 = new global.Int16Array(buffer); 5691 var HEAP32 = new global.Int32Array(buffer); 5692 var HEAPU8 = new global.Uint8Array(buffer); 5693 var HEAPU16 = new global.Uint16Array(buffer); 5694 var HEAPU32 = new global.Uint32Array(buffer); 5695 var HEAPF32 = new global.Float32Array(buffer); 5696 var HEAPF64 = new global.Float64Array(buffer); 5697 5698 var STACKTOP=env.STACKTOP|0; 5699 var STACK_MAX=env.STACK_MAX|0; 5700 var tempDoublePtr=env.tempDoublePtr|0; 5701 var ABORT=env.ABORT|0; 5702 5703 var __THREW__ = 0; 5704 var threwValue = 0; 5705 var setjmpId = 0; 5706 var undef = 0; 5707 var nan = +env.NaN, inf = +env.Infinity; 5708 var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0; 5709 5710 var tempRet0 = 0; 5711 var tempRet1 = 0; 5712 var tempRet2 = 0; 5713 var tempRet3 = 0; 5714 var tempRet4 = 0; 5715 var tempRet5 = 0; 5716 var tempRet6 = 0; 5717 var tempRet7 = 0; 5718 var tempRet8 = 0; 5719 var tempRet9 = 0; 5720 var Math_floor=global.Math.floor; 5721 var Math_abs=global.Math.abs; 5722 var Math_sqrt=global.Math.sqrt; 5723 var Math_pow=global.Math.pow; 5724 var Math_cos=global.Math.cos; 5725 var Math_sin=global.Math.sin; 5726 var Math_tan=global.Math.tan; 5727 var Math_acos=global.Math.acos; 5728 var Math_asin=global.Math.asin; 5729 var Math_atan=global.Math.atan; 5730 var Math_atan2=global.Math.atan2; 5731 var Math_exp=global.Math.exp; 5732 var Math_log=global.Math.log; 5733 var Math_ceil=global.Math.ceil; 5734 var Math_imul=global.Math.imul; 5735 var abort=env.abort; 5736 var assert=env.assert; 5737 var asmPrintInt=env.asmPrintInt; 5738 var asmPrintFloat=env.asmPrintFloat; 5739 var Math_min=env.min; 5740 var invoke_iiii=env.invoke_iiii; 5741 var invoke_vii=env.invoke_vii; 5742 var invoke_iii=env.invoke_iii; 5743 var _send=env._send; 5744 var ___setErrNo=env.___setErrNo; 5745 var ___assert_fail=env.___assert_fail; 5746 var _fflush=env._fflush; 5747 var _pwrite=env._pwrite; 5748 var __reallyNegative=env.__reallyNegative; 5749 var _sbrk=env._sbrk; 5750 var ___errno_location=env.___errno_location; 5751 var _emscripten_memcpy_big=env._emscripten_memcpy_big; 5752 var _fileno=env._fileno; 5753 var _sysconf=env._sysconf; 5754 var _puts=env._puts; 5755 var _mkport=env._mkport; 5756 var _write=env._write; 5757 var _llvm_bswap_i32=env._llvm_bswap_i32; 5758 var _fputc=env._fputc; 5759 var _abort=env._abort; 5760 var _fwrite=env._fwrite; 5761 var _time=env._time; 5762 var _fprintf=env._fprintf; 5763 var __formatString=env.__formatString; 5764 var _fputs=env._fputs; 5765 var _printf=env._printf; 5766 var tempFloat = 0.0; 5767 5768// EMSCRIPTEN_START_FUNCS 5769function _inflate(i2, i3) { 5770 i2 = i2 | 0; 5771 i3 = i3 | 0; 5772 var i1 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0, i33 = 0, i34 = 0, i35 = 0, i36 = 0, i37 = 0, i38 = 0, i39 = 0, i40 = 0, i41 = 0, i42 = 0, i43 = 0, i44 = 0, i45 = 0, i46 = 0, i47 = 0, i48 = 0, i49 = 0, i50 = 0, i51 = 0, i52 = 0, i53 = 0, i54 = 0, i55 = 0, i56 = 0, i57 = 0, i58 = 0, i59 = 0, i60 = 0, i61 = 0, i62 = 0, i63 = 0, i64 = 0, i65 = 0, i66 = 0, i67 = 0, i68 = 0, i69 = 0, i70 = 0, i71 = 0, i72 = 0; 5773 i1 = STACKTOP; 5774 STACKTOP = STACKTOP + 16 | 0; 5775 i25 = i1; 5776 if ((i2 | 0) == 0) { 5777 i72 = -2; 5778 STACKTOP = i1; 5779 return i72 | 0; 5780 } 5781 i4 = HEAP32[i2 + 28 >> 2] | 0; 5782 if ((i4 | 0) == 0) { 5783 i72 = -2; 5784 STACKTOP = i1; 5785 return i72 | 0; 5786 } 5787 i8 = i2 + 12 | 0; 5788 i19 = HEAP32[i8 >> 2] | 0; 5789 if ((i19 | 0) == 0) { 5790 i72 = -2; 5791 STACKTOP = i1; 5792 return i72 | 0; 5793 } 5794 i62 = HEAP32[i2 >> 2] | 0; 5795 if ((i62 | 0) == 0 ? (HEAP32[i2 + 4 >> 2] | 0) != 0 : 0) { 5796 i72 = -2; 5797 STACKTOP = i1; 5798 return i72 | 0; 5799 } 5800 i68 = HEAP32[i4 >> 2] | 0; 5801 if ((i68 | 0) == 11) { 5802 HEAP32[i4 >> 2] = 12; 5803 i68 = 12; 5804 i62 = HEAP32[i2 >> 2] | 0; 5805 i19 = HEAP32[i8 >> 2] | 0; 5806 } 5807 i15 = i2 + 16 | 0; 5808 i59 = HEAP32[i15 >> 2] | 0; 5809 i16 = i2 + 4 | 0; 5810 i5 = HEAP32[i16 >> 2] | 0; 5811 i17 = i4 + 56 | 0; 5812 i6 = i4 + 60 | 0; 5813 i12 = i4 + 8 | 0; 5814 i10 = i4 + 24 | 0; 5815 i39 = i25 + 1 | 0; 5816 i11 = i4 + 16 | 0; 5817 i38 = i4 + 32 | 0; 5818 i35 = i2 + 24 | 0; 5819 i40 = i4 + 36 | 0; 5820 i41 = i4 + 20 | 0; 5821 i9 = i2 + 48 | 0; 5822 i42 = i4 + 64 | 0; 5823 i46 = i4 + 12 | 0; 5824 i47 = (i3 + -5 | 0) >>> 0 < 2; 5825 i7 = i4 + 4 | 0; 5826 i48 = i4 + 76 | 0; 5827 i49 = i4 + 84 | 0; 5828 i50 = i4 + 80 | 0; 5829 i51 = i4 + 88 | 0; 5830 i43 = (i3 | 0) == 6; 5831 i57 = i4 + 7108 | 0; 5832 i37 = i4 + 72 | 0; 5833 i58 = i4 + 7112 | 0; 5834 i54 = i4 + 68 | 0; 5835 i28 = i4 + 44 | 0; 5836 i29 = i4 + 7104 | 0; 5837 i30 = i4 + 48 | 0; 5838 i31 = i4 + 52 | 0; 5839 i18 = i4 + 40 | 0; 5840 i13 = i2 + 20 | 0; 5841 i14 = i4 + 28 | 0; 5842 i32 = i4 + 96 | 0; 5843 i33 = i4 + 100 | 0; 5844 i34 = i4 + 92 | 0; 5845 i36 = i4 + 104 | 0; 5846 i52 = i4 + 1328 | 0; 5847 i53 = i4 + 108 | 0; 5848 i27 = i4 + 112 | 0; 5849 i55 = i4 + 752 | 0; 5850 i56 = i4 + 624 | 0; 5851 i44 = i25 + 2 | 0; 5852 i45 = i25 + 3 | 0; 5853 i67 = HEAP32[i6 >> 2] | 0; 5854 i65 = i5; 5855 i64 = HEAP32[i17 >> 2] | 0; 5856 i26 = i59; 5857 i61 = 0; 5858 L17 : while (1) { 5859 L19 : do { 5860 switch (i68 | 0) { 5861 case 16: 5862 { 5863 if (i67 >>> 0 < 14) { 5864 i63 = i67; 5865 while (1) { 5866 if ((i65 | 0) == 0) { 5867 i65 = 0; 5868 break L17; 5869 } 5870 i65 = i65 + -1 | 0; 5871 i66 = i62 + 1 | 0; 5872 i64 = (HEAPU8[i62] << i63) + i64 | 0; 5873 i63 = i63 + 8 | 0; 5874 if (i63 >>> 0 < 14) { 5875 i62 = i66; 5876 } else { 5877 i62 = i66; 5878 break; 5879 } 5880 } 5881 } else { 5882 i63 = i67; 5883 } 5884 i71 = (i64 & 31) + 257 | 0; 5885 HEAP32[i32 >> 2] = i71; 5886 i72 = (i64 >>> 5 & 31) + 1 | 0; 5887 HEAP32[i33 >> 2] = i72; 5888 HEAP32[i34 >> 2] = (i64 >>> 10 & 15) + 4; 5889 i64 = i64 >>> 14; 5890 i63 = i63 + -14 | 0; 5891 if (i71 >>> 0 > 286 | i72 >>> 0 > 30) { 5892 HEAP32[i35 >> 2] = 11616; 5893 HEAP32[i4 >> 2] = 29; 5894 i66 = i26; 5895 break L19; 5896 } else { 5897 HEAP32[i36 >> 2] = 0; 5898 HEAP32[i4 >> 2] = 17; 5899 i66 = 0; 5900 i60 = 154; 5901 break L19; 5902 } 5903 } 5904 case 2: 5905 { 5906 if (i67 >>> 0 < 32) { 5907 i63 = i67; 5908 i60 = 47; 5909 } else { 5910 i60 = 49; 5911 } 5912 break; 5913 } 5914 case 23: 5915 { 5916 i66 = HEAP32[i37 >> 2] | 0; 5917 i63 = i67; 5918 i60 = 240; 5919 break; 5920 } 5921 case 18: 5922 { 5923 i63 = HEAP32[i36 >> 2] | 0; 5924 i69 = i65; 5925 i60 = 164; 5926 break; 5927 } 5928 case 1: 5929 { 5930 if (i67 >>> 0 < 16) { 5931 i63 = i67; 5932 while (1) { 5933 if ((i65 | 0) == 0) { 5934 i65 = 0; 5935 break L17; 5936 } 5937 i65 = i65 + -1 | 0; 5938 i66 = i62 + 1 | 0; 5939 i64 = (HEAPU8[i62] << i63) + i64 | 0; 5940 i63 = i63 + 8 | 0; 5941 if (i63 >>> 0 < 16) { 5942 i62 = i66; 5943 } else { 5944 i62 = i66; 5945 break; 5946 } 5947 } 5948 } else { 5949 i63 = i67; 5950 } 5951 HEAP32[i11 >> 2] = i64; 5952 if ((i64 & 255 | 0) != 8) { 5953 HEAP32[i35 >> 2] = 11448; 5954 HEAP32[i4 >> 2] = 29; 5955 i66 = i26; 5956 break L19; 5957 } 5958 if ((i64 & 57344 | 0) != 0) { 5959 HEAP32[i35 >> 2] = 11504; 5960 HEAP32[i4 >> 2] = 29; 5961 i66 = i26; 5962 break L19; 5963 } 5964 i60 = HEAP32[i38 >> 2] | 0; 5965 if ((i60 | 0) == 0) { 5966 i60 = i64; 5967 } else { 5968 HEAP32[i60 >> 2] = i64 >>> 8 & 1; 5969 i60 = HEAP32[i11 >> 2] | 0; 5970 } 5971 if ((i60 & 512 | 0) != 0) { 5972 HEAP8[i25] = i64; 5973 HEAP8[i39] = i64 >>> 8; 5974 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i25, 2) | 0; 5975 } 5976 HEAP32[i4 >> 2] = 2; 5977 i63 = 0; 5978 i64 = 0; 5979 i60 = 47; 5980 break; 5981 } 5982 case 8: 5983 { 5984 i63 = i67; 5985 i60 = 109; 5986 break; 5987 } 5988 case 22: 5989 { 5990 i63 = i67; 5991 i60 = 228; 5992 break; 5993 } 5994 case 24: 5995 { 5996 i63 = i67; 5997 i60 = 246; 5998 break; 5999 } 6000 case 19: 6001 { 6002 i63 = i67; 6003 i60 = 201; 6004 break; 6005 } 6006 case 20: 6007 { 6008 i63 = i67; 6009 i60 = 202; 6010 break; 6011 } 6012 case 21: 6013 { 6014 i66 = HEAP32[i37 >> 2] | 0; 6015 i63 = i67; 6016 i60 = 221; 6017 break; 6018 } 6019 case 10: 6020 { 6021 i63 = i67; 6022 i60 = 121; 6023 break; 6024 } 6025 case 11: 6026 { 6027 i63 = i67; 6028 i60 = 124; 6029 break; 6030 } 6031 case 12: 6032 { 6033 i63 = i67; 6034 i60 = 125; 6035 break; 6036 } 6037 case 5: 6038 { 6039 i63 = i67; 6040 i60 = 73; 6041 break; 6042 } 6043 case 4: 6044 { 6045 i63 = i67; 6046 i60 = 62; 6047 break; 6048 } 6049 case 0: 6050 { 6051 i66 = HEAP32[i12 >> 2] | 0; 6052 if ((i66 | 0) == 0) { 6053 HEAP32[i4 >> 2] = 12; 6054 i63 = i67; 6055 i66 = i26; 6056 break L19; 6057 } 6058 if (i67 >>> 0 < 16) { 6059 i63 = i67; 6060 while (1) { 6061 if ((i65 | 0) == 0) { 6062 i65 = 0; 6063 break L17; 6064 } 6065 i65 = i65 + -1 | 0; 6066 i67 = i62 + 1 | 0; 6067 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6068 i63 = i63 + 8 | 0; 6069 if (i63 >>> 0 < 16) { 6070 i62 = i67; 6071 } else { 6072 i62 = i67; 6073 break; 6074 } 6075 } 6076 } else { 6077 i63 = i67; 6078 } 6079 if ((i66 & 2 | 0) != 0 & (i64 | 0) == 35615) { 6080 HEAP32[i10 >> 2] = _crc32(0, 0, 0) | 0; 6081 HEAP8[i25] = 31; 6082 HEAP8[i39] = -117; 6083 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i25, 2) | 0; 6084 HEAP32[i4 >> 2] = 1; 6085 i63 = 0; 6086 i64 = 0; 6087 i66 = i26; 6088 break L19; 6089 } 6090 HEAP32[i11 >> 2] = 0; 6091 i67 = HEAP32[i38 >> 2] | 0; 6092 if ((i67 | 0) != 0) { 6093 HEAP32[i67 + 48 >> 2] = -1; 6094 i66 = HEAP32[i12 >> 2] | 0; 6095 } 6096 if ((i66 & 1 | 0) != 0 ? ((((i64 << 8 & 65280) + (i64 >>> 8) | 0) >>> 0) % 31 | 0 | 0) == 0 : 0) { 6097 if ((i64 & 15 | 0) != 8) { 6098 HEAP32[i35 >> 2] = 11448; 6099 HEAP32[i4 >> 2] = 29; 6100 i66 = i26; 6101 break L19; 6102 } 6103 i66 = i64 >>> 4; 6104 i63 = i63 + -4 | 0; 6105 i68 = (i66 & 15) + 8 | 0; 6106 i67 = HEAP32[i40 >> 2] | 0; 6107 if ((i67 | 0) != 0) { 6108 if (i68 >>> 0 > i67 >>> 0) { 6109 HEAP32[i35 >> 2] = 11480; 6110 HEAP32[i4 >> 2] = 29; 6111 i64 = i66; 6112 i66 = i26; 6113 break L19; 6114 } 6115 } else { 6116 HEAP32[i40 >> 2] = i68; 6117 } 6118 HEAP32[i41 >> 2] = 1 << i68; 6119 i63 = _adler32(0, 0, 0) | 0; 6120 HEAP32[i10 >> 2] = i63; 6121 HEAP32[i9 >> 2] = i63; 6122 HEAP32[i4 >> 2] = i64 >>> 12 & 2 ^ 11; 6123 i63 = 0; 6124 i64 = 0; 6125 i66 = i26; 6126 break L19; 6127 } 6128 HEAP32[i35 >> 2] = 11424; 6129 HEAP32[i4 >> 2] = 29; 6130 i66 = i26; 6131 break; 6132 } 6133 case 26: 6134 { 6135 if ((HEAP32[i12 >> 2] | 0) != 0) { 6136 if (i67 >>> 0 < 32) { 6137 i63 = i67; 6138 while (1) { 6139 if ((i65 | 0) == 0) { 6140 i65 = 0; 6141 break L17; 6142 } 6143 i65 = i65 + -1 | 0; 6144 i66 = i62 + 1 | 0; 6145 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6146 i63 = i63 + 8 | 0; 6147 if (i63 >>> 0 < 32) { 6148 i62 = i66; 6149 } else { 6150 i62 = i66; 6151 break; 6152 } 6153 } 6154 } else { 6155 i63 = i67; 6156 } 6157 i66 = i59 - i26 | 0; 6158 HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) + i66; 6159 HEAP32[i14 >> 2] = (HEAP32[i14 >> 2] | 0) + i66; 6160 if ((i59 | 0) != (i26 | 0)) { 6161 i59 = HEAP32[i10 >> 2] | 0; 6162 i67 = i19 + (0 - i66) | 0; 6163 if ((HEAP32[i11 >> 2] | 0) == 0) { 6164 i59 = _adler32(i59, i67, i66) | 0; 6165 } else { 6166 i59 = _crc32(i59, i67, i66) | 0; 6167 } 6168 HEAP32[i10 >> 2] = i59; 6169 HEAP32[i9 >> 2] = i59; 6170 } 6171 if ((HEAP32[i11 >> 2] | 0) == 0) { 6172 i59 = _llvm_bswap_i32(i64 | 0) | 0; 6173 } else { 6174 i59 = i64; 6175 } 6176 if ((i59 | 0) == (HEAP32[i10 >> 2] | 0)) { 6177 i63 = 0; 6178 i64 = 0; 6179 i59 = i26; 6180 } else { 6181 HEAP32[i35 >> 2] = 11904; 6182 HEAP32[i4 >> 2] = 29; 6183 i66 = i26; 6184 i59 = i26; 6185 break L19; 6186 } 6187 } else { 6188 i63 = i67; 6189 } 6190 HEAP32[i4 >> 2] = 27; 6191 i60 = 277; 6192 break; 6193 } 6194 case 27: 6195 { 6196 i63 = i67; 6197 i60 = 277; 6198 break; 6199 } 6200 case 28: 6201 { 6202 i63 = i67; 6203 i61 = 1; 6204 i60 = 285; 6205 break L17; 6206 } 6207 case 29: 6208 { 6209 i63 = i67; 6210 i61 = -3; 6211 break L17; 6212 } 6213 case 25: 6214 { 6215 if ((i26 | 0) == 0) { 6216 i63 = i67; 6217 i26 = 0; 6218 i60 = 285; 6219 break L17; 6220 } 6221 HEAP8[i19] = HEAP32[i42 >> 2]; 6222 HEAP32[i4 >> 2] = 20; 6223 i63 = i67; 6224 i66 = i26 + -1 | 0; 6225 i19 = i19 + 1 | 0; 6226 break; 6227 } 6228 case 17: 6229 { 6230 i66 = HEAP32[i36 >> 2] | 0; 6231 if (i66 >>> 0 < (HEAP32[i34 >> 2] | 0) >>> 0) { 6232 i63 = i67; 6233 i60 = 154; 6234 } else { 6235 i60 = 158; 6236 } 6237 break; 6238 } 6239 case 13: 6240 { 6241 i63 = i67 & 7; 6242 i64 = i64 >>> i63; 6243 i63 = i67 - i63 | 0; 6244 if (i63 >>> 0 < 32) { 6245 while (1) { 6246 if ((i65 | 0) == 0) { 6247 i65 = 0; 6248 break L17; 6249 } 6250 i65 = i65 + -1 | 0; 6251 i66 = i62 + 1 | 0; 6252 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6253 i63 = i63 + 8 | 0; 6254 if (i63 >>> 0 < 32) { 6255 i62 = i66; 6256 } else { 6257 i62 = i66; 6258 break; 6259 } 6260 } 6261 } 6262 i66 = i64 & 65535; 6263 if ((i66 | 0) == (i64 >>> 16 ^ 65535 | 0)) { 6264 HEAP32[i42 >> 2] = i66; 6265 HEAP32[i4 >> 2] = 14; 6266 if (i43) { 6267 i63 = 0; 6268 i64 = 0; 6269 i60 = 285; 6270 break L17; 6271 } else { 6272 i63 = 0; 6273 i64 = 0; 6274 i60 = 143; 6275 break L19; 6276 } 6277 } else { 6278 HEAP32[i35 >> 2] = 11584; 6279 HEAP32[i4 >> 2] = 29; 6280 i66 = i26; 6281 break L19; 6282 } 6283 } 6284 case 7: 6285 { 6286 i63 = i67; 6287 i60 = 96; 6288 break; 6289 } 6290 case 14: 6291 { 6292 i63 = i67; 6293 i60 = 143; 6294 break; 6295 } 6296 case 15: 6297 { 6298 i63 = i67; 6299 i60 = 144; 6300 break; 6301 } 6302 case 9: 6303 { 6304 if (i67 >>> 0 < 32) { 6305 i63 = i67; 6306 while (1) { 6307 if ((i65 | 0) == 0) { 6308 i65 = 0; 6309 break L17; 6310 } 6311 i65 = i65 + -1 | 0; 6312 i66 = i62 + 1 | 0; 6313 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6314 i63 = i63 + 8 | 0; 6315 if (i63 >>> 0 < 32) { 6316 i62 = i66; 6317 } else { 6318 i62 = i66; 6319 break; 6320 } 6321 } 6322 } 6323 i63 = _llvm_bswap_i32(i64 | 0) | 0; 6324 HEAP32[i10 >> 2] = i63; 6325 HEAP32[i9 >> 2] = i63; 6326 HEAP32[i4 >> 2] = 10; 6327 i63 = 0; 6328 i64 = 0; 6329 i60 = 121; 6330 break; 6331 } 6332 case 30: 6333 { 6334 i60 = 299; 6335 break L17; 6336 } 6337 case 6: 6338 { 6339 i63 = i67; 6340 i60 = 83; 6341 break; 6342 } 6343 case 3: 6344 { 6345 if (i67 >>> 0 < 16) { 6346 i63 = i67; 6347 i66 = i62; 6348 i60 = 55; 6349 } else { 6350 i60 = 57; 6351 } 6352 break; 6353 } 6354 default: 6355 { 6356 i2 = -2; 6357 i60 = 300; 6358 break L17; 6359 } 6360 } 6361 } while (0); 6362 if ((i60 | 0) == 47) { 6363 while (1) { 6364 i60 = 0; 6365 if ((i65 | 0) == 0) { 6366 i65 = 0; 6367 break L17; 6368 } 6369 i65 = i65 + -1 | 0; 6370 i60 = i62 + 1 | 0; 6371 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6372 i63 = i63 + 8 | 0; 6373 if (i63 >>> 0 < 32) { 6374 i62 = i60; 6375 i60 = 47; 6376 } else { 6377 i62 = i60; 6378 i60 = 49; 6379 break; 6380 } 6381 } 6382 } else if ((i60 | 0) == 121) { 6383 if ((HEAP32[i46 >> 2] | 0) == 0) { 6384 i60 = 122; 6385 break; 6386 } 6387 i60 = _adler32(0, 0, 0) | 0; 6388 HEAP32[i10 >> 2] = i60; 6389 HEAP32[i9 >> 2] = i60; 6390 HEAP32[i4 >> 2] = 11; 6391 i60 = 124; 6392 } else if ((i60 | 0) == 143) { 6393 HEAP32[i4 >> 2] = 15; 6394 i60 = 144; 6395 } else if ((i60 | 0) == 154) { 6396 while (1) { 6397 i60 = 0; 6398 if (i63 >>> 0 < 3) { 6399 while (1) { 6400 if ((i65 | 0) == 0) { 6401 i65 = 0; 6402 break L17; 6403 } 6404 i65 = i65 + -1 | 0; 6405 i67 = i62 + 1 | 0; 6406 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6407 i63 = i63 + 8 | 0; 6408 if (i63 >>> 0 < 3) { 6409 i62 = i67; 6410 } else { 6411 i62 = i67; 6412 break; 6413 } 6414 } 6415 } 6416 HEAP32[i36 >> 2] = i66 + 1; 6417 HEAP16[i4 + (HEAPU16[11384 + (i66 << 1) >> 1] << 1) + 112 >> 1] = i64 & 7; 6418 i64 = i64 >>> 3; 6419 i63 = i63 + -3 | 0; 6420 i66 = HEAP32[i36 >> 2] | 0; 6421 if (i66 >>> 0 < (HEAP32[i34 >> 2] | 0) >>> 0) { 6422 i60 = 154; 6423 } else { 6424 i67 = i63; 6425 i60 = 158; 6426 break; 6427 } 6428 } 6429 } else if ((i60 | 0) == 277) { 6430 i60 = 0; 6431 if ((HEAP32[i12 >> 2] | 0) == 0) { 6432 i60 = 284; 6433 break; 6434 } 6435 if ((HEAP32[i11 >> 2] | 0) == 0) { 6436 i60 = 284; 6437 break; 6438 } 6439 if (i63 >>> 0 < 32) { 6440 i66 = i62; 6441 while (1) { 6442 if ((i65 | 0) == 0) { 6443 i65 = 0; 6444 i62 = i66; 6445 break L17; 6446 } 6447 i65 = i65 + -1 | 0; 6448 i62 = i66 + 1 | 0; 6449 i64 = (HEAPU8[i66] << i63) + i64 | 0; 6450 i63 = i63 + 8 | 0; 6451 if (i63 >>> 0 < 32) { 6452 i66 = i62; 6453 } else { 6454 break; 6455 } 6456 } 6457 } 6458 if ((i64 | 0) == (HEAP32[i14 >> 2] | 0)) { 6459 i63 = 0; 6460 i64 = 0; 6461 i60 = 284; 6462 break; 6463 } 6464 HEAP32[i35 >> 2] = 11928; 6465 HEAP32[i4 >> 2] = 29; 6466 i66 = i26; 6467 } 6468 do { 6469 if ((i60 | 0) == 49) { 6470 i60 = HEAP32[i38 >> 2] | 0; 6471 if ((i60 | 0) != 0) { 6472 HEAP32[i60 + 4 >> 2] = i64; 6473 } 6474 if ((HEAP32[i11 >> 2] & 512 | 0) != 0) { 6475 HEAP8[i25] = i64; 6476 HEAP8[i39] = i64 >>> 8; 6477 HEAP8[i44] = i64 >>> 16; 6478 HEAP8[i45] = i64 >>> 24; 6479 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i25, 4) | 0; 6480 } 6481 HEAP32[i4 >> 2] = 3; 6482 i63 = 0; 6483 i64 = 0; 6484 i66 = i62; 6485 i60 = 55; 6486 } else if ((i60 | 0) == 124) { 6487 if (i47) { 6488 i60 = 285; 6489 break L17; 6490 } else { 6491 i60 = 125; 6492 } 6493 } else if ((i60 | 0) == 144) { 6494 i60 = 0; 6495 i66 = HEAP32[i42 >> 2] | 0; 6496 if ((i66 | 0) == 0) { 6497 HEAP32[i4 >> 2] = 11; 6498 i66 = i26; 6499 break; 6500 } 6501 i66 = i66 >>> 0 > i65 >>> 0 ? i65 : i66; 6502 i67 = i66 >>> 0 > i26 >>> 0 ? i26 : i66; 6503 if ((i67 | 0) == 0) { 6504 i60 = 285; 6505 break L17; 6506 } 6507 _memcpy(i19 | 0, i62 | 0, i67 | 0) | 0; 6508 HEAP32[i42 >> 2] = (HEAP32[i42 >> 2] | 0) - i67; 6509 i65 = i65 - i67 | 0; 6510 i66 = i26 - i67 | 0; 6511 i62 = i62 + i67 | 0; 6512 i19 = i19 + i67 | 0; 6513 } else if ((i60 | 0) == 158) { 6514 i60 = 0; 6515 if (i66 >>> 0 < 19) { 6516 while (1) { 6517 i61 = i66 + 1 | 0; 6518 HEAP16[i4 + (HEAPU16[11384 + (i66 << 1) >> 1] << 1) + 112 >> 1] = 0; 6519 if ((i61 | 0) == 19) { 6520 break; 6521 } else { 6522 i66 = i61; 6523 } 6524 } 6525 HEAP32[i36 >> 2] = 19; 6526 } 6527 HEAP32[i53 >> 2] = i52; 6528 HEAP32[i48 >> 2] = i52; 6529 HEAP32[i49 >> 2] = 7; 6530 i61 = _inflate_table(0, i27, 19, i53, i49, i55) | 0; 6531 if ((i61 | 0) == 0) { 6532 HEAP32[i36 >> 2] = 0; 6533 HEAP32[i4 >> 2] = 18; 6534 i63 = 0; 6535 i69 = i65; 6536 i61 = 0; 6537 i60 = 164; 6538 break; 6539 } else { 6540 HEAP32[i35 >> 2] = 11656; 6541 HEAP32[i4 >> 2] = 29; 6542 i63 = i67; 6543 i66 = i26; 6544 break; 6545 } 6546 } 6547 } while (0); 6548 L163 : do { 6549 if ((i60 | 0) == 55) { 6550 while (1) { 6551 i60 = 0; 6552 if ((i65 | 0) == 0) { 6553 i65 = 0; 6554 i62 = i66; 6555 break L17; 6556 } 6557 i65 = i65 + -1 | 0; 6558 i62 = i66 + 1 | 0; 6559 i64 = (HEAPU8[i66] << i63) + i64 | 0; 6560 i63 = i63 + 8 | 0; 6561 if (i63 >>> 0 < 16) { 6562 i66 = i62; 6563 i60 = 55; 6564 } else { 6565 i60 = 57; 6566 break; 6567 } 6568 } 6569 } else if ((i60 | 0) == 125) { 6570 i60 = 0; 6571 if ((HEAP32[i7 >> 2] | 0) != 0) { 6572 i66 = i63 & 7; 6573 HEAP32[i4 >> 2] = 26; 6574 i63 = i63 - i66 | 0; 6575 i64 = i64 >>> i66; 6576 i66 = i26; 6577 break; 6578 } 6579 if (i63 >>> 0 < 3) { 6580 while (1) { 6581 if ((i65 | 0) == 0) { 6582 i65 = 0; 6583 break L17; 6584 } 6585 i65 = i65 + -1 | 0; 6586 i66 = i62 + 1 | 0; 6587 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6588 i63 = i63 + 8 | 0; 6589 if (i63 >>> 0 < 3) { 6590 i62 = i66; 6591 } else { 6592 i62 = i66; 6593 break; 6594 } 6595 } 6596 } 6597 HEAP32[i7 >> 2] = i64 & 1; 6598 i66 = i64 >>> 1 & 3; 6599 if ((i66 | 0) == 0) { 6600 HEAP32[i4 >> 2] = 13; 6601 } else if ((i66 | 0) == 1) { 6602 HEAP32[i48 >> 2] = 11952; 6603 HEAP32[i49 >> 2] = 9; 6604 HEAP32[i50 >> 2] = 14e3; 6605 HEAP32[i51 >> 2] = 5; 6606 HEAP32[i4 >> 2] = 19; 6607 if (i43) { 6608 i60 = 133; 6609 break L17; 6610 } 6611 } else if ((i66 | 0) == 2) { 6612 HEAP32[i4 >> 2] = 16; 6613 } else if ((i66 | 0) == 3) { 6614 HEAP32[i35 >> 2] = 11560; 6615 HEAP32[i4 >> 2] = 29; 6616 } 6617 i63 = i63 + -3 | 0; 6618 i64 = i64 >>> 3; 6619 i66 = i26; 6620 } else if ((i60 | 0) == 164) { 6621 i60 = 0; 6622 i65 = HEAP32[i32 >> 2] | 0; 6623 i66 = HEAP32[i33 >> 2] | 0; 6624 do { 6625 if (i63 >>> 0 < (i66 + i65 | 0) >>> 0) { 6626 i71 = i67; 6627 L181 : while (1) { 6628 i70 = (1 << HEAP32[i49 >> 2]) + -1 | 0; 6629 i72 = i70 & i64; 6630 i68 = HEAP32[i48 >> 2] | 0; 6631 i67 = HEAPU8[i68 + (i72 << 2) + 1 | 0] | 0; 6632 if (i67 >>> 0 > i71 >>> 0) { 6633 i67 = i71; 6634 while (1) { 6635 if ((i69 | 0) == 0) { 6636 i63 = i67; 6637 i65 = 0; 6638 break L17; 6639 } 6640 i69 = i69 + -1 | 0; 6641 i71 = i62 + 1 | 0; 6642 i64 = (HEAPU8[i62] << i67) + i64 | 0; 6643 i62 = i67 + 8 | 0; 6644 i72 = i70 & i64; 6645 i67 = HEAPU8[i68 + (i72 << 2) + 1 | 0] | 0; 6646 if (i67 >>> 0 > i62 >>> 0) { 6647 i67 = i62; 6648 i62 = i71; 6649 } else { 6650 i70 = i62; 6651 i62 = i71; 6652 break; 6653 } 6654 } 6655 } else { 6656 i70 = i71; 6657 } 6658 i68 = HEAP16[i68 + (i72 << 2) + 2 >> 1] | 0; 6659 L188 : do { 6660 if ((i68 & 65535) < 16) { 6661 if (i70 >>> 0 < i67 >>> 0) { 6662 while (1) { 6663 if ((i69 | 0) == 0) { 6664 i63 = i70; 6665 i65 = 0; 6666 break L17; 6667 } 6668 i69 = i69 + -1 | 0; 6669 i65 = i62 + 1 | 0; 6670 i64 = (HEAPU8[i62] << i70) + i64 | 0; 6671 i70 = i70 + 8 | 0; 6672 if (i70 >>> 0 < i67 >>> 0) { 6673 i62 = i65; 6674 } else { 6675 i62 = i65; 6676 break; 6677 } 6678 } 6679 } 6680 HEAP32[i36 >> 2] = i63 + 1; 6681 HEAP16[i4 + (i63 << 1) + 112 >> 1] = i68; 6682 i71 = i70 - i67 | 0; 6683 i64 = i64 >>> i67; 6684 } else { 6685 if (i68 << 16 >> 16 == 16) { 6686 i68 = i67 + 2 | 0; 6687 if (i70 >>> 0 < i68 >>> 0) { 6688 i71 = i62; 6689 while (1) { 6690 if ((i69 | 0) == 0) { 6691 i63 = i70; 6692 i65 = 0; 6693 i62 = i71; 6694 break L17; 6695 } 6696 i69 = i69 + -1 | 0; 6697 i62 = i71 + 1 | 0; 6698 i64 = (HEAPU8[i71] << i70) + i64 | 0; 6699 i70 = i70 + 8 | 0; 6700 if (i70 >>> 0 < i68 >>> 0) { 6701 i71 = i62; 6702 } else { 6703 break; 6704 } 6705 } 6706 } 6707 i64 = i64 >>> i67; 6708 i67 = i70 - i67 | 0; 6709 if ((i63 | 0) == 0) { 6710 i60 = 181; 6711 break L181; 6712 } 6713 i67 = i67 + -2 | 0; 6714 i68 = (i64 & 3) + 3 | 0; 6715 i64 = i64 >>> 2; 6716 i70 = HEAP16[i4 + (i63 + -1 << 1) + 112 >> 1] | 0; 6717 } else if (i68 << 16 >> 16 == 17) { 6718 i68 = i67 + 3 | 0; 6719 if (i70 >>> 0 < i68 >>> 0) { 6720 i71 = i62; 6721 while (1) { 6722 if ((i69 | 0) == 0) { 6723 i63 = i70; 6724 i65 = 0; 6725 i62 = i71; 6726 break L17; 6727 } 6728 i69 = i69 + -1 | 0; 6729 i62 = i71 + 1 | 0; 6730 i64 = (HEAPU8[i71] << i70) + i64 | 0; 6731 i70 = i70 + 8 | 0; 6732 if (i70 >>> 0 < i68 >>> 0) { 6733 i71 = i62; 6734 } else { 6735 break; 6736 } 6737 } 6738 } 6739 i64 = i64 >>> i67; 6740 i67 = -3 - i67 + i70 | 0; 6741 i68 = (i64 & 7) + 3 | 0; 6742 i64 = i64 >>> 3; 6743 i70 = 0; 6744 } else { 6745 i68 = i67 + 7 | 0; 6746 if (i70 >>> 0 < i68 >>> 0) { 6747 i71 = i62; 6748 while (1) { 6749 if ((i69 | 0) == 0) { 6750 i63 = i70; 6751 i65 = 0; 6752 i62 = i71; 6753 break L17; 6754 } 6755 i69 = i69 + -1 | 0; 6756 i62 = i71 + 1 | 0; 6757 i64 = (HEAPU8[i71] << i70) + i64 | 0; 6758 i70 = i70 + 8 | 0; 6759 if (i70 >>> 0 < i68 >>> 0) { 6760 i71 = i62; 6761 } else { 6762 break; 6763 } 6764 } 6765 } 6766 i64 = i64 >>> i67; 6767 i67 = -7 - i67 + i70 | 0; 6768 i68 = (i64 & 127) + 11 | 0; 6769 i64 = i64 >>> 7; 6770 i70 = 0; 6771 } 6772 if ((i63 + i68 | 0) >>> 0 > (i66 + i65 | 0) >>> 0) { 6773 i60 = 190; 6774 break L181; 6775 } 6776 while (1) { 6777 i68 = i68 + -1 | 0; 6778 HEAP32[i36 >> 2] = i63 + 1; 6779 HEAP16[i4 + (i63 << 1) + 112 >> 1] = i70; 6780 if ((i68 | 0) == 0) { 6781 i71 = i67; 6782 break L188; 6783 } 6784 i63 = HEAP32[i36 >> 2] | 0; 6785 } 6786 } 6787 } while (0); 6788 i63 = HEAP32[i36 >> 2] | 0; 6789 i65 = HEAP32[i32 >> 2] | 0; 6790 i66 = HEAP32[i33 >> 2] | 0; 6791 if (!(i63 >>> 0 < (i66 + i65 | 0) >>> 0)) { 6792 i60 = 193; 6793 break; 6794 } 6795 } 6796 if ((i60 | 0) == 181) { 6797 i60 = 0; 6798 HEAP32[i35 >> 2] = 11688; 6799 HEAP32[i4 >> 2] = 29; 6800 i63 = i67; 6801 i65 = i69; 6802 i66 = i26; 6803 break L163; 6804 } else if ((i60 | 0) == 190) { 6805 i60 = 0; 6806 HEAP32[i35 >> 2] = 11688; 6807 HEAP32[i4 >> 2] = 29; 6808 i63 = i67; 6809 i65 = i69; 6810 i66 = i26; 6811 break L163; 6812 } else if ((i60 | 0) == 193) { 6813 i60 = 0; 6814 if ((HEAP32[i4 >> 2] | 0) == 29) { 6815 i63 = i71; 6816 i65 = i69; 6817 i66 = i26; 6818 break L163; 6819 } else { 6820 i63 = i71; 6821 break; 6822 } 6823 } 6824 } else { 6825 i63 = i67; 6826 } 6827 } while (0); 6828 if ((HEAP16[i56 >> 1] | 0) == 0) { 6829 HEAP32[i35 >> 2] = 11720; 6830 HEAP32[i4 >> 2] = 29; 6831 i65 = i69; 6832 i66 = i26; 6833 break; 6834 } 6835 HEAP32[i53 >> 2] = i52; 6836 HEAP32[i48 >> 2] = i52; 6837 HEAP32[i49 >> 2] = 9; 6838 i61 = _inflate_table(1, i27, i65, i53, i49, i55) | 0; 6839 if ((i61 | 0) != 0) { 6840 HEAP32[i35 >> 2] = 11760; 6841 HEAP32[i4 >> 2] = 29; 6842 i65 = i69; 6843 i66 = i26; 6844 break; 6845 } 6846 HEAP32[i50 >> 2] = HEAP32[i53 >> 2]; 6847 HEAP32[i51 >> 2] = 6; 6848 i61 = _inflate_table(2, i4 + (HEAP32[i32 >> 2] << 1) + 112 | 0, HEAP32[i33 >> 2] | 0, i53, i51, i55) | 0; 6849 if ((i61 | 0) == 0) { 6850 HEAP32[i4 >> 2] = 19; 6851 if (i43) { 6852 i65 = i69; 6853 i61 = 0; 6854 i60 = 285; 6855 break L17; 6856 } else { 6857 i65 = i69; 6858 i61 = 0; 6859 i60 = 201; 6860 break; 6861 } 6862 } else { 6863 HEAP32[i35 >> 2] = 11792; 6864 HEAP32[i4 >> 2] = 29; 6865 i65 = i69; 6866 i66 = i26; 6867 break; 6868 } 6869 } 6870 } while (0); 6871 if ((i60 | 0) == 57) { 6872 i60 = HEAP32[i38 >> 2] | 0; 6873 if ((i60 | 0) != 0) { 6874 HEAP32[i60 + 8 >> 2] = i64 & 255; 6875 HEAP32[i60 + 12 >> 2] = i64 >>> 8; 6876 } 6877 if ((HEAP32[i11 >> 2] & 512 | 0) != 0) { 6878 HEAP8[i25] = i64; 6879 HEAP8[i39] = i64 >>> 8; 6880 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i25, 2) | 0; 6881 } 6882 HEAP32[i4 >> 2] = 4; 6883 i63 = 0; 6884 i64 = 0; 6885 i60 = 62; 6886 } else if ((i60 | 0) == 201) { 6887 HEAP32[i4 >> 2] = 20; 6888 i60 = 202; 6889 } 6890 do { 6891 if ((i60 | 0) == 62) { 6892 i60 = 0; 6893 i66 = HEAP32[i11 >> 2] | 0; 6894 if ((i66 & 1024 | 0) == 0) { 6895 i60 = HEAP32[i38 >> 2] | 0; 6896 if ((i60 | 0) != 0) { 6897 HEAP32[i60 + 16 >> 2] = 0; 6898 } 6899 } else { 6900 if (i63 >>> 0 < 16) { 6901 while (1) { 6902 if ((i65 | 0) == 0) { 6903 i65 = 0; 6904 break L17; 6905 } 6906 i65 = i65 + -1 | 0; 6907 i67 = i62 + 1 | 0; 6908 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6909 i63 = i63 + 8 | 0; 6910 if (i63 >>> 0 < 16) { 6911 i62 = i67; 6912 } else { 6913 i62 = i67; 6914 break; 6915 } 6916 } 6917 } 6918 HEAP32[i42 >> 2] = i64; 6919 i60 = HEAP32[i38 >> 2] | 0; 6920 if ((i60 | 0) != 0) { 6921 HEAP32[i60 + 20 >> 2] = i64; 6922 i66 = HEAP32[i11 >> 2] | 0; 6923 } 6924 if ((i66 & 512 | 0) == 0) { 6925 i63 = 0; 6926 i64 = 0; 6927 } else { 6928 HEAP8[i25] = i64; 6929 HEAP8[i39] = i64 >>> 8; 6930 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i25, 2) | 0; 6931 i63 = 0; 6932 i64 = 0; 6933 } 6934 } 6935 HEAP32[i4 >> 2] = 5; 6936 i60 = 73; 6937 } else if ((i60 | 0) == 202) { 6938 i60 = 0; 6939 if (i65 >>> 0 > 5 & i26 >>> 0 > 257) { 6940 HEAP32[i8 >> 2] = i19; 6941 HEAP32[i15 >> 2] = i26; 6942 HEAP32[i2 >> 2] = i62; 6943 HEAP32[i16 >> 2] = i65; 6944 HEAP32[i17 >> 2] = i64; 6945 HEAP32[i6 >> 2] = i63; 6946 _inflate_fast(i2, i59); 6947 i19 = HEAP32[i8 >> 2] | 0; 6948 i66 = HEAP32[i15 >> 2] | 0; 6949 i62 = HEAP32[i2 >> 2] | 0; 6950 i65 = HEAP32[i16 >> 2] | 0; 6951 i64 = HEAP32[i17 >> 2] | 0; 6952 i63 = HEAP32[i6 >> 2] | 0; 6953 if ((HEAP32[i4 >> 2] | 0) != 11) { 6954 break; 6955 } 6956 HEAP32[i57 >> 2] = -1; 6957 break; 6958 } 6959 HEAP32[i57 >> 2] = 0; 6960 i69 = (1 << HEAP32[i49 >> 2]) + -1 | 0; 6961 i71 = i69 & i64; 6962 i66 = HEAP32[i48 >> 2] | 0; 6963 i68 = HEAP8[i66 + (i71 << 2) + 1 | 0] | 0; 6964 i67 = i68 & 255; 6965 if (i67 >>> 0 > i63 >>> 0) { 6966 while (1) { 6967 if ((i65 | 0) == 0) { 6968 i65 = 0; 6969 break L17; 6970 } 6971 i65 = i65 + -1 | 0; 6972 i70 = i62 + 1 | 0; 6973 i64 = (HEAPU8[i62] << i63) + i64 | 0; 6974 i63 = i63 + 8 | 0; 6975 i71 = i69 & i64; 6976 i68 = HEAP8[i66 + (i71 << 2) + 1 | 0] | 0; 6977 i67 = i68 & 255; 6978 if (i67 >>> 0 > i63 >>> 0) { 6979 i62 = i70; 6980 } else { 6981 i62 = i70; 6982 break; 6983 } 6984 } 6985 } 6986 i69 = HEAP8[i66 + (i71 << 2) | 0] | 0; 6987 i70 = HEAP16[i66 + (i71 << 2) + 2 >> 1] | 0; 6988 i71 = i69 & 255; 6989 if (!(i69 << 24 >> 24 == 0)) { 6990 if ((i71 & 240 | 0) == 0) { 6991 i69 = i70 & 65535; 6992 i70 = (1 << i67 + i71) + -1 | 0; 6993 i71 = ((i64 & i70) >>> i67) + i69 | 0; 6994 i68 = HEAP8[i66 + (i71 << 2) + 1 | 0] | 0; 6995 if (((i68 & 255) + i67 | 0) >>> 0 > i63 >>> 0) { 6996 while (1) { 6997 if ((i65 | 0) == 0) { 6998 i65 = 0; 6999 break L17; 7000 } 7001 i65 = i65 + -1 | 0; 7002 i71 = i62 + 1 | 0; 7003 i64 = (HEAPU8[i62] << i63) + i64 | 0; 7004 i63 = i63 + 8 | 0; 7005 i62 = ((i64 & i70) >>> i67) + i69 | 0; 7006 i68 = HEAP8[i66 + (i62 << 2) + 1 | 0] | 0; 7007 if (((i68 & 255) + i67 | 0) >>> 0 > i63 >>> 0) { 7008 i62 = i71; 7009 } else { 7010 i69 = i62; 7011 i62 = i71; 7012 break; 7013 } 7014 } 7015 } else { 7016 i69 = i71; 7017 } 7018 i70 = HEAP16[i66 + (i69 << 2) + 2 >> 1] | 0; 7019 i69 = HEAP8[i66 + (i69 << 2) | 0] | 0; 7020 HEAP32[i57 >> 2] = i67; 7021 i66 = i67; 7022 i63 = i63 - i67 | 0; 7023 i64 = i64 >>> i67; 7024 } else { 7025 i66 = 0; 7026 } 7027 } else { 7028 i66 = 0; 7029 i69 = 0; 7030 } 7031 i72 = i68 & 255; 7032 i64 = i64 >>> i72; 7033 i63 = i63 - i72 | 0; 7034 HEAP32[i57 >> 2] = i66 + i72; 7035 HEAP32[i42 >> 2] = i70 & 65535; 7036 i66 = i69 & 255; 7037 if (i69 << 24 >> 24 == 0) { 7038 HEAP32[i4 >> 2] = 25; 7039 i66 = i26; 7040 break; 7041 } 7042 if ((i66 & 32 | 0) != 0) { 7043 HEAP32[i57 >> 2] = -1; 7044 HEAP32[i4 >> 2] = 11; 7045 i66 = i26; 7046 break; 7047 } 7048 if ((i66 & 64 | 0) == 0) { 7049 i66 = i66 & 15; 7050 HEAP32[i37 >> 2] = i66; 7051 HEAP32[i4 >> 2] = 21; 7052 i60 = 221; 7053 break; 7054 } else { 7055 HEAP32[i35 >> 2] = 11816; 7056 HEAP32[i4 >> 2] = 29; 7057 i66 = i26; 7058 break; 7059 } 7060 } 7061 } while (0); 7062 if ((i60 | 0) == 73) { 7063 i68 = HEAP32[i11 >> 2] | 0; 7064 if ((i68 & 1024 | 0) != 0) { 7065 i67 = HEAP32[i42 >> 2] | 0; 7066 i60 = i67 >>> 0 > i65 >>> 0 ? i65 : i67; 7067 if ((i60 | 0) != 0) { 7068 i66 = HEAP32[i38 >> 2] | 0; 7069 if ((i66 | 0) != 0 ? (i20 = HEAP32[i66 + 16 >> 2] | 0, (i20 | 0) != 0) : 0) { 7070 i67 = (HEAP32[i66 + 20 >> 2] | 0) - i67 | 0; 7071 i66 = HEAP32[i66 + 24 >> 2] | 0; 7072 _memcpy(i20 + i67 | 0, i62 | 0, ((i67 + i60 | 0) >>> 0 > i66 >>> 0 ? i66 - i67 | 0 : i60) | 0) | 0; 7073 i68 = HEAP32[i11 >> 2] | 0; 7074 } 7075 if ((i68 & 512 | 0) != 0) { 7076 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i62, i60) | 0; 7077 } 7078 i67 = (HEAP32[i42 >> 2] | 0) - i60 | 0; 7079 HEAP32[i42 >> 2] = i67; 7080 i65 = i65 - i60 | 0; 7081 i62 = i62 + i60 | 0; 7082 } 7083 if ((i67 | 0) != 0) { 7084 i60 = 285; 7085 break; 7086 } 7087 } 7088 HEAP32[i42 >> 2] = 0; 7089 HEAP32[i4 >> 2] = 6; 7090 i60 = 83; 7091 } else if ((i60 | 0) == 221) { 7092 i60 = 0; 7093 if ((i66 | 0) == 0) { 7094 i60 = HEAP32[i42 >> 2] | 0; 7095 } else { 7096 if (i63 >>> 0 < i66 >>> 0) { 7097 while (1) { 7098 if ((i65 | 0) == 0) { 7099 i65 = 0; 7100 break L17; 7101 } 7102 i65 = i65 + -1 | 0; 7103 i67 = i62 + 1 | 0; 7104 i64 = (HEAPU8[i62] << i63) + i64 | 0; 7105 i63 = i63 + 8 | 0; 7106 if (i63 >>> 0 < i66 >>> 0) { 7107 i62 = i67; 7108 } else { 7109 i62 = i67; 7110 break; 7111 } 7112 } 7113 } 7114 i60 = (HEAP32[i42 >> 2] | 0) + ((1 << i66) + -1 & i64) | 0; 7115 HEAP32[i42 >> 2] = i60; 7116 HEAP32[i57 >> 2] = (HEAP32[i57 >> 2] | 0) + i66; 7117 i63 = i63 - i66 | 0; 7118 i64 = i64 >>> i66; 7119 } 7120 HEAP32[i58 >> 2] = i60; 7121 HEAP32[i4 >> 2] = 22; 7122 i60 = 228; 7123 } 7124 do { 7125 if ((i60 | 0) == 83) { 7126 if ((HEAP32[i11 >> 2] & 2048 | 0) == 0) { 7127 i60 = HEAP32[i38 >> 2] | 0; 7128 if ((i60 | 0) != 0) { 7129 HEAP32[i60 + 28 >> 2] = 0; 7130 } 7131 } else { 7132 if ((i65 | 0) == 0) { 7133 i65 = 0; 7134 i60 = 285; 7135 break L17; 7136 } else { 7137 i66 = 0; 7138 } 7139 while (1) { 7140 i60 = i66 + 1 | 0; 7141 i67 = HEAP8[i62 + i66 | 0] | 0; 7142 i66 = HEAP32[i38 >> 2] | 0; 7143 if (((i66 | 0) != 0 ? (i23 = HEAP32[i66 + 28 >> 2] | 0, (i23 | 0) != 0) : 0) ? (i21 = HEAP32[i42 >> 2] | 0, i21 >>> 0 < (HEAP32[i66 + 32 >> 2] | 0) >>> 0) : 0) { 7144 HEAP32[i42 >> 2] = i21 + 1; 7145 HEAP8[i23 + i21 | 0] = i67; 7146 } 7147 i66 = i67 << 24 >> 24 != 0; 7148 if (i66 & i60 >>> 0 < i65 >>> 0) { 7149 i66 = i60; 7150 } else { 7151 break; 7152 } 7153 } 7154 if ((HEAP32[i11 >> 2] & 512 | 0) != 0) { 7155 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i62, i60) | 0; 7156 } 7157 i65 = i65 - i60 | 0; 7158 i62 = i62 + i60 | 0; 7159 if (i66) { 7160 i60 = 285; 7161 break L17; 7162 } 7163 } 7164 HEAP32[i42 >> 2] = 0; 7165 HEAP32[i4 >> 2] = 7; 7166 i60 = 96; 7167 } else if ((i60 | 0) == 228) { 7168 i60 = 0; 7169 i69 = (1 << HEAP32[i51 >> 2]) + -1 | 0; 7170 i71 = i69 & i64; 7171 i66 = HEAP32[i50 >> 2] | 0; 7172 i68 = HEAP8[i66 + (i71 << 2) + 1 | 0] | 0; 7173 i67 = i68 & 255; 7174 if (i67 >>> 0 > i63 >>> 0) { 7175 while (1) { 7176 if ((i65 | 0) == 0) { 7177 i65 = 0; 7178 break L17; 7179 } 7180 i65 = i65 + -1 | 0; 7181 i70 = i62 + 1 | 0; 7182 i64 = (HEAPU8[i62] << i63) + i64 | 0; 7183 i63 = i63 + 8 | 0; 7184 i71 = i69 & i64; 7185 i68 = HEAP8[i66 + (i71 << 2) + 1 | 0] | 0; 7186 i67 = i68 & 255; 7187 if (i67 >>> 0 > i63 >>> 0) { 7188 i62 = i70; 7189 } else { 7190 i62 = i70; 7191 break; 7192 } 7193 } 7194 } 7195 i69 = HEAP8[i66 + (i71 << 2) | 0] | 0; 7196 i70 = HEAP16[i66 + (i71 << 2) + 2 >> 1] | 0; 7197 i71 = i69 & 255; 7198 if ((i71 & 240 | 0) == 0) { 7199 i69 = i70 & 65535; 7200 i70 = (1 << i67 + i71) + -1 | 0; 7201 i71 = ((i64 & i70) >>> i67) + i69 | 0; 7202 i68 = HEAP8[i66 + (i71 << 2) + 1 | 0] | 0; 7203 if (((i68 & 255) + i67 | 0) >>> 0 > i63 >>> 0) { 7204 while (1) { 7205 if ((i65 | 0) == 0) { 7206 i65 = 0; 7207 break L17; 7208 } 7209 i65 = i65 + -1 | 0; 7210 i71 = i62 + 1 | 0; 7211 i64 = (HEAPU8[i62] << i63) + i64 | 0; 7212 i63 = i63 + 8 | 0; 7213 i62 = ((i64 & i70) >>> i67) + i69 | 0; 7214 i68 = HEAP8[i66 + (i62 << 2) + 1 | 0] | 0; 7215 if (((i68 & 255) + i67 | 0) >>> 0 > i63 >>> 0) { 7216 i62 = i71; 7217 } else { 7218 i69 = i62; 7219 i62 = i71; 7220 break; 7221 } 7222 } 7223 } else { 7224 i69 = i71; 7225 } 7226 i70 = HEAP16[i66 + (i69 << 2) + 2 >> 1] | 0; 7227 i69 = HEAP8[i66 + (i69 << 2) | 0] | 0; 7228 i66 = (HEAP32[i57 >> 2] | 0) + i67 | 0; 7229 HEAP32[i57 >> 2] = i66; 7230 i63 = i63 - i67 | 0; 7231 i64 = i64 >>> i67; 7232 } else { 7233 i66 = HEAP32[i57 >> 2] | 0; 7234 } 7235 i72 = i68 & 255; 7236 i64 = i64 >>> i72; 7237 i63 = i63 - i72 | 0; 7238 HEAP32[i57 >> 2] = i66 + i72; 7239 i66 = i69 & 255; 7240 if ((i66 & 64 | 0) == 0) { 7241 HEAP32[i54 >> 2] = i70 & 65535; 7242 i66 = i66 & 15; 7243 HEAP32[i37 >> 2] = i66; 7244 HEAP32[i4 >> 2] = 23; 7245 i60 = 240; 7246 break; 7247 } else { 7248 HEAP32[i35 >> 2] = 11848; 7249 HEAP32[i4 >> 2] = 29; 7250 i66 = i26; 7251 break; 7252 } 7253 } 7254 } while (0); 7255 if ((i60 | 0) == 96) { 7256 if ((HEAP32[i11 >> 2] & 4096 | 0) == 0) { 7257 i60 = HEAP32[i38 >> 2] | 0; 7258 if ((i60 | 0) != 0) { 7259 HEAP32[i60 + 36 >> 2] = 0; 7260 } 7261 } else { 7262 if ((i65 | 0) == 0) { 7263 i65 = 0; 7264 i60 = 285; 7265 break; 7266 } else { 7267 i66 = 0; 7268 } 7269 while (1) { 7270 i60 = i66 + 1 | 0; 7271 i66 = HEAP8[i62 + i66 | 0] | 0; 7272 i67 = HEAP32[i38 >> 2] | 0; 7273 if (((i67 | 0) != 0 ? (i24 = HEAP32[i67 + 36 >> 2] | 0, (i24 | 0) != 0) : 0) ? (i22 = HEAP32[i42 >> 2] | 0, i22 >>> 0 < (HEAP32[i67 + 40 >> 2] | 0) >>> 0) : 0) { 7274 HEAP32[i42 >> 2] = i22 + 1; 7275 HEAP8[i24 + i22 | 0] = i66; 7276 } 7277 i66 = i66 << 24 >> 24 != 0; 7278 if (i66 & i60 >>> 0 < i65 >>> 0) { 7279 i66 = i60; 7280 } else { 7281 break; 7282 } 7283 } 7284 if ((HEAP32[i11 >> 2] & 512 | 0) != 0) { 7285 HEAP32[i10 >> 2] = _crc32(HEAP32[i10 >> 2] | 0, i62, i60) | 0; 7286 } 7287 i65 = i65 - i60 | 0; 7288 i62 = i62 + i60 | 0; 7289 if (i66) { 7290 i60 = 285; 7291 break; 7292 } 7293 } 7294 HEAP32[i4 >> 2] = 8; 7295 i60 = 109; 7296 } else if ((i60 | 0) == 240) { 7297 i60 = 0; 7298 if ((i66 | 0) != 0) { 7299 if (i63 >>> 0 < i66 >>> 0) { 7300 i67 = i62; 7301 while (1) { 7302 if ((i65 | 0) == 0) { 7303 i65 = 0; 7304 i62 = i67; 7305 break L17; 7306 } 7307 i65 = i65 + -1 | 0; 7308 i62 = i67 + 1 | 0; 7309 i64 = (HEAPU8[i67] << i63) + i64 | 0; 7310 i63 = i63 + 8 | 0; 7311 if (i63 >>> 0 < i66 >>> 0) { 7312 i67 = i62; 7313 } else { 7314 break; 7315 } 7316 } 7317 } 7318 HEAP32[i54 >> 2] = (HEAP32[i54 >> 2] | 0) + ((1 << i66) + -1 & i64); 7319 HEAP32[i57 >> 2] = (HEAP32[i57 >> 2] | 0) + i66; 7320 i63 = i63 - i66 | 0; 7321 i64 = i64 >>> i66; 7322 } 7323 HEAP32[i4 >> 2] = 24; 7324 i60 = 246; 7325 } 7326 do { 7327 if ((i60 | 0) == 109) { 7328 i60 = 0; 7329 i66 = HEAP32[i11 >> 2] | 0; 7330 if ((i66 & 512 | 0) != 0) { 7331 if (i63 >>> 0 < 16) { 7332 i67 = i62; 7333 while (1) { 7334 if ((i65 | 0) == 0) { 7335 i65 = 0; 7336 i62 = i67; 7337 break L17; 7338 } 7339 i65 = i65 + -1 | 0; 7340 i62 = i67 + 1 | 0; 7341 i64 = (HEAPU8[i67] << i63) + i64 | 0; 7342 i63 = i63 + 8 | 0; 7343 if (i63 >>> 0 < 16) { 7344 i67 = i62; 7345 } else { 7346 break; 7347 } 7348 } 7349 } 7350 if ((i64 | 0) == (HEAP32[i10 >> 2] & 65535 | 0)) { 7351 i63 = 0; 7352 i64 = 0; 7353 } else { 7354 HEAP32[i35 >> 2] = 11536; 7355 HEAP32[i4 >> 2] = 29; 7356 i66 = i26; 7357 break; 7358 } 7359 } 7360 i67 = HEAP32[i38 >> 2] | 0; 7361 if ((i67 | 0) != 0) { 7362 HEAP32[i67 + 44 >> 2] = i66 >>> 9 & 1; 7363 HEAP32[i67 + 48 >> 2] = 1; 7364 } 7365 i66 = _crc32(0, 0, 0) | 0; 7366 HEAP32[i10 >> 2] = i66; 7367 HEAP32[i9 >> 2] = i66; 7368 HEAP32[i4 >> 2] = 11; 7369 i66 = i26; 7370 } else if ((i60 | 0) == 246) { 7371 i60 = 0; 7372 if ((i26 | 0) == 0) { 7373 i26 = 0; 7374 i60 = 285; 7375 break L17; 7376 } 7377 i67 = i59 - i26 | 0; 7378 i66 = HEAP32[i54 >> 2] | 0; 7379 if (i66 >>> 0 > i67 >>> 0) { 7380 i67 = i66 - i67 | 0; 7381 if (i67 >>> 0 > (HEAP32[i28 >> 2] | 0) >>> 0 ? (HEAP32[i29 >> 2] | 0) != 0 : 0) { 7382 HEAP32[i35 >> 2] = 11872; 7383 HEAP32[i4 >> 2] = 29; 7384 i66 = i26; 7385 break; 7386 } 7387 i68 = HEAP32[i30 >> 2] | 0; 7388 if (i67 >>> 0 > i68 >>> 0) { 7389 i68 = i67 - i68 | 0; 7390 i66 = i68; 7391 i68 = (HEAP32[i31 >> 2] | 0) + ((HEAP32[i18 >> 2] | 0) - i68) | 0; 7392 } else { 7393 i66 = i67; 7394 i68 = (HEAP32[i31 >> 2] | 0) + (i68 - i67) | 0; 7395 } 7396 i69 = HEAP32[i42 >> 2] | 0; 7397 i67 = i69; 7398 i69 = i66 >>> 0 > i69 >>> 0 ? i69 : i66; 7399 } else { 7400 i69 = HEAP32[i42 >> 2] | 0; 7401 i67 = i69; 7402 i68 = i19 + (0 - i66) | 0; 7403 } 7404 i66 = i69 >>> 0 > i26 >>> 0 ? i26 : i69; 7405 HEAP32[i42 >> 2] = i67 - i66; 7406 i67 = ~i26; 7407 i69 = ~i69; 7408 i67 = i67 >>> 0 > i69 >>> 0 ? i67 : i69; 7409 i69 = i66; 7410 i70 = i19; 7411 while (1) { 7412 HEAP8[i70] = HEAP8[i68] | 0; 7413 i69 = i69 + -1 | 0; 7414 if ((i69 | 0) == 0) { 7415 break; 7416 } else { 7417 i68 = i68 + 1 | 0; 7418 i70 = i70 + 1 | 0; 7419 } 7420 } 7421 i66 = i26 - i66 | 0; 7422 i19 = i19 + ~i67 | 0; 7423 if ((HEAP32[i42 >> 2] | 0) == 0) { 7424 HEAP32[i4 >> 2] = 20; 7425 } 7426 } 7427 } while (0); 7428 i68 = HEAP32[i4 >> 2] | 0; 7429 i67 = i63; 7430 i26 = i66; 7431 } 7432 if ((i60 | 0) == 122) { 7433 HEAP32[i8 >> 2] = i19; 7434 HEAP32[i15 >> 2] = i26; 7435 HEAP32[i2 >> 2] = i62; 7436 HEAP32[i16 >> 2] = i65; 7437 HEAP32[i17 >> 2] = i64; 7438 HEAP32[i6 >> 2] = i63; 7439 i72 = 2; 7440 STACKTOP = i1; 7441 return i72 | 0; 7442 } else if ((i60 | 0) == 133) { 7443 i63 = i63 + -3 | 0; 7444 i64 = i64 >>> 3; 7445 } else if ((i60 | 0) == 284) { 7446 HEAP32[i4 >> 2] = 28; 7447 i61 = 1; 7448 } else if ((i60 | 0) != 285) if ((i60 | 0) == 299) { 7449 i72 = -4; 7450 STACKTOP = i1; 7451 return i72 | 0; 7452 } else if ((i60 | 0) == 300) { 7453 STACKTOP = i1; 7454 return i2 | 0; 7455 } 7456 HEAP32[i8 >> 2] = i19; 7457 HEAP32[i15 >> 2] = i26; 7458 HEAP32[i2 >> 2] = i62; 7459 HEAP32[i16 >> 2] = i65; 7460 HEAP32[i17 >> 2] = i64; 7461 HEAP32[i6 >> 2] = i63; 7462 if ((HEAP32[i18 >> 2] | 0) == 0) { 7463 if ((HEAP32[i4 >> 2] | 0) >>> 0 < 26 ? (i59 | 0) != (HEAP32[i15 >> 2] | 0) : 0) { 7464 i60 = 289; 7465 } 7466 } else { 7467 i60 = 289; 7468 } 7469 if ((i60 | 0) == 289 ? (_updatewindow(i2, i59) | 0) != 0 : 0) { 7470 HEAP32[i4 >> 2] = 30; 7471 i72 = -4; 7472 STACKTOP = i1; 7473 return i72 | 0; 7474 } 7475 i16 = HEAP32[i16 >> 2] | 0; 7476 i72 = HEAP32[i15 >> 2] | 0; 7477 i15 = i59 - i72 | 0; 7478 i71 = i2 + 8 | 0; 7479 HEAP32[i71 >> 2] = i5 - i16 + (HEAP32[i71 >> 2] | 0); 7480 HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) + i15; 7481 HEAP32[i14 >> 2] = (HEAP32[i14 >> 2] | 0) + i15; 7482 i13 = (i59 | 0) == (i72 | 0); 7483 if (!((HEAP32[i12 >> 2] | 0) == 0 | i13)) { 7484 i12 = HEAP32[i10 >> 2] | 0; 7485 i8 = (HEAP32[i8 >> 2] | 0) + (0 - i15) | 0; 7486 if ((HEAP32[i11 >> 2] | 0) == 0) { 7487 i8 = _adler32(i12, i8, i15) | 0; 7488 } else { 7489 i8 = _crc32(i12, i8, i15) | 0; 7490 } 7491 HEAP32[i10 >> 2] = i8; 7492 HEAP32[i9 >> 2] = i8; 7493 } 7494 i4 = HEAP32[i4 >> 2] | 0; 7495 if ((i4 | 0) == 19) { 7496 i8 = 256; 7497 } else { 7498 i8 = (i4 | 0) == 14 ? 256 : 0; 7499 } 7500 HEAP32[i2 + 44 >> 2] = ((HEAP32[i7 >> 2] | 0) != 0 ? 64 : 0) + (HEAP32[i6 >> 2] | 0) + ((i4 | 0) == 11 ? 128 : 0) + i8; 7501 i72 = ((i5 | 0) == (i16 | 0) & i13 | (i3 | 0) == 4) & (i61 | 0) == 0 ? -5 : i61; 7502 STACKTOP = i1; 7503 return i72 | 0; 7504} 7505function _malloc(i12) { 7506 i12 = i12 | 0; 7507 var i1 = 0, i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0; 7508 i1 = STACKTOP; 7509 do { 7510 if (i12 >>> 0 < 245) { 7511 if (i12 >>> 0 < 11) { 7512 i12 = 16; 7513 } else { 7514 i12 = i12 + 11 & -8; 7515 } 7516 i20 = i12 >>> 3; 7517 i18 = HEAP32[3618] | 0; 7518 i21 = i18 >>> i20; 7519 if ((i21 & 3 | 0) != 0) { 7520 i6 = (i21 & 1 ^ 1) + i20 | 0; 7521 i5 = i6 << 1; 7522 i3 = 14512 + (i5 << 2) | 0; 7523 i5 = 14512 + (i5 + 2 << 2) | 0; 7524 i7 = HEAP32[i5 >> 2] | 0; 7525 i2 = i7 + 8 | 0; 7526 i4 = HEAP32[i2 >> 2] | 0; 7527 do { 7528 if ((i3 | 0) != (i4 | 0)) { 7529 if (i4 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7530 _abort(); 7531 } 7532 i8 = i4 + 12 | 0; 7533 if ((HEAP32[i8 >> 2] | 0) == (i7 | 0)) { 7534 HEAP32[i8 >> 2] = i3; 7535 HEAP32[i5 >> 2] = i4; 7536 break; 7537 } else { 7538 _abort(); 7539 } 7540 } else { 7541 HEAP32[3618] = i18 & ~(1 << i6); 7542 } 7543 } while (0); 7544 i32 = i6 << 3; 7545 HEAP32[i7 + 4 >> 2] = i32 | 3; 7546 i32 = i7 + (i32 | 4) | 0; 7547 HEAP32[i32 >> 2] = HEAP32[i32 >> 2] | 1; 7548 i32 = i2; 7549 STACKTOP = i1; 7550 return i32 | 0; 7551 } 7552 if (i12 >>> 0 > (HEAP32[14480 >> 2] | 0) >>> 0) { 7553 if ((i21 | 0) != 0) { 7554 i7 = 2 << i20; 7555 i7 = i21 << i20 & (i7 | 0 - i7); 7556 i7 = (i7 & 0 - i7) + -1 | 0; 7557 i2 = i7 >>> 12 & 16; 7558 i7 = i7 >>> i2; 7559 i6 = i7 >>> 5 & 8; 7560 i7 = i7 >>> i6; 7561 i5 = i7 >>> 2 & 4; 7562 i7 = i7 >>> i5; 7563 i4 = i7 >>> 1 & 2; 7564 i7 = i7 >>> i4; 7565 i3 = i7 >>> 1 & 1; 7566 i3 = (i6 | i2 | i5 | i4 | i3) + (i7 >>> i3) | 0; 7567 i7 = i3 << 1; 7568 i4 = 14512 + (i7 << 2) | 0; 7569 i7 = 14512 + (i7 + 2 << 2) | 0; 7570 i5 = HEAP32[i7 >> 2] | 0; 7571 i2 = i5 + 8 | 0; 7572 i6 = HEAP32[i2 >> 2] | 0; 7573 do { 7574 if ((i4 | 0) != (i6 | 0)) { 7575 if (i6 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7576 _abort(); 7577 } 7578 i8 = i6 + 12 | 0; 7579 if ((HEAP32[i8 >> 2] | 0) == (i5 | 0)) { 7580 HEAP32[i8 >> 2] = i4; 7581 HEAP32[i7 >> 2] = i6; 7582 break; 7583 } else { 7584 _abort(); 7585 } 7586 } else { 7587 HEAP32[3618] = i18 & ~(1 << i3); 7588 } 7589 } while (0); 7590 i6 = i3 << 3; 7591 i4 = i6 - i12 | 0; 7592 HEAP32[i5 + 4 >> 2] = i12 | 3; 7593 i3 = i5 + i12 | 0; 7594 HEAP32[i5 + (i12 | 4) >> 2] = i4 | 1; 7595 HEAP32[i5 + i6 >> 2] = i4; 7596 i6 = HEAP32[14480 >> 2] | 0; 7597 if ((i6 | 0) != 0) { 7598 i5 = HEAP32[14492 >> 2] | 0; 7599 i8 = i6 >>> 3; 7600 i9 = i8 << 1; 7601 i6 = 14512 + (i9 << 2) | 0; 7602 i7 = HEAP32[3618] | 0; 7603 i8 = 1 << i8; 7604 if ((i7 & i8 | 0) != 0) { 7605 i7 = 14512 + (i9 + 2 << 2) | 0; 7606 i8 = HEAP32[i7 >> 2] | 0; 7607 if (i8 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7608 _abort(); 7609 } else { 7610 i28 = i7; 7611 i27 = i8; 7612 } 7613 } else { 7614 HEAP32[3618] = i7 | i8; 7615 i28 = 14512 + (i9 + 2 << 2) | 0; 7616 i27 = i6; 7617 } 7618 HEAP32[i28 >> 2] = i5; 7619 HEAP32[i27 + 12 >> 2] = i5; 7620 HEAP32[i5 + 8 >> 2] = i27; 7621 HEAP32[i5 + 12 >> 2] = i6; 7622 } 7623 HEAP32[14480 >> 2] = i4; 7624 HEAP32[14492 >> 2] = i3; 7625 i32 = i2; 7626 STACKTOP = i1; 7627 return i32 | 0; 7628 } 7629 i18 = HEAP32[14476 >> 2] | 0; 7630 if ((i18 | 0) != 0) { 7631 i2 = (i18 & 0 - i18) + -1 | 0; 7632 i31 = i2 >>> 12 & 16; 7633 i2 = i2 >>> i31; 7634 i30 = i2 >>> 5 & 8; 7635 i2 = i2 >>> i30; 7636 i32 = i2 >>> 2 & 4; 7637 i2 = i2 >>> i32; 7638 i6 = i2 >>> 1 & 2; 7639 i2 = i2 >>> i6; 7640 i3 = i2 >>> 1 & 1; 7641 i3 = HEAP32[14776 + ((i30 | i31 | i32 | i6 | i3) + (i2 >>> i3) << 2) >> 2] | 0; 7642 i2 = (HEAP32[i3 + 4 >> 2] & -8) - i12 | 0; 7643 i6 = i3; 7644 while (1) { 7645 i5 = HEAP32[i6 + 16 >> 2] | 0; 7646 if ((i5 | 0) == 0) { 7647 i5 = HEAP32[i6 + 20 >> 2] | 0; 7648 if ((i5 | 0) == 0) { 7649 break; 7650 } 7651 } 7652 i6 = (HEAP32[i5 + 4 >> 2] & -8) - i12 | 0; 7653 i4 = i6 >>> 0 < i2 >>> 0; 7654 i2 = i4 ? i6 : i2; 7655 i6 = i5; 7656 i3 = i4 ? i5 : i3; 7657 } 7658 i6 = HEAP32[14488 >> 2] | 0; 7659 if (i3 >>> 0 < i6 >>> 0) { 7660 _abort(); 7661 } 7662 i4 = i3 + i12 | 0; 7663 if (!(i3 >>> 0 < i4 >>> 0)) { 7664 _abort(); 7665 } 7666 i5 = HEAP32[i3 + 24 >> 2] | 0; 7667 i7 = HEAP32[i3 + 12 >> 2] | 0; 7668 do { 7669 if ((i7 | 0) == (i3 | 0)) { 7670 i8 = i3 + 20 | 0; 7671 i7 = HEAP32[i8 >> 2] | 0; 7672 if ((i7 | 0) == 0) { 7673 i8 = i3 + 16 | 0; 7674 i7 = HEAP32[i8 >> 2] | 0; 7675 if ((i7 | 0) == 0) { 7676 i26 = 0; 7677 break; 7678 } 7679 } 7680 while (1) { 7681 i10 = i7 + 20 | 0; 7682 i9 = HEAP32[i10 >> 2] | 0; 7683 if ((i9 | 0) != 0) { 7684 i7 = i9; 7685 i8 = i10; 7686 continue; 7687 } 7688 i10 = i7 + 16 | 0; 7689 i9 = HEAP32[i10 >> 2] | 0; 7690 if ((i9 | 0) == 0) { 7691 break; 7692 } else { 7693 i7 = i9; 7694 i8 = i10; 7695 } 7696 } 7697 if (i8 >>> 0 < i6 >>> 0) { 7698 _abort(); 7699 } else { 7700 HEAP32[i8 >> 2] = 0; 7701 i26 = i7; 7702 break; 7703 } 7704 } else { 7705 i8 = HEAP32[i3 + 8 >> 2] | 0; 7706 if (i8 >>> 0 < i6 >>> 0) { 7707 _abort(); 7708 } 7709 i6 = i8 + 12 | 0; 7710 if ((HEAP32[i6 >> 2] | 0) != (i3 | 0)) { 7711 _abort(); 7712 } 7713 i9 = i7 + 8 | 0; 7714 if ((HEAP32[i9 >> 2] | 0) == (i3 | 0)) { 7715 HEAP32[i6 >> 2] = i7; 7716 HEAP32[i9 >> 2] = i8; 7717 i26 = i7; 7718 break; 7719 } else { 7720 _abort(); 7721 } 7722 } 7723 } while (0); 7724 do { 7725 if ((i5 | 0) != 0) { 7726 i7 = HEAP32[i3 + 28 >> 2] | 0; 7727 i6 = 14776 + (i7 << 2) | 0; 7728 if ((i3 | 0) == (HEAP32[i6 >> 2] | 0)) { 7729 HEAP32[i6 >> 2] = i26; 7730 if ((i26 | 0) == 0) { 7731 HEAP32[14476 >> 2] = HEAP32[14476 >> 2] & ~(1 << i7); 7732 break; 7733 } 7734 } else { 7735 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7736 _abort(); 7737 } 7738 i6 = i5 + 16 | 0; 7739 if ((HEAP32[i6 >> 2] | 0) == (i3 | 0)) { 7740 HEAP32[i6 >> 2] = i26; 7741 } else { 7742 HEAP32[i5 + 20 >> 2] = i26; 7743 } 7744 if ((i26 | 0) == 0) { 7745 break; 7746 } 7747 } 7748 if (i26 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7749 _abort(); 7750 } 7751 HEAP32[i26 + 24 >> 2] = i5; 7752 i5 = HEAP32[i3 + 16 >> 2] | 0; 7753 do { 7754 if ((i5 | 0) != 0) { 7755 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7756 _abort(); 7757 } else { 7758 HEAP32[i26 + 16 >> 2] = i5; 7759 HEAP32[i5 + 24 >> 2] = i26; 7760 break; 7761 } 7762 } 7763 } while (0); 7764 i5 = HEAP32[i3 + 20 >> 2] | 0; 7765 if ((i5 | 0) != 0) { 7766 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7767 _abort(); 7768 } else { 7769 HEAP32[i26 + 20 >> 2] = i5; 7770 HEAP32[i5 + 24 >> 2] = i26; 7771 break; 7772 } 7773 } 7774 } 7775 } while (0); 7776 if (i2 >>> 0 < 16) { 7777 i32 = i2 + i12 | 0; 7778 HEAP32[i3 + 4 >> 2] = i32 | 3; 7779 i32 = i3 + (i32 + 4) | 0; 7780 HEAP32[i32 >> 2] = HEAP32[i32 >> 2] | 1; 7781 } else { 7782 HEAP32[i3 + 4 >> 2] = i12 | 3; 7783 HEAP32[i3 + (i12 | 4) >> 2] = i2 | 1; 7784 HEAP32[i3 + (i2 + i12) >> 2] = i2; 7785 i6 = HEAP32[14480 >> 2] | 0; 7786 if ((i6 | 0) != 0) { 7787 i5 = HEAP32[14492 >> 2] | 0; 7788 i8 = i6 >>> 3; 7789 i9 = i8 << 1; 7790 i6 = 14512 + (i9 << 2) | 0; 7791 i7 = HEAP32[3618] | 0; 7792 i8 = 1 << i8; 7793 if ((i7 & i8 | 0) != 0) { 7794 i7 = 14512 + (i9 + 2 << 2) | 0; 7795 i8 = HEAP32[i7 >> 2] | 0; 7796 if (i8 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7797 _abort(); 7798 } else { 7799 i25 = i7; 7800 i24 = i8; 7801 } 7802 } else { 7803 HEAP32[3618] = i7 | i8; 7804 i25 = 14512 + (i9 + 2 << 2) | 0; 7805 i24 = i6; 7806 } 7807 HEAP32[i25 >> 2] = i5; 7808 HEAP32[i24 + 12 >> 2] = i5; 7809 HEAP32[i5 + 8 >> 2] = i24; 7810 HEAP32[i5 + 12 >> 2] = i6; 7811 } 7812 HEAP32[14480 >> 2] = i2; 7813 HEAP32[14492 >> 2] = i4; 7814 } 7815 i32 = i3 + 8 | 0; 7816 STACKTOP = i1; 7817 return i32 | 0; 7818 } 7819 } 7820 } else { 7821 if (!(i12 >>> 0 > 4294967231)) { 7822 i24 = i12 + 11 | 0; 7823 i12 = i24 & -8; 7824 i26 = HEAP32[14476 >> 2] | 0; 7825 if ((i26 | 0) != 0) { 7826 i25 = 0 - i12 | 0; 7827 i24 = i24 >>> 8; 7828 if ((i24 | 0) != 0) { 7829 if (i12 >>> 0 > 16777215) { 7830 i27 = 31; 7831 } else { 7832 i31 = (i24 + 1048320 | 0) >>> 16 & 8; 7833 i32 = i24 << i31; 7834 i30 = (i32 + 520192 | 0) >>> 16 & 4; 7835 i32 = i32 << i30; 7836 i27 = (i32 + 245760 | 0) >>> 16 & 2; 7837 i27 = 14 - (i30 | i31 | i27) + (i32 << i27 >>> 15) | 0; 7838 i27 = i12 >>> (i27 + 7 | 0) & 1 | i27 << 1; 7839 } 7840 } else { 7841 i27 = 0; 7842 } 7843 i30 = HEAP32[14776 + (i27 << 2) >> 2] | 0; 7844 L126 : do { 7845 if ((i30 | 0) == 0) { 7846 i29 = 0; 7847 i24 = 0; 7848 } else { 7849 if ((i27 | 0) == 31) { 7850 i24 = 0; 7851 } else { 7852 i24 = 25 - (i27 >>> 1) | 0; 7853 } 7854 i29 = 0; 7855 i28 = i12 << i24; 7856 i24 = 0; 7857 while (1) { 7858 i32 = HEAP32[i30 + 4 >> 2] & -8; 7859 i31 = i32 - i12 | 0; 7860 if (i31 >>> 0 < i25 >>> 0) { 7861 if ((i32 | 0) == (i12 | 0)) { 7862 i25 = i31; 7863 i29 = i30; 7864 i24 = i30; 7865 break L126; 7866 } else { 7867 i25 = i31; 7868 i24 = i30; 7869 } 7870 } 7871 i31 = HEAP32[i30 + 20 >> 2] | 0; 7872 i30 = HEAP32[i30 + (i28 >>> 31 << 2) + 16 >> 2] | 0; 7873 i29 = (i31 | 0) == 0 | (i31 | 0) == (i30 | 0) ? i29 : i31; 7874 if ((i30 | 0) == 0) { 7875 break; 7876 } else { 7877 i28 = i28 << 1; 7878 } 7879 } 7880 } 7881 } while (0); 7882 if ((i29 | 0) == 0 & (i24 | 0) == 0) { 7883 i32 = 2 << i27; 7884 i26 = i26 & (i32 | 0 - i32); 7885 if ((i26 | 0) == 0) { 7886 break; 7887 } 7888 i32 = (i26 & 0 - i26) + -1 | 0; 7889 i28 = i32 >>> 12 & 16; 7890 i32 = i32 >>> i28; 7891 i27 = i32 >>> 5 & 8; 7892 i32 = i32 >>> i27; 7893 i30 = i32 >>> 2 & 4; 7894 i32 = i32 >>> i30; 7895 i31 = i32 >>> 1 & 2; 7896 i32 = i32 >>> i31; 7897 i29 = i32 >>> 1 & 1; 7898 i29 = HEAP32[14776 + ((i27 | i28 | i30 | i31 | i29) + (i32 >>> i29) << 2) >> 2] | 0; 7899 } 7900 if ((i29 | 0) != 0) { 7901 while (1) { 7902 i27 = (HEAP32[i29 + 4 >> 2] & -8) - i12 | 0; 7903 i26 = i27 >>> 0 < i25 >>> 0; 7904 i25 = i26 ? i27 : i25; 7905 i24 = i26 ? i29 : i24; 7906 i26 = HEAP32[i29 + 16 >> 2] | 0; 7907 if ((i26 | 0) != 0) { 7908 i29 = i26; 7909 continue; 7910 } 7911 i29 = HEAP32[i29 + 20 >> 2] | 0; 7912 if ((i29 | 0) == 0) { 7913 break; 7914 } 7915 } 7916 } 7917 if ((i24 | 0) != 0 ? i25 >>> 0 < ((HEAP32[14480 >> 2] | 0) - i12 | 0) >>> 0 : 0) { 7918 i4 = HEAP32[14488 >> 2] | 0; 7919 if (i24 >>> 0 < i4 >>> 0) { 7920 _abort(); 7921 } 7922 i2 = i24 + i12 | 0; 7923 if (!(i24 >>> 0 < i2 >>> 0)) { 7924 _abort(); 7925 } 7926 i3 = HEAP32[i24 + 24 >> 2] | 0; 7927 i6 = HEAP32[i24 + 12 >> 2] | 0; 7928 do { 7929 if ((i6 | 0) == (i24 | 0)) { 7930 i6 = i24 + 20 | 0; 7931 i5 = HEAP32[i6 >> 2] | 0; 7932 if ((i5 | 0) == 0) { 7933 i6 = i24 + 16 | 0; 7934 i5 = HEAP32[i6 >> 2] | 0; 7935 if ((i5 | 0) == 0) { 7936 i22 = 0; 7937 break; 7938 } 7939 } 7940 while (1) { 7941 i8 = i5 + 20 | 0; 7942 i7 = HEAP32[i8 >> 2] | 0; 7943 if ((i7 | 0) != 0) { 7944 i5 = i7; 7945 i6 = i8; 7946 continue; 7947 } 7948 i7 = i5 + 16 | 0; 7949 i8 = HEAP32[i7 >> 2] | 0; 7950 if ((i8 | 0) == 0) { 7951 break; 7952 } else { 7953 i5 = i8; 7954 i6 = i7; 7955 } 7956 } 7957 if (i6 >>> 0 < i4 >>> 0) { 7958 _abort(); 7959 } else { 7960 HEAP32[i6 >> 2] = 0; 7961 i22 = i5; 7962 break; 7963 } 7964 } else { 7965 i5 = HEAP32[i24 + 8 >> 2] | 0; 7966 if (i5 >>> 0 < i4 >>> 0) { 7967 _abort(); 7968 } 7969 i7 = i5 + 12 | 0; 7970 if ((HEAP32[i7 >> 2] | 0) != (i24 | 0)) { 7971 _abort(); 7972 } 7973 i4 = i6 + 8 | 0; 7974 if ((HEAP32[i4 >> 2] | 0) == (i24 | 0)) { 7975 HEAP32[i7 >> 2] = i6; 7976 HEAP32[i4 >> 2] = i5; 7977 i22 = i6; 7978 break; 7979 } else { 7980 _abort(); 7981 } 7982 } 7983 } while (0); 7984 do { 7985 if ((i3 | 0) != 0) { 7986 i4 = HEAP32[i24 + 28 >> 2] | 0; 7987 i5 = 14776 + (i4 << 2) | 0; 7988 if ((i24 | 0) == (HEAP32[i5 >> 2] | 0)) { 7989 HEAP32[i5 >> 2] = i22; 7990 if ((i22 | 0) == 0) { 7991 HEAP32[14476 >> 2] = HEAP32[14476 >> 2] & ~(1 << i4); 7992 break; 7993 } 7994 } else { 7995 if (i3 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 7996 _abort(); 7997 } 7998 i4 = i3 + 16 | 0; 7999 if ((HEAP32[i4 >> 2] | 0) == (i24 | 0)) { 8000 HEAP32[i4 >> 2] = i22; 8001 } else { 8002 HEAP32[i3 + 20 >> 2] = i22; 8003 } 8004 if ((i22 | 0) == 0) { 8005 break; 8006 } 8007 } 8008 if (i22 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8009 _abort(); 8010 } 8011 HEAP32[i22 + 24 >> 2] = i3; 8012 i3 = HEAP32[i24 + 16 >> 2] | 0; 8013 do { 8014 if ((i3 | 0) != 0) { 8015 if (i3 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8016 _abort(); 8017 } else { 8018 HEAP32[i22 + 16 >> 2] = i3; 8019 HEAP32[i3 + 24 >> 2] = i22; 8020 break; 8021 } 8022 } 8023 } while (0); 8024 i3 = HEAP32[i24 + 20 >> 2] | 0; 8025 if ((i3 | 0) != 0) { 8026 if (i3 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8027 _abort(); 8028 } else { 8029 HEAP32[i22 + 20 >> 2] = i3; 8030 HEAP32[i3 + 24 >> 2] = i22; 8031 break; 8032 } 8033 } 8034 } 8035 } while (0); 8036 L204 : do { 8037 if (!(i25 >>> 0 < 16)) { 8038 HEAP32[i24 + 4 >> 2] = i12 | 3; 8039 HEAP32[i24 + (i12 | 4) >> 2] = i25 | 1; 8040 HEAP32[i24 + (i25 + i12) >> 2] = i25; 8041 i4 = i25 >>> 3; 8042 if (i25 >>> 0 < 256) { 8043 i6 = i4 << 1; 8044 i3 = 14512 + (i6 << 2) | 0; 8045 i5 = HEAP32[3618] | 0; 8046 i4 = 1 << i4; 8047 if ((i5 & i4 | 0) != 0) { 8048 i5 = 14512 + (i6 + 2 << 2) | 0; 8049 i4 = HEAP32[i5 >> 2] | 0; 8050 if (i4 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8051 _abort(); 8052 } else { 8053 i21 = i5; 8054 i20 = i4; 8055 } 8056 } else { 8057 HEAP32[3618] = i5 | i4; 8058 i21 = 14512 + (i6 + 2 << 2) | 0; 8059 i20 = i3; 8060 } 8061 HEAP32[i21 >> 2] = i2; 8062 HEAP32[i20 + 12 >> 2] = i2; 8063 HEAP32[i24 + (i12 + 8) >> 2] = i20; 8064 HEAP32[i24 + (i12 + 12) >> 2] = i3; 8065 break; 8066 } 8067 i3 = i25 >>> 8; 8068 if ((i3 | 0) != 0) { 8069 if (i25 >>> 0 > 16777215) { 8070 i3 = 31; 8071 } else { 8072 i31 = (i3 + 1048320 | 0) >>> 16 & 8; 8073 i32 = i3 << i31; 8074 i30 = (i32 + 520192 | 0) >>> 16 & 4; 8075 i32 = i32 << i30; 8076 i3 = (i32 + 245760 | 0) >>> 16 & 2; 8077 i3 = 14 - (i30 | i31 | i3) + (i32 << i3 >>> 15) | 0; 8078 i3 = i25 >>> (i3 + 7 | 0) & 1 | i3 << 1; 8079 } 8080 } else { 8081 i3 = 0; 8082 } 8083 i6 = 14776 + (i3 << 2) | 0; 8084 HEAP32[i24 + (i12 + 28) >> 2] = i3; 8085 HEAP32[i24 + (i12 + 20) >> 2] = 0; 8086 HEAP32[i24 + (i12 + 16) >> 2] = 0; 8087 i4 = HEAP32[14476 >> 2] | 0; 8088 i5 = 1 << i3; 8089 if ((i4 & i5 | 0) == 0) { 8090 HEAP32[14476 >> 2] = i4 | i5; 8091 HEAP32[i6 >> 2] = i2; 8092 HEAP32[i24 + (i12 + 24) >> 2] = i6; 8093 HEAP32[i24 + (i12 + 12) >> 2] = i2; 8094 HEAP32[i24 + (i12 + 8) >> 2] = i2; 8095 break; 8096 } 8097 i4 = HEAP32[i6 >> 2] | 0; 8098 if ((i3 | 0) == 31) { 8099 i3 = 0; 8100 } else { 8101 i3 = 25 - (i3 >>> 1) | 0; 8102 } 8103 L225 : do { 8104 if ((HEAP32[i4 + 4 >> 2] & -8 | 0) != (i25 | 0)) { 8105 i3 = i25 << i3; 8106 while (1) { 8107 i6 = i4 + (i3 >>> 31 << 2) + 16 | 0; 8108 i5 = HEAP32[i6 >> 2] | 0; 8109 if ((i5 | 0) == 0) { 8110 break; 8111 } 8112 if ((HEAP32[i5 + 4 >> 2] & -8 | 0) == (i25 | 0)) { 8113 i18 = i5; 8114 break L225; 8115 } else { 8116 i3 = i3 << 1; 8117 i4 = i5; 8118 } 8119 } 8120 if (i6 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8121 _abort(); 8122 } else { 8123 HEAP32[i6 >> 2] = i2; 8124 HEAP32[i24 + (i12 + 24) >> 2] = i4; 8125 HEAP32[i24 + (i12 + 12) >> 2] = i2; 8126 HEAP32[i24 + (i12 + 8) >> 2] = i2; 8127 break L204; 8128 } 8129 } else { 8130 i18 = i4; 8131 } 8132 } while (0); 8133 i4 = i18 + 8 | 0; 8134 i3 = HEAP32[i4 >> 2] | 0; 8135 i5 = HEAP32[14488 >> 2] | 0; 8136 if (i18 >>> 0 < i5 >>> 0) { 8137 _abort(); 8138 } 8139 if (i3 >>> 0 < i5 >>> 0) { 8140 _abort(); 8141 } else { 8142 HEAP32[i3 + 12 >> 2] = i2; 8143 HEAP32[i4 >> 2] = i2; 8144 HEAP32[i24 + (i12 + 8) >> 2] = i3; 8145 HEAP32[i24 + (i12 + 12) >> 2] = i18; 8146 HEAP32[i24 + (i12 + 24) >> 2] = 0; 8147 break; 8148 } 8149 } else { 8150 i32 = i25 + i12 | 0; 8151 HEAP32[i24 + 4 >> 2] = i32 | 3; 8152 i32 = i24 + (i32 + 4) | 0; 8153 HEAP32[i32 >> 2] = HEAP32[i32 >> 2] | 1; 8154 } 8155 } while (0); 8156 i32 = i24 + 8 | 0; 8157 STACKTOP = i1; 8158 return i32 | 0; 8159 } 8160 } 8161 } else { 8162 i12 = -1; 8163 } 8164 } 8165 } while (0); 8166 i18 = HEAP32[14480 >> 2] | 0; 8167 if (!(i12 >>> 0 > i18 >>> 0)) { 8168 i3 = i18 - i12 | 0; 8169 i2 = HEAP32[14492 >> 2] | 0; 8170 if (i3 >>> 0 > 15) { 8171 HEAP32[14492 >> 2] = i2 + i12; 8172 HEAP32[14480 >> 2] = i3; 8173 HEAP32[i2 + (i12 + 4) >> 2] = i3 | 1; 8174 HEAP32[i2 + i18 >> 2] = i3; 8175 HEAP32[i2 + 4 >> 2] = i12 | 3; 8176 } else { 8177 HEAP32[14480 >> 2] = 0; 8178 HEAP32[14492 >> 2] = 0; 8179 HEAP32[i2 + 4 >> 2] = i18 | 3; 8180 i32 = i2 + (i18 + 4) | 0; 8181 HEAP32[i32 >> 2] = HEAP32[i32 >> 2] | 1; 8182 } 8183 i32 = i2 + 8 | 0; 8184 STACKTOP = i1; 8185 return i32 | 0; 8186 } 8187 i18 = HEAP32[14484 >> 2] | 0; 8188 if (i12 >>> 0 < i18 >>> 0) { 8189 i31 = i18 - i12 | 0; 8190 HEAP32[14484 >> 2] = i31; 8191 i32 = HEAP32[14496 >> 2] | 0; 8192 HEAP32[14496 >> 2] = i32 + i12; 8193 HEAP32[i32 + (i12 + 4) >> 2] = i31 | 1; 8194 HEAP32[i32 + 4 >> 2] = i12 | 3; 8195 i32 = i32 + 8 | 0; 8196 STACKTOP = i1; 8197 return i32 | 0; 8198 } 8199 do { 8200 if ((HEAP32[3736] | 0) == 0) { 8201 i18 = _sysconf(30) | 0; 8202 if ((i18 + -1 & i18 | 0) == 0) { 8203 HEAP32[14952 >> 2] = i18; 8204 HEAP32[14948 >> 2] = i18; 8205 HEAP32[14956 >> 2] = -1; 8206 HEAP32[14960 >> 2] = -1; 8207 HEAP32[14964 >> 2] = 0; 8208 HEAP32[14916 >> 2] = 0; 8209 HEAP32[3736] = (_time(0) | 0) & -16 ^ 1431655768; 8210 break; 8211 } else { 8212 _abort(); 8213 } 8214 } 8215 } while (0); 8216 i20 = i12 + 48 | 0; 8217 i25 = HEAP32[14952 >> 2] | 0; 8218 i21 = i12 + 47 | 0; 8219 i22 = i25 + i21 | 0; 8220 i25 = 0 - i25 | 0; 8221 i18 = i22 & i25; 8222 if (!(i18 >>> 0 > i12 >>> 0)) { 8223 i32 = 0; 8224 STACKTOP = i1; 8225 return i32 | 0; 8226 } 8227 i24 = HEAP32[14912 >> 2] | 0; 8228 if ((i24 | 0) != 0 ? (i31 = HEAP32[14904 >> 2] | 0, i32 = i31 + i18 | 0, i32 >>> 0 <= i31 >>> 0 | i32 >>> 0 > i24 >>> 0) : 0) { 8229 i32 = 0; 8230 STACKTOP = i1; 8231 return i32 | 0; 8232 } 8233 L269 : do { 8234 if ((HEAP32[14916 >> 2] & 4 | 0) == 0) { 8235 i26 = HEAP32[14496 >> 2] | 0; 8236 L271 : do { 8237 if ((i26 | 0) != 0) { 8238 i24 = 14920 | 0; 8239 while (1) { 8240 i27 = HEAP32[i24 >> 2] | 0; 8241 if (!(i27 >>> 0 > i26 >>> 0) ? (i23 = i24 + 4 | 0, (i27 + (HEAP32[i23 >> 2] | 0) | 0) >>> 0 > i26 >>> 0) : 0) { 8242 break; 8243 } 8244 i24 = HEAP32[i24 + 8 >> 2] | 0; 8245 if ((i24 | 0) == 0) { 8246 i13 = 182; 8247 break L271; 8248 } 8249 } 8250 if ((i24 | 0) != 0) { 8251 i25 = i22 - (HEAP32[14484 >> 2] | 0) & i25; 8252 if (i25 >>> 0 < 2147483647) { 8253 i13 = _sbrk(i25 | 0) | 0; 8254 i26 = (i13 | 0) == ((HEAP32[i24 >> 2] | 0) + (HEAP32[i23 >> 2] | 0) | 0); 8255 i22 = i13; 8256 i24 = i25; 8257 i23 = i26 ? i13 : -1; 8258 i25 = i26 ? i25 : 0; 8259 i13 = 191; 8260 } else { 8261 i25 = 0; 8262 } 8263 } else { 8264 i13 = 182; 8265 } 8266 } else { 8267 i13 = 182; 8268 } 8269 } while (0); 8270 do { 8271 if ((i13 | 0) == 182) { 8272 i23 = _sbrk(0) | 0; 8273 if ((i23 | 0) != (-1 | 0)) { 8274 i24 = i23; 8275 i22 = HEAP32[14948 >> 2] | 0; 8276 i25 = i22 + -1 | 0; 8277 if ((i25 & i24 | 0) == 0) { 8278 i25 = i18; 8279 } else { 8280 i25 = i18 - i24 + (i25 + i24 & 0 - i22) | 0; 8281 } 8282 i24 = HEAP32[14904 >> 2] | 0; 8283 i26 = i24 + i25 | 0; 8284 if (i25 >>> 0 > i12 >>> 0 & i25 >>> 0 < 2147483647) { 8285 i22 = HEAP32[14912 >> 2] | 0; 8286 if ((i22 | 0) != 0 ? i26 >>> 0 <= i24 >>> 0 | i26 >>> 0 > i22 >>> 0 : 0) { 8287 i25 = 0; 8288 break; 8289 } 8290 i22 = _sbrk(i25 | 0) | 0; 8291 i13 = (i22 | 0) == (i23 | 0); 8292 i24 = i25; 8293 i23 = i13 ? i23 : -1; 8294 i25 = i13 ? i25 : 0; 8295 i13 = 191; 8296 } else { 8297 i25 = 0; 8298 } 8299 } else { 8300 i25 = 0; 8301 } 8302 } 8303 } while (0); 8304 L291 : do { 8305 if ((i13 | 0) == 191) { 8306 i13 = 0 - i24 | 0; 8307 if ((i23 | 0) != (-1 | 0)) { 8308 i17 = i23; 8309 i14 = i25; 8310 i13 = 202; 8311 break L269; 8312 } 8313 do { 8314 if ((i22 | 0) != (-1 | 0) & i24 >>> 0 < 2147483647 & i24 >>> 0 < i20 >>> 0 ? (i19 = HEAP32[14952 >> 2] | 0, i19 = i21 - i24 + i19 & 0 - i19, i19 >>> 0 < 2147483647) : 0) { 8315 if ((_sbrk(i19 | 0) | 0) == (-1 | 0)) { 8316 _sbrk(i13 | 0) | 0; 8317 break L291; 8318 } else { 8319 i24 = i19 + i24 | 0; 8320 break; 8321 } 8322 } 8323 } while (0); 8324 if ((i22 | 0) != (-1 | 0)) { 8325 i17 = i22; 8326 i14 = i24; 8327 i13 = 202; 8328 break L269; 8329 } 8330 } 8331 } while (0); 8332 HEAP32[14916 >> 2] = HEAP32[14916 >> 2] | 4; 8333 i13 = 199; 8334 } else { 8335 i25 = 0; 8336 i13 = 199; 8337 } 8338 } while (0); 8339 if ((((i13 | 0) == 199 ? i18 >>> 0 < 2147483647 : 0) ? (i17 = _sbrk(i18 | 0) | 0, i16 = _sbrk(0) | 0, (i16 | 0) != (-1 | 0) & (i17 | 0) != (-1 | 0) & i17 >>> 0 < i16 >>> 0) : 0) ? (i15 = i16 - i17 | 0, i14 = i15 >>> 0 > (i12 + 40 | 0) >>> 0, i14) : 0) { 8340 i14 = i14 ? i15 : i25; 8341 i13 = 202; 8342 } 8343 if ((i13 | 0) == 202) { 8344 i15 = (HEAP32[14904 >> 2] | 0) + i14 | 0; 8345 HEAP32[14904 >> 2] = i15; 8346 if (i15 >>> 0 > (HEAP32[14908 >> 2] | 0) >>> 0) { 8347 HEAP32[14908 >> 2] = i15; 8348 } 8349 i15 = HEAP32[14496 >> 2] | 0; 8350 L311 : do { 8351 if ((i15 | 0) != 0) { 8352 i21 = 14920 | 0; 8353 while (1) { 8354 i16 = HEAP32[i21 >> 2] | 0; 8355 i19 = i21 + 4 | 0; 8356 i20 = HEAP32[i19 >> 2] | 0; 8357 if ((i17 | 0) == (i16 + i20 | 0)) { 8358 i13 = 214; 8359 break; 8360 } 8361 i18 = HEAP32[i21 + 8 >> 2] | 0; 8362 if ((i18 | 0) == 0) { 8363 break; 8364 } else { 8365 i21 = i18; 8366 } 8367 } 8368 if (((i13 | 0) == 214 ? (HEAP32[i21 + 12 >> 2] & 8 | 0) == 0 : 0) ? i15 >>> 0 >= i16 >>> 0 & i15 >>> 0 < i17 >>> 0 : 0) { 8369 HEAP32[i19 >> 2] = i20 + i14; 8370 i2 = (HEAP32[14484 >> 2] | 0) + i14 | 0; 8371 i3 = i15 + 8 | 0; 8372 if ((i3 & 7 | 0) == 0) { 8373 i3 = 0; 8374 } else { 8375 i3 = 0 - i3 & 7; 8376 } 8377 i32 = i2 - i3 | 0; 8378 HEAP32[14496 >> 2] = i15 + i3; 8379 HEAP32[14484 >> 2] = i32; 8380 HEAP32[i15 + (i3 + 4) >> 2] = i32 | 1; 8381 HEAP32[i15 + (i2 + 4) >> 2] = 40; 8382 HEAP32[14500 >> 2] = HEAP32[14960 >> 2]; 8383 break; 8384 } 8385 if (i17 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8386 HEAP32[14488 >> 2] = i17; 8387 } 8388 i19 = i17 + i14 | 0; 8389 i16 = 14920 | 0; 8390 while (1) { 8391 if ((HEAP32[i16 >> 2] | 0) == (i19 | 0)) { 8392 i13 = 224; 8393 break; 8394 } 8395 i18 = HEAP32[i16 + 8 >> 2] | 0; 8396 if ((i18 | 0) == 0) { 8397 break; 8398 } else { 8399 i16 = i18; 8400 } 8401 } 8402 if ((i13 | 0) == 224 ? (HEAP32[i16 + 12 >> 2] & 8 | 0) == 0 : 0) { 8403 HEAP32[i16 >> 2] = i17; 8404 i6 = i16 + 4 | 0; 8405 HEAP32[i6 >> 2] = (HEAP32[i6 >> 2] | 0) + i14; 8406 i6 = i17 + 8 | 0; 8407 if ((i6 & 7 | 0) == 0) { 8408 i6 = 0; 8409 } else { 8410 i6 = 0 - i6 & 7; 8411 } 8412 i7 = i17 + (i14 + 8) | 0; 8413 if ((i7 & 7 | 0) == 0) { 8414 i13 = 0; 8415 } else { 8416 i13 = 0 - i7 & 7; 8417 } 8418 i15 = i17 + (i13 + i14) | 0; 8419 i8 = i6 + i12 | 0; 8420 i7 = i17 + i8 | 0; 8421 i10 = i15 - (i17 + i6) - i12 | 0; 8422 HEAP32[i17 + (i6 + 4) >> 2] = i12 | 3; 8423 L348 : do { 8424 if ((i15 | 0) != (HEAP32[14496 >> 2] | 0)) { 8425 if ((i15 | 0) == (HEAP32[14492 >> 2] | 0)) { 8426 i32 = (HEAP32[14480 >> 2] | 0) + i10 | 0; 8427 HEAP32[14480 >> 2] = i32; 8428 HEAP32[14492 >> 2] = i7; 8429 HEAP32[i17 + (i8 + 4) >> 2] = i32 | 1; 8430 HEAP32[i17 + (i32 + i8) >> 2] = i32; 8431 break; 8432 } 8433 i12 = i14 + 4 | 0; 8434 i18 = HEAP32[i17 + (i12 + i13) >> 2] | 0; 8435 if ((i18 & 3 | 0) == 1) { 8436 i11 = i18 & -8; 8437 i16 = i18 >>> 3; 8438 do { 8439 if (!(i18 >>> 0 < 256)) { 8440 i9 = HEAP32[i17 + ((i13 | 24) + i14) >> 2] | 0; 8441 i19 = HEAP32[i17 + (i14 + 12 + i13) >> 2] | 0; 8442 do { 8443 if ((i19 | 0) == (i15 | 0)) { 8444 i19 = i13 | 16; 8445 i18 = i17 + (i12 + i19) | 0; 8446 i16 = HEAP32[i18 >> 2] | 0; 8447 if ((i16 | 0) == 0) { 8448 i18 = i17 + (i19 + i14) | 0; 8449 i16 = HEAP32[i18 >> 2] | 0; 8450 if ((i16 | 0) == 0) { 8451 i5 = 0; 8452 break; 8453 } 8454 } 8455 while (1) { 8456 i20 = i16 + 20 | 0; 8457 i19 = HEAP32[i20 >> 2] | 0; 8458 if ((i19 | 0) != 0) { 8459 i16 = i19; 8460 i18 = i20; 8461 continue; 8462 } 8463 i19 = i16 + 16 | 0; 8464 i20 = HEAP32[i19 >> 2] | 0; 8465 if ((i20 | 0) == 0) { 8466 break; 8467 } else { 8468 i16 = i20; 8469 i18 = i19; 8470 } 8471 } 8472 if (i18 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8473 _abort(); 8474 } else { 8475 HEAP32[i18 >> 2] = 0; 8476 i5 = i16; 8477 break; 8478 } 8479 } else { 8480 i18 = HEAP32[i17 + ((i13 | 8) + i14) >> 2] | 0; 8481 if (i18 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8482 _abort(); 8483 } 8484 i16 = i18 + 12 | 0; 8485 if ((HEAP32[i16 >> 2] | 0) != (i15 | 0)) { 8486 _abort(); 8487 } 8488 i20 = i19 + 8 | 0; 8489 if ((HEAP32[i20 >> 2] | 0) == (i15 | 0)) { 8490 HEAP32[i16 >> 2] = i19; 8491 HEAP32[i20 >> 2] = i18; 8492 i5 = i19; 8493 break; 8494 } else { 8495 _abort(); 8496 } 8497 } 8498 } while (0); 8499 if ((i9 | 0) != 0) { 8500 i16 = HEAP32[i17 + (i14 + 28 + i13) >> 2] | 0; 8501 i18 = 14776 + (i16 << 2) | 0; 8502 if ((i15 | 0) == (HEAP32[i18 >> 2] | 0)) { 8503 HEAP32[i18 >> 2] = i5; 8504 if ((i5 | 0) == 0) { 8505 HEAP32[14476 >> 2] = HEAP32[14476 >> 2] & ~(1 << i16); 8506 break; 8507 } 8508 } else { 8509 if (i9 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8510 _abort(); 8511 } 8512 i16 = i9 + 16 | 0; 8513 if ((HEAP32[i16 >> 2] | 0) == (i15 | 0)) { 8514 HEAP32[i16 >> 2] = i5; 8515 } else { 8516 HEAP32[i9 + 20 >> 2] = i5; 8517 } 8518 if ((i5 | 0) == 0) { 8519 break; 8520 } 8521 } 8522 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8523 _abort(); 8524 } 8525 HEAP32[i5 + 24 >> 2] = i9; 8526 i15 = i13 | 16; 8527 i9 = HEAP32[i17 + (i15 + i14) >> 2] | 0; 8528 do { 8529 if ((i9 | 0) != 0) { 8530 if (i9 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8531 _abort(); 8532 } else { 8533 HEAP32[i5 + 16 >> 2] = i9; 8534 HEAP32[i9 + 24 >> 2] = i5; 8535 break; 8536 } 8537 } 8538 } while (0); 8539 i9 = HEAP32[i17 + (i12 + i15) >> 2] | 0; 8540 if ((i9 | 0) != 0) { 8541 if (i9 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8542 _abort(); 8543 } else { 8544 HEAP32[i5 + 20 >> 2] = i9; 8545 HEAP32[i9 + 24 >> 2] = i5; 8546 break; 8547 } 8548 } 8549 } 8550 } else { 8551 i5 = HEAP32[i17 + ((i13 | 8) + i14) >> 2] | 0; 8552 i12 = HEAP32[i17 + (i14 + 12 + i13) >> 2] | 0; 8553 i18 = 14512 + (i16 << 1 << 2) | 0; 8554 if ((i5 | 0) != (i18 | 0)) { 8555 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8556 _abort(); 8557 } 8558 if ((HEAP32[i5 + 12 >> 2] | 0) != (i15 | 0)) { 8559 _abort(); 8560 } 8561 } 8562 if ((i12 | 0) == (i5 | 0)) { 8563 HEAP32[3618] = HEAP32[3618] & ~(1 << i16); 8564 break; 8565 } 8566 if ((i12 | 0) != (i18 | 0)) { 8567 if (i12 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8568 _abort(); 8569 } 8570 i16 = i12 + 8 | 0; 8571 if ((HEAP32[i16 >> 2] | 0) == (i15 | 0)) { 8572 i9 = i16; 8573 } else { 8574 _abort(); 8575 } 8576 } else { 8577 i9 = i12 + 8 | 0; 8578 } 8579 HEAP32[i5 + 12 >> 2] = i12; 8580 HEAP32[i9 >> 2] = i5; 8581 } 8582 } while (0); 8583 i15 = i17 + ((i11 | i13) + i14) | 0; 8584 i10 = i11 + i10 | 0; 8585 } 8586 i5 = i15 + 4 | 0; 8587 HEAP32[i5 >> 2] = HEAP32[i5 >> 2] & -2; 8588 HEAP32[i17 + (i8 + 4) >> 2] = i10 | 1; 8589 HEAP32[i17 + (i10 + i8) >> 2] = i10; 8590 i5 = i10 >>> 3; 8591 if (i10 >>> 0 < 256) { 8592 i10 = i5 << 1; 8593 i2 = 14512 + (i10 << 2) | 0; 8594 i9 = HEAP32[3618] | 0; 8595 i5 = 1 << i5; 8596 if ((i9 & i5 | 0) != 0) { 8597 i9 = 14512 + (i10 + 2 << 2) | 0; 8598 i5 = HEAP32[i9 >> 2] | 0; 8599 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8600 _abort(); 8601 } else { 8602 i3 = i9; 8603 i4 = i5; 8604 } 8605 } else { 8606 HEAP32[3618] = i9 | i5; 8607 i3 = 14512 + (i10 + 2 << 2) | 0; 8608 i4 = i2; 8609 } 8610 HEAP32[i3 >> 2] = i7; 8611 HEAP32[i4 + 12 >> 2] = i7; 8612 HEAP32[i17 + (i8 + 8) >> 2] = i4; 8613 HEAP32[i17 + (i8 + 12) >> 2] = i2; 8614 break; 8615 } 8616 i3 = i10 >>> 8; 8617 if ((i3 | 0) != 0) { 8618 if (i10 >>> 0 > 16777215) { 8619 i3 = 31; 8620 } else { 8621 i31 = (i3 + 1048320 | 0) >>> 16 & 8; 8622 i32 = i3 << i31; 8623 i30 = (i32 + 520192 | 0) >>> 16 & 4; 8624 i32 = i32 << i30; 8625 i3 = (i32 + 245760 | 0) >>> 16 & 2; 8626 i3 = 14 - (i30 | i31 | i3) + (i32 << i3 >>> 15) | 0; 8627 i3 = i10 >>> (i3 + 7 | 0) & 1 | i3 << 1; 8628 } 8629 } else { 8630 i3 = 0; 8631 } 8632 i4 = 14776 + (i3 << 2) | 0; 8633 HEAP32[i17 + (i8 + 28) >> 2] = i3; 8634 HEAP32[i17 + (i8 + 20) >> 2] = 0; 8635 HEAP32[i17 + (i8 + 16) >> 2] = 0; 8636 i9 = HEAP32[14476 >> 2] | 0; 8637 i5 = 1 << i3; 8638 if ((i9 & i5 | 0) == 0) { 8639 HEAP32[14476 >> 2] = i9 | i5; 8640 HEAP32[i4 >> 2] = i7; 8641 HEAP32[i17 + (i8 + 24) >> 2] = i4; 8642 HEAP32[i17 + (i8 + 12) >> 2] = i7; 8643 HEAP32[i17 + (i8 + 8) >> 2] = i7; 8644 break; 8645 } 8646 i4 = HEAP32[i4 >> 2] | 0; 8647 if ((i3 | 0) == 31) { 8648 i3 = 0; 8649 } else { 8650 i3 = 25 - (i3 >>> 1) | 0; 8651 } 8652 L444 : do { 8653 if ((HEAP32[i4 + 4 >> 2] & -8 | 0) != (i10 | 0)) { 8654 i3 = i10 << i3; 8655 while (1) { 8656 i5 = i4 + (i3 >>> 31 << 2) + 16 | 0; 8657 i9 = HEAP32[i5 >> 2] | 0; 8658 if ((i9 | 0) == 0) { 8659 break; 8660 } 8661 if ((HEAP32[i9 + 4 >> 2] & -8 | 0) == (i10 | 0)) { 8662 i2 = i9; 8663 break L444; 8664 } else { 8665 i3 = i3 << 1; 8666 i4 = i9; 8667 } 8668 } 8669 if (i5 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8670 _abort(); 8671 } else { 8672 HEAP32[i5 >> 2] = i7; 8673 HEAP32[i17 + (i8 + 24) >> 2] = i4; 8674 HEAP32[i17 + (i8 + 12) >> 2] = i7; 8675 HEAP32[i17 + (i8 + 8) >> 2] = i7; 8676 break L348; 8677 } 8678 } else { 8679 i2 = i4; 8680 } 8681 } while (0); 8682 i4 = i2 + 8 | 0; 8683 i3 = HEAP32[i4 >> 2] | 0; 8684 i5 = HEAP32[14488 >> 2] | 0; 8685 if (i2 >>> 0 < i5 >>> 0) { 8686 _abort(); 8687 } 8688 if (i3 >>> 0 < i5 >>> 0) { 8689 _abort(); 8690 } else { 8691 HEAP32[i3 + 12 >> 2] = i7; 8692 HEAP32[i4 >> 2] = i7; 8693 HEAP32[i17 + (i8 + 8) >> 2] = i3; 8694 HEAP32[i17 + (i8 + 12) >> 2] = i2; 8695 HEAP32[i17 + (i8 + 24) >> 2] = 0; 8696 break; 8697 } 8698 } else { 8699 i32 = (HEAP32[14484 >> 2] | 0) + i10 | 0; 8700 HEAP32[14484 >> 2] = i32; 8701 HEAP32[14496 >> 2] = i7; 8702 HEAP32[i17 + (i8 + 4) >> 2] = i32 | 1; 8703 } 8704 } while (0); 8705 i32 = i17 + (i6 | 8) | 0; 8706 STACKTOP = i1; 8707 return i32 | 0; 8708 } 8709 i3 = 14920 | 0; 8710 while (1) { 8711 i2 = HEAP32[i3 >> 2] | 0; 8712 if (!(i2 >>> 0 > i15 >>> 0) ? (i11 = HEAP32[i3 + 4 >> 2] | 0, i10 = i2 + i11 | 0, i10 >>> 0 > i15 >>> 0) : 0) { 8713 break; 8714 } 8715 i3 = HEAP32[i3 + 8 >> 2] | 0; 8716 } 8717 i3 = i2 + (i11 + -39) | 0; 8718 if ((i3 & 7 | 0) == 0) { 8719 i3 = 0; 8720 } else { 8721 i3 = 0 - i3 & 7; 8722 } 8723 i2 = i2 + (i11 + -47 + i3) | 0; 8724 i2 = i2 >>> 0 < (i15 + 16 | 0) >>> 0 ? i15 : i2; 8725 i3 = i2 + 8 | 0; 8726 i4 = i17 + 8 | 0; 8727 if ((i4 & 7 | 0) == 0) { 8728 i4 = 0; 8729 } else { 8730 i4 = 0 - i4 & 7; 8731 } 8732 i32 = i14 + -40 - i4 | 0; 8733 HEAP32[14496 >> 2] = i17 + i4; 8734 HEAP32[14484 >> 2] = i32; 8735 HEAP32[i17 + (i4 + 4) >> 2] = i32 | 1; 8736 HEAP32[i17 + (i14 + -36) >> 2] = 40; 8737 HEAP32[14500 >> 2] = HEAP32[14960 >> 2]; 8738 HEAP32[i2 + 4 >> 2] = 27; 8739 HEAP32[i3 + 0 >> 2] = HEAP32[14920 >> 2]; 8740 HEAP32[i3 + 4 >> 2] = HEAP32[14924 >> 2]; 8741 HEAP32[i3 + 8 >> 2] = HEAP32[14928 >> 2]; 8742 HEAP32[i3 + 12 >> 2] = HEAP32[14932 >> 2]; 8743 HEAP32[14920 >> 2] = i17; 8744 HEAP32[14924 >> 2] = i14; 8745 HEAP32[14932 >> 2] = 0; 8746 HEAP32[14928 >> 2] = i3; 8747 i4 = i2 + 28 | 0; 8748 HEAP32[i4 >> 2] = 7; 8749 if ((i2 + 32 | 0) >>> 0 < i10 >>> 0) { 8750 while (1) { 8751 i3 = i4 + 4 | 0; 8752 HEAP32[i3 >> 2] = 7; 8753 if ((i4 + 8 | 0) >>> 0 < i10 >>> 0) { 8754 i4 = i3; 8755 } else { 8756 break; 8757 } 8758 } 8759 } 8760 if ((i2 | 0) != (i15 | 0)) { 8761 i2 = i2 - i15 | 0; 8762 i3 = i15 + (i2 + 4) | 0; 8763 HEAP32[i3 >> 2] = HEAP32[i3 >> 2] & -2; 8764 HEAP32[i15 + 4 >> 2] = i2 | 1; 8765 HEAP32[i15 + i2 >> 2] = i2; 8766 i3 = i2 >>> 3; 8767 if (i2 >>> 0 < 256) { 8768 i4 = i3 << 1; 8769 i2 = 14512 + (i4 << 2) | 0; 8770 i5 = HEAP32[3618] | 0; 8771 i3 = 1 << i3; 8772 if ((i5 & i3 | 0) != 0) { 8773 i4 = 14512 + (i4 + 2 << 2) | 0; 8774 i3 = HEAP32[i4 >> 2] | 0; 8775 if (i3 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8776 _abort(); 8777 } else { 8778 i7 = i4; 8779 i8 = i3; 8780 } 8781 } else { 8782 HEAP32[3618] = i5 | i3; 8783 i7 = 14512 + (i4 + 2 << 2) | 0; 8784 i8 = i2; 8785 } 8786 HEAP32[i7 >> 2] = i15; 8787 HEAP32[i8 + 12 >> 2] = i15; 8788 HEAP32[i15 + 8 >> 2] = i8; 8789 HEAP32[i15 + 12 >> 2] = i2; 8790 break; 8791 } 8792 i3 = i2 >>> 8; 8793 if ((i3 | 0) != 0) { 8794 if (i2 >>> 0 > 16777215) { 8795 i3 = 31; 8796 } else { 8797 i31 = (i3 + 1048320 | 0) >>> 16 & 8; 8798 i32 = i3 << i31; 8799 i30 = (i32 + 520192 | 0) >>> 16 & 4; 8800 i32 = i32 << i30; 8801 i3 = (i32 + 245760 | 0) >>> 16 & 2; 8802 i3 = 14 - (i30 | i31 | i3) + (i32 << i3 >>> 15) | 0; 8803 i3 = i2 >>> (i3 + 7 | 0) & 1 | i3 << 1; 8804 } 8805 } else { 8806 i3 = 0; 8807 } 8808 i7 = 14776 + (i3 << 2) | 0; 8809 HEAP32[i15 + 28 >> 2] = i3; 8810 HEAP32[i15 + 20 >> 2] = 0; 8811 HEAP32[i15 + 16 >> 2] = 0; 8812 i4 = HEAP32[14476 >> 2] | 0; 8813 i5 = 1 << i3; 8814 if ((i4 & i5 | 0) == 0) { 8815 HEAP32[14476 >> 2] = i4 | i5; 8816 HEAP32[i7 >> 2] = i15; 8817 HEAP32[i15 + 24 >> 2] = i7; 8818 HEAP32[i15 + 12 >> 2] = i15; 8819 HEAP32[i15 + 8 >> 2] = i15; 8820 break; 8821 } 8822 i4 = HEAP32[i7 >> 2] | 0; 8823 if ((i3 | 0) == 31) { 8824 i3 = 0; 8825 } else { 8826 i3 = 25 - (i3 >>> 1) | 0; 8827 } 8828 L499 : do { 8829 if ((HEAP32[i4 + 4 >> 2] & -8 | 0) != (i2 | 0)) { 8830 i3 = i2 << i3; 8831 while (1) { 8832 i7 = i4 + (i3 >>> 31 << 2) + 16 | 0; 8833 i5 = HEAP32[i7 >> 2] | 0; 8834 if ((i5 | 0) == 0) { 8835 break; 8836 } 8837 if ((HEAP32[i5 + 4 >> 2] & -8 | 0) == (i2 | 0)) { 8838 i6 = i5; 8839 break L499; 8840 } else { 8841 i3 = i3 << 1; 8842 i4 = i5; 8843 } 8844 } 8845 if (i7 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 8846 _abort(); 8847 } else { 8848 HEAP32[i7 >> 2] = i15; 8849 HEAP32[i15 + 24 >> 2] = i4; 8850 HEAP32[i15 + 12 >> 2] = i15; 8851 HEAP32[i15 + 8 >> 2] = i15; 8852 break L311; 8853 } 8854 } else { 8855 i6 = i4; 8856 } 8857 } while (0); 8858 i4 = i6 + 8 | 0; 8859 i3 = HEAP32[i4 >> 2] | 0; 8860 i2 = HEAP32[14488 >> 2] | 0; 8861 if (i6 >>> 0 < i2 >>> 0) { 8862 _abort(); 8863 } 8864 if (i3 >>> 0 < i2 >>> 0) { 8865 _abort(); 8866 } else { 8867 HEAP32[i3 + 12 >> 2] = i15; 8868 HEAP32[i4 >> 2] = i15; 8869 HEAP32[i15 + 8 >> 2] = i3; 8870 HEAP32[i15 + 12 >> 2] = i6; 8871 HEAP32[i15 + 24 >> 2] = 0; 8872 break; 8873 } 8874 } 8875 } else { 8876 i32 = HEAP32[14488 >> 2] | 0; 8877 if ((i32 | 0) == 0 | i17 >>> 0 < i32 >>> 0) { 8878 HEAP32[14488 >> 2] = i17; 8879 } 8880 HEAP32[14920 >> 2] = i17; 8881 HEAP32[14924 >> 2] = i14; 8882 HEAP32[14932 >> 2] = 0; 8883 HEAP32[14508 >> 2] = HEAP32[3736]; 8884 HEAP32[14504 >> 2] = -1; 8885 i2 = 0; 8886 do { 8887 i32 = i2 << 1; 8888 i31 = 14512 + (i32 << 2) | 0; 8889 HEAP32[14512 + (i32 + 3 << 2) >> 2] = i31; 8890 HEAP32[14512 + (i32 + 2 << 2) >> 2] = i31; 8891 i2 = i2 + 1 | 0; 8892 } while ((i2 | 0) != 32); 8893 i2 = i17 + 8 | 0; 8894 if ((i2 & 7 | 0) == 0) { 8895 i2 = 0; 8896 } else { 8897 i2 = 0 - i2 & 7; 8898 } 8899 i32 = i14 + -40 - i2 | 0; 8900 HEAP32[14496 >> 2] = i17 + i2; 8901 HEAP32[14484 >> 2] = i32; 8902 HEAP32[i17 + (i2 + 4) >> 2] = i32 | 1; 8903 HEAP32[i17 + (i14 + -36) >> 2] = 40; 8904 HEAP32[14500 >> 2] = HEAP32[14960 >> 2]; 8905 } 8906 } while (0); 8907 i2 = HEAP32[14484 >> 2] | 0; 8908 if (i2 >>> 0 > i12 >>> 0) { 8909 i31 = i2 - i12 | 0; 8910 HEAP32[14484 >> 2] = i31; 8911 i32 = HEAP32[14496 >> 2] | 0; 8912 HEAP32[14496 >> 2] = i32 + i12; 8913 HEAP32[i32 + (i12 + 4) >> 2] = i31 | 1; 8914 HEAP32[i32 + 4 >> 2] = i12 | 3; 8915 i32 = i32 + 8 | 0; 8916 STACKTOP = i1; 8917 return i32 | 0; 8918 } 8919 } 8920 HEAP32[(___errno_location() | 0) >> 2] = 12; 8921 i32 = 0; 8922 STACKTOP = i1; 8923 return i32 | 0; 8924} 8925function _deflate(i2, i10) { 8926 i2 = i2 | 0; 8927 i10 = i10 | 0; 8928 var i1 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0, i33 = 0, i34 = 0, i35 = 0, i36 = 0, i37 = 0; 8929 i1 = STACKTOP; 8930 if ((i2 | 0) == 0) { 8931 i37 = -2; 8932 STACKTOP = i1; 8933 return i37 | 0; 8934 } 8935 i5 = i2 + 28 | 0; 8936 i7 = HEAP32[i5 >> 2] | 0; 8937 if ((i7 | 0) == 0 | i10 >>> 0 > 5) { 8938 i37 = -2; 8939 STACKTOP = i1; 8940 return i37 | 0; 8941 } 8942 i4 = i2 + 12 | 0; 8943 do { 8944 if ((HEAP32[i4 >> 2] | 0) != 0) { 8945 if ((HEAP32[i2 >> 2] | 0) == 0 ? (HEAP32[i2 + 4 >> 2] | 0) != 0 : 0) { 8946 break; 8947 } 8948 i11 = i7 + 4 | 0; 8949 i29 = HEAP32[i11 >> 2] | 0; 8950 i9 = (i10 | 0) == 4; 8951 if ((i29 | 0) != 666 | i9) { 8952 i3 = i2 + 16 | 0; 8953 if ((HEAP32[i3 >> 2] | 0) == 0) { 8954 HEAP32[i2 + 24 >> 2] = HEAP32[3180 >> 2]; 8955 i37 = -5; 8956 STACKTOP = i1; 8957 return i37 | 0; 8958 } 8959 HEAP32[i7 >> 2] = i2; 8960 i8 = i7 + 40 | 0; 8961 i18 = HEAP32[i8 >> 2] | 0; 8962 HEAP32[i8 >> 2] = i10; 8963 do { 8964 if ((i29 | 0) == 42) { 8965 if ((HEAP32[i7 + 24 >> 2] | 0) != 2) { 8966 i17 = (HEAP32[i7 + 48 >> 2] << 12) + -30720 | 0; 8967 if ((HEAP32[i7 + 136 >> 2] | 0) <= 1 ? (i28 = HEAP32[i7 + 132 >> 2] | 0, (i28 | 0) >= 2) : 0) { 8968 if ((i28 | 0) < 6) { 8969 i28 = 64; 8970 } else { 8971 i28 = (i28 | 0) == 6 ? 128 : 192; 8972 } 8973 } else { 8974 i28 = 0; 8975 } 8976 i28 = i28 | i17; 8977 i17 = i7 + 108 | 0; 8978 i37 = (HEAP32[i17 >> 2] | 0) == 0 ? i28 : i28 | 32; 8979 HEAP32[i11 >> 2] = 113; 8980 i29 = i7 + 20 | 0; 8981 i30 = HEAP32[i29 >> 2] | 0; 8982 HEAP32[i29 >> 2] = i30 + 1; 8983 i28 = i7 + 8 | 0; 8984 HEAP8[(HEAP32[i28 >> 2] | 0) + i30 | 0] = i37 >>> 8; 8985 i30 = HEAP32[i29 >> 2] | 0; 8986 HEAP32[i29 >> 2] = i30 + 1; 8987 HEAP8[(HEAP32[i28 >> 2] | 0) + i30 | 0] = (i37 | ((i37 >>> 0) % 31 | 0)) ^ 31; 8988 i30 = i2 + 48 | 0; 8989 if ((HEAP32[i17 >> 2] | 0) != 0) { 8990 i37 = HEAP32[i30 >> 2] | 0; 8991 i36 = HEAP32[i29 >> 2] | 0; 8992 HEAP32[i29 >> 2] = i36 + 1; 8993 HEAP8[(HEAP32[i28 >> 2] | 0) + i36 | 0] = i37 >>> 24; 8994 i36 = HEAP32[i29 >> 2] | 0; 8995 HEAP32[i29 >> 2] = i36 + 1; 8996 HEAP8[(HEAP32[i28 >> 2] | 0) + i36 | 0] = i37 >>> 16; 8997 i36 = HEAP32[i30 >> 2] | 0; 8998 i37 = HEAP32[i29 >> 2] | 0; 8999 HEAP32[i29 >> 2] = i37 + 1; 9000 HEAP8[(HEAP32[i28 >> 2] | 0) + i37 | 0] = i36 >>> 8; 9001 i37 = HEAP32[i29 >> 2] | 0; 9002 HEAP32[i29 >> 2] = i37 + 1; 9003 HEAP8[(HEAP32[i28 >> 2] | 0) + i37 | 0] = i36; 9004 } 9005 HEAP32[i30 >> 2] = _adler32(0, 0, 0) | 0; 9006 i31 = HEAP32[i11 >> 2] | 0; 9007 i17 = 32; 9008 break; 9009 } 9010 i32 = i2 + 48 | 0; 9011 HEAP32[i32 >> 2] = _crc32(0, 0, 0) | 0; 9012 i30 = i7 + 20 | 0; 9013 i28 = HEAP32[i30 >> 2] | 0; 9014 HEAP32[i30 >> 2] = i28 + 1; 9015 i29 = i7 + 8 | 0; 9016 HEAP8[(HEAP32[i29 >> 2] | 0) + i28 | 0] = 31; 9017 i28 = HEAP32[i30 >> 2] | 0; 9018 HEAP32[i30 >> 2] = i28 + 1; 9019 HEAP8[(HEAP32[i29 >> 2] | 0) + i28 | 0] = -117; 9020 i28 = HEAP32[i30 >> 2] | 0; 9021 HEAP32[i30 >> 2] = i28 + 1; 9022 HEAP8[(HEAP32[i29 >> 2] | 0) + i28 | 0] = 8; 9023 i28 = i7 + 28 | 0; 9024 i33 = HEAP32[i28 >> 2] | 0; 9025 if ((i33 | 0) == 0) { 9026 i22 = HEAP32[i30 >> 2] | 0; 9027 HEAP32[i30 >> 2] = i22 + 1; 9028 HEAP8[(HEAP32[i29 >> 2] | 0) + i22 | 0] = 0; 9029 i22 = HEAP32[i30 >> 2] | 0; 9030 HEAP32[i30 >> 2] = i22 + 1; 9031 HEAP8[(HEAP32[i29 >> 2] | 0) + i22 | 0] = 0; 9032 i22 = HEAP32[i30 >> 2] | 0; 9033 HEAP32[i30 >> 2] = i22 + 1; 9034 HEAP8[(HEAP32[i29 >> 2] | 0) + i22 | 0] = 0; 9035 i22 = HEAP32[i30 >> 2] | 0; 9036 HEAP32[i30 >> 2] = i22 + 1; 9037 HEAP8[(HEAP32[i29 >> 2] | 0) + i22 | 0] = 0; 9038 i22 = HEAP32[i30 >> 2] | 0; 9039 HEAP32[i30 >> 2] = i22 + 1; 9040 HEAP8[(HEAP32[i29 >> 2] | 0) + i22 | 0] = 0; 9041 i22 = HEAP32[i7 + 132 >> 2] | 0; 9042 if ((i22 | 0) != 9) { 9043 if ((HEAP32[i7 + 136 >> 2] | 0) > 1) { 9044 i22 = 4; 9045 } else { 9046 i22 = (i22 | 0) < 2 ? 4 : 0; 9047 } 9048 } else { 9049 i22 = 2; 9050 } 9051 i37 = HEAP32[i30 >> 2] | 0; 9052 HEAP32[i30 >> 2] = i37 + 1; 9053 HEAP8[(HEAP32[i29 >> 2] | 0) + i37 | 0] = i22; 9054 i37 = HEAP32[i30 >> 2] | 0; 9055 HEAP32[i30 >> 2] = i37 + 1; 9056 HEAP8[(HEAP32[i29 >> 2] | 0) + i37 | 0] = 3; 9057 HEAP32[i11 >> 2] = 113; 9058 break; 9059 } 9060 i37 = (((HEAP32[i33 + 44 >> 2] | 0) != 0 ? 2 : 0) | (HEAP32[i33 >> 2] | 0) != 0 | ((HEAP32[i33 + 16 >> 2] | 0) == 0 ? 0 : 4) | ((HEAP32[i33 + 28 >> 2] | 0) == 0 ? 0 : 8) | ((HEAP32[i33 + 36 >> 2] | 0) == 0 ? 0 : 16)) & 255; 9061 i17 = HEAP32[i30 >> 2] | 0; 9062 HEAP32[i30 >> 2] = i17 + 1; 9063 HEAP8[(HEAP32[i29 >> 2] | 0) + i17 | 0] = i37; 9064 i17 = HEAP32[(HEAP32[i28 >> 2] | 0) + 4 >> 2] & 255; 9065 i37 = HEAP32[i30 >> 2] | 0; 9066 HEAP32[i30 >> 2] = i37 + 1; 9067 HEAP8[(HEAP32[i29 >> 2] | 0) + i37 | 0] = i17; 9068 i37 = (HEAP32[(HEAP32[i28 >> 2] | 0) + 4 >> 2] | 0) >>> 8 & 255; 9069 i17 = HEAP32[i30 >> 2] | 0; 9070 HEAP32[i30 >> 2] = i17 + 1; 9071 HEAP8[(HEAP32[i29 >> 2] | 0) + i17 | 0] = i37; 9072 i17 = (HEAP32[(HEAP32[i28 >> 2] | 0) + 4 >> 2] | 0) >>> 16 & 255; 9073 i37 = HEAP32[i30 >> 2] | 0; 9074 HEAP32[i30 >> 2] = i37 + 1; 9075 HEAP8[(HEAP32[i29 >> 2] | 0) + i37 | 0] = i17; 9076 i37 = (HEAP32[(HEAP32[i28 >> 2] | 0) + 4 >> 2] | 0) >>> 24 & 255; 9077 i17 = HEAP32[i30 >> 2] | 0; 9078 HEAP32[i30 >> 2] = i17 + 1; 9079 HEAP8[(HEAP32[i29 >> 2] | 0) + i17 | 0] = i37; 9080 i17 = HEAP32[i7 + 132 >> 2] | 0; 9081 if ((i17 | 0) != 9) { 9082 if ((HEAP32[i7 + 136 >> 2] | 0) > 1) { 9083 i17 = 4; 9084 } else { 9085 i17 = (i17 | 0) < 2 ? 4 : 0; 9086 } 9087 } else { 9088 i17 = 2; 9089 } 9090 i37 = HEAP32[i30 >> 2] | 0; 9091 HEAP32[i30 >> 2] = i37 + 1; 9092 HEAP8[(HEAP32[i29 >> 2] | 0) + i37 | 0] = i17; 9093 i37 = HEAP32[(HEAP32[i28 >> 2] | 0) + 12 >> 2] & 255; 9094 i17 = HEAP32[i30 >> 2] | 0; 9095 HEAP32[i30 >> 2] = i17 + 1; 9096 HEAP8[(HEAP32[i29 >> 2] | 0) + i17 | 0] = i37; 9097 i17 = HEAP32[i28 >> 2] | 0; 9098 if ((HEAP32[i17 + 16 >> 2] | 0) != 0) { 9099 i17 = HEAP32[i17 + 20 >> 2] & 255; 9100 i37 = HEAP32[i30 >> 2] | 0; 9101 HEAP32[i30 >> 2] = i37 + 1; 9102 HEAP8[(HEAP32[i29 >> 2] | 0) + i37 | 0] = i17; 9103 i37 = (HEAP32[(HEAP32[i28 >> 2] | 0) + 20 >> 2] | 0) >>> 8 & 255; 9104 i17 = HEAP32[i30 >> 2] | 0; 9105 HEAP32[i30 >> 2] = i17 + 1; 9106 HEAP8[(HEAP32[i29 >> 2] | 0) + i17 | 0] = i37; 9107 i17 = HEAP32[i28 >> 2] | 0; 9108 } 9109 if ((HEAP32[i17 + 44 >> 2] | 0) != 0) { 9110 HEAP32[i32 >> 2] = _crc32(HEAP32[i32 >> 2] | 0, HEAP32[i29 >> 2] | 0, HEAP32[i30 >> 2] | 0) | 0; 9111 } 9112 HEAP32[i7 + 32 >> 2] = 0; 9113 HEAP32[i11 >> 2] = 69; 9114 i17 = 34; 9115 } else { 9116 i31 = i29; 9117 i17 = 32; 9118 } 9119 } while (0); 9120 if ((i17 | 0) == 32) { 9121 if ((i31 | 0) == 69) { 9122 i28 = i7 + 28 | 0; 9123 i17 = 34; 9124 } else { 9125 i17 = 55; 9126 } 9127 } 9128 do { 9129 if ((i17 | 0) == 34) { 9130 i37 = HEAP32[i28 >> 2] | 0; 9131 if ((HEAP32[i37 + 16 >> 2] | 0) == 0) { 9132 HEAP32[i11 >> 2] = 73; 9133 i17 = 57; 9134 break; 9135 } 9136 i29 = i7 + 20 | 0; 9137 i34 = HEAP32[i29 >> 2] | 0; 9138 i17 = i7 + 32 | 0; 9139 i36 = HEAP32[i17 >> 2] | 0; 9140 L55 : do { 9141 if (i36 >>> 0 < (HEAP32[i37 + 20 >> 2] & 65535) >>> 0) { 9142 i30 = i7 + 12 | 0; 9143 i32 = i2 + 48 | 0; 9144 i31 = i7 + 8 | 0; 9145 i33 = i2 + 20 | 0; 9146 i35 = i34; 9147 while (1) { 9148 if ((i35 | 0) == (HEAP32[i30 >> 2] | 0)) { 9149 if ((HEAP32[i37 + 44 >> 2] | 0) != 0 & i35 >>> 0 > i34 >>> 0) { 9150 HEAP32[i32 >> 2] = _crc32(HEAP32[i32 >> 2] | 0, (HEAP32[i31 >> 2] | 0) + i34 | 0, i35 - i34 | 0) | 0; 9151 } 9152 i34 = HEAP32[i5 >> 2] | 0; 9153 i35 = HEAP32[i34 + 20 >> 2] | 0; 9154 i36 = HEAP32[i3 >> 2] | 0; 9155 i35 = i35 >>> 0 > i36 >>> 0 ? i36 : i35; 9156 if ((i35 | 0) != 0 ? (_memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i34 + 16 >> 2] | 0, i35 | 0) | 0, HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i35, i27 = (HEAP32[i5 >> 2] | 0) + 16 | 0, HEAP32[i27 >> 2] = (HEAP32[i27 >> 2] | 0) + i35, HEAP32[i33 >> 2] = (HEAP32[i33 >> 2] | 0) + i35, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i35, i27 = HEAP32[i5 >> 2] | 0, i36 = i27 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i35, (i37 | 0) == (i35 | 0)) : 0) { 9157 HEAP32[i27 + 16 >> 2] = HEAP32[i27 + 8 >> 2]; 9158 } 9159 i34 = HEAP32[i29 >> 2] | 0; 9160 if ((i34 | 0) == (HEAP32[i30 >> 2] | 0)) { 9161 break; 9162 } 9163 i37 = HEAP32[i28 >> 2] | 0; 9164 i36 = HEAP32[i17 >> 2] | 0; 9165 i35 = i34; 9166 } 9167 i36 = HEAP8[(HEAP32[i37 + 16 >> 2] | 0) + i36 | 0] | 0; 9168 HEAP32[i29 >> 2] = i35 + 1; 9169 HEAP8[(HEAP32[i31 >> 2] | 0) + i35 | 0] = i36; 9170 i36 = (HEAP32[i17 >> 2] | 0) + 1 | 0; 9171 HEAP32[i17 >> 2] = i36; 9172 i37 = HEAP32[i28 >> 2] | 0; 9173 if (!(i36 >>> 0 < (HEAP32[i37 + 20 >> 2] & 65535) >>> 0)) { 9174 break L55; 9175 } 9176 i35 = HEAP32[i29 >> 2] | 0; 9177 } 9178 i37 = HEAP32[i28 >> 2] | 0; 9179 } 9180 } while (0); 9181 if ((HEAP32[i37 + 44 >> 2] | 0) != 0 ? (i26 = HEAP32[i29 >> 2] | 0, i26 >>> 0 > i34 >>> 0) : 0) { 9182 i37 = i2 + 48 | 0; 9183 HEAP32[i37 >> 2] = _crc32(HEAP32[i37 >> 2] | 0, (HEAP32[i7 + 8 >> 2] | 0) + i34 | 0, i26 - i34 | 0) | 0; 9184 i37 = HEAP32[i28 >> 2] | 0; 9185 } 9186 if ((HEAP32[i17 >> 2] | 0) == (HEAP32[i37 + 20 >> 2] | 0)) { 9187 HEAP32[i17 >> 2] = 0; 9188 HEAP32[i11 >> 2] = 73; 9189 i17 = 57; 9190 break; 9191 } else { 9192 i31 = HEAP32[i11 >> 2] | 0; 9193 i17 = 55; 9194 break; 9195 } 9196 } 9197 } while (0); 9198 if ((i17 | 0) == 55) { 9199 if ((i31 | 0) == 73) { 9200 i37 = HEAP32[i7 + 28 >> 2] | 0; 9201 i17 = 57; 9202 } else { 9203 i17 = 76; 9204 } 9205 } 9206 do { 9207 if ((i17 | 0) == 57) { 9208 i26 = i7 + 28 | 0; 9209 if ((HEAP32[i37 + 28 >> 2] | 0) == 0) { 9210 HEAP32[i11 >> 2] = 91; 9211 i17 = 78; 9212 break; 9213 } 9214 i27 = i7 + 20 | 0; 9215 i35 = HEAP32[i27 >> 2] | 0; 9216 i32 = i7 + 12 | 0; 9217 i29 = i2 + 48 | 0; 9218 i28 = i7 + 8 | 0; 9219 i31 = i2 + 20 | 0; 9220 i30 = i7 + 32 | 0; 9221 i33 = i35; 9222 while (1) { 9223 if ((i33 | 0) == (HEAP32[i32 >> 2] | 0)) { 9224 if ((HEAP32[(HEAP32[i26 >> 2] | 0) + 44 >> 2] | 0) != 0 & i33 >>> 0 > i35 >>> 0) { 9225 HEAP32[i29 >> 2] = _crc32(HEAP32[i29 >> 2] | 0, (HEAP32[i28 >> 2] | 0) + i35 | 0, i33 - i35 | 0) | 0; 9226 } 9227 i33 = HEAP32[i5 >> 2] | 0; 9228 i34 = HEAP32[i33 + 20 >> 2] | 0; 9229 i35 = HEAP32[i3 >> 2] | 0; 9230 i34 = i34 >>> 0 > i35 >>> 0 ? i35 : i34; 9231 if ((i34 | 0) != 0 ? (_memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i33 + 16 >> 2] | 0, i34 | 0) | 0, HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i34, i25 = (HEAP32[i5 >> 2] | 0) + 16 | 0, HEAP32[i25 >> 2] = (HEAP32[i25 >> 2] | 0) + i34, HEAP32[i31 >> 2] = (HEAP32[i31 >> 2] | 0) + i34, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i34, i25 = HEAP32[i5 >> 2] | 0, i36 = i25 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i34, (i37 | 0) == (i34 | 0)) : 0) { 9232 HEAP32[i25 + 16 >> 2] = HEAP32[i25 + 8 >> 2]; 9233 } 9234 i35 = HEAP32[i27 >> 2] | 0; 9235 if ((i35 | 0) == (HEAP32[i32 >> 2] | 0)) { 9236 i25 = 1; 9237 break; 9238 } else { 9239 i33 = i35; 9240 } 9241 } 9242 i34 = HEAP32[i30 >> 2] | 0; 9243 HEAP32[i30 >> 2] = i34 + 1; 9244 i34 = HEAP8[(HEAP32[(HEAP32[i26 >> 2] | 0) + 28 >> 2] | 0) + i34 | 0] | 0; 9245 HEAP32[i27 >> 2] = i33 + 1; 9246 HEAP8[(HEAP32[i28 >> 2] | 0) + i33 | 0] = i34; 9247 if (i34 << 24 >> 24 == 0) { 9248 i17 = 68; 9249 break; 9250 } 9251 i33 = HEAP32[i27 >> 2] | 0; 9252 } 9253 if ((i17 | 0) == 68) { 9254 i25 = i34 & 255; 9255 } 9256 if ((HEAP32[(HEAP32[i26 >> 2] | 0) + 44 >> 2] | 0) != 0 ? (i24 = HEAP32[i27 >> 2] | 0, i24 >>> 0 > i35 >>> 0) : 0) { 9257 HEAP32[i29 >> 2] = _crc32(HEAP32[i29 >> 2] | 0, (HEAP32[i28 >> 2] | 0) + i35 | 0, i24 - i35 | 0) | 0; 9258 } 9259 if ((i25 | 0) == 0) { 9260 HEAP32[i30 >> 2] = 0; 9261 HEAP32[i11 >> 2] = 91; 9262 i17 = 78; 9263 break; 9264 } else { 9265 i31 = HEAP32[i11 >> 2] | 0; 9266 i17 = 76; 9267 break; 9268 } 9269 } 9270 } while (0); 9271 if ((i17 | 0) == 76) { 9272 if ((i31 | 0) == 91) { 9273 i26 = i7 + 28 | 0; 9274 i17 = 78; 9275 } else { 9276 i17 = 97; 9277 } 9278 } 9279 do { 9280 if ((i17 | 0) == 78) { 9281 if ((HEAP32[(HEAP32[i26 >> 2] | 0) + 36 >> 2] | 0) == 0) { 9282 HEAP32[i11 >> 2] = 103; 9283 i17 = 99; 9284 break; 9285 } 9286 i24 = i7 + 20 | 0; 9287 i32 = HEAP32[i24 >> 2] | 0; 9288 i29 = i7 + 12 | 0; 9289 i27 = i2 + 48 | 0; 9290 i25 = i7 + 8 | 0; 9291 i28 = i2 + 20 | 0; 9292 i30 = i7 + 32 | 0; 9293 i31 = i32; 9294 while (1) { 9295 if ((i31 | 0) == (HEAP32[i29 >> 2] | 0)) { 9296 if ((HEAP32[(HEAP32[i26 >> 2] | 0) + 44 >> 2] | 0) != 0 & i31 >>> 0 > i32 >>> 0) { 9297 HEAP32[i27 >> 2] = _crc32(HEAP32[i27 >> 2] | 0, (HEAP32[i25 >> 2] | 0) + i32 | 0, i31 - i32 | 0) | 0; 9298 } 9299 i31 = HEAP32[i5 >> 2] | 0; 9300 i33 = HEAP32[i31 + 20 >> 2] | 0; 9301 i32 = HEAP32[i3 >> 2] | 0; 9302 i32 = i33 >>> 0 > i32 >>> 0 ? i32 : i33; 9303 if ((i32 | 0) != 0 ? (_memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i31 + 16 >> 2] | 0, i32 | 0) | 0, HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i32, i23 = (HEAP32[i5 >> 2] | 0) + 16 | 0, HEAP32[i23 >> 2] = (HEAP32[i23 >> 2] | 0) + i32, HEAP32[i28 >> 2] = (HEAP32[i28 >> 2] | 0) + i32, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i32, i23 = HEAP32[i5 >> 2] | 0, i36 = i23 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i32, (i37 | 0) == (i32 | 0)) : 0) { 9304 HEAP32[i23 + 16 >> 2] = HEAP32[i23 + 8 >> 2]; 9305 } 9306 i32 = HEAP32[i24 >> 2] | 0; 9307 if ((i32 | 0) == (HEAP32[i29 >> 2] | 0)) { 9308 i23 = 1; 9309 break; 9310 } else { 9311 i31 = i32; 9312 } 9313 } 9314 i33 = HEAP32[i30 >> 2] | 0; 9315 HEAP32[i30 >> 2] = i33 + 1; 9316 i33 = HEAP8[(HEAP32[(HEAP32[i26 >> 2] | 0) + 36 >> 2] | 0) + i33 | 0] | 0; 9317 HEAP32[i24 >> 2] = i31 + 1; 9318 HEAP8[(HEAP32[i25 >> 2] | 0) + i31 | 0] = i33; 9319 if (i33 << 24 >> 24 == 0) { 9320 i17 = 89; 9321 break; 9322 } 9323 i31 = HEAP32[i24 >> 2] | 0; 9324 } 9325 if ((i17 | 0) == 89) { 9326 i23 = i33 & 255; 9327 } 9328 if ((HEAP32[(HEAP32[i26 >> 2] | 0) + 44 >> 2] | 0) != 0 ? (i22 = HEAP32[i24 >> 2] | 0, i22 >>> 0 > i32 >>> 0) : 0) { 9329 HEAP32[i27 >> 2] = _crc32(HEAP32[i27 >> 2] | 0, (HEAP32[i25 >> 2] | 0) + i32 | 0, i22 - i32 | 0) | 0; 9330 } 9331 if ((i23 | 0) == 0) { 9332 HEAP32[i11 >> 2] = 103; 9333 i17 = 99; 9334 break; 9335 } else { 9336 i31 = HEAP32[i11 >> 2] | 0; 9337 i17 = 97; 9338 break; 9339 } 9340 } 9341 } while (0); 9342 if ((i17 | 0) == 97 ? (i31 | 0) == 103 : 0) { 9343 i26 = i7 + 28 | 0; 9344 i17 = 99; 9345 } 9346 do { 9347 if ((i17 | 0) == 99) { 9348 if ((HEAP32[(HEAP32[i26 >> 2] | 0) + 44 >> 2] | 0) == 0) { 9349 HEAP32[i11 >> 2] = 113; 9350 break; 9351 } 9352 i17 = i7 + 20 | 0; 9353 i22 = i7 + 12 | 0; 9354 if ((((HEAP32[i17 >> 2] | 0) + 2 | 0) >>> 0 > (HEAP32[i22 >> 2] | 0) >>> 0 ? (i20 = HEAP32[i5 >> 2] | 0, i21 = HEAP32[i20 + 20 >> 2] | 0, i23 = HEAP32[i3 >> 2] | 0, i21 = i21 >>> 0 > i23 >>> 0 ? i23 : i21, (i21 | 0) != 0) : 0) ? (_memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i20 + 16 >> 2] | 0, i21 | 0) | 0, HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i21, i19 = (HEAP32[i5 >> 2] | 0) + 16 | 0, HEAP32[i19 >> 2] = (HEAP32[i19 >> 2] | 0) + i21, i19 = i2 + 20 | 0, HEAP32[i19 >> 2] = (HEAP32[i19 >> 2] | 0) + i21, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i21, i19 = HEAP32[i5 >> 2] | 0, i36 = i19 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i21, (i37 | 0) == (i21 | 0)) : 0) { 9355 HEAP32[i19 + 16 >> 2] = HEAP32[i19 + 8 >> 2]; 9356 } 9357 i19 = HEAP32[i17 >> 2] | 0; 9358 if (!((i19 + 2 | 0) >>> 0 > (HEAP32[i22 >> 2] | 0) >>> 0)) { 9359 i37 = i2 + 48 | 0; 9360 i34 = HEAP32[i37 >> 2] & 255; 9361 HEAP32[i17 >> 2] = i19 + 1; 9362 i35 = i7 + 8 | 0; 9363 HEAP8[(HEAP32[i35 >> 2] | 0) + i19 | 0] = i34; 9364 i34 = (HEAP32[i37 >> 2] | 0) >>> 8 & 255; 9365 i36 = HEAP32[i17 >> 2] | 0; 9366 HEAP32[i17 >> 2] = i36 + 1; 9367 HEAP8[(HEAP32[i35 >> 2] | 0) + i36 | 0] = i34; 9368 HEAP32[i37 >> 2] = _crc32(0, 0, 0) | 0; 9369 HEAP32[i11 >> 2] = 113; 9370 } 9371 } 9372 } while (0); 9373 i19 = i7 + 20 | 0; 9374 if ((HEAP32[i19 >> 2] | 0) == 0) { 9375 if ((HEAP32[i2 + 4 >> 2] | 0) == 0 ? (i18 | 0) >= (i10 | 0) & (i10 | 0) != 4 : 0) { 9376 HEAP32[i2 + 24 >> 2] = HEAP32[3180 >> 2]; 9377 i37 = -5; 9378 STACKTOP = i1; 9379 return i37 | 0; 9380 } 9381 } else { 9382 i17 = HEAP32[i5 >> 2] | 0; 9383 i20 = HEAP32[i17 + 20 >> 2] | 0; 9384 i18 = HEAP32[i3 >> 2] | 0; 9385 i20 = i20 >>> 0 > i18 >>> 0 ? i18 : i20; 9386 if ((i20 | 0) != 0) { 9387 _memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i17 + 16 >> 2] | 0, i20 | 0) | 0; 9388 HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i20; 9389 i17 = (HEAP32[i5 >> 2] | 0) + 16 | 0; 9390 HEAP32[i17 >> 2] = (HEAP32[i17 >> 2] | 0) + i20; 9391 i17 = i2 + 20 | 0; 9392 HEAP32[i17 >> 2] = (HEAP32[i17 >> 2] | 0) + i20; 9393 HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i20; 9394 i17 = HEAP32[i5 >> 2] | 0; 9395 i36 = i17 + 20 | 0; 9396 i37 = HEAP32[i36 >> 2] | 0; 9397 HEAP32[i36 >> 2] = i37 - i20; 9398 if ((i37 | 0) == (i20 | 0)) { 9399 HEAP32[i17 + 16 >> 2] = HEAP32[i17 + 8 >> 2]; 9400 } 9401 i18 = HEAP32[i3 >> 2] | 0; 9402 } 9403 if ((i18 | 0) == 0) { 9404 HEAP32[i8 >> 2] = -1; 9405 i37 = 0; 9406 STACKTOP = i1; 9407 return i37 | 0; 9408 } 9409 } 9410 i18 = (HEAP32[i11 >> 2] | 0) == 666; 9411 i17 = (HEAP32[i2 + 4 >> 2] | 0) == 0; 9412 if (i18) { 9413 if (i17) { 9414 i17 = 121; 9415 } else { 9416 HEAP32[i2 + 24 >> 2] = HEAP32[3180 >> 2]; 9417 i37 = -5; 9418 STACKTOP = i1; 9419 return i37 | 0; 9420 } 9421 } else { 9422 if (i17) { 9423 i17 = 121; 9424 } else { 9425 i17 = 124; 9426 } 9427 } 9428 do { 9429 if ((i17 | 0) == 121) { 9430 if ((HEAP32[i7 + 116 >> 2] | 0) == 0) { 9431 if ((i10 | 0) != 0) { 9432 if (i18) { 9433 break; 9434 } else { 9435 i17 = 124; 9436 break; 9437 } 9438 } else { 9439 i37 = 0; 9440 STACKTOP = i1; 9441 return i37 | 0; 9442 } 9443 } else { 9444 i17 = 124; 9445 } 9446 } 9447 } while (0); 9448 do { 9449 if ((i17 | 0) == 124) { 9450 i18 = HEAP32[i7 + 136 >> 2] | 0; 9451 L185 : do { 9452 if ((i18 | 0) == 2) { 9453 i22 = i7 + 116 | 0; 9454 i18 = i7 + 96 | 0; 9455 i13 = i7 + 108 | 0; 9456 i14 = i7 + 56 | 0; 9457 i21 = i7 + 5792 | 0; 9458 i20 = i7 + 5796 | 0; 9459 i24 = i7 + 5784 | 0; 9460 i23 = i7 + 5788 | 0; 9461 i12 = i7 + 92 | 0; 9462 while (1) { 9463 if ((HEAP32[i22 >> 2] | 0) == 0 ? (_fill_window(i7), (HEAP32[i22 >> 2] | 0) == 0) : 0) { 9464 break; 9465 } 9466 HEAP32[i18 >> 2] = 0; 9467 i37 = HEAP8[(HEAP32[i14 >> 2] | 0) + (HEAP32[i13 >> 2] | 0) | 0] | 0; 9468 i26 = HEAP32[i21 >> 2] | 0; 9469 HEAP16[(HEAP32[i20 >> 2] | 0) + (i26 << 1) >> 1] = 0; 9470 HEAP32[i21 >> 2] = i26 + 1; 9471 HEAP8[(HEAP32[i24 >> 2] | 0) + i26 | 0] = i37; 9472 i37 = i7 + ((i37 & 255) << 2) + 148 | 0; 9473 HEAP16[i37 >> 1] = (HEAP16[i37 >> 1] | 0) + 1 << 16 >> 16; 9474 i37 = (HEAP32[i21 >> 2] | 0) == ((HEAP32[i23 >> 2] | 0) + -1 | 0); 9475 HEAP32[i22 >> 2] = (HEAP32[i22 >> 2] | 0) + -1; 9476 i26 = (HEAP32[i13 >> 2] | 0) + 1 | 0; 9477 HEAP32[i13 >> 2] = i26; 9478 if (!i37) { 9479 continue; 9480 } 9481 i25 = HEAP32[i12 >> 2] | 0; 9482 if ((i25 | 0) > -1) { 9483 i27 = (HEAP32[i14 >> 2] | 0) + i25 | 0; 9484 } else { 9485 i27 = 0; 9486 } 9487 __tr_flush_block(i7, i27, i26 - i25 | 0, 0); 9488 HEAP32[i12 >> 2] = HEAP32[i13 >> 2]; 9489 i26 = HEAP32[i7 >> 2] | 0; 9490 i25 = i26 + 28 | 0; 9491 i27 = HEAP32[i25 >> 2] | 0; 9492 i30 = HEAP32[i27 + 20 >> 2] | 0; 9493 i28 = i26 + 16 | 0; 9494 i29 = HEAP32[i28 >> 2] | 0; 9495 i29 = i30 >>> 0 > i29 >>> 0 ? i29 : i30; 9496 if ((i29 | 0) != 0 ? (i16 = i26 + 12 | 0, _memcpy(HEAP32[i16 >> 2] | 0, HEAP32[i27 + 16 >> 2] | 0, i29 | 0) | 0, HEAP32[i16 >> 2] = (HEAP32[i16 >> 2] | 0) + i29, i16 = (HEAP32[i25 >> 2] | 0) + 16 | 0, HEAP32[i16 >> 2] = (HEAP32[i16 >> 2] | 0) + i29, i16 = i26 + 20 | 0, HEAP32[i16 >> 2] = (HEAP32[i16 >> 2] | 0) + i29, HEAP32[i28 >> 2] = (HEAP32[i28 >> 2] | 0) - i29, i16 = HEAP32[i25 >> 2] | 0, i36 = i16 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i29, (i37 | 0) == (i29 | 0)) : 0) { 9497 HEAP32[i16 + 16 >> 2] = HEAP32[i16 + 8 >> 2]; 9498 } 9499 if ((HEAP32[(HEAP32[i7 >> 2] | 0) + 16 >> 2] | 0) == 0) { 9500 break L185; 9501 } 9502 } 9503 if ((i10 | 0) != 0) { 9504 i16 = HEAP32[i12 >> 2] | 0; 9505 if ((i16 | 0) > -1) { 9506 i14 = (HEAP32[i14 >> 2] | 0) + i16 | 0; 9507 } else { 9508 i14 = 0; 9509 } 9510 __tr_flush_block(i7, i14, (HEAP32[i13 >> 2] | 0) - i16 | 0, i9 & 1); 9511 HEAP32[i12 >> 2] = HEAP32[i13 >> 2]; 9512 i14 = HEAP32[i7 >> 2] | 0; 9513 i13 = i14 + 28 | 0; 9514 i12 = HEAP32[i13 >> 2] | 0; 9515 i17 = HEAP32[i12 + 20 >> 2] | 0; 9516 i16 = i14 + 16 | 0; 9517 i18 = HEAP32[i16 >> 2] | 0; 9518 i17 = i17 >>> 0 > i18 >>> 0 ? i18 : i17; 9519 if ((i17 | 0) != 0 ? (i15 = i14 + 12 | 0, _memcpy(HEAP32[i15 >> 2] | 0, HEAP32[i12 + 16 >> 2] | 0, i17 | 0) | 0, HEAP32[i15 >> 2] = (HEAP32[i15 >> 2] | 0) + i17, i15 = (HEAP32[i13 >> 2] | 0) + 16 | 0, HEAP32[i15 >> 2] = (HEAP32[i15 >> 2] | 0) + i17, i15 = i14 + 20 | 0, HEAP32[i15 >> 2] = (HEAP32[i15 >> 2] | 0) + i17, HEAP32[i16 >> 2] = (HEAP32[i16 >> 2] | 0) - i17, i15 = HEAP32[i13 >> 2] | 0, i36 = i15 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i17, (i37 | 0) == (i17 | 0)) : 0) { 9520 HEAP32[i15 + 16 >> 2] = HEAP32[i15 + 8 >> 2]; 9521 } 9522 if ((HEAP32[(HEAP32[i7 >> 2] | 0) + 16 >> 2] | 0) == 0) { 9523 i12 = i9 ? 2 : 0; 9524 i17 = 183; 9525 break; 9526 } else { 9527 i12 = i9 ? 3 : 1; 9528 i17 = 183; 9529 break; 9530 } 9531 } 9532 } else if ((i18 | 0) == 3) { 9533 i27 = i7 + 116 | 0; 9534 i26 = (i10 | 0) == 0; 9535 i22 = i7 + 96 | 0; 9536 i15 = i7 + 108 | 0; 9537 i20 = i7 + 5792 | 0; 9538 i24 = i7 + 5796 | 0; 9539 i23 = i7 + 5784 | 0; 9540 i21 = i7 + (HEAPU8[296] << 2) + 2440 | 0; 9541 i25 = i7 + 5788 | 0; 9542 i18 = i7 + 56 | 0; 9543 i16 = i7 + 92 | 0; 9544 while (1) { 9545 i29 = HEAP32[i27 >> 2] | 0; 9546 if (i29 >>> 0 < 258) { 9547 _fill_window(i7); 9548 i29 = HEAP32[i27 >> 2] | 0; 9549 if (i29 >>> 0 < 258 & i26) { 9550 break L185; 9551 } 9552 if ((i29 | 0) == 0) { 9553 break; 9554 } 9555 HEAP32[i22 >> 2] = 0; 9556 if (i29 >>> 0 > 2) { 9557 i17 = 151; 9558 } else { 9559 i28 = HEAP32[i15 >> 2] | 0; 9560 i17 = 166; 9561 } 9562 } else { 9563 HEAP32[i22 >> 2] = 0; 9564 i17 = 151; 9565 } 9566 if ((i17 | 0) == 151) { 9567 i17 = 0; 9568 i28 = HEAP32[i15 >> 2] | 0; 9569 if ((i28 | 0) != 0) { 9570 i31 = HEAP32[i18 >> 2] | 0; 9571 i30 = HEAP8[i31 + (i28 + -1) | 0] | 0; 9572 if ((i30 << 24 >> 24 == (HEAP8[i31 + i28 | 0] | 0) ? i30 << 24 >> 24 == (HEAP8[i31 + (i28 + 1) | 0] | 0) : 0) ? (i14 = i31 + (i28 + 2) | 0, i30 << 24 >> 24 == (HEAP8[i14] | 0)) : 0) { 9573 i31 = i31 + (i28 + 258) | 0; 9574 i32 = i14; 9575 do { 9576 i33 = i32 + 1 | 0; 9577 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9578 i32 = i33; 9579 break; 9580 } 9581 i33 = i32 + 2 | 0; 9582 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9583 i32 = i33; 9584 break; 9585 } 9586 i33 = i32 + 3 | 0; 9587 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9588 i32 = i33; 9589 break; 9590 } 9591 i33 = i32 + 4 | 0; 9592 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9593 i32 = i33; 9594 break; 9595 } 9596 i33 = i32 + 5 | 0; 9597 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9598 i32 = i33; 9599 break; 9600 } 9601 i33 = i32 + 6 | 0; 9602 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9603 i32 = i33; 9604 break; 9605 } 9606 i33 = i32 + 7 | 0; 9607 if (!(i30 << 24 >> 24 == (HEAP8[i33] | 0))) { 9608 i32 = i33; 9609 break; 9610 } 9611 i32 = i32 + 8 | 0; 9612 } while (i30 << 24 >> 24 == (HEAP8[i32] | 0) & i32 >>> 0 < i31 >>> 0); 9613 i30 = i32 - i31 + 258 | 0; 9614 i29 = i30 >>> 0 > i29 >>> 0 ? i29 : i30; 9615 HEAP32[i22 >> 2] = i29; 9616 if (i29 >>> 0 > 2) { 9617 i29 = i29 + 253 | 0; 9618 i28 = HEAP32[i20 >> 2] | 0; 9619 HEAP16[(HEAP32[i24 >> 2] | 0) + (i28 << 1) >> 1] = 1; 9620 HEAP32[i20 >> 2] = i28 + 1; 9621 HEAP8[(HEAP32[i23 >> 2] | 0) + i28 | 0] = i29; 9622 i29 = i7 + ((HEAPU8[808 + (i29 & 255) | 0] | 256) + 1 << 2) + 148 | 0; 9623 HEAP16[i29 >> 1] = (HEAP16[i29 >> 1] | 0) + 1 << 16 >> 16; 9624 HEAP16[i21 >> 1] = (HEAP16[i21 >> 1] | 0) + 1 << 16 >> 16; 9625 i29 = (HEAP32[i20 >> 2] | 0) == ((HEAP32[i25 >> 2] | 0) + -1 | 0) | 0; 9626 i28 = HEAP32[i22 >> 2] | 0; 9627 HEAP32[i27 >> 2] = (HEAP32[i27 >> 2] | 0) - i28; 9628 i28 = (HEAP32[i15 >> 2] | 0) + i28 | 0; 9629 HEAP32[i15 >> 2] = i28; 9630 HEAP32[i22 >> 2] = 0; 9631 } else { 9632 i17 = 166; 9633 } 9634 } else { 9635 i17 = 166; 9636 } 9637 } else { 9638 i28 = 0; 9639 i17 = 166; 9640 } 9641 } 9642 if ((i17 | 0) == 166) { 9643 i17 = 0; 9644 i29 = HEAP8[(HEAP32[i18 >> 2] | 0) + i28 | 0] | 0; 9645 i28 = HEAP32[i20 >> 2] | 0; 9646 HEAP16[(HEAP32[i24 >> 2] | 0) + (i28 << 1) >> 1] = 0; 9647 HEAP32[i20 >> 2] = i28 + 1; 9648 HEAP8[(HEAP32[i23 >> 2] | 0) + i28 | 0] = i29; 9649 i29 = i7 + ((i29 & 255) << 2) + 148 | 0; 9650 HEAP16[i29 >> 1] = (HEAP16[i29 >> 1] | 0) + 1 << 16 >> 16; 9651 i29 = (HEAP32[i20 >> 2] | 0) == ((HEAP32[i25 >> 2] | 0) + -1 | 0) | 0; 9652 HEAP32[i27 >> 2] = (HEAP32[i27 >> 2] | 0) + -1; 9653 i28 = (HEAP32[i15 >> 2] | 0) + 1 | 0; 9654 HEAP32[i15 >> 2] = i28; 9655 } 9656 if ((i29 | 0) == 0) { 9657 continue; 9658 } 9659 i29 = HEAP32[i16 >> 2] | 0; 9660 if ((i29 | 0) > -1) { 9661 i30 = (HEAP32[i18 >> 2] | 0) + i29 | 0; 9662 } else { 9663 i30 = 0; 9664 } 9665 __tr_flush_block(i7, i30, i28 - i29 | 0, 0); 9666 HEAP32[i16 >> 2] = HEAP32[i15 >> 2]; 9667 i30 = HEAP32[i7 >> 2] | 0; 9668 i28 = i30 + 28 | 0; 9669 i29 = HEAP32[i28 >> 2] | 0; 9670 i33 = HEAP32[i29 + 20 >> 2] | 0; 9671 i31 = i30 + 16 | 0; 9672 i32 = HEAP32[i31 >> 2] | 0; 9673 i32 = i33 >>> 0 > i32 >>> 0 ? i32 : i33; 9674 if ((i32 | 0) != 0 ? (i13 = i30 + 12 | 0, _memcpy(HEAP32[i13 >> 2] | 0, HEAP32[i29 + 16 >> 2] | 0, i32 | 0) | 0, HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) + i32, i13 = (HEAP32[i28 >> 2] | 0) + 16 | 0, HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) + i32, i13 = i30 + 20 | 0, HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) + i32, HEAP32[i31 >> 2] = (HEAP32[i31 >> 2] | 0) - i32, i13 = HEAP32[i28 >> 2] | 0, i36 = i13 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i32, (i37 | 0) == (i32 | 0)) : 0) { 9675 HEAP32[i13 + 16 >> 2] = HEAP32[i13 + 8 >> 2]; 9676 } 9677 if ((HEAP32[(HEAP32[i7 >> 2] | 0) + 16 >> 2] | 0) == 0) { 9678 break L185; 9679 } 9680 } 9681 i13 = HEAP32[i16 >> 2] | 0; 9682 if ((i13 | 0) > -1) { 9683 i14 = (HEAP32[i18 >> 2] | 0) + i13 | 0; 9684 } else { 9685 i14 = 0; 9686 } 9687 __tr_flush_block(i7, i14, (HEAP32[i15 >> 2] | 0) - i13 | 0, i9 & 1); 9688 HEAP32[i16 >> 2] = HEAP32[i15 >> 2]; 9689 i14 = HEAP32[i7 >> 2] | 0; 9690 i16 = i14 + 28 | 0; 9691 i15 = HEAP32[i16 >> 2] | 0; 9692 i18 = HEAP32[i15 + 20 >> 2] | 0; 9693 i13 = i14 + 16 | 0; 9694 i17 = HEAP32[i13 >> 2] | 0; 9695 i17 = i18 >>> 0 > i17 >>> 0 ? i17 : i18; 9696 if ((i17 | 0) != 0 ? (i12 = i14 + 12 | 0, _memcpy(HEAP32[i12 >> 2] | 0, HEAP32[i15 + 16 >> 2] | 0, i17 | 0) | 0, HEAP32[i12 >> 2] = (HEAP32[i12 >> 2] | 0) + i17, i12 = (HEAP32[i16 >> 2] | 0) + 16 | 0, HEAP32[i12 >> 2] = (HEAP32[i12 >> 2] | 0) + i17, i12 = i14 + 20 | 0, HEAP32[i12 >> 2] = (HEAP32[i12 >> 2] | 0) + i17, HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) - i17, i12 = HEAP32[i16 >> 2] | 0, i36 = i12 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i17, (i37 | 0) == (i17 | 0)) : 0) { 9697 HEAP32[i12 + 16 >> 2] = HEAP32[i12 + 8 >> 2]; 9698 } 9699 if ((HEAP32[(HEAP32[i7 >> 2] | 0) + 16 >> 2] | 0) == 0) { 9700 i12 = i9 ? 2 : 0; 9701 i17 = 183; 9702 break; 9703 } else { 9704 i12 = i9 ? 3 : 1; 9705 i17 = 183; 9706 break; 9707 } 9708 } else { 9709 i12 = FUNCTION_TABLE_iii[HEAP32[184 + ((HEAP32[i7 + 132 >> 2] | 0) * 12 | 0) >> 2] & 3](i7, i10) | 0; 9710 i17 = 183; 9711 } 9712 } while (0); 9713 if ((i17 | 0) == 183) { 9714 if ((i12 & -2 | 0) == 2) { 9715 HEAP32[i11 >> 2] = 666; 9716 } 9717 if ((i12 & -3 | 0) != 0) { 9718 if ((i12 | 0) != 1) { 9719 break; 9720 } 9721 if ((i10 | 0) == 1) { 9722 __tr_align(i7); 9723 } else if (((i10 | 0) != 5 ? (__tr_stored_block(i7, 0, 0, 0), (i10 | 0) == 3) : 0) ? (i37 = HEAP32[i7 + 76 >> 2] | 0, i36 = HEAP32[i7 + 68 >> 2] | 0, HEAP16[i36 + (i37 + -1 << 1) >> 1] = 0, _memset(i36 | 0, 0, (i37 << 1) + -2 | 0) | 0, (HEAP32[i7 + 116 >> 2] | 0) == 0) : 0) { 9724 HEAP32[i7 + 108 >> 2] = 0; 9725 HEAP32[i7 + 92 >> 2] = 0; 9726 } 9727 i11 = HEAP32[i5 >> 2] | 0; 9728 i12 = HEAP32[i11 + 20 >> 2] | 0; 9729 i10 = HEAP32[i3 >> 2] | 0; 9730 i12 = i12 >>> 0 > i10 >>> 0 ? i10 : i12; 9731 if ((i12 | 0) != 0) { 9732 _memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i11 + 16 >> 2] | 0, i12 | 0) | 0; 9733 HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i12; 9734 i10 = (HEAP32[i5 >> 2] | 0) + 16 | 0; 9735 HEAP32[i10 >> 2] = (HEAP32[i10 >> 2] | 0) + i12; 9736 i10 = i2 + 20 | 0; 9737 HEAP32[i10 >> 2] = (HEAP32[i10 >> 2] | 0) + i12; 9738 HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i12; 9739 i10 = HEAP32[i5 >> 2] | 0; 9740 i36 = i10 + 20 | 0; 9741 i37 = HEAP32[i36 >> 2] | 0; 9742 HEAP32[i36 >> 2] = i37 - i12; 9743 if ((i37 | 0) == (i12 | 0)) { 9744 HEAP32[i10 + 16 >> 2] = HEAP32[i10 + 8 >> 2]; 9745 } 9746 i10 = HEAP32[i3 >> 2] | 0; 9747 } 9748 if ((i10 | 0) != 0) { 9749 break; 9750 } 9751 HEAP32[i8 >> 2] = -1; 9752 i37 = 0; 9753 STACKTOP = i1; 9754 return i37 | 0; 9755 } 9756 } 9757 if ((HEAP32[i3 >> 2] | 0) != 0) { 9758 i37 = 0; 9759 STACKTOP = i1; 9760 return i37 | 0; 9761 } 9762 HEAP32[i8 >> 2] = -1; 9763 i37 = 0; 9764 STACKTOP = i1; 9765 return i37 | 0; 9766 } 9767 } while (0); 9768 if (!i9) { 9769 i37 = 0; 9770 STACKTOP = i1; 9771 return i37 | 0; 9772 } 9773 i8 = i7 + 24 | 0; 9774 i10 = HEAP32[i8 >> 2] | 0; 9775 if ((i10 | 0) < 1) { 9776 i37 = 1; 9777 STACKTOP = i1; 9778 return i37 | 0; 9779 } 9780 i11 = i2 + 48 | 0; 9781 i9 = HEAP32[i11 >> 2] | 0; 9782 if ((i10 | 0) == 2) { 9783 i34 = HEAP32[i19 >> 2] | 0; 9784 HEAP32[i19 >> 2] = i34 + 1; 9785 i36 = i7 + 8 | 0; 9786 HEAP8[(HEAP32[i36 >> 2] | 0) + i34 | 0] = i9; 9787 i34 = (HEAP32[i11 >> 2] | 0) >>> 8 & 255; 9788 i35 = HEAP32[i19 >> 2] | 0; 9789 HEAP32[i19 >> 2] = i35 + 1; 9790 HEAP8[(HEAP32[i36 >> 2] | 0) + i35 | 0] = i34; 9791 i35 = (HEAP32[i11 >> 2] | 0) >>> 16 & 255; 9792 i34 = HEAP32[i19 >> 2] | 0; 9793 HEAP32[i19 >> 2] = i34 + 1; 9794 HEAP8[(HEAP32[i36 >> 2] | 0) + i34 | 0] = i35; 9795 i34 = (HEAP32[i11 >> 2] | 0) >>> 24 & 255; 9796 i35 = HEAP32[i19 >> 2] | 0; 9797 HEAP32[i19 >> 2] = i35 + 1; 9798 HEAP8[(HEAP32[i36 >> 2] | 0) + i35 | 0] = i34; 9799 i35 = i2 + 8 | 0; 9800 i34 = HEAP32[i35 >> 2] & 255; 9801 i37 = HEAP32[i19 >> 2] | 0; 9802 HEAP32[i19 >> 2] = i37 + 1; 9803 HEAP8[(HEAP32[i36 >> 2] | 0) + i37 | 0] = i34; 9804 i37 = (HEAP32[i35 >> 2] | 0) >>> 8 & 255; 9805 i34 = HEAP32[i19 >> 2] | 0; 9806 HEAP32[i19 >> 2] = i34 + 1; 9807 HEAP8[(HEAP32[i36 >> 2] | 0) + i34 | 0] = i37; 9808 i34 = (HEAP32[i35 >> 2] | 0) >>> 16 & 255; 9809 i37 = HEAP32[i19 >> 2] | 0; 9810 HEAP32[i19 >> 2] = i37 + 1; 9811 HEAP8[(HEAP32[i36 >> 2] | 0) + i37 | 0] = i34; 9812 i35 = (HEAP32[i35 >> 2] | 0) >>> 24 & 255; 9813 i37 = HEAP32[i19 >> 2] | 0; 9814 HEAP32[i19 >> 2] = i37 + 1; 9815 HEAP8[(HEAP32[i36 >> 2] | 0) + i37 | 0] = i35; 9816 } else { 9817 i35 = HEAP32[i19 >> 2] | 0; 9818 HEAP32[i19 >> 2] = i35 + 1; 9819 i36 = i7 + 8 | 0; 9820 HEAP8[(HEAP32[i36 >> 2] | 0) + i35 | 0] = i9 >>> 24; 9821 i35 = HEAP32[i19 >> 2] | 0; 9822 HEAP32[i19 >> 2] = i35 + 1; 9823 HEAP8[(HEAP32[i36 >> 2] | 0) + i35 | 0] = i9 >>> 16; 9824 i35 = HEAP32[i11 >> 2] | 0; 9825 i37 = HEAP32[i19 >> 2] | 0; 9826 HEAP32[i19 >> 2] = i37 + 1; 9827 HEAP8[(HEAP32[i36 >> 2] | 0) + i37 | 0] = i35 >>> 8; 9828 i37 = HEAP32[i19 >> 2] | 0; 9829 HEAP32[i19 >> 2] = i37 + 1; 9830 HEAP8[(HEAP32[i36 >> 2] | 0) + i37 | 0] = i35; 9831 } 9832 i7 = HEAP32[i5 >> 2] | 0; 9833 i10 = HEAP32[i7 + 20 >> 2] | 0; 9834 i9 = HEAP32[i3 >> 2] | 0; 9835 i9 = i10 >>> 0 > i9 >>> 0 ? i9 : i10; 9836 if ((i9 | 0) != 0 ? (_memcpy(HEAP32[i4 >> 2] | 0, HEAP32[i7 + 16 >> 2] | 0, i9 | 0) | 0, HEAP32[i4 >> 2] = (HEAP32[i4 >> 2] | 0) + i9, i6 = (HEAP32[i5 >> 2] | 0) + 16 | 0, HEAP32[i6 >> 2] = (HEAP32[i6 >> 2] | 0) + i9, i6 = i2 + 20 | 0, HEAP32[i6 >> 2] = (HEAP32[i6 >> 2] | 0) + i9, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) - i9, i6 = HEAP32[i5 >> 2] | 0, i36 = i6 + 20 | 0, i37 = HEAP32[i36 >> 2] | 0, HEAP32[i36 >> 2] = i37 - i9, (i37 | 0) == (i9 | 0)) : 0) { 9837 HEAP32[i6 + 16 >> 2] = HEAP32[i6 + 8 >> 2]; 9838 } 9839 i2 = HEAP32[i8 >> 2] | 0; 9840 if ((i2 | 0) > 0) { 9841 HEAP32[i8 >> 2] = 0 - i2; 9842 } 9843 i37 = (HEAP32[i19 >> 2] | 0) == 0 | 0; 9844 STACKTOP = i1; 9845 return i37 | 0; 9846 } 9847 } 9848 } while (0); 9849 HEAP32[i2 + 24 >> 2] = HEAP32[3168 >> 2]; 9850 i37 = -2; 9851 STACKTOP = i1; 9852 return i37 | 0; 9853} 9854function _free(i7) { 9855 i7 = i7 | 0; 9856 var i1 = 0, i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0; 9857 i1 = STACKTOP; 9858 if ((i7 | 0) == 0) { 9859 STACKTOP = i1; 9860 return; 9861 } 9862 i15 = i7 + -8 | 0; 9863 i16 = HEAP32[14488 >> 2] | 0; 9864 if (i15 >>> 0 < i16 >>> 0) { 9865 _abort(); 9866 } 9867 i13 = HEAP32[i7 + -4 >> 2] | 0; 9868 i12 = i13 & 3; 9869 if ((i12 | 0) == 1) { 9870 _abort(); 9871 } 9872 i8 = i13 & -8; 9873 i6 = i7 + (i8 + -8) | 0; 9874 do { 9875 if ((i13 & 1 | 0) == 0) { 9876 i19 = HEAP32[i15 >> 2] | 0; 9877 if ((i12 | 0) == 0) { 9878 STACKTOP = i1; 9879 return; 9880 } 9881 i15 = -8 - i19 | 0; 9882 i13 = i7 + i15 | 0; 9883 i12 = i19 + i8 | 0; 9884 if (i13 >>> 0 < i16 >>> 0) { 9885 _abort(); 9886 } 9887 if ((i13 | 0) == (HEAP32[14492 >> 2] | 0)) { 9888 i2 = i7 + (i8 + -4) | 0; 9889 if ((HEAP32[i2 >> 2] & 3 | 0) != 3) { 9890 i2 = i13; 9891 i11 = i12; 9892 break; 9893 } 9894 HEAP32[14480 >> 2] = i12; 9895 HEAP32[i2 >> 2] = HEAP32[i2 >> 2] & -2; 9896 HEAP32[i7 + (i15 + 4) >> 2] = i12 | 1; 9897 HEAP32[i6 >> 2] = i12; 9898 STACKTOP = i1; 9899 return; 9900 } 9901 i18 = i19 >>> 3; 9902 if (i19 >>> 0 < 256) { 9903 i2 = HEAP32[i7 + (i15 + 8) >> 2] | 0; 9904 i11 = HEAP32[i7 + (i15 + 12) >> 2] | 0; 9905 i14 = 14512 + (i18 << 1 << 2) | 0; 9906 if ((i2 | 0) != (i14 | 0)) { 9907 if (i2 >>> 0 < i16 >>> 0) { 9908 _abort(); 9909 } 9910 if ((HEAP32[i2 + 12 >> 2] | 0) != (i13 | 0)) { 9911 _abort(); 9912 } 9913 } 9914 if ((i11 | 0) == (i2 | 0)) { 9915 HEAP32[3618] = HEAP32[3618] & ~(1 << i18); 9916 i2 = i13; 9917 i11 = i12; 9918 break; 9919 } 9920 if ((i11 | 0) != (i14 | 0)) { 9921 if (i11 >>> 0 < i16 >>> 0) { 9922 _abort(); 9923 } 9924 i14 = i11 + 8 | 0; 9925 if ((HEAP32[i14 >> 2] | 0) == (i13 | 0)) { 9926 i17 = i14; 9927 } else { 9928 _abort(); 9929 } 9930 } else { 9931 i17 = i11 + 8 | 0; 9932 } 9933 HEAP32[i2 + 12 >> 2] = i11; 9934 HEAP32[i17 >> 2] = i2; 9935 i2 = i13; 9936 i11 = i12; 9937 break; 9938 } 9939 i17 = HEAP32[i7 + (i15 + 24) >> 2] | 0; 9940 i18 = HEAP32[i7 + (i15 + 12) >> 2] | 0; 9941 do { 9942 if ((i18 | 0) == (i13 | 0)) { 9943 i19 = i7 + (i15 + 20) | 0; 9944 i18 = HEAP32[i19 >> 2] | 0; 9945 if ((i18 | 0) == 0) { 9946 i19 = i7 + (i15 + 16) | 0; 9947 i18 = HEAP32[i19 >> 2] | 0; 9948 if ((i18 | 0) == 0) { 9949 i14 = 0; 9950 break; 9951 } 9952 } 9953 while (1) { 9954 i21 = i18 + 20 | 0; 9955 i20 = HEAP32[i21 >> 2] | 0; 9956 if ((i20 | 0) != 0) { 9957 i18 = i20; 9958 i19 = i21; 9959 continue; 9960 } 9961 i20 = i18 + 16 | 0; 9962 i21 = HEAP32[i20 >> 2] | 0; 9963 if ((i21 | 0) == 0) { 9964 break; 9965 } else { 9966 i18 = i21; 9967 i19 = i20; 9968 } 9969 } 9970 if (i19 >>> 0 < i16 >>> 0) { 9971 _abort(); 9972 } else { 9973 HEAP32[i19 >> 2] = 0; 9974 i14 = i18; 9975 break; 9976 } 9977 } else { 9978 i19 = HEAP32[i7 + (i15 + 8) >> 2] | 0; 9979 if (i19 >>> 0 < i16 >>> 0) { 9980 _abort(); 9981 } 9982 i16 = i19 + 12 | 0; 9983 if ((HEAP32[i16 >> 2] | 0) != (i13 | 0)) { 9984 _abort(); 9985 } 9986 i20 = i18 + 8 | 0; 9987 if ((HEAP32[i20 >> 2] | 0) == (i13 | 0)) { 9988 HEAP32[i16 >> 2] = i18; 9989 HEAP32[i20 >> 2] = i19; 9990 i14 = i18; 9991 break; 9992 } else { 9993 _abort(); 9994 } 9995 } 9996 } while (0); 9997 if ((i17 | 0) != 0) { 9998 i18 = HEAP32[i7 + (i15 + 28) >> 2] | 0; 9999 i16 = 14776 + (i18 << 2) | 0; 10000 if ((i13 | 0) == (HEAP32[i16 >> 2] | 0)) { 10001 HEAP32[i16 >> 2] = i14; 10002 if ((i14 | 0) == 0) { 10003 HEAP32[14476 >> 2] = HEAP32[14476 >> 2] & ~(1 << i18); 10004 i2 = i13; 10005 i11 = i12; 10006 break; 10007 } 10008 } else { 10009 if (i17 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10010 _abort(); 10011 } 10012 i16 = i17 + 16 | 0; 10013 if ((HEAP32[i16 >> 2] | 0) == (i13 | 0)) { 10014 HEAP32[i16 >> 2] = i14; 10015 } else { 10016 HEAP32[i17 + 20 >> 2] = i14; 10017 } 10018 if ((i14 | 0) == 0) { 10019 i2 = i13; 10020 i11 = i12; 10021 break; 10022 } 10023 } 10024 if (i14 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10025 _abort(); 10026 } 10027 HEAP32[i14 + 24 >> 2] = i17; 10028 i16 = HEAP32[i7 + (i15 + 16) >> 2] | 0; 10029 do { 10030 if ((i16 | 0) != 0) { 10031 if (i16 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10032 _abort(); 10033 } else { 10034 HEAP32[i14 + 16 >> 2] = i16; 10035 HEAP32[i16 + 24 >> 2] = i14; 10036 break; 10037 } 10038 } 10039 } while (0); 10040 i15 = HEAP32[i7 + (i15 + 20) >> 2] | 0; 10041 if ((i15 | 0) != 0) { 10042 if (i15 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10043 _abort(); 10044 } else { 10045 HEAP32[i14 + 20 >> 2] = i15; 10046 HEAP32[i15 + 24 >> 2] = i14; 10047 i2 = i13; 10048 i11 = i12; 10049 break; 10050 } 10051 } else { 10052 i2 = i13; 10053 i11 = i12; 10054 } 10055 } else { 10056 i2 = i13; 10057 i11 = i12; 10058 } 10059 } else { 10060 i2 = i15; 10061 i11 = i8; 10062 } 10063 } while (0); 10064 if (!(i2 >>> 0 < i6 >>> 0)) { 10065 _abort(); 10066 } 10067 i12 = i7 + (i8 + -4) | 0; 10068 i13 = HEAP32[i12 >> 2] | 0; 10069 if ((i13 & 1 | 0) == 0) { 10070 _abort(); 10071 } 10072 if ((i13 & 2 | 0) == 0) { 10073 if ((i6 | 0) == (HEAP32[14496 >> 2] | 0)) { 10074 i21 = (HEAP32[14484 >> 2] | 0) + i11 | 0; 10075 HEAP32[14484 >> 2] = i21; 10076 HEAP32[14496 >> 2] = i2; 10077 HEAP32[i2 + 4 >> 2] = i21 | 1; 10078 if ((i2 | 0) != (HEAP32[14492 >> 2] | 0)) { 10079 STACKTOP = i1; 10080 return; 10081 } 10082 HEAP32[14492 >> 2] = 0; 10083 HEAP32[14480 >> 2] = 0; 10084 STACKTOP = i1; 10085 return; 10086 } 10087 if ((i6 | 0) == (HEAP32[14492 >> 2] | 0)) { 10088 i21 = (HEAP32[14480 >> 2] | 0) + i11 | 0; 10089 HEAP32[14480 >> 2] = i21; 10090 HEAP32[14492 >> 2] = i2; 10091 HEAP32[i2 + 4 >> 2] = i21 | 1; 10092 HEAP32[i2 + i21 >> 2] = i21; 10093 STACKTOP = i1; 10094 return; 10095 } 10096 i11 = (i13 & -8) + i11 | 0; 10097 i12 = i13 >>> 3; 10098 do { 10099 if (!(i13 >>> 0 < 256)) { 10100 i10 = HEAP32[i7 + (i8 + 16) >> 2] | 0; 10101 i15 = HEAP32[i7 + (i8 | 4) >> 2] | 0; 10102 do { 10103 if ((i15 | 0) == (i6 | 0)) { 10104 i13 = i7 + (i8 + 12) | 0; 10105 i12 = HEAP32[i13 >> 2] | 0; 10106 if ((i12 | 0) == 0) { 10107 i13 = i7 + (i8 + 8) | 0; 10108 i12 = HEAP32[i13 >> 2] | 0; 10109 if ((i12 | 0) == 0) { 10110 i9 = 0; 10111 break; 10112 } 10113 } 10114 while (1) { 10115 i14 = i12 + 20 | 0; 10116 i15 = HEAP32[i14 >> 2] | 0; 10117 if ((i15 | 0) != 0) { 10118 i12 = i15; 10119 i13 = i14; 10120 continue; 10121 } 10122 i14 = i12 + 16 | 0; 10123 i15 = HEAP32[i14 >> 2] | 0; 10124 if ((i15 | 0) == 0) { 10125 break; 10126 } else { 10127 i12 = i15; 10128 i13 = i14; 10129 } 10130 } 10131 if (i13 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10132 _abort(); 10133 } else { 10134 HEAP32[i13 >> 2] = 0; 10135 i9 = i12; 10136 break; 10137 } 10138 } else { 10139 i13 = HEAP32[i7 + i8 >> 2] | 0; 10140 if (i13 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10141 _abort(); 10142 } 10143 i14 = i13 + 12 | 0; 10144 if ((HEAP32[i14 >> 2] | 0) != (i6 | 0)) { 10145 _abort(); 10146 } 10147 i12 = i15 + 8 | 0; 10148 if ((HEAP32[i12 >> 2] | 0) == (i6 | 0)) { 10149 HEAP32[i14 >> 2] = i15; 10150 HEAP32[i12 >> 2] = i13; 10151 i9 = i15; 10152 break; 10153 } else { 10154 _abort(); 10155 } 10156 } 10157 } while (0); 10158 if ((i10 | 0) != 0) { 10159 i12 = HEAP32[i7 + (i8 + 20) >> 2] | 0; 10160 i13 = 14776 + (i12 << 2) | 0; 10161 if ((i6 | 0) == (HEAP32[i13 >> 2] | 0)) { 10162 HEAP32[i13 >> 2] = i9; 10163 if ((i9 | 0) == 0) { 10164 HEAP32[14476 >> 2] = HEAP32[14476 >> 2] & ~(1 << i12); 10165 break; 10166 } 10167 } else { 10168 if (i10 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10169 _abort(); 10170 } 10171 i12 = i10 + 16 | 0; 10172 if ((HEAP32[i12 >> 2] | 0) == (i6 | 0)) { 10173 HEAP32[i12 >> 2] = i9; 10174 } else { 10175 HEAP32[i10 + 20 >> 2] = i9; 10176 } 10177 if ((i9 | 0) == 0) { 10178 break; 10179 } 10180 } 10181 if (i9 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10182 _abort(); 10183 } 10184 HEAP32[i9 + 24 >> 2] = i10; 10185 i6 = HEAP32[i7 + (i8 + 8) >> 2] | 0; 10186 do { 10187 if ((i6 | 0) != 0) { 10188 if (i6 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10189 _abort(); 10190 } else { 10191 HEAP32[i9 + 16 >> 2] = i6; 10192 HEAP32[i6 + 24 >> 2] = i9; 10193 break; 10194 } 10195 } 10196 } while (0); 10197 i6 = HEAP32[i7 + (i8 + 12) >> 2] | 0; 10198 if ((i6 | 0) != 0) { 10199 if (i6 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10200 _abort(); 10201 } else { 10202 HEAP32[i9 + 20 >> 2] = i6; 10203 HEAP32[i6 + 24 >> 2] = i9; 10204 break; 10205 } 10206 } 10207 } 10208 } else { 10209 i9 = HEAP32[i7 + i8 >> 2] | 0; 10210 i7 = HEAP32[i7 + (i8 | 4) >> 2] | 0; 10211 i8 = 14512 + (i12 << 1 << 2) | 0; 10212 if ((i9 | 0) != (i8 | 0)) { 10213 if (i9 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10214 _abort(); 10215 } 10216 if ((HEAP32[i9 + 12 >> 2] | 0) != (i6 | 0)) { 10217 _abort(); 10218 } 10219 } 10220 if ((i7 | 0) == (i9 | 0)) { 10221 HEAP32[3618] = HEAP32[3618] & ~(1 << i12); 10222 break; 10223 } 10224 if ((i7 | 0) != (i8 | 0)) { 10225 if (i7 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10226 _abort(); 10227 } 10228 i8 = i7 + 8 | 0; 10229 if ((HEAP32[i8 >> 2] | 0) == (i6 | 0)) { 10230 i10 = i8; 10231 } else { 10232 _abort(); 10233 } 10234 } else { 10235 i10 = i7 + 8 | 0; 10236 } 10237 HEAP32[i9 + 12 >> 2] = i7; 10238 HEAP32[i10 >> 2] = i9; 10239 } 10240 } while (0); 10241 HEAP32[i2 + 4 >> 2] = i11 | 1; 10242 HEAP32[i2 + i11 >> 2] = i11; 10243 if ((i2 | 0) == (HEAP32[14492 >> 2] | 0)) { 10244 HEAP32[14480 >> 2] = i11; 10245 STACKTOP = i1; 10246 return; 10247 } 10248 } else { 10249 HEAP32[i12 >> 2] = i13 & -2; 10250 HEAP32[i2 + 4 >> 2] = i11 | 1; 10251 HEAP32[i2 + i11 >> 2] = i11; 10252 } 10253 i6 = i11 >>> 3; 10254 if (i11 >>> 0 < 256) { 10255 i7 = i6 << 1; 10256 i3 = 14512 + (i7 << 2) | 0; 10257 i8 = HEAP32[3618] | 0; 10258 i6 = 1 << i6; 10259 if ((i8 & i6 | 0) != 0) { 10260 i6 = 14512 + (i7 + 2 << 2) | 0; 10261 i7 = HEAP32[i6 >> 2] | 0; 10262 if (i7 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10263 _abort(); 10264 } else { 10265 i4 = i6; 10266 i5 = i7; 10267 } 10268 } else { 10269 HEAP32[3618] = i8 | i6; 10270 i4 = 14512 + (i7 + 2 << 2) | 0; 10271 i5 = i3; 10272 } 10273 HEAP32[i4 >> 2] = i2; 10274 HEAP32[i5 + 12 >> 2] = i2; 10275 HEAP32[i2 + 8 >> 2] = i5; 10276 HEAP32[i2 + 12 >> 2] = i3; 10277 STACKTOP = i1; 10278 return; 10279 } 10280 i4 = i11 >>> 8; 10281 if ((i4 | 0) != 0) { 10282 if (i11 >>> 0 > 16777215) { 10283 i4 = 31; 10284 } else { 10285 i20 = (i4 + 1048320 | 0) >>> 16 & 8; 10286 i21 = i4 << i20; 10287 i19 = (i21 + 520192 | 0) >>> 16 & 4; 10288 i21 = i21 << i19; 10289 i4 = (i21 + 245760 | 0) >>> 16 & 2; 10290 i4 = 14 - (i19 | i20 | i4) + (i21 << i4 >>> 15) | 0; 10291 i4 = i11 >>> (i4 + 7 | 0) & 1 | i4 << 1; 10292 } 10293 } else { 10294 i4 = 0; 10295 } 10296 i5 = 14776 + (i4 << 2) | 0; 10297 HEAP32[i2 + 28 >> 2] = i4; 10298 HEAP32[i2 + 20 >> 2] = 0; 10299 HEAP32[i2 + 16 >> 2] = 0; 10300 i7 = HEAP32[14476 >> 2] | 0; 10301 i6 = 1 << i4; 10302 L199 : do { 10303 if ((i7 & i6 | 0) != 0) { 10304 i5 = HEAP32[i5 >> 2] | 0; 10305 if ((i4 | 0) == 31) { 10306 i4 = 0; 10307 } else { 10308 i4 = 25 - (i4 >>> 1) | 0; 10309 } 10310 L204 : do { 10311 if ((HEAP32[i5 + 4 >> 2] & -8 | 0) != (i11 | 0)) { 10312 i4 = i11 << i4; 10313 i7 = i5; 10314 while (1) { 10315 i6 = i7 + (i4 >>> 31 << 2) + 16 | 0; 10316 i5 = HEAP32[i6 >> 2] | 0; 10317 if ((i5 | 0) == 0) { 10318 break; 10319 } 10320 if ((HEAP32[i5 + 4 >> 2] & -8 | 0) == (i11 | 0)) { 10321 i3 = i5; 10322 break L204; 10323 } else { 10324 i4 = i4 << 1; 10325 i7 = i5; 10326 } 10327 } 10328 if (i6 >>> 0 < (HEAP32[14488 >> 2] | 0) >>> 0) { 10329 _abort(); 10330 } else { 10331 HEAP32[i6 >> 2] = i2; 10332 HEAP32[i2 + 24 >> 2] = i7; 10333 HEAP32[i2 + 12 >> 2] = i2; 10334 HEAP32[i2 + 8 >> 2] = i2; 10335 break L199; 10336 } 10337 } else { 10338 i3 = i5; 10339 } 10340 } while (0); 10341 i5 = i3 + 8 | 0; 10342 i4 = HEAP32[i5 >> 2] | 0; 10343 i6 = HEAP32[14488 >> 2] | 0; 10344 if (i3 >>> 0 < i6 >>> 0) { 10345 _abort(); 10346 } 10347 if (i4 >>> 0 < i6 >>> 0) { 10348 _abort(); 10349 } else { 10350 HEAP32[i4 + 12 >> 2] = i2; 10351 HEAP32[i5 >> 2] = i2; 10352 HEAP32[i2 + 8 >> 2] = i4; 10353 HEAP32[i2 + 12 >> 2] = i3; 10354 HEAP32[i2 + 24 >> 2] = 0; 10355 break; 10356 } 10357 } else { 10358 HEAP32[14476 >> 2] = i7 | i6; 10359 HEAP32[i5 >> 2] = i2; 10360 HEAP32[i2 + 24 >> 2] = i5; 10361 HEAP32[i2 + 12 >> 2] = i2; 10362 HEAP32[i2 + 8 >> 2] = i2; 10363 } 10364 } while (0); 10365 i21 = (HEAP32[14504 >> 2] | 0) + -1 | 0; 10366 HEAP32[14504 >> 2] = i21; 10367 if ((i21 | 0) == 0) { 10368 i2 = 14928 | 0; 10369 } else { 10370 STACKTOP = i1; 10371 return; 10372 } 10373 while (1) { 10374 i2 = HEAP32[i2 >> 2] | 0; 10375 if ((i2 | 0) == 0) { 10376 break; 10377 } else { 10378 i2 = i2 + 8 | 0; 10379 } 10380 } 10381 HEAP32[14504 >> 2] = -1; 10382 STACKTOP = i1; 10383 return; 10384} 10385function _build_tree(i4, i9) { 10386 i4 = i4 | 0; 10387 i9 = i9 | 0; 10388 var i1 = 0, i2 = 0, i3 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0; 10389 i2 = STACKTOP; 10390 STACKTOP = STACKTOP + 32 | 0; 10391 i1 = i2; 10392 i3 = HEAP32[i9 >> 2] | 0; 10393 i7 = i9 + 8 | 0; 10394 i11 = HEAP32[i7 >> 2] | 0; 10395 i12 = HEAP32[i11 >> 2] | 0; 10396 i11 = HEAP32[i11 + 12 >> 2] | 0; 10397 i8 = i4 + 5200 | 0; 10398 HEAP32[i8 >> 2] = 0; 10399 i6 = i4 + 5204 | 0; 10400 HEAP32[i6 >> 2] = 573; 10401 if ((i11 | 0) > 0) { 10402 i5 = -1; 10403 i13 = 0; 10404 do { 10405 if ((HEAP16[i3 + (i13 << 2) >> 1] | 0) == 0) { 10406 HEAP16[i3 + (i13 << 2) + 2 >> 1] = 0; 10407 } else { 10408 i5 = (HEAP32[i8 >> 2] | 0) + 1 | 0; 10409 HEAP32[i8 >> 2] = i5; 10410 HEAP32[i4 + (i5 << 2) + 2908 >> 2] = i13; 10411 HEAP8[i4 + i13 + 5208 | 0] = 0; 10412 i5 = i13; 10413 } 10414 i13 = i13 + 1 | 0; 10415 } while ((i13 | 0) != (i11 | 0)); 10416 i14 = HEAP32[i8 >> 2] | 0; 10417 if ((i14 | 0) < 2) { 10418 i10 = 3; 10419 } 10420 } else { 10421 i14 = 0; 10422 i5 = -1; 10423 i10 = 3; 10424 } 10425 if ((i10 | 0) == 3) { 10426 i10 = i4 + 5800 | 0; 10427 i13 = i4 + 5804 | 0; 10428 if ((i12 | 0) == 0) { 10429 do { 10430 i12 = (i5 | 0) < 2; 10431 i13 = i5 + 1 | 0; 10432 i5 = i12 ? i13 : i5; 10433 i23 = i12 ? i13 : 0; 10434 i14 = i14 + 1 | 0; 10435 HEAP32[i8 >> 2] = i14; 10436 HEAP32[i4 + (i14 << 2) + 2908 >> 2] = i23; 10437 HEAP16[i3 + (i23 << 2) >> 1] = 1; 10438 HEAP8[i4 + i23 + 5208 | 0] = 0; 10439 HEAP32[i10 >> 2] = (HEAP32[i10 >> 2] | 0) + -1; 10440 i14 = HEAP32[i8 >> 2] | 0; 10441 } while ((i14 | 0) < 2); 10442 } else { 10443 do { 10444 i15 = (i5 | 0) < 2; 10445 i16 = i5 + 1 | 0; 10446 i5 = i15 ? i16 : i5; 10447 i23 = i15 ? i16 : 0; 10448 i14 = i14 + 1 | 0; 10449 HEAP32[i8 >> 2] = i14; 10450 HEAP32[i4 + (i14 << 2) + 2908 >> 2] = i23; 10451 HEAP16[i3 + (i23 << 2) >> 1] = 1; 10452 HEAP8[i4 + i23 + 5208 | 0] = 0; 10453 HEAP32[i10 >> 2] = (HEAP32[i10 >> 2] | 0) + -1; 10454 HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) - (HEAPU16[i12 + (i23 << 2) + 2 >> 1] | 0); 10455 i14 = HEAP32[i8 >> 2] | 0; 10456 } while ((i14 | 0) < 2); 10457 } 10458 } 10459 i10 = i9 + 4 | 0; 10460 HEAP32[i10 >> 2] = i5; 10461 i12 = HEAP32[i8 >> 2] | 0; 10462 if ((i12 | 0) > 1) { 10463 i18 = i12; 10464 i13 = (i12 | 0) / 2 | 0; 10465 do { 10466 i12 = HEAP32[i4 + (i13 << 2) + 2908 >> 2] | 0; 10467 i14 = i4 + i12 + 5208 | 0; 10468 i17 = i13 << 1; 10469 L21 : do { 10470 if ((i17 | 0) > (i18 | 0)) { 10471 i15 = i13; 10472 } else { 10473 i16 = i3 + (i12 << 2) | 0; 10474 i15 = i13; 10475 while (1) { 10476 do { 10477 if ((i17 | 0) < (i18 | 0)) { 10478 i18 = i17 | 1; 10479 i19 = HEAP32[i4 + (i18 << 2) + 2908 >> 2] | 0; 10480 i22 = HEAP16[i3 + (i19 << 2) >> 1] | 0; 10481 i20 = HEAP32[i4 + (i17 << 2) + 2908 >> 2] | 0; 10482 i21 = HEAP16[i3 + (i20 << 2) >> 1] | 0; 10483 if (!((i22 & 65535) < (i21 & 65535))) { 10484 if (!(i22 << 16 >> 16 == i21 << 16 >> 16)) { 10485 break; 10486 } 10487 if ((HEAPU8[i4 + i19 + 5208 | 0] | 0) > (HEAPU8[i4 + i20 + 5208 | 0] | 0)) { 10488 break; 10489 } 10490 } 10491 i17 = i18; 10492 } 10493 } while (0); 10494 i19 = HEAP16[i16 >> 1] | 0; 10495 i18 = HEAP32[i4 + (i17 << 2) + 2908 >> 2] | 0; 10496 i20 = HEAP16[i3 + (i18 << 2) >> 1] | 0; 10497 if ((i19 & 65535) < (i20 & 65535)) { 10498 break L21; 10499 } 10500 if (i19 << 16 >> 16 == i20 << 16 >> 16 ? (HEAPU8[i14] | 0) <= (HEAPU8[i4 + i18 + 5208 | 0] | 0) : 0) { 10501 break L21; 10502 } 10503 HEAP32[i4 + (i15 << 2) + 2908 >> 2] = i18; 10504 i19 = i17 << 1; 10505 i18 = HEAP32[i8 >> 2] | 0; 10506 if ((i19 | 0) > (i18 | 0)) { 10507 i15 = i17; 10508 break; 10509 } else { 10510 i15 = i17; 10511 i17 = i19; 10512 } 10513 } 10514 } 10515 } while (0); 10516 HEAP32[i4 + (i15 << 2) + 2908 >> 2] = i12; 10517 i13 = i13 + -1 | 0; 10518 i18 = HEAP32[i8 >> 2] | 0; 10519 } while ((i13 | 0) > 0); 10520 } else { 10521 i18 = i12; 10522 } 10523 i12 = i4 + 2912 | 0; 10524 while (1) { 10525 i13 = HEAP32[i12 >> 2] | 0; 10526 i20 = i18 + -1 | 0; 10527 HEAP32[i8 >> 2] = i20; 10528 i14 = HEAP32[i4 + (i18 << 2) + 2908 >> 2] | 0; 10529 HEAP32[i12 >> 2] = i14; 10530 i15 = i4 + i14 + 5208 | 0; 10531 L40 : do { 10532 if ((i18 | 0) < 3) { 10533 i17 = 1; 10534 } else { 10535 i16 = i3 + (i14 << 2) | 0; 10536 i17 = 1; 10537 i18 = 2; 10538 while (1) { 10539 do { 10540 if ((i18 | 0) < (i20 | 0)) { 10541 i22 = i18 | 1; 10542 i21 = HEAP32[i4 + (i22 << 2) + 2908 >> 2] | 0; 10543 i23 = HEAP16[i3 + (i21 << 2) >> 1] | 0; 10544 i20 = HEAP32[i4 + (i18 << 2) + 2908 >> 2] | 0; 10545 i19 = HEAP16[i3 + (i20 << 2) >> 1] | 0; 10546 if (!((i23 & 65535) < (i19 & 65535))) { 10547 if (!(i23 << 16 >> 16 == i19 << 16 >> 16)) { 10548 break; 10549 } 10550 if ((HEAPU8[i4 + i21 + 5208 | 0] | 0) > (HEAPU8[i4 + i20 + 5208 | 0] | 0)) { 10551 break; 10552 } 10553 } 10554 i18 = i22; 10555 } 10556 } while (0); 10557 i21 = HEAP16[i16 >> 1] | 0; 10558 i20 = HEAP32[i4 + (i18 << 2) + 2908 >> 2] | 0; 10559 i19 = HEAP16[i3 + (i20 << 2) >> 1] | 0; 10560 if ((i21 & 65535) < (i19 & 65535)) { 10561 break L40; 10562 } 10563 if (i21 << 16 >> 16 == i19 << 16 >> 16 ? (HEAPU8[i15] | 0) <= (HEAPU8[i4 + i20 + 5208 | 0] | 0) : 0) { 10564 break L40; 10565 } 10566 HEAP32[i4 + (i17 << 2) + 2908 >> 2] = i20; 10567 i19 = i18 << 1; 10568 i20 = HEAP32[i8 >> 2] | 0; 10569 if ((i19 | 0) > (i20 | 0)) { 10570 i17 = i18; 10571 break; 10572 } else { 10573 i17 = i18; 10574 i18 = i19; 10575 } 10576 } 10577 } 10578 } while (0); 10579 HEAP32[i4 + (i17 << 2) + 2908 >> 2] = i14; 10580 i17 = HEAP32[i12 >> 2] | 0; 10581 i14 = (HEAP32[i6 >> 2] | 0) + -1 | 0; 10582 HEAP32[i6 >> 2] = i14; 10583 HEAP32[i4 + (i14 << 2) + 2908 >> 2] = i13; 10584 i14 = (HEAP32[i6 >> 2] | 0) + -1 | 0; 10585 HEAP32[i6 >> 2] = i14; 10586 HEAP32[i4 + (i14 << 2) + 2908 >> 2] = i17; 10587 i14 = i3 + (i11 << 2) | 0; 10588 HEAP16[i14 >> 1] = (HEAPU16[i3 + (i17 << 2) >> 1] | 0) + (HEAPU16[i3 + (i13 << 2) >> 1] | 0); 10589 i18 = HEAP8[i4 + i13 + 5208 | 0] | 0; 10590 i16 = HEAP8[i4 + i17 + 5208 | 0] | 0; 10591 i15 = i4 + i11 + 5208 | 0; 10592 HEAP8[i15] = (((i18 & 255) < (i16 & 255) ? i16 : i18) & 255) + 1; 10593 i19 = i11 & 65535; 10594 HEAP16[i3 + (i17 << 2) + 2 >> 1] = i19; 10595 HEAP16[i3 + (i13 << 2) + 2 >> 1] = i19; 10596 i13 = i11 + 1 | 0; 10597 HEAP32[i12 >> 2] = i11; 10598 i19 = HEAP32[i8 >> 2] | 0; 10599 L56 : do { 10600 if ((i19 | 0) < 2) { 10601 i16 = 1; 10602 } else { 10603 i16 = 1; 10604 i17 = 2; 10605 while (1) { 10606 do { 10607 if ((i17 | 0) < (i19 | 0)) { 10608 i21 = i17 | 1; 10609 i22 = HEAP32[i4 + (i21 << 2) + 2908 >> 2] | 0; 10610 i19 = HEAP16[i3 + (i22 << 2) >> 1] | 0; 10611 i18 = HEAP32[i4 + (i17 << 2) + 2908 >> 2] | 0; 10612 i20 = HEAP16[i3 + (i18 << 2) >> 1] | 0; 10613 if (!((i19 & 65535) < (i20 & 65535))) { 10614 if (!(i19 << 16 >> 16 == i20 << 16 >> 16)) { 10615 break; 10616 } 10617 if ((HEAPU8[i4 + i22 + 5208 | 0] | 0) > (HEAPU8[i4 + i18 + 5208 | 0] | 0)) { 10618 break; 10619 } 10620 } 10621 i17 = i21; 10622 } 10623 } while (0); 10624 i19 = HEAP16[i14 >> 1] | 0; 10625 i20 = HEAP32[i4 + (i17 << 2) + 2908 >> 2] | 0; 10626 i18 = HEAP16[i3 + (i20 << 2) >> 1] | 0; 10627 if ((i19 & 65535) < (i18 & 65535)) { 10628 break L56; 10629 } 10630 if (i19 << 16 >> 16 == i18 << 16 >> 16 ? (HEAPU8[i15] | 0) <= (HEAPU8[i4 + i20 + 5208 | 0] | 0) : 0) { 10631 break L56; 10632 } 10633 HEAP32[i4 + (i16 << 2) + 2908 >> 2] = i20; 10634 i18 = i17 << 1; 10635 i19 = HEAP32[i8 >> 2] | 0; 10636 if ((i18 | 0) > (i19 | 0)) { 10637 i16 = i17; 10638 break; 10639 } else { 10640 i16 = i17; 10641 i17 = i18; 10642 } 10643 } 10644 } 10645 } while (0); 10646 HEAP32[i4 + (i16 << 2) + 2908 >> 2] = i11; 10647 i18 = HEAP32[i8 >> 2] | 0; 10648 if ((i18 | 0) > 1) { 10649 i11 = i13; 10650 } else { 10651 break; 10652 } 10653 } 10654 i12 = HEAP32[i12 >> 2] | 0; 10655 i8 = (HEAP32[i6 >> 2] | 0) + -1 | 0; 10656 HEAP32[i6 >> 2] = i8; 10657 HEAP32[i4 + (i8 << 2) + 2908 >> 2] = i12; 10658 i8 = HEAP32[i9 >> 2] | 0; 10659 i9 = HEAP32[i10 >> 2] | 0; 10660 i7 = HEAP32[i7 >> 2] | 0; 10661 i12 = HEAP32[i7 >> 2] | 0; 10662 i11 = HEAP32[i7 + 4 >> 2] | 0; 10663 i10 = HEAP32[i7 + 8 >> 2] | 0; 10664 i7 = HEAP32[i7 + 16 >> 2] | 0; 10665 i13 = i4 + 2876 | 0; 10666 i14 = i13 + 32 | 0; 10667 do { 10668 HEAP16[i13 >> 1] = 0; 10669 i13 = i13 + 2 | 0; 10670 } while ((i13 | 0) < (i14 | 0)); 10671 i14 = HEAP32[i6 >> 2] | 0; 10672 HEAP16[i8 + (HEAP32[i4 + (i14 << 2) + 2908 >> 2] << 2) + 2 >> 1] = 0; 10673 i14 = i14 + 1 | 0; 10674 L72 : do { 10675 if ((i14 | 0) < 573) { 10676 i6 = i4 + 5800 | 0; 10677 i13 = i4 + 5804 | 0; 10678 if ((i12 | 0) == 0) { 10679 i18 = 0; 10680 do { 10681 i12 = HEAP32[i4 + (i14 << 2) + 2908 >> 2] | 0; 10682 i13 = i8 + (i12 << 2) + 2 | 0; 10683 i15 = HEAPU16[i8 + (HEAPU16[i13 >> 1] << 2) + 2 >> 1] | 0; 10684 i16 = (i15 | 0) < (i7 | 0); 10685 i15 = i16 ? i15 + 1 | 0 : i7; 10686 i18 = (i16 & 1 ^ 1) + i18 | 0; 10687 HEAP16[i13 >> 1] = i15; 10688 if ((i12 | 0) <= (i9 | 0)) { 10689 i23 = i4 + (i15 << 1) + 2876 | 0; 10690 HEAP16[i23 >> 1] = (HEAP16[i23 >> 1] | 0) + 1 << 16 >> 16; 10691 if ((i12 | 0) < (i10 | 0)) { 10692 i13 = 0; 10693 } else { 10694 i13 = HEAP32[i11 + (i12 - i10 << 2) >> 2] | 0; 10695 } 10696 i23 = Math_imul(HEAPU16[i8 + (i12 << 2) >> 1] | 0, i13 + i15 | 0) | 0; 10697 HEAP32[i6 >> 2] = i23 + (HEAP32[i6 >> 2] | 0); 10698 } 10699 i14 = i14 + 1 | 0; 10700 } while ((i14 | 0) != 573); 10701 } else { 10702 i18 = 0; 10703 do { 10704 i15 = HEAP32[i4 + (i14 << 2) + 2908 >> 2] | 0; 10705 i16 = i8 + (i15 << 2) + 2 | 0; 10706 i17 = HEAPU16[i8 + (HEAPU16[i16 >> 1] << 2) + 2 >> 1] | 0; 10707 i19 = (i17 | 0) < (i7 | 0); 10708 i17 = i19 ? i17 + 1 | 0 : i7; 10709 i18 = (i19 & 1 ^ 1) + i18 | 0; 10710 HEAP16[i16 >> 1] = i17; 10711 if ((i15 | 0) <= (i9 | 0)) { 10712 i23 = i4 + (i17 << 1) + 2876 | 0; 10713 HEAP16[i23 >> 1] = (HEAP16[i23 >> 1] | 0) + 1 << 16 >> 16; 10714 if ((i15 | 0) < (i10 | 0)) { 10715 i16 = 0; 10716 } else { 10717 i16 = HEAP32[i11 + (i15 - i10 << 2) >> 2] | 0; 10718 } 10719 i23 = HEAPU16[i8 + (i15 << 2) >> 1] | 0; 10720 i22 = Math_imul(i23, i16 + i17 | 0) | 0; 10721 HEAP32[i6 >> 2] = i22 + (HEAP32[i6 >> 2] | 0); 10722 i23 = Math_imul((HEAPU16[i12 + (i15 << 2) + 2 >> 1] | 0) + i16 | 0, i23) | 0; 10723 HEAP32[i13 >> 2] = i23 + (HEAP32[i13 >> 2] | 0); 10724 } 10725 i14 = i14 + 1 | 0; 10726 } while ((i14 | 0) != 573); 10727 } 10728 if ((i18 | 0) != 0) { 10729 i10 = i4 + (i7 << 1) + 2876 | 0; 10730 do { 10731 i12 = i7; 10732 while (1) { 10733 i11 = i12 + -1 | 0; 10734 i13 = i4 + (i11 << 1) + 2876 | 0; 10735 i14 = HEAP16[i13 >> 1] | 0; 10736 if (i14 << 16 >> 16 == 0) { 10737 i12 = i11; 10738 } else { 10739 break; 10740 } 10741 } 10742 HEAP16[i13 >> 1] = i14 + -1 << 16 >> 16; 10743 i11 = i4 + (i12 << 1) + 2876 | 0; 10744 HEAP16[i11 >> 1] = (HEAPU16[i11 >> 1] | 0) + 2; 10745 i11 = (HEAP16[i10 >> 1] | 0) + -1 << 16 >> 16; 10746 HEAP16[i10 >> 1] = i11; 10747 i18 = i18 + -2 | 0; 10748 } while ((i18 | 0) > 0); 10749 if ((i7 | 0) != 0) { 10750 i12 = 573; 10751 while (1) { 10752 i10 = i7 & 65535; 10753 if (!(i11 << 16 >> 16 == 0)) { 10754 i11 = i11 & 65535; 10755 do { 10756 do { 10757 i12 = i12 + -1 | 0; 10758 i15 = HEAP32[i4 + (i12 << 2) + 2908 >> 2] | 0; 10759 } while ((i15 | 0) > (i9 | 0)); 10760 i13 = i8 + (i15 << 2) + 2 | 0; 10761 i14 = HEAPU16[i13 >> 1] | 0; 10762 if ((i14 | 0) != (i7 | 0)) { 10763 i23 = Math_imul(HEAPU16[i8 + (i15 << 2) >> 1] | 0, i7 - i14 | 0) | 0; 10764 HEAP32[i6 >> 2] = i23 + (HEAP32[i6 >> 2] | 0); 10765 HEAP16[i13 >> 1] = i10; 10766 } 10767 i11 = i11 + -1 | 0; 10768 } while ((i11 | 0) != 0); 10769 } 10770 i7 = i7 + -1 | 0; 10771 if ((i7 | 0) == 0) { 10772 break L72; 10773 } 10774 i11 = HEAP16[i4 + (i7 << 1) + 2876 >> 1] | 0; 10775 } 10776 } 10777 } 10778 } 10779 } while (0); 10780 i7 = 1; 10781 i6 = 0; 10782 do { 10783 i6 = (HEAPU16[i4 + (i7 + -1 << 1) + 2876 >> 1] | 0) + (i6 & 65534) << 1; 10784 HEAP16[i1 + (i7 << 1) >> 1] = i6; 10785 i7 = i7 + 1 | 0; 10786 } while ((i7 | 0) != 16); 10787 if ((i5 | 0) < 0) { 10788 STACKTOP = i2; 10789 return; 10790 } else { 10791 i4 = 0; 10792 } 10793 while (1) { 10794 i23 = HEAP16[i3 + (i4 << 2) + 2 >> 1] | 0; 10795 i7 = i23 & 65535; 10796 if (!(i23 << 16 >> 16 == 0)) { 10797 i8 = i1 + (i7 << 1) | 0; 10798 i6 = HEAP16[i8 >> 1] | 0; 10799 HEAP16[i8 >> 1] = i6 + 1 << 16 >> 16; 10800 i6 = i6 & 65535; 10801 i8 = 0; 10802 while (1) { 10803 i8 = i8 | i6 & 1; 10804 i7 = i7 + -1 | 0; 10805 if ((i7 | 0) <= 0) { 10806 break; 10807 } else { 10808 i6 = i6 >>> 1; 10809 i8 = i8 << 1; 10810 } 10811 } 10812 HEAP16[i3 + (i4 << 2) >> 1] = i8; 10813 } 10814 if ((i4 | 0) == (i5 | 0)) { 10815 break; 10816 } else { 10817 i4 = i4 + 1 | 0; 10818 } 10819 } 10820 STACKTOP = i2; 10821 return; 10822} 10823function _deflate_slow(i2, i6) { 10824 i2 = i2 | 0; 10825 i6 = i6 | 0; 10826 var i1 = 0, i3 = 0, i4 = 0, i5 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0, i33 = 0, i34 = 0, i35 = 0, i36 = 0; 10827 i1 = STACKTOP; 10828 i15 = i2 + 116 | 0; 10829 i16 = (i6 | 0) == 0; 10830 i17 = i2 + 72 | 0; 10831 i18 = i2 + 88 | 0; 10832 i5 = i2 + 108 | 0; 10833 i7 = i2 + 56 | 0; 10834 i19 = i2 + 84 | 0; 10835 i20 = i2 + 68 | 0; 10836 i22 = i2 + 52 | 0; 10837 i21 = i2 + 64 | 0; 10838 i9 = i2 + 96 | 0; 10839 i10 = i2 + 120 | 0; 10840 i11 = i2 + 112 | 0; 10841 i12 = i2 + 100 | 0; 10842 i26 = i2 + 5792 | 0; 10843 i27 = i2 + 5796 | 0; 10844 i29 = i2 + 5784 | 0; 10845 i23 = i2 + 5788 | 0; 10846 i8 = i2 + 104 | 0; 10847 i4 = i2 + 92 | 0; 10848 i24 = i2 + 128 | 0; 10849 i14 = i2 + 44 | 0; 10850 i13 = i2 + 136 | 0; 10851 L1 : while (1) { 10852 i30 = HEAP32[i15 >> 2] | 0; 10853 while (1) { 10854 if (i30 >>> 0 < 262) { 10855 _fill_window(i2); 10856 i30 = HEAP32[i15 >> 2] | 0; 10857 if (i30 >>> 0 < 262 & i16) { 10858 i2 = 0; 10859 i30 = 50; 10860 break L1; 10861 } 10862 if ((i30 | 0) == 0) { 10863 i30 = 40; 10864 break L1; 10865 } 10866 if (!(i30 >>> 0 > 2)) { 10867 HEAP32[i10 >> 2] = HEAP32[i9 >> 2]; 10868 HEAP32[i12 >> 2] = HEAP32[i11 >> 2]; 10869 HEAP32[i9 >> 2] = 2; 10870 i32 = 2; 10871 i30 = 16; 10872 } else { 10873 i30 = 8; 10874 } 10875 } else { 10876 i30 = 8; 10877 } 10878 do { 10879 if ((i30 | 0) == 8) { 10880 i30 = 0; 10881 i34 = HEAP32[i5 >> 2] | 0; 10882 i31 = ((HEAPU8[(HEAP32[i7 >> 2] | 0) + (i34 + 2) | 0] | 0) ^ HEAP32[i17 >> 2] << HEAP32[i18 >> 2]) & HEAP32[i19 >> 2]; 10883 HEAP32[i17 >> 2] = i31; 10884 i31 = (HEAP32[i20 >> 2] | 0) + (i31 << 1) | 0; 10885 i35 = HEAP16[i31 >> 1] | 0; 10886 HEAP16[(HEAP32[i21 >> 2] | 0) + ((HEAP32[i22 >> 2] & i34) << 1) >> 1] = i35; 10887 i32 = i35 & 65535; 10888 HEAP16[i31 >> 1] = i34; 10889 i31 = HEAP32[i9 >> 2] | 0; 10890 HEAP32[i10 >> 2] = i31; 10891 HEAP32[i12 >> 2] = HEAP32[i11 >> 2]; 10892 HEAP32[i9 >> 2] = 2; 10893 if (!(i35 << 16 >> 16 == 0)) { 10894 if (i31 >>> 0 < (HEAP32[i24 >> 2] | 0) >>> 0) { 10895 if (!(((HEAP32[i5 >> 2] | 0) - i32 | 0) >>> 0 > ((HEAP32[i14 >> 2] | 0) + -262 | 0) >>> 0)) { 10896 i32 = _longest_match(i2, i32) | 0; 10897 HEAP32[i9 >> 2] = i32; 10898 if (i32 >>> 0 < 6) { 10899 if ((HEAP32[i13 >> 2] | 0) != 1) { 10900 if ((i32 | 0) != 3) { 10901 i30 = 16; 10902 break; 10903 } 10904 if (!(((HEAP32[i5 >> 2] | 0) - (HEAP32[i11 >> 2] | 0) | 0) >>> 0 > 4096)) { 10905 i32 = 3; 10906 i30 = 16; 10907 break; 10908 } 10909 } 10910 HEAP32[i9 >> 2] = 2; 10911 i32 = 2; 10912 i30 = 16; 10913 } else { 10914 i30 = 16; 10915 } 10916 } else { 10917 i32 = 2; 10918 i30 = 16; 10919 } 10920 } else { 10921 i32 = 2; 10922 } 10923 } else { 10924 i32 = 2; 10925 i30 = 16; 10926 } 10927 } 10928 } while (0); 10929 if ((i30 | 0) == 16) { 10930 i31 = HEAP32[i10 >> 2] | 0; 10931 } 10932 if (!(i31 >>> 0 < 3 | i32 >>> 0 > i31 >>> 0)) { 10933 break; 10934 } 10935 if ((HEAP32[i8 >> 2] | 0) == 0) { 10936 HEAP32[i8 >> 2] = 1; 10937 HEAP32[i5 >> 2] = (HEAP32[i5 >> 2] | 0) + 1; 10938 i30 = (HEAP32[i15 >> 2] | 0) + -1 | 0; 10939 HEAP32[i15 >> 2] = i30; 10940 continue; 10941 } 10942 i35 = HEAP8[(HEAP32[i7 >> 2] | 0) + ((HEAP32[i5 >> 2] | 0) + -1) | 0] | 0; 10943 i34 = HEAP32[i26 >> 2] | 0; 10944 HEAP16[(HEAP32[i27 >> 2] | 0) + (i34 << 1) >> 1] = 0; 10945 HEAP32[i26 >> 2] = i34 + 1; 10946 HEAP8[(HEAP32[i29 >> 2] | 0) + i34 | 0] = i35; 10947 i35 = i2 + ((i35 & 255) << 2) + 148 | 0; 10948 HEAP16[i35 >> 1] = (HEAP16[i35 >> 1] | 0) + 1 << 16 >> 16; 10949 if ((HEAP32[i26 >> 2] | 0) == ((HEAP32[i23 >> 2] | 0) + -1 | 0)) { 10950 i30 = HEAP32[i4 >> 2] | 0; 10951 if ((i30 | 0) > -1) { 10952 i31 = (HEAP32[i7 >> 2] | 0) + i30 | 0; 10953 } else { 10954 i31 = 0; 10955 } 10956 __tr_flush_block(i2, i31, (HEAP32[i5 >> 2] | 0) - i30 | 0, 0); 10957 HEAP32[i4 >> 2] = HEAP32[i5 >> 2]; 10958 i33 = HEAP32[i2 >> 2] | 0; 10959 i32 = i33 + 28 | 0; 10960 i30 = HEAP32[i32 >> 2] | 0; 10961 i35 = HEAP32[i30 + 20 >> 2] | 0; 10962 i31 = i33 + 16 | 0; 10963 i34 = HEAP32[i31 >> 2] | 0; 10964 i34 = i35 >>> 0 > i34 >>> 0 ? i34 : i35; 10965 if ((i34 | 0) != 0 ? (i28 = i33 + 12 | 0, _memcpy(HEAP32[i28 >> 2] | 0, HEAP32[i30 + 16 >> 2] | 0, i34 | 0) | 0, HEAP32[i28 >> 2] = (HEAP32[i28 >> 2] | 0) + i34, i28 = (HEAP32[i32 >> 2] | 0) + 16 | 0, HEAP32[i28 >> 2] = (HEAP32[i28 >> 2] | 0) + i34, i28 = i33 + 20 | 0, HEAP32[i28 >> 2] = (HEAP32[i28 >> 2] | 0) + i34, HEAP32[i31 >> 2] = (HEAP32[i31 >> 2] | 0) - i34, i28 = HEAP32[i32 >> 2] | 0, i33 = i28 + 20 | 0, i35 = HEAP32[i33 >> 2] | 0, HEAP32[i33 >> 2] = i35 - i34, (i35 | 0) == (i34 | 0)) : 0) { 10966 HEAP32[i28 + 16 >> 2] = HEAP32[i28 + 8 >> 2]; 10967 } 10968 } 10969 HEAP32[i5 >> 2] = (HEAP32[i5 >> 2] | 0) + 1; 10970 i30 = (HEAP32[i15 >> 2] | 0) + -1 | 0; 10971 HEAP32[i15 >> 2] = i30; 10972 if ((HEAP32[(HEAP32[i2 >> 2] | 0) + 16 >> 2] | 0) == 0) { 10973 i2 = 0; 10974 i30 = 50; 10975 break L1; 10976 } 10977 } 10978 i34 = HEAP32[i5 >> 2] | 0; 10979 i30 = i34 + -3 + (HEAP32[i15 >> 2] | 0) | 0; 10980 i35 = i31 + 253 | 0; 10981 i31 = i34 + 65535 - (HEAP32[i12 >> 2] | 0) | 0; 10982 i34 = HEAP32[i26 >> 2] | 0; 10983 HEAP16[(HEAP32[i27 >> 2] | 0) + (i34 << 1) >> 1] = i31; 10984 HEAP32[i26 >> 2] = i34 + 1; 10985 HEAP8[(HEAP32[i29 >> 2] | 0) + i34 | 0] = i35; 10986 i35 = i2 + ((HEAPU8[808 + (i35 & 255) | 0] | 0 | 256) + 1 << 2) + 148 | 0; 10987 HEAP16[i35 >> 1] = (HEAP16[i35 >> 1] | 0) + 1 << 16 >> 16; 10988 i31 = i31 + 65535 & 65535; 10989 if (!(i31 >>> 0 < 256)) { 10990 i31 = (i31 >>> 7) + 256 | 0; 10991 } 10992 i32 = i2 + ((HEAPU8[296 + i31 | 0] | 0) << 2) + 2440 | 0; 10993 HEAP16[i32 >> 1] = (HEAP16[i32 >> 1] | 0) + 1 << 16 >> 16; 10994 i32 = HEAP32[i26 >> 2] | 0; 10995 i31 = (HEAP32[i23 >> 2] | 0) + -1 | 0; 10996 i34 = HEAP32[i10 >> 2] | 0; 10997 HEAP32[i15 >> 2] = 1 - i34 + (HEAP32[i15 >> 2] | 0); 10998 i34 = i34 + -2 | 0; 10999 HEAP32[i10 >> 2] = i34; 11000 i33 = HEAP32[i5 >> 2] | 0; 11001 while (1) { 11002 i35 = i33 + 1 | 0; 11003 HEAP32[i5 >> 2] = i35; 11004 if (!(i35 >>> 0 > i30 >>> 0)) { 11005 i36 = ((HEAPU8[(HEAP32[i7 >> 2] | 0) + (i33 + 3) | 0] | 0) ^ HEAP32[i17 >> 2] << HEAP32[i18 >> 2]) & HEAP32[i19 >> 2]; 11006 HEAP32[i17 >> 2] = i36; 11007 i36 = (HEAP32[i20 >> 2] | 0) + (i36 << 1) | 0; 11008 HEAP16[(HEAP32[i21 >> 2] | 0) + ((HEAP32[i22 >> 2] & i35) << 1) >> 1] = HEAP16[i36 >> 1] | 0; 11009 HEAP16[i36 >> 1] = i35; 11010 } 11011 i34 = i34 + -1 | 0; 11012 HEAP32[i10 >> 2] = i34; 11013 if ((i34 | 0) == 0) { 11014 break; 11015 } else { 11016 i33 = i35; 11017 } 11018 } 11019 HEAP32[i8 >> 2] = 0; 11020 HEAP32[i9 >> 2] = 2; 11021 i30 = i33 + 2 | 0; 11022 HEAP32[i5 >> 2] = i30; 11023 if ((i32 | 0) != (i31 | 0)) { 11024 continue; 11025 } 11026 i32 = HEAP32[i4 >> 2] | 0; 11027 if ((i32 | 0) > -1) { 11028 i31 = (HEAP32[i7 >> 2] | 0) + i32 | 0; 11029 } else { 11030 i31 = 0; 11031 } 11032 __tr_flush_block(i2, i31, i30 - i32 | 0, 0); 11033 HEAP32[i4 >> 2] = HEAP32[i5 >> 2]; 11034 i33 = HEAP32[i2 >> 2] | 0; 11035 i31 = i33 + 28 | 0; 11036 i32 = HEAP32[i31 >> 2] | 0; 11037 i35 = HEAP32[i32 + 20 >> 2] | 0; 11038 i30 = i33 + 16 | 0; 11039 i34 = HEAP32[i30 >> 2] | 0; 11040 i34 = i35 >>> 0 > i34 >>> 0 ? i34 : i35; 11041 if ((i34 | 0) != 0 ? (i25 = i33 + 12 | 0, _memcpy(HEAP32[i25 >> 2] | 0, HEAP32[i32 + 16 >> 2] | 0, i34 | 0) | 0, HEAP32[i25 >> 2] = (HEAP32[i25 >> 2] | 0) + i34, i25 = (HEAP32[i31 >> 2] | 0) + 16 | 0, HEAP32[i25 >> 2] = (HEAP32[i25 >> 2] | 0) + i34, i25 = i33 + 20 | 0, HEAP32[i25 >> 2] = (HEAP32[i25 >> 2] | 0) + i34, HEAP32[i30 >> 2] = (HEAP32[i30 >> 2] | 0) - i34, i25 = HEAP32[i31 >> 2] | 0, i35 = i25 + 20 | 0, i36 = HEAP32[i35 >> 2] | 0, HEAP32[i35 >> 2] = i36 - i34, (i36 | 0) == (i34 | 0)) : 0) { 11042 HEAP32[i25 + 16 >> 2] = HEAP32[i25 + 8 >> 2]; 11043 } 11044 if ((HEAP32[(HEAP32[i2 >> 2] | 0) + 16 >> 2] | 0) == 0) { 11045 i2 = 0; 11046 i30 = 50; 11047 break; 11048 } 11049 } 11050 if ((i30 | 0) == 40) { 11051 if ((HEAP32[i8 >> 2] | 0) != 0) { 11052 i36 = HEAP8[(HEAP32[i7 >> 2] | 0) + ((HEAP32[i5 >> 2] | 0) + -1) | 0] | 0; 11053 i35 = HEAP32[i26 >> 2] | 0; 11054 HEAP16[(HEAP32[i27 >> 2] | 0) + (i35 << 1) >> 1] = 0; 11055 HEAP32[i26 >> 2] = i35 + 1; 11056 HEAP8[(HEAP32[i29 >> 2] | 0) + i35 | 0] = i36; 11057 i36 = i2 + ((i36 & 255) << 2) + 148 | 0; 11058 HEAP16[i36 >> 1] = (HEAP16[i36 >> 1] | 0) + 1 << 16 >> 16; 11059 HEAP32[i8 >> 2] = 0; 11060 } 11061 i8 = HEAP32[i4 >> 2] | 0; 11062 if ((i8 | 0) > -1) { 11063 i7 = (HEAP32[i7 >> 2] | 0) + i8 | 0; 11064 } else { 11065 i7 = 0; 11066 } 11067 i6 = (i6 | 0) == 4; 11068 __tr_flush_block(i2, i7, (HEAP32[i5 >> 2] | 0) - i8 | 0, i6 & 1); 11069 HEAP32[i4 >> 2] = HEAP32[i5 >> 2]; 11070 i4 = HEAP32[i2 >> 2] | 0; 11071 i7 = i4 + 28 | 0; 11072 i5 = HEAP32[i7 >> 2] | 0; 11073 i10 = HEAP32[i5 + 20 >> 2] | 0; 11074 i8 = i4 + 16 | 0; 11075 i9 = HEAP32[i8 >> 2] | 0; 11076 i9 = i10 >>> 0 > i9 >>> 0 ? i9 : i10; 11077 if ((i9 | 0) != 0 ? (i3 = i4 + 12 | 0, _memcpy(HEAP32[i3 >> 2] | 0, HEAP32[i5 + 16 >> 2] | 0, i9 | 0) | 0, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + i9, i3 = (HEAP32[i7 >> 2] | 0) + 16 | 0, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + i9, i3 = i4 + 20 | 0, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + i9, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) - i9, i3 = HEAP32[i7 >> 2] | 0, i35 = i3 + 20 | 0, i36 = HEAP32[i35 >> 2] | 0, HEAP32[i35 >> 2] = i36 - i9, (i36 | 0) == (i9 | 0)) : 0) { 11078 HEAP32[i3 + 16 >> 2] = HEAP32[i3 + 8 >> 2]; 11079 } 11080 if ((HEAP32[(HEAP32[i2 >> 2] | 0) + 16 >> 2] | 0) == 0) { 11081 i36 = i6 ? 2 : 0; 11082 STACKTOP = i1; 11083 return i36 | 0; 11084 } else { 11085 i36 = i6 ? 3 : 1; 11086 STACKTOP = i1; 11087 return i36 | 0; 11088 } 11089 } else if ((i30 | 0) == 50) { 11090 STACKTOP = i1; 11091 return i2 | 0; 11092 } 11093 return 0; 11094} 11095function _inflate_fast(i7, i19) { 11096 i7 = i7 | 0; 11097 i19 = i19 | 0; 11098 var i1 = 0, i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0, i33 = 0, i34 = 0, i35 = 0, i36 = 0, i37 = 0; 11099 i1 = STACKTOP; 11100 i11 = HEAP32[i7 + 28 >> 2] | 0; 11101 i29 = HEAP32[i7 >> 2] | 0; 11102 i5 = i7 + 4 | 0; 11103 i8 = i29 + ((HEAP32[i5 >> 2] | 0) + -6) | 0; 11104 i9 = i7 + 12 | 0; 11105 i28 = HEAP32[i9 >> 2] | 0; 11106 i4 = i7 + 16 | 0; 11107 i25 = HEAP32[i4 >> 2] | 0; 11108 i6 = i28 + (i25 + -258) | 0; 11109 i17 = HEAP32[i11 + 44 >> 2] | 0; 11110 i12 = HEAP32[i11 + 48 >> 2] | 0; 11111 i18 = HEAP32[i11 + 52 >> 2] | 0; 11112 i3 = i11 + 56 | 0; 11113 i2 = i11 + 60 | 0; 11114 i16 = HEAP32[i11 + 76 >> 2] | 0; 11115 i13 = HEAP32[i11 + 80 >> 2] | 0; 11116 i14 = (1 << HEAP32[i11 + 84 >> 2]) + -1 | 0; 11117 i15 = (1 << HEAP32[i11 + 88 >> 2]) + -1 | 0; 11118 i19 = i28 + (i25 + ~i19) | 0; 11119 i25 = i11 + 7104 | 0; 11120 i20 = i18 + -1 | 0; 11121 i27 = (i12 | 0) == 0; 11122 i24 = (HEAP32[i11 + 40 >> 2] | 0) + -1 | 0; 11123 i21 = i24 + i12 | 0; 11124 i22 = i12 + -1 | 0; 11125 i23 = i19 + -1 | 0; 11126 i26 = i19 - i12 | 0; 11127 i31 = HEAP32[i2 >> 2] | 0; 11128 i30 = HEAP32[i3 >> 2] | 0; 11129 i29 = i29 + -1 | 0; 11130 i28 = i28 + -1 | 0; 11131 L1 : do { 11132 if (i31 >>> 0 < 15) { 11133 i37 = i29 + 2 | 0; 11134 i33 = i31 + 16 | 0; 11135 i30 = ((HEAPU8[i29 + 1 | 0] | 0) << i31) + i30 + ((HEAPU8[i37] | 0) << i31 + 8) | 0; 11136 i29 = i37; 11137 } else { 11138 i33 = i31; 11139 } 11140 i31 = i30 & i14; 11141 i34 = HEAP8[i16 + (i31 << 2) | 0] | 0; 11142 i32 = HEAP16[i16 + (i31 << 2) + 2 >> 1] | 0; 11143 i31 = HEAPU8[i16 + (i31 << 2) + 1 | 0] | 0; 11144 i30 = i30 >>> i31; 11145 i31 = i33 - i31 | 0; 11146 do { 11147 if (!(i34 << 24 >> 24 == 0)) { 11148 i33 = i34 & 255; 11149 while (1) { 11150 if ((i33 & 16 | 0) != 0) { 11151 break; 11152 } 11153 if ((i33 & 64 | 0) != 0) { 11154 i10 = 55; 11155 break L1; 11156 } 11157 i37 = (i30 & (1 << i33) + -1) + (i32 & 65535) | 0; 11158 i33 = HEAP8[i16 + (i37 << 2) | 0] | 0; 11159 i32 = HEAP16[i16 + (i37 << 2) + 2 >> 1] | 0; 11160 i37 = HEAPU8[i16 + (i37 << 2) + 1 | 0] | 0; 11161 i30 = i30 >>> i37; 11162 i31 = i31 - i37 | 0; 11163 if (i33 << 24 >> 24 == 0) { 11164 i10 = 6; 11165 break; 11166 } else { 11167 i33 = i33 & 255; 11168 } 11169 } 11170 if ((i10 | 0) == 6) { 11171 i32 = i32 & 255; 11172 i10 = 7; 11173 break; 11174 } 11175 i32 = i32 & 65535; 11176 i33 = i33 & 15; 11177 if ((i33 | 0) != 0) { 11178 if (i31 >>> 0 < i33 >>> 0) { 11179 i29 = i29 + 1 | 0; 11180 i35 = i31 + 8 | 0; 11181 i34 = ((HEAPU8[i29] | 0) << i31) + i30 | 0; 11182 } else { 11183 i35 = i31; 11184 i34 = i30; 11185 } 11186 i31 = i35 - i33 | 0; 11187 i30 = i34 >>> i33; 11188 i32 = (i34 & (1 << i33) + -1) + i32 | 0; 11189 } 11190 if (i31 >>> 0 < 15) { 11191 i37 = i29 + 2 | 0; 11192 i34 = i31 + 16 | 0; 11193 i30 = ((HEAPU8[i29 + 1 | 0] | 0) << i31) + i30 + ((HEAPU8[i37] | 0) << i31 + 8) | 0; 11194 i29 = i37; 11195 } else { 11196 i34 = i31; 11197 } 11198 i37 = i30 & i15; 11199 i33 = HEAP16[i13 + (i37 << 2) + 2 >> 1] | 0; 11200 i31 = HEAPU8[i13 + (i37 << 2) + 1 | 0] | 0; 11201 i30 = i30 >>> i31; 11202 i31 = i34 - i31 | 0; 11203 i34 = HEAPU8[i13 + (i37 << 2) | 0] | 0; 11204 if ((i34 & 16 | 0) == 0) { 11205 do { 11206 if ((i34 & 64 | 0) != 0) { 11207 i10 = 52; 11208 break L1; 11209 } 11210 i34 = (i30 & (1 << i34) + -1) + (i33 & 65535) | 0; 11211 i33 = HEAP16[i13 + (i34 << 2) + 2 >> 1] | 0; 11212 i37 = HEAPU8[i13 + (i34 << 2) + 1 | 0] | 0; 11213 i30 = i30 >>> i37; 11214 i31 = i31 - i37 | 0; 11215 i34 = HEAPU8[i13 + (i34 << 2) | 0] | 0; 11216 } while ((i34 & 16 | 0) == 0); 11217 } 11218 i33 = i33 & 65535; 11219 i34 = i34 & 15; 11220 if (i31 >>> 0 < i34 >>> 0) { 11221 i35 = i29 + 1 | 0; 11222 i30 = ((HEAPU8[i35] | 0) << i31) + i30 | 0; 11223 i36 = i31 + 8 | 0; 11224 if (i36 >>> 0 < i34 >>> 0) { 11225 i29 = i29 + 2 | 0; 11226 i31 = i31 + 16 | 0; 11227 i30 = ((HEAPU8[i29] | 0) << i36) + i30 | 0; 11228 } else { 11229 i31 = i36; 11230 i29 = i35; 11231 } 11232 } 11233 i33 = (i30 & (1 << i34) + -1) + i33 | 0; 11234 i30 = i30 >>> i34; 11235 i31 = i31 - i34 | 0; 11236 i35 = i28; 11237 i34 = i35 - i19 | 0; 11238 if (!(i33 >>> 0 > i34 >>> 0)) { 11239 i34 = i28 + (0 - i33) | 0; 11240 while (1) { 11241 HEAP8[i28 + 1 | 0] = HEAP8[i34 + 1 | 0] | 0; 11242 HEAP8[i28 + 2 | 0] = HEAP8[i34 + 2 | 0] | 0; 11243 i35 = i34 + 3 | 0; 11244 i33 = i28 + 3 | 0; 11245 HEAP8[i33] = HEAP8[i35] | 0; 11246 i32 = i32 + -3 | 0; 11247 if (!(i32 >>> 0 > 2)) { 11248 break; 11249 } else { 11250 i34 = i35; 11251 i28 = i33; 11252 } 11253 } 11254 if ((i32 | 0) == 0) { 11255 i28 = i33; 11256 break; 11257 } 11258 i33 = i28 + 4 | 0; 11259 HEAP8[i33] = HEAP8[i34 + 4 | 0] | 0; 11260 if (!(i32 >>> 0 > 1)) { 11261 i28 = i33; 11262 break; 11263 } 11264 i28 = i28 + 5 | 0; 11265 HEAP8[i28] = HEAP8[i34 + 5 | 0] | 0; 11266 break; 11267 } 11268 i34 = i33 - i34 | 0; 11269 if (i34 >>> 0 > i17 >>> 0 ? (HEAP32[i25 >> 2] | 0) != 0 : 0) { 11270 i10 = 22; 11271 break L1; 11272 } 11273 do { 11274 if (i27) { 11275 i36 = i18 + (i24 - i34) | 0; 11276 if (i34 >>> 0 < i32 >>> 0) { 11277 i32 = i32 - i34 | 0; 11278 i35 = i33 - i35 | 0; 11279 i37 = i28; 11280 do { 11281 i36 = i36 + 1 | 0; 11282 i37 = i37 + 1 | 0; 11283 HEAP8[i37] = HEAP8[i36] | 0; 11284 i34 = i34 + -1 | 0; 11285 } while ((i34 | 0) != 0); 11286 i33 = i28 + (i23 + i35 + (1 - i33)) | 0; 11287 i28 = i28 + (i19 + i35) | 0; 11288 } else { 11289 i33 = i36; 11290 } 11291 } else { 11292 if (!(i12 >>> 0 < i34 >>> 0)) { 11293 i36 = i18 + (i22 - i34) | 0; 11294 if (!(i34 >>> 0 < i32 >>> 0)) { 11295 i33 = i36; 11296 break; 11297 } 11298 i32 = i32 - i34 | 0; 11299 i35 = i33 - i35 | 0; 11300 i37 = i28; 11301 do { 11302 i36 = i36 + 1 | 0; 11303 i37 = i37 + 1 | 0; 11304 HEAP8[i37] = HEAP8[i36] | 0; 11305 i34 = i34 + -1 | 0; 11306 } while ((i34 | 0) != 0); 11307 i33 = i28 + (i23 + i35 + (1 - i33)) | 0; 11308 i28 = i28 + (i19 + i35) | 0; 11309 break; 11310 } 11311 i37 = i18 + (i21 - i34) | 0; 11312 i36 = i34 - i12 | 0; 11313 if (i36 >>> 0 < i32 >>> 0) { 11314 i32 = i32 - i36 | 0; 11315 i34 = i33 - i35 | 0; 11316 i35 = i28; 11317 do { 11318 i37 = i37 + 1 | 0; 11319 i35 = i35 + 1 | 0; 11320 HEAP8[i35] = HEAP8[i37] | 0; 11321 i36 = i36 + -1 | 0; 11322 } while ((i36 | 0) != 0); 11323 i35 = i28 + (i26 + i34) | 0; 11324 if (i12 >>> 0 < i32 >>> 0) { 11325 i32 = i32 - i12 | 0; 11326 i37 = i20; 11327 i36 = i12; 11328 do { 11329 i37 = i37 + 1 | 0; 11330 i35 = i35 + 1 | 0; 11331 HEAP8[i35] = HEAP8[i37] | 0; 11332 i36 = i36 + -1 | 0; 11333 } while ((i36 | 0) != 0); 11334 i33 = i28 + (i23 + i34 + (1 - i33)) | 0; 11335 i28 = i28 + (i19 + i34) | 0; 11336 } else { 11337 i33 = i20; 11338 i28 = i35; 11339 } 11340 } else { 11341 i33 = i37; 11342 } 11343 } 11344 } while (0); 11345 if (i32 >>> 0 > 2) { 11346 do { 11347 HEAP8[i28 + 1 | 0] = HEAP8[i33 + 1 | 0] | 0; 11348 HEAP8[i28 + 2 | 0] = HEAP8[i33 + 2 | 0] | 0; 11349 i33 = i33 + 3 | 0; 11350 i28 = i28 + 3 | 0; 11351 HEAP8[i28] = HEAP8[i33] | 0; 11352 i32 = i32 + -3 | 0; 11353 } while (i32 >>> 0 > 2); 11354 } 11355 if ((i32 | 0) != 0) { 11356 i34 = i28 + 1 | 0; 11357 HEAP8[i34] = HEAP8[i33 + 1 | 0] | 0; 11358 if (i32 >>> 0 > 1) { 11359 i28 = i28 + 2 | 0; 11360 HEAP8[i28] = HEAP8[i33 + 2 | 0] | 0; 11361 } else { 11362 i28 = i34; 11363 } 11364 } 11365 } else { 11366 i32 = i32 & 255; 11367 i10 = 7; 11368 } 11369 } while (0); 11370 if ((i10 | 0) == 7) { 11371 i10 = 0; 11372 i28 = i28 + 1 | 0; 11373 HEAP8[i28] = i32; 11374 } 11375 } while (i29 >>> 0 < i8 >>> 0 & i28 >>> 0 < i6 >>> 0); 11376 do { 11377 if ((i10 | 0) == 22) { 11378 HEAP32[i7 + 24 >> 2] = 14384; 11379 HEAP32[i11 >> 2] = 29; 11380 } else if ((i10 | 0) == 52) { 11381 HEAP32[i7 + 24 >> 2] = 14416; 11382 HEAP32[i11 >> 2] = 29; 11383 } else if ((i10 | 0) == 55) { 11384 if ((i33 & 32 | 0) == 0) { 11385 HEAP32[i7 + 24 >> 2] = 14440; 11386 HEAP32[i11 >> 2] = 29; 11387 break; 11388 } else { 11389 HEAP32[i11 >> 2] = 11; 11390 break; 11391 } 11392 } 11393 } while (0); 11394 i37 = i31 >>> 3; 11395 i11 = i29 + (0 - i37) | 0; 11396 i10 = i31 - (i37 << 3) | 0; 11397 i12 = (1 << i10) + -1 & i30; 11398 HEAP32[i7 >> 2] = i29 + (1 - i37); 11399 HEAP32[i9 >> 2] = i28 + 1; 11400 if (i11 >>> 0 < i8 >>> 0) { 11401 i7 = i8 - i11 | 0; 11402 } else { 11403 i7 = i8 - i11 | 0; 11404 } 11405 HEAP32[i5 >> 2] = i7 + 5; 11406 if (i28 >>> 0 < i6 >>> 0) { 11407 i37 = i6 - i28 | 0; 11408 i37 = i37 + 257 | 0; 11409 HEAP32[i4 >> 2] = i37; 11410 HEAP32[i3 >> 2] = i12; 11411 HEAP32[i2 >> 2] = i10; 11412 STACKTOP = i1; 11413 return; 11414 } else { 11415 i37 = i6 - i28 | 0; 11416 i37 = i37 + 257 | 0; 11417 HEAP32[i4 >> 2] = i37; 11418 HEAP32[i3 >> 2] = i12; 11419 HEAP32[i2 >> 2] = i10; 11420 STACKTOP = i1; 11421 return; 11422 } 11423} 11424function _send_tree(i2, i13, i12) { 11425 i2 = i2 | 0; 11426 i13 = i13 | 0; 11427 i12 = i12 | 0; 11428 var i1 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0; 11429 i11 = STACKTOP; 11430 i15 = HEAP16[i13 + 2 >> 1] | 0; 11431 i16 = i15 << 16 >> 16 == 0; 11432 i7 = i2 + 2754 | 0; 11433 i4 = i2 + 5820 | 0; 11434 i8 = i2 + 2752 | 0; 11435 i3 = i2 + 5816 | 0; 11436 i14 = i2 + 20 | 0; 11437 i10 = i2 + 8 | 0; 11438 i9 = i2 + 2758 | 0; 11439 i1 = i2 + 2756 | 0; 11440 i5 = i2 + 2750 | 0; 11441 i6 = i2 + 2748 | 0; 11442 i21 = i16 ? 138 : 7; 11443 i23 = i16 ? 3 : 4; 11444 i18 = 0; 11445 i15 = i15 & 65535; 11446 i24 = -1; 11447 L1 : while (1) { 11448 i20 = 0; 11449 while (1) { 11450 if ((i18 | 0) > (i12 | 0)) { 11451 break L1; 11452 } 11453 i18 = i18 + 1 | 0; 11454 i19 = HEAP16[i13 + (i18 << 2) + 2 >> 1] | 0; 11455 i16 = i19 & 65535; 11456 i22 = i20 + 1 | 0; 11457 i17 = (i15 | 0) == (i16 | 0); 11458 if (!((i22 | 0) < (i21 | 0) & i17)) { 11459 break; 11460 } else { 11461 i20 = i22; 11462 } 11463 } 11464 do { 11465 if ((i22 | 0) >= (i23 | 0)) { 11466 if ((i15 | 0) != 0) { 11467 if ((i15 | 0) == (i24 | 0)) { 11468 i23 = HEAP16[i3 >> 1] | 0; 11469 i21 = HEAP32[i4 >> 2] | 0; 11470 i20 = i22; 11471 } else { 11472 i22 = HEAPU16[i2 + (i15 << 2) + 2686 >> 1] | 0; 11473 i21 = HEAP32[i4 >> 2] | 0; 11474 i24 = HEAPU16[i2 + (i15 << 2) + 2684 >> 1] | 0; 11475 i25 = HEAPU16[i3 >> 1] | 0 | i24 << i21; 11476 i23 = i25 & 65535; 11477 HEAP16[i3 >> 1] = i23; 11478 if ((i21 | 0) > (16 - i22 | 0)) { 11479 i23 = HEAP32[i14 >> 2] | 0; 11480 HEAP32[i14 >> 2] = i23 + 1; 11481 HEAP8[(HEAP32[i10 >> 2] | 0) + i23 | 0] = i25; 11482 i23 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11483 i21 = HEAP32[i14 >> 2] | 0; 11484 HEAP32[i14 >> 2] = i21 + 1; 11485 HEAP8[(HEAP32[i10 >> 2] | 0) + i21 | 0] = i23; 11486 i21 = HEAP32[i4 >> 2] | 0; 11487 i23 = i24 >>> (16 - i21 | 0) & 65535; 11488 HEAP16[i3 >> 1] = i23; 11489 i21 = i22 + -16 + i21 | 0; 11490 } else { 11491 i21 = i21 + i22 | 0; 11492 } 11493 HEAP32[i4 >> 2] = i21; 11494 } 11495 i22 = HEAPU16[i5 >> 1] | 0; 11496 i24 = HEAPU16[i6 >> 1] | 0; 11497 i23 = i23 & 65535 | i24 << i21; 11498 HEAP16[i3 >> 1] = i23; 11499 if ((i21 | 0) > (16 - i22 | 0)) { 11500 i21 = HEAP32[i14 >> 2] | 0; 11501 HEAP32[i14 >> 2] = i21 + 1; 11502 HEAP8[(HEAP32[i10 >> 2] | 0) + i21 | 0] = i23; 11503 i23 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11504 i21 = HEAP32[i14 >> 2] | 0; 11505 HEAP32[i14 >> 2] = i21 + 1; 11506 HEAP8[(HEAP32[i10 >> 2] | 0) + i21 | 0] = i23; 11507 i21 = HEAP32[i4 >> 2] | 0; 11508 i23 = i24 >>> (16 - i21 | 0); 11509 HEAP16[i3 >> 1] = i23; 11510 i21 = i22 + -16 + i21 | 0; 11511 } else { 11512 i21 = i21 + i22 | 0; 11513 } 11514 HEAP32[i4 >> 2] = i21; 11515 i20 = i20 + 65533 & 65535; 11516 i22 = i23 & 65535 | i20 << i21; 11517 HEAP16[i3 >> 1] = i22; 11518 if ((i21 | 0) > 14) { 11519 i26 = HEAP32[i14 >> 2] | 0; 11520 HEAP32[i14 >> 2] = i26 + 1; 11521 HEAP8[(HEAP32[i10 >> 2] | 0) + i26 | 0] = i22; 11522 i26 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11523 i27 = HEAP32[i14 >> 2] | 0; 11524 HEAP32[i14 >> 2] = i27 + 1; 11525 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i26; 11526 i27 = HEAP32[i4 >> 2] | 0; 11527 HEAP16[i3 >> 1] = i20 >>> (16 - i27 | 0); 11528 HEAP32[i4 >> 2] = i27 + -14; 11529 break; 11530 } else { 11531 HEAP32[i4 >> 2] = i21 + 2; 11532 break; 11533 } 11534 } 11535 if ((i22 | 0) < 11) { 11536 i24 = HEAPU16[i7 >> 1] | 0; 11537 i23 = HEAP32[i4 >> 2] | 0; 11538 i21 = HEAPU16[i8 >> 1] | 0; 11539 i22 = HEAPU16[i3 >> 1] | 0 | i21 << i23; 11540 HEAP16[i3 >> 1] = i22; 11541 if ((i23 | 0) > (16 - i24 | 0)) { 11542 i27 = HEAP32[i14 >> 2] | 0; 11543 HEAP32[i14 >> 2] = i27 + 1; 11544 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i22; 11545 i22 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11546 i27 = HEAP32[i14 >> 2] | 0; 11547 HEAP32[i14 >> 2] = i27 + 1; 11548 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i22; 11549 i27 = HEAP32[i4 >> 2] | 0; 11550 i22 = i21 >>> (16 - i27 | 0); 11551 HEAP16[i3 >> 1] = i22; 11552 i21 = i24 + -16 + i27 | 0; 11553 } else { 11554 i21 = i23 + i24 | 0; 11555 } 11556 HEAP32[i4 >> 2] = i21; 11557 i20 = i20 + 65534 & 65535; 11558 i22 = i22 & 65535 | i20 << i21; 11559 HEAP16[i3 >> 1] = i22; 11560 if ((i21 | 0) > 13) { 11561 i26 = HEAP32[i14 >> 2] | 0; 11562 HEAP32[i14 >> 2] = i26 + 1; 11563 HEAP8[(HEAP32[i10 >> 2] | 0) + i26 | 0] = i22; 11564 i26 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11565 i27 = HEAP32[i14 >> 2] | 0; 11566 HEAP32[i14 >> 2] = i27 + 1; 11567 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i26; 11568 i27 = HEAP32[i4 >> 2] | 0; 11569 HEAP16[i3 >> 1] = i20 >>> (16 - i27 | 0); 11570 HEAP32[i4 >> 2] = i27 + -13; 11571 break; 11572 } else { 11573 HEAP32[i4 >> 2] = i21 + 3; 11574 break; 11575 } 11576 } else { 11577 i21 = HEAPU16[i9 >> 1] | 0; 11578 i24 = HEAP32[i4 >> 2] | 0; 11579 i23 = HEAPU16[i1 >> 1] | 0; 11580 i22 = HEAPU16[i3 >> 1] | 0 | i23 << i24; 11581 HEAP16[i3 >> 1] = i22; 11582 if ((i24 | 0) > (16 - i21 | 0)) { 11583 i27 = HEAP32[i14 >> 2] | 0; 11584 HEAP32[i14 >> 2] = i27 + 1; 11585 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i22; 11586 i22 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11587 i27 = HEAP32[i14 >> 2] | 0; 11588 HEAP32[i14 >> 2] = i27 + 1; 11589 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i22; 11590 i27 = HEAP32[i4 >> 2] | 0; 11591 i22 = i23 >>> (16 - i27 | 0); 11592 HEAP16[i3 >> 1] = i22; 11593 i21 = i21 + -16 + i27 | 0; 11594 } else { 11595 i21 = i24 + i21 | 0; 11596 } 11597 HEAP32[i4 >> 2] = i21; 11598 i20 = i20 + 65526 & 65535; 11599 i22 = i22 & 65535 | i20 << i21; 11600 HEAP16[i3 >> 1] = i22; 11601 if ((i21 | 0) > 9) { 11602 i26 = HEAP32[i14 >> 2] | 0; 11603 HEAP32[i14 >> 2] = i26 + 1; 11604 HEAP8[(HEAP32[i10 >> 2] | 0) + i26 | 0] = i22; 11605 i26 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11606 i27 = HEAP32[i14 >> 2] | 0; 11607 HEAP32[i14 >> 2] = i27 + 1; 11608 HEAP8[(HEAP32[i10 >> 2] | 0) + i27 | 0] = i26; 11609 i27 = HEAP32[i4 >> 2] | 0; 11610 HEAP16[i3 >> 1] = i20 >>> (16 - i27 | 0); 11611 HEAP32[i4 >> 2] = i27 + -9; 11612 break; 11613 } else { 11614 HEAP32[i4 >> 2] = i21 + 7; 11615 break; 11616 } 11617 } 11618 } else { 11619 i20 = i2 + (i15 << 2) + 2686 | 0; 11620 i21 = i2 + (i15 << 2) + 2684 | 0; 11621 i23 = HEAP32[i4 >> 2] | 0; 11622 i26 = HEAP16[i3 >> 1] | 0; 11623 do { 11624 i24 = HEAPU16[i20 >> 1] | 0; 11625 i25 = HEAPU16[i21 >> 1] | 0; 11626 i27 = i26 & 65535 | i25 << i23; 11627 i26 = i27 & 65535; 11628 HEAP16[i3 >> 1] = i26; 11629 if ((i23 | 0) > (16 - i24 | 0)) { 11630 i26 = HEAP32[i14 >> 2] | 0; 11631 HEAP32[i14 >> 2] = i26 + 1; 11632 HEAP8[(HEAP32[i10 >> 2] | 0) + i26 | 0] = i27; 11633 i26 = (HEAPU16[i3 >> 1] | 0) >>> 8 & 255; 11634 i23 = HEAP32[i14 >> 2] | 0; 11635 HEAP32[i14 >> 2] = i23 + 1; 11636 HEAP8[(HEAP32[i10 >> 2] | 0) + i23 | 0] = i26; 11637 i23 = HEAP32[i4 >> 2] | 0; 11638 i26 = i25 >>> (16 - i23 | 0) & 65535; 11639 HEAP16[i3 >> 1] = i26; 11640 i23 = i24 + -16 + i23 | 0; 11641 } else { 11642 i23 = i23 + i24 | 0; 11643 } 11644 HEAP32[i4 >> 2] = i23; 11645 i22 = i22 + -1 | 0; 11646 } while ((i22 | 0) != 0); 11647 } 11648 } while (0); 11649 if (i19 << 16 >> 16 == 0) { 11650 i24 = i15; 11651 i21 = 138; 11652 i23 = 3; 11653 i15 = i16; 11654 continue; 11655 } 11656 i24 = i15; 11657 i21 = i17 ? 6 : 7; 11658 i23 = i17 ? 3 : 4; 11659 i15 = i16; 11660 } 11661 STACKTOP = i11; 11662 return; 11663} 11664function __tr_flush_block(i2, i4, i6, i3) { 11665 i2 = i2 | 0; 11666 i4 = i4 | 0; 11667 i6 = i6 | 0; 11668 i3 = i3 | 0; 11669 var i1 = 0, i5 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0; 11670 i1 = STACKTOP; 11671 if ((HEAP32[i2 + 132 >> 2] | 0) > 0) { 11672 i5 = (HEAP32[i2 >> 2] | 0) + 44 | 0; 11673 if ((HEAP32[i5 >> 2] | 0) == 2) { 11674 i8 = -201342849; 11675 i9 = 0; 11676 while (1) { 11677 if ((i8 & 1 | 0) != 0 ? (HEAP16[i2 + (i9 << 2) + 148 >> 1] | 0) != 0 : 0) { 11678 i8 = 0; 11679 break; 11680 } 11681 i9 = i9 + 1 | 0; 11682 if ((i9 | 0) < 32) { 11683 i8 = i8 >>> 1; 11684 } else { 11685 i7 = 6; 11686 break; 11687 } 11688 } 11689 L9 : do { 11690 if ((i7 | 0) == 6) { 11691 if (((HEAP16[i2 + 184 >> 1] | 0) == 0 ? (HEAP16[i2 + 188 >> 1] | 0) == 0 : 0) ? (HEAP16[i2 + 200 >> 1] | 0) == 0 : 0) { 11692 i8 = 32; 11693 while (1) { 11694 i7 = i8 + 1 | 0; 11695 if ((HEAP16[i2 + (i8 << 2) + 148 >> 1] | 0) != 0) { 11696 i8 = 1; 11697 break L9; 11698 } 11699 if ((i7 | 0) < 256) { 11700 i8 = i7; 11701 } else { 11702 i8 = 0; 11703 break; 11704 } 11705 } 11706 } else { 11707 i8 = 1; 11708 } 11709 } 11710 } while (0); 11711 HEAP32[i5 >> 2] = i8; 11712 } 11713 _build_tree(i2, i2 + 2840 | 0); 11714 _build_tree(i2, i2 + 2852 | 0); 11715 _scan_tree(i2, i2 + 148 | 0, HEAP32[i2 + 2844 >> 2] | 0); 11716 _scan_tree(i2, i2 + 2440 | 0, HEAP32[i2 + 2856 >> 2] | 0); 11717 _build_tree(i2, i2 + 2864 | 0); 11718 i5 = 18; 11719 while (1) { 11720 i7 = i5 + -1 | 0; 11721 if ((HEAP16[i2 + (HEAPU8[2888 + i5 | 0] << 2) + 2686 >> 1] | 0) != 0) { 11722 break; 11723 } 11724 if ((i7 | 0) > 2) { 11725 i5 = i7; 11726 } else { 11727 i5 = i7; 11728 break; 11729 } 11730 } 11731 i10 = i2 + 5800 | 0; 11732 i7 = (i5 * 3 | 0) + 17 + (HEAP32[i10 >> 2] | 0) | 0; 11733 HEAP32[i10 >> 2] = i7; 11734 i7 = (i7 + 10 | 0) >>> 3; 11735 i10 = ((HEAP32[i2 + 5804 >> 2] | 0) + 10 | 0) >>> 3; 11736 i9 = i10 >>> 0 > i7 >>> 0 ? i7 : i10; 11737 } else { 11738 i10 = i6 + 5 | 0; 11739 i5 = 0; 11740 i9 = i10; 11741 } 11742 do { 11743 if ((i6 + 4 | 0) >>> 0 > i9 >>> 0 | (i4 | 0) == 0) { 11744 i4 = i2 + 5820 | 0; 11745 i7 = HEAP32[i4 >> 2] | 0; 11746 i8 = (i7 | 0) > 13; 11747 if ((HEAP32[i2 + 136 >> 2] | 0) == 4 | (i10 | 0) == (i9 | 0)) { 11748 i9 = i3 + 2 & 65535; 11749 i6 = i2 + 5816 | 0; 11750 i5 = HEAPU16[i6 >> 1] | i9 << i7; 11751 HEAP16[i6 >> 1] = i5; 11752 if (i8) { 11753 i12 = i2 + 20 | 0; 11754 i13 = HEAP32[i12 >> 2] | 0; 11755 HEAP32[i12 >> 2] = i13 + 1; 11756 i14 = i2 + 8 | 0; 11757 HEAP8[(HEAP32[i14 >> 2] | 0) + i13 | 0] = i5; 11758 i13 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 11759 i5 = HEAP32[i12 >> 2] | 0; 11760 HEAP32[i12 >> 2] = i5 + 1; 11761 HEAP8[(HEAP32[i14 >> 2] | 0) + i5 | 0] = i13; 11762 i5 = HEAP32[i4 >> 2] | 0; 11763 HEAP16[i6 >> 1] = i9 >>> (16 - i5 | 0); 11764 i5 = i5 + -13 | 0; 11765 } else { 11766 i5 = i7 + 3 | 0; 11767 } 11768 HEAP32[i4 >> 2] = i5; 11769 _compress_block(i2, 1136, 2288); 11770 break; 11771 } 11772 i10 = i3 + 4 & 65535; 11773 i6 = i2 + 5816 | 0; 11774 i9 = HEAPU16[i6 >> 1] | i10 << i7; 11775 HEAP16[i6 >> 1] = i9; 11776 if (i8) { 11777 i13 = i2 + 20 | 0; 11778 i12 = HEAP32[i13 >> 2] | 0; 11779 HEAP32[i13 >> 2] = i12 + 1; 11780 i14 = i2 + 8 | 0; 11781 HEAP8[(HEAP32[i14 >> 2] | 0) + i12 | 0] = i9; 11782 i9 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 11783 i12 = HEAP32[i13 >> 2] | 0; 11784 HEAP32[i13 >> 2] = i12 + 1; 11785 HEAP8[(HEAP32[i14 >> 2] | 0) + i12 | 0] = i9; 11786 i12 = HEAP32[i4 >> 2] | 0; 11787 i9 = i10 >>> (16 - i12 | 0); 11788 HEAP16[i6 >> 1] = i9; 11789 i12 = i12 + -13 | 0; 11790 } else { 11791 i12 = i7 + 3 | 0; 11792 } 11793 HEAP32[i4 >> 2] = i12; 11794 i7 = HEAP32[i2 + 2844 >> 2] | 0; 11795 i8 = HEAP32[i2 + 2856 >> 2] | 0; 11796 i10 = i7 + 65280 & 65535; 11797 i11 = i9 & 65535 | i10 << i12; 11798 HEAP16[i6 >> 1] = i11; 11799 if ((i12 | 0) > 11) { 11800 i13 = i2 + 20 | 0; 11801 i9 = HEAP32[i13 >> 2] | 0; 11802 HEAP32[i13 >> 2] = i9 + 1; 11803 i14 = i2 + 8 | 0; 11804 HEAP8[(HEAP32[i14 >> 2] | 0) + i9 | 0] = i11; 11805 i11 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 11806 i9 = HEAP32[i13 >> 2] | 0; 11807 HEAP32[i13 >> 2] = i9 + 1; 11808 HEAP8[(HEAP32[i14 >> 2] | 0) + i9 | 0] = i11; 11809 i9 = HEAP32[i4 >> 2] | 0; 11810 i11 = i10 >>> (16 - i9 | 0); 11811 HEAP16[i6 >> 1] = i11; 11812 i9 = i9 + -11 | 0; 11813 } else { 11814 i9 = i12 + 5 | 0; 11815 } 11816 HEAP32[i4 >> 2] = i9; 11817 i10 = i8 & 65535; 11818 i11 = i10 << i9 | i11 & 65535; 11819 HEAP16[i6 >> 1] = i11; 11820 if ((i9 | 0) > 11) { 11821 i13 = i2 + 20 | 0; 11822 i9 = HEAP32[i13 >> 2] | 0; 11823 HEAP32[i13 >> 2] = i9 + 1; 11824 i14 = i2 + 8 | 0; 11825 HEAP8[(HEAP32[i14 >> 2] | 0) + i9 | 0] = i11; 11826 i11 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 11827 i9 = HEAP32[i13 >> 2] | 0; 11828 HEAP32[i13 >> 2] = i9 + 1; 11829 HEAP8[(HEAP32[i14 >> 2] | 0) + i9 | 0] = i11; 11830 i9 = HEAP32[i4 >> 2] | 0; 11831 i11 = i10 >>> (16 - i9 | 0); 11832 HEAP16[i6 >> 1] = i11; 11833 i9 = i9 + -11 | 0; 11834 } else { 11835 i9 = i9 + 5 | 0; 11836 } 11837 HEAP32[i4 >> 2] = i9; 11838 i10 = i5 + 65533 & 65535; 11839 i14 = i10 << i9 | i11 & 65535; 11840 HEAP16[i6 >> 1] = i14; 11841 if ((i9 | 0) > 12) { 11842 i12 = i2 + 20 | 0; 11843 i11 = HEAP32[i12 >> 2] | 0; 11844 HEAP32[i12 >> 2] = i11 + 1; 11845 i13 = i2 + 8 | 0; 11846 HEAP8[(HEAP32[i13 >> 2] | 0) + i11 | 0] = i14; 11847 i14 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 11848 i11 = HEAP32[i12 >> 2] | 0; 11849 HEAP32[i12 >> 2] = i11 + 1; 11850 HEAP8[(HEAP32[i13 >> 2] | 0) + i11 | 0] = i14; 11851 i11 = HEAP32[i4 >> 2] | 0; 11852 i14 = i10 >>> (16 - i11 | 0); 11853 HEAP16[i6 >> 1] = i14; 11854 i11 = i11 + -12 | 0; 11855 } else { 11856 i11 = i9 + 4 | 0; 11857 } 11858 HEAP32[i4 >> 2] = i11; 11859 if ((i5 | 0) > -1) { 11860 i10 = i2 + 20 | 0; 11861 i9 = i2 + 8 | 0; 11862 i12 = 0; 11863 while (1) { 11864 i13 = HEAPU16[i2 + (HEAPU8[2888 + i12 | 0] << 2) + 2686 >> 1] | 0; 11865 i14 = i13 << i11 | i14 & 65535; 11866 HEAP16[i6 >> 1] = i14; 11867 if ((i11 | 0) > 13) { 11868 i11 = HEAP32[i10 >> 2] | 0; 11869 HEAP32[i10 >> 2] = i11 + 1; 11870 HEAP8[(HEAP32[i9 >> 2] | 0) + i11 | 0] = i14; 11871 i14 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 11872 i11 = HEAP32[i10 >> 2] | 0; 11873 HEAP32[i10 >> 2] = i11 + 1; 11874 HEAP8[(HEAP32[i9 >> 2] | 0) + i11 | 0] = i14; 11875 i11 = HEAP32[i4 >> 2] | 0; 11876 i14 = i13 >>> (16 - i11 | 0); 11877 HEAP16[i6 >> 1] = i14; 11878 i11 = i11 + -13 | 0; 11879 } else { 11880 i11 = i11 + 3 | 0; 11881 } 11882 HEAP32[i4 >> 2] = i11; 11883 if ((i12 | 0) == (i5 | 0)) { 11884 break; 11885 } else { 11886 i12 = i12 + 1 | 0; 11887 } 11888 } 11889 } 11890 i13 = i2 + 148 | 0; 11891 _send_tree(i2, i13, i7); 11892 i14 = i2 + 2440 | 0; 11893 _send_tree(i2, i14, i8); 11894 _compress_block(i2, i13, i14); 11895 } else { 11896 __tr_stored_block(i2, i4, i6, i3); 11897 } 11898 } while (0); 11899 _init_block(i2); 11900 if ((i3 | 0) == 0) { 11901 STACKTOP = i1; 11902 return; 11903 } 11904 i3 = i2 + 5820 | 0; 11905 i4 = HEAP32[i3 >> 2] | 0; 11906 if ((i4 | 0) <= 8) { 11907 i5 = i2 + 5816 | 0; 11908 if ((i4 | 0) > 0) { 11909 i13 = HEAP16[i5 >> 1] & 255; 11910 i12 = i2 + 20 | 0; 11911 i14 = HEAP32[i12 >> 2] | 0; 11912 HEAP32[i12 >> 2] = i14 + 1; 11913 HEAP8[(HEAP32[i2 + 8 >> 2] | 0) + i14 | 0] = i13; 11914 } 11915 } else { 11916 i5 = i2 + 5816 | 0; 11917 i14 = HEAP16[i5 >> 1] & 255; 11918 i11 = i2 + 20 | 0; 11919 i12 = HEAP32[i11 >> 2] | 0; 11920 HEAP32[i11 >> 2] = i12 + 1; 11921 i13 = i2 + 8 | 0; 11922 HEAP8[(HEAP32[i13 >> 2] | 0) + i12 | 0] = i14; 11923 i12 = (HEAPU16[i5 >> 1] | 0) >>> 8 & 255; 11924 i14 = HEAP32[i11 >> 2] | 0; 11925 HEAP32[i11 >> 2] = i14 + 1; 11926 HEAP8[(HEAP32[i13 >> 2] | 0) + i14 | 0] = i12; 11927 } 11928 HEAP16[i5 >> 1] = 0; 11929 HEAP32[i3 >> 2] = 0; 11930 STACKTOP = i1; 11931 return; 11932} 11933function _deflate_fast(i3, i6) { 11934 i3 = i3 | 0; 11935 i6 = i6 | 0; 11936 var i1 = 0, i2 = 0, i4 = 0, i5 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0, i33 = 0, i34 = 0, i35 = 0, i36 = 0; 11937 i1 = STACKTOP; 11938 i20 = i3 + 116 | 0; 11939 i22 = (i6 | 0) == 0; 11940 i23 = i3 + 72 | 0; 11941 i24 = i3 + 88 | 0; 11942 i5 = i3 + 108 | 0; 11943 i7 = i3 + 56 | 0; 11944 i9 = i3 + 84 | 0; 11945 i10 = i3 + 68 | 0; 11946 i11 = i3 + 52 | 0; 11947 i12 = i3 + 64 | 0; 11948 i19 = i3 + 44 | 0; 11949 i21 = i3 + 96 | 0; 11950 i16 = i3 + 112 | 0; 11951 i13 = i3 + 5792 | 0; 11952 i17 = i3 + 5796 | 0; 11953 i18 = i3 + 5784 | 0; 11954 i14 = i3 + 5788 | 0; 11955 i15 = i3 + 128 | 0; 11956 i4 = i3 + 92 | 0; 11957 while (1) { 11958 if ((HEAP32[i20 >> 2] | 0) >>> 0 < 262) { 11959 _fill_window(i3); 11960 i25 = HEAP32[i20 >> 2] | 0; 11961 if (i25 >>> 0 < 262 & i22) { 11962 i2 = 0; 11963 i25 = 34; 11964 break; 11965 } 11966 if ((i25 | 0) == 0) { 11967 i25 = 26; 11968 break; 11969 } 11970 if (!(i25 >>> 0 > 2)) { 11971 i25 = 9; 11972 } else { 11973 i25 = 6; 11974 } 11975 } else { 11976 i25 = 6; 11977 } 11978 if ((i25 | 0) == 6) { 11979 i25 = 0; 11980 i26 = HEAP32[i5 >> 2] | 0; 11981 i34 = ((HEAPU8[(HEAP32[i7 >> 2] | 0) + (i26 + 2) | 0] | 0) ^ HEAP32[i23 >> 2] << HEAP32[i24 >> 2]) & HEAP32[i9 >> 2]; 11982 HEAP32[i23 >> 2] = i34; 11983 i34 = (HEAP32[i10 >> 2] | 0) + (i34 << 1) | 0; 11984 i35 = HEAP16[i34 >> 1] | 0; 11985 HEAP16[(HEAP32[i12 >> 2] | 0) + ((HEAP32[i11 >> 2] & i26) << 1) >> 1] = i35; 11986 i27 = i35 & 65535; 11987 HEAP16[i34 >> 1] = i26; 11988 if (!(i35 << 16 >> 16 == 0) ? !((i26 - i27 | 0) >>> 0 > ((HEAP32[i19 >> 2] | 0) + -262 | 0) >>> 0) : 0) { 11989 i26 = _longest_match(i3, i27) | 0; 11990 HEAP32[i21 >> 2] = i26; 11991 } else { 11992 i25 = 9; 11993 } 11994 } 11995 if ((i25 | 0) == 9) { 11996 i26 = HEAP32[i21 >> 2] | 0; 11997 } 11998 do { 11999 if (i26 >>> 0 > 2) { 12000 i35 = i26 + 253 | 0; 12001 i25 = (HEAP32[i5 >> 2] | 0) - (HEAP32[i16 >> 2] | 0) | 0; 12002 i34 = HEAP32[i13 >> 2] | 0; 12003 HEAP16[(HEAP32[i17 >> 2] | 0) + (i34 << 1) >> 1] = i25; 12004 HEAP32[i13 >> 2] = i34 + 1; 12005 HEAP8[(HEAP32[i18 >> 2] | 0) + i34 | 0] = i35; 12006 i35 = i3 + ((HEAPU8[808 + (i35 & 255) | 0] | 0 | 256) + 1 << 2) + 148 | 0; 12007 HEAP16[i35 >> 1] = (HEAP16[i35 >> 1] | 0) + 1 << 16 >> 16; 12008 i25 = i25 + 65535 & 65535; 12009 if (!(i25 >>> 0 < 256)) { 12010 i25 = (i25 >>> 7) + 256 | 0; 12011 } 12012 i25 = i3 + ((HEAPU8[296 + i25 | 0] | 0) << 2) + 2440 | 0; 12013 HEAP16[i25 >> 1] = (HEAP16[i25 >> 1] | 0) + 1 << 16 >> 16; 12014 i25 = (HEAP32[i13 >> 2] | 0) == ((HEAP32[i14 >> 2] | 0) + -1 | 0) | 0; 12015 i26 = HEAP32[i21 >> 2] | 0; 12016 i35 = (HEAP32[i20 >> 2] | 0) - i26 | 0; 12017 HEAP32[i20 >> 2] = i35; 12018 if (!(i26 >>> 0 <= (HEAP32[i15 >> 2] | 0) >>> 0 & i35 >>> 0 > 2)) { 12019 i26 = (HEAP32[i5 >> 2] | 0) + i26 | 0; 12020 HEAP32[i5 >> 2] = i26; 12021 HEAP32[i21 >> 2] = 0; 12022 i34 = HEAP32[i7 >> 2] | 0; 12023 i35 = HEAPU8[i34 + i26 | 0] | 0; 12024 HEAP32[i23 >> 2] = i35; 12025 HEAP32[i23 >> 2] = ((HEAPU8[i34 + (i26 + 1) | 0] | 0) ^ i35 << HEAP32[i24 >> 2]) & HEAP32[i9 >> 2]; 12026 break; 12027 } 12028 i30 = i26 + -1 | 0; 12029 HEAP32[i21 >> 2] = i30; 12030 i34 = HEAP32[i24 >> 2] | 0; 12031 i33 = HEAP32[i7 >> 2] | 0; 12032 i35 = HEAP32[i9 >> 2] | 0; 12033 i32 = HEAP32[i10 >> 2] | 0; 12034 i27 = HEAP32[i11 >> 2] | 0; 12035 i29 = HEAP32[i12 >> 2] | 0; 12036 i26 = HEAP32[i5 >> 2] | 0; 12037 i31 = HEAP32[i23 >> 2] | 0; 12038 while (1) { 12039 i28 = i26 + 1 | 0; 12040 HEAP32[i5 >> 2] = i28; 12041 i31 = ((HEAPU8[i33 + (i26 + 3) | 0] | 0) ^ i31 << i34) & i35; 12042 HEAP32[i23 >> 2] = i31; 12043 i36 = i32 + (i31 << 1) | 0; 12044 HEAP16[i29 + ((i27 & i28) << 1) >> 1] = HEAP16[i36 >> 1] | 0; 12045 HEAP16[i36 >> 1] = i28; 12046 i30 = i30 + -1 | 0; 12047 HEAP32[i21 >> 2] = i30; 12048 if ((i30 | 0) == 0) { 12049 break; 12050 } else { 12051 i26 = i28; 12052 } 12053 } 12054 i26 = i26 + 2 | 0; 12055 HEAP32[i5 >> 2] = i26; 12056 } else { 12057 i25 = HEAP8[(HEAP32[i7 >> 2] | 0) + (HEAP32[i5 >> 2] | 0) | 0] | 0; 12058 i26 = HEAP32[i13 >> 2] | 0; 12059 HEAP16[(HEAP32[i17 >> 2] | 0) + (i26 << 1) >> 1] = 0; 12060 HEAP32[i13 >> 2] = i26 + 1; 12061 HEAP8[(HEAP32[i18 >> 2] | 0) + i26 | 0] = i25; 12062 i25 = i3 + ((i25 & 255) << 2) + 148 | 0; 12063 HEAP16[i25 >> 1] = (HEAP16[i25 >> 1] | 0) + 1 << 16 >> 16; 12064 i25 = (HEAP32[i13 >> 2] | 0) == ((HEAP32[i14 >> 2] | 0) + -1 | 0) | 0; 12065 HEAP32[i20 >> 2] = (HEAP32[i20 >> 2] | 0) + -1; 12066 i26 = (HEAP32[i5 >> 2] | 0) + 1 | 0; 12067 HEAP32[i5 >> 2] = i26; 12068 } 12069 } while (0); 12070 if ((i25 | 0) == 0) { 12071 continue; 12072 } 12073 i25 = HEAP32[i4 >> 2] | 0; 12074 if ((i25 | 0) > -1) { 12075 i27 = (HEAP32[i7 >> 2] | 0) + i25 | 0; 12076 } else { 12077 i27 = 0; 12078 } 12079 __tr_flush_block(i3, i27, i26 - i25 | 0, 0); 12080 HEAP32[i4 >> 2] = HEAP32[i5 >> 2]; 12081 i27 = HEAP32[i3 >> 2] | 0; 12082 i28 = i27 + 28 | 0; 12083 i25 = HEAP32[i28 >> 2] | 0; 12084 i30 = HEAP32[i25 + 20 >> 2] | 0; 12085 i26 = i27 + 16 | 0; 12086 i29 = HEAP32[i26 >> 2] | 0; 12087 i29 = i30 >>> 0 > i29 >>> 0 ? i29 : i30; 12088 if ((i29 | 0) != 0 ? (i8 = i27 + 12 | 0, _memcpy(HEAP32[i8 >> 2] | 0, HEAP32[i25 + 16 >> 2] | 0, i29 | 0) | 0, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) + i29, i8 = (HEAP32[i28 >> 2] | 0) + 16 | 0, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) + i29, i8 = i27 + 20 | 0, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) + i29, HEAP32[i26 >> 2] = (HEAP32[i26 >> 2] | 0) - i29, i8 = HEAP32[i28 >> 2] | 0, i35 = i8 + 20 | 0, i36 = HEAP32[i35 >> 2] | 0, HEAP32[i35 >> 2] = i36 - i29, (i36 | 0) == (i29 | 0)) : 0) { 12089 HEAP32[i8 + 16 >> 2] = HEAP32[i8 + 8 >> 2]; 12090 } 12091 if ((HEAP32[(HEAP32[i3 >> 2] | 0) + 16 >> 2] | 0) == 0) { 12092 i2 = 0; 12093 i25 = 34; 12094 break; 12095 } 12096 } 12097 if ((i25 | 0) == 26) { 12098 i8 = HEAP32[i4 >> 2] | 0; 12099 if ((i8 | 0) > -1) { 12100 i7 = (HEAP32[i7 >> 2] | 0) + i8 | 0; 12101 } else { 12102 i7 = 0; 12103 } 12104 i6 = (i6 | 0) == 4; 12105 __tr_flush_block(i3, i7, (HEAP32[i5 >> 2] | 0) - i8 | 0, i6 & 1); 12106 HEAP32[i4 >> 2] = HEAP32[i5 >> 2]; 12107 i5 = HEAP32[i3 >> 2] | 0; 12108 i7 = i5 + 28 | 0; 12109 i4 = HEAP32[i7 >> 2] | 0; 12110 i10 = HEAP32[i4 + 20 >> 2] | 0; 12111 i8 = i5 + 16 | 0; 12112 i9 = HEAP32[i8 >> 2] | 0; 12113 i9 = i10 >>> 0 > i9 >>> 0 ? i9 : i10; 12114 if ((i9 | 0) != 0 ? (i2 = i5 + 12 | 0, _memcpy(HEAP32[i2 >> 2] | 0, HEAP32[i4 + 16 >> 2] | 0, i9 | 0) | 0, HEAP32[i2 >> 2] = (HEAP32[i2 >> 2] | 0) + i9, i2 = (HEAP32[i7 >> 2] | 0) + 16 | 0, HEAP32[i2 >> 2] = (HEAP32[i2 >> 2] | 0) + i9, i2 = i5 + 20 | 0, HEAP32[i2 >> 2] = (HEAP32[i2 >> 2] | 0) + i9, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) - i9, i2 = HEAP32[i7 >> 2] | 0, i35 = i2 + 20 | 0, i36 = HEAP32[i35 >> 2] | 0, HEAP32[i35 >> 2] = i36 - i9, (i36 | 0) == (i9 | 0)) : 0) { 12115 HEAP32[i2 + 16 >> 2] = HEAP32[i2 + 8 >> 2]; 12116 } 12117 if ((HEAP32[(HEAP32[i3 >> 2] | 0) + 16 >> 2] | 0) == 0) { 12118 i36 = i6 ? 2 : 0; 12119 STACKTOP = i1; 12120 return i36 | 0; 12121 } else { 12122 i36 = i6 ? 3 : 1; 12123 STACKTOP = i1; 12124 return i36 | 0; 12125 } 12126 } else if ((i25 | 0) == 34) { 12127 STACKTOP = i1; 12128 return i2 | 0; 12129 } 12130 return 0; 12131} 12132function _inflate_table(i11, i5, i13, i2, i1, i10) { 12133 i11 = i11 | 0; 12134 i5 = i5 | 0; 12135 i13 = i13 | 0; 12136 i2 = i2 | 0; 12137 i1 = i1 | 0; 12138 i10 = i10 | 0; 12139 var i3 = 0, i4 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i12 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0, i26 = 0, i27 = 0, i28 = 0, i29 = 0, i30 = 0, i31 = 0, i32 = 0, i33 = 0; 12140 i3 = STACKTOP; 12141 STACKTOP = STACKTOP + 64 | 0; 12142 i7 = i3 + 32 | 0; 12143 i12 = i3; 12144 i4 = i7 + 0 | 0; 12145 i9 = i4 + 32 | 0; 12146 do { 12147 HEAP16[i4 >> 1] = 0; 12148 i4 = i4 + 2 | 0; 12149 } while ((i4 | 0) < (i9 | 0)); 12150 i14 = (i13 | 0) == 0; 12151 if (!i14) { 12152 i4 = 0; 12153 do { 12154 i32 = i7 + (HEAPU16[i5 + (i4 << 1) >> 1] << 1) | 0; 12155 HEAP16[i32 >> 1] = (HEAP16[i32 >> 1] | 0) + 1 << 16 >> 16; 12156 i4 = i4 + 1 | 0; 12157 } while ((i4 | 0) != (i13 | 0)); 12158 } 12159 i4 = HEAP32[i1 >> 2] | 0; 12160 i9 = 15; 12161 while (1) { 12162 i15 = i9 + -1 | 0; 12163 if ((HEAP16[i7 + (i9 << 1) >> 1] | 0) != 0) { 12164 break; 12165 } 12166 if ((i15 | 0) == 0) { 12167 i6 = 7; 12168 break; 12169 } else { 12170 i9 = i15; 12171 } 12172 } 12173 if ((i6 | 0) == 7) { 12174 i32 = HEAP32[i2 >> 2] | 0; 12175 HEAP32[i2 >> 2] = i32 + 4; 12176 HEAP8[i32] = 64; 12177 HEAP8[i32 + 1 | 0] = 1; 12178 HEAP16[i32 + 2 >> 1] = 0; 12179 i32 = HEAP32[i2 >> 2] | 0; 12180 HEAP32[i2 >> 2] = i32 + 4; 12181 HEAP8[i32] = 64; 12182 HEAP8[i32 + 1 | 0] = 1; 12183 HEAP16[i32 + 2 >> 1] = 0; 12184 HEAP32[i1 >> 2] = 1; 12185 i32 = 0; 12186 STACKTOP = i3; 12187 return i32 | 0; 12188 } 12189 i4 = i4 >>> 0 > i9 >>> 0 ? i9 : i4; 12190 L12 : do { 12191 if (i9 >>> 0 > 1) { 12192 i27 = 1; 12193 while (1) { 12194 i15 = i27 + 1 | 0; 12195 if ((HEAP16[i7 + (i27 << 1) >> 1] | 0) != 0) { 12196 break L12; 12197 } 12198 if (i15 >>> 0 < i9 >>> 0) { 12199 i27 = i15; 12200 } else { 12201 i27 = i15; 12202 break; 12203 } 12204 } 12205 } else { 12206 i27 = 1; 12207 } 12208 } while (0); 12209 i4 = i4 >>> 0 < i27 >>> 0 ? i27 : i4; 12210 i16 = 1; 12211 i15 = 1; 12212 do { 12213 i16 = (i16 << 1) - (HEAPU16[i7 + (i15 << 1) >> 1] | 0) | 0; 12214 i15 = i15 + 1 | 0; 12215 if ((i16 | 0) < 0) { 12216 i8 = -1; 12217 i6 = 56; 12218 break; 12219 } 12220 } while (i15 >>> 0 < 16); 12221 if ((i6 | 0) == 56) { 12222 STACKTOP = i3; 12223 return i8 | 0; 12224 } 12225 if ((i16 | 0) > 0 ? !((i11 | 0) != 0 & (i9 | 0) == 1) : 0) { 12226 i32 = -1; 12227 STACKTOP = i3; 12228 return i32 | 0; 12229 } 12230 HEAP16[i12 + 2 >> 1] = 0; 12231 i16 = 0; 12232 i15 = 1; 12233 do { 12234 i16 = (HEAPU16[i7 + (i15 << 1) >> 1] | 0) + (i16 & 65535) | 0; 12235 i15 = i15 + 1 | 0; 12236 HEAP16[i12 + (i15 << 1) >> 1] = i16; 12237 } while ((i15 | 0) != 15); 12238 if (!i14) { 12239 i15 = 0; 12240 do { 12241 i14 = HEAP16[i5 + (i15 << 1) >> 1] | 0; 12242 if (!(i14 << 16 >> 16 == 0)) { 12243 i31 = i12 + ((i14 & 65535) << 1) | 0; 12244 i32 = HEAP16[i31 >> 1] | 0; 12245 HEAP16[i31 >> 1] = i32 + 1 << 16 >> 16; 12246 HEAP16[i10 + ((i32 & 65535) << 1) >> 1] = i15; 12247 } 12248 i15 = i15 + 1 | 0; 12249 } while ((i15 | 0) != (i13 | 0)); 12250 } 12251 if ((i11 | 0) == 1) { 12252 i14 = 1 << i4; 12253 if (i14 >>> 0 > 851) { 12254 i32 = 1; 12255 STACKTOP = i3; 12256 return i32 | 0; 12257 } else { 12258 i16 = 0; 12259 i20 = 1; 12260 i17 = 14128 + -514 | 0; 12261 i19 = 256; 12262 i18 = 14192 + -514 | 0; 12263 } 12264 } else if ((i11 | 0) != 0) { 12265 i14 = 1 << i4; 12266 i16 = (i11 | 0) == 2; 12267 if (i16 & i14 >>> 0 > 591) { 12268 i32 = 1; 12269 STACKTOP = i3; 12270 return i32 | 0; 12271 } else { 12272 i20 = 0; 12273 i17 = 14256; 12274 i19 = -1; 12275 i18 = 14320; 12276 } 12277 } else { 12278 i16 = 0; 12279 i14 = 1 << i4; 12280 i20 = 0; 12281 i17 = i10; 12282 i19 = 19; 12283 i18 = i10; 12284 } 12285 i11 = i14 + -1 | 0; 12286 i12 = i4 & 255; 12287 i22 = i4; 12288 i21 = 0; 12289 i25 = 0; 12290 i13 = -1; 12291 i15 = HEAP32[i2 >> 2] | 0; 12292 i24 = 0; 12293 L44 : while (1) { 12294 i23 = 1 << i22; 12295 while (1) { 12296 i29 = i27 - i21 | 0; 12297 i22 = i29 & 255; 12298 i28 = HEAP16[i10 + (i24 << 1) >> 1] | 0; 12299 i30 = i28 & 65535; 12300 if ((i30 | 0) >= (i19 | 0)) { 12301 if ((i30 | 0) > (i19 | 0)) { 12302 i26 = HEAP16[i18 + (i30 << 1) >> 1] & 255; 12303 i28 = HEAP16[i17 + (i30 << 1) >> 1] | 0; 12304 } else { 12305 i26 = 96; 12306 i28 = 0; 12307 } 12308 } else { 12309 i26 = 0; 12310 } 12311 i31 = 1 << i29; 12312 i30 = i25 >>> i21; 12313 i32 = i23; 12314 while (1) { 12315 i29 = i32 - i31 | 0; 12316 i33 = i29 + i30 | 0; 12317 HEAP8[i15 + (i33 << 2) | 0] = i26; 12318 HEAP8[i15 + (i33 << 2) + 1 | 0] = i22; 12319 HEAP16[i15 + (i33 << 2) + 2 >> 1] = i28; 12320 if ((i32 | 0) == (i31 | 0)) { 12321 break; 12322 } else { 12323 i32 = i29; 12324 } 12325 } 12326 i26 = 1 << i27 + -1; 12327 while (1) { 12328 if ((i26 & i25 | 0) == 0) { 12329 break; 12330 } else { 12331 i26 = i26 >>> 1; 12332 } 12333 } 12334 if ((i26 | 0) == 0) { 12335 i25 = 0; 12336 } else { 12337 i25 = (i26 + -1 & i25) + i26 | 0; 12338 } 12339 i24 = i24 + 1 | 0; 12340 i32 = i7 + (i27 << 1) | 0; 12341 i33 = (HEAP16[i32 >> 1] | 0) + -1 << 16 >> 16; 12342 HEAP16[i32 >> 1] = i33; 12343 if (i33 << 16 >> 16 == 0) { 12344 if ((i27 | 0) == (i9 | 0)) { 12345 break L44; 12346 } 12347 i27 = HEAPU16[i5 + (HEAPU16[i10 + (i24 << 1) >> 1] << 1) >> 1] | 0; 12348 } 12349 if (!(i27 >>> 0 > i4 >>> 0)) { 12350 continue; 12351 } 12352 i26 = i25 & i11; 12353 if ((i26 | 0) != (i13 | 0)) { 12354 break; 12355 } 12356 } 12357 i28 = (i21 | 0) == 0 ? i4 : i21; 12358 i23 = i15 + (i23 << 2) | 0; 12359 i31 = i27 - i28 | 0; 12360 L67 : do { 12361 if (i27 >>> 0 < i9 >>> 0) { 12362 i29 = i27; 12363 i30 = i31; 12364 i31 = 1 << i31; 12365 while (1) { 12366 i31 = i31 - (HEAPU16[i7 + (i29 << 1) >> 1] | 0) | 0; 12367 if ((i31 | 0) < 1) { 12368 break L67; 12369 } 12370 i30 = i30 + 1 | 0; 12371 i29 = i30 + i28 | 0; 12372 if (i29 >>> 0 < i9 >>> 0) { 12373 i31 = i31 << 1; 12374 } else { 12375 break; 12376 } 12377 } 12378 } else { 12379 i30 = i31; 12380 } 12381 } while (0); 12382 i29 = (1 << i30) + i14 | 0; 12383 if (i20 & i29 >>> 0 > 851 | i16 & i29 >>> 0 > 591) { 12384 i8 = 1; 12385 i6 = 56; 12386 break; 12387 } 12388 HEAP8[(HEAP32[i2 >> 2] | 0) + (i26 << 2) | 0] = i30; 12389 HEAP8[(HEAP32[i2 >> 2] | 0) + (i26 << 2) + 1 | 0] = i12; 12390 i22 = HEAP32[i2 >> 2] | 0; 12391 HEAP16[i22 + (i26 << 2) + 2 >> 1] = (i23 - i22 | 0) >>> 2; 12392 i22 = i30; 12393 i21 = i28; 12394 i13 = i26; 12395 i15 = i23; 12396 i14 = i29; 12397 } 12398 if ((i6 | 0) == 56) { 12399 STACKTOP = i3; 12400 return i8 | 0; 12401 } 12402 L77 : do { 12403 if ((i25 | 0) != 0) { 12404 do { 12405 if ((i21 | 0) != 0) { 12406 if ((i25 & i11 | 0) != (i13 | 0)) { 12407 i21 = 0; 12408 i22 = i12; 12409 i9 = i4; 12410 i15 = HEAP32[i2 >> 2] | 0; 12411 } 12412 } else { 12413 i21 = 0; 12414 } 12415 i5 = i25 >>> i21; 12416 HEAP8[i15 + (i5 << 2) | 0] = 64; 12417 HEAP8[i15 + (i5 << 2) + 1 | 0] = i22; 12418 HEAP16[i15 + (i5 << 2) + 2 >> 1] = 0; 12419 i5 = 1 << i9 + -1; 12420 while (1) { 12421 if ((i5 & i25 | 0) == 0) { 12422 break; 12423 } else { 12424 i5 = i5 >>> 1; 12425 } 12426 } 12427 if ((i5 | 0) == 0) { 12428 break L77; 12429 } 12430 i25 = (i5 + -1 & i25) + i5 | 0; 12431 } while ((i25 | 0) != 0); 12432 } 12433 } while (0); 12434 HEAP32[i2 >> 2] = (HEAP32[i2 >> 2] | 0) + (i14 << 2); 12435 HEAP32[i1 >> 2] = i4; 12436 i33 = 0; 12437 STACKTOP = i3; 12438 return i33 | 0; 12439} 12440function _compress_block(i1, i3, i7) { 12441 i1 = i1 | 0; 12442 i3 = i3 | 0; 12443 i7 = i7 | 0; 12444 var i2 = 0, i4 = 0, i5 = 0, i6 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0; 12445 i2 = STACKTOP; 12446 i11 = i1 + 5792 | 0; 12447 if ((HEAP32[i11 >> 2] | 0) == 0) { 12448 i14 = HEAP32[i1 + 5820 >> 2] | 0; 12449 i17 = HEAP16[i1 + 5816 >> 1] | 0; 12450 } else { 12451 i9 = i1 + 5796 | 0; 12452 i10 = i1 + 5784 | 0; 12453 i8 = i1 + 5820 | 0; 12454 i12 = i1 + 5816 | 0; 12455 i5 = i1 + 20 | 0; 12456 i6 = i1 + 8 | 0; 12457 i14 = 0; 12458 while (1) { 12459 i20 = HEAP16[(HEAP32[i9 >> 2] | 0) + (i14 << 1) >> 1] | 0; 12460 i13 = i20 & 65535; 12461 i4 = i14 + 1 | 0; 12462 i14 = HEAPU8[(HEAP32[i10 >> 2] | 0) + i14 | 0] | 0; 12463 do { 12464 if (i20 << 16 >> 16 == 0) { 12465 i15 = HEAPU16[i3 + (i14 << 2) + 2 >> 1] | 0; 12466 i13 = HEAP32[i8 >> 2] | 0; 12467 i14 = HEAPU16[i3 + (i14 << 2) >> 1] | 0; 12468 i16 = HEAPU16[i12 >> 1] | 0 | i14 << i13; 12469 i17 = i16 & 65535; 12470 HEAP16[i12 >> 1] = i17; 12471 if ((i13 | 0) > (16 - i15 | 0)) { 12472 i17 = HEAP32[i5 >> 2] | 0; 12473 HEAP32[i5 >> 2] = i17 + 1; 12474 HEAP8[(HEAP32[i6 >> 2] | 0) + i17 | 0] = i16; 12475 i17 = (HEAPU16[i12 >> 1] | 0) >>> 8 & 255; 12476 i20 = HEAP32[i5 >> 2] | 0; 12477 HEAP32[i5 >> 2] = i20 + 1; 12478 HEAP8[(HEAP32[i6 >> 2] | 0) + i20 | 0] = i17; 12479 i20 = HEAP32[i8 >> 2] | 0; 12480 i17 = i14 >>> (16 - i20 | 0) & 65535; 12481 HEAP16[i12 >> 1] = i17; 12482 i14 = i15 + -16 + i20 | 0; 12483 HEAP32[i8 >> 2] = i14; 12484 break; 12485 } else { 12486 i14 = i13 + i15 | 0; 12487 HEAP32[i8 >> 2] = i14; 12488 break; 12489 } 12490 } else { 12491 i15 = HEAPU8[808 + i14 | 0] | 0; 12492 i19 = (i15 | 256) + 1 | 0; 12493 i18 = HEAPU16[i3 + (i19 << 2) + 2 >> 1] | 0; 12494 i17 = HEAP32[i8 >> 2] | 0; 12495 i19 = HEAPU16[i3 + (i19 << 2) >> 1] | 0; 12496 i20 = HEAPU16[i12 >> 1] | 0 | i19 << i17; 12497 i16 = i20 & 65535; 12498 HEAP16[i12 >> 1] = i16; 12499 if ((i17 | 0) > (16 - i18 | 0)) { 12500 i16 = HEAP32[i5 >> 2] | 0; 12501 HEAP32[i5 >> 2] = i16 + 1; 12502 HEAP8[(HEAP32[i6 >> 2] | 0) + i16 | 0] = i20; 12503 i16 = (HEAPU16[i12 >> 1] | 0) >>> 8 & 255; 12504 i20 = HEAP32[i5 >> 2] | 0; 12505 HEAP32[i5 >> 2] = i20 + 1; 12506 HEAP8[(HEAP32[i6 >> 2] | 0) + i20 | 0] = i16; 12507 i20 = HEAP32[i8 >> 2] | 0; 12508 i16 = i19 >>> (16 - i20 | 0) & 65535; 12509 HEAP16[i12 >> 1] = i16; 12510 i18 = i18 + -16 + i20 | 0; 12511 } else { 12512 i18 = i17 + i18 | 0; 12513 } 12514 HEAP32[i8 >> 2] = i18; 12515 i17 = HEAP32[2408 + (i15 << 2) >> 2] | 0; 12516 do { 12517 if ((i15 + -8 | 0) >>> 0 < 20) { 12518 i14 = i14 - (HEAP32[2528 + (i15 << 2) >> 2] | 0) & 65535; 12519 i15 = i14 << i18 | i16 & 65535; 12520 i16 = i15 & 65535; 12521 HEAP16[i12 >> 1] = i16; 12522 if ((i18 | 0) > (16 - i17 | 0)) { 12523 i16 = HEAP32[i5 >> 2] | 0; 12524 HEAP32[i5 >> 2] = i16 + 1; 12525 HEAP8[(HEAP32[i6 >> 2] | 0) + i16 | 0] = i15; 12526 i16 = (HEAPU16[i12 >> 1] | 0) >>> 8 & 255; 12527 i20 = HEAP32[i5 >> 2] | 0; 12528 HEAP32[i5 >> 2] = i20 + 1; 12529 HEAP8[(HEAP32[i6 >> 2] | 0) + i20 | 0] = i16; 12530 i20 = HEAP32[i8 >> 2] | 0; 12531 i16 = i14 >>> (16 - i20 | 0) & 65535; 12532 HEAP16[i12 >> 1] = i16; 12533 i14 = i17 + -16 + i20 | 0; 12534 HEAP32[i8 >> 2] = i14; 12535 break; 12536 } else { 12537 i14 = i18 + i17 | 0; 12538 HEAP32[i8 >> 2] = i14; 12539 break; 12540 } 12541 } else { 12542 i14 = i18; 12543 } 12544 } while (0); 12545 i13 = i13 + -1 | 0; 12546 if (i13 >>> 0 < 256) { 12547 i15 = i13; 12548 } else { 12549 i15 = (i13 >>> 7) + 256 | 0; 12550 } 12551 i15 = HEAPU8[296 + i15 | 0] | 0; 12552 i17 = HEAPU16[i7 + (i15 << 2) + 2 >> 1] | 0; 12553 i18 = HEAPU16[i7 + (i15 << 2) >> 1] | 0; 12554 i19 = i16 & 65535 | i18 << i14; 12555 i16 = i19 & 65535; 12556 HEAP16[i12 >> 1] = i16; 12557 if ((i14 | 0) > (16 - i17 | 0)) { 12558 i20 = HEAP32[i5 >> 2] | 0; 12559 HEAP32[i5 >> 2] = i20 + 1; 12560 HEAP8[(HEAP32[i6 >> 2] | 0) + i20 | 0] = i19; 12561 i20 = (HEAPU16[i12 >> 1] | 0) >>> 8 & 255; 12562 i14 = HEAP32[i5 >> 2] | 0; 12563 HEAP32[i5 >> 2] = i14 + 1; 12564 HEAP8[(HEAP32[i6 >> 2] | 0) + i14 | 0] = i20; 12565 i14 = HEAP32[i8 >> 2] | 0; 12566 i20 = i18 >>> (16 - i14 | 0) & 65535; 12567 HEAP16[i12 >> 1] = i20; 12568 i14 = i17 + -16 + i14 | 0; 12569 i17 = i20; 12570 } else { 12571 i14 = i14 + i17 | 0; 12572 i17 = i16; 12573 } 12574 HEAP32[i8 >> 2] = i14; 12575 i16 = HEAP32[2648 + (i15 << 2) >> 2] | 0; 12576 if ((i15 + -4 | 0) >>> 0 < 26) { 12577 i13 = i13 - (HEAP32[2768 + (i15 << 2) >> 2] | 0) & 65535; 12578 i15 = i13 << i14 | i17 & 65535; 12579 i17 = i15 & 65535; 12580 HEAP16[i12 >> 1] = i17; 12581 if ((i14 | 0) > (16 - i16 | 0)) { 12582 i17 = HEAP32[i5 >> 2] | 0; 12583 HEAP32[i5 >> 2] = i17 + 1; 12584 HEAP8[(HEAP32[i6 >> 2] | 0) + i17 | 0] = i15; 12585 i17 = (HEAPU16[i12 >> 1] | 0) >>> 8 & 255; 12586 i14 = HEAP32[i5 >> 2] | 0; 12587 HEAP32[i5 >> 2] = i14 + 1; 12588 HEAP8[(HEAP32[i6 >> 2] | 0) + i14 | 0] = i17; 12589 i14 = HEAP32[i8 >> 2] | 0; 12590 i17 = i13 >>> (16 - i14 | 0) & 65535; 12591 HEAP16[i12 >> 1] = i17; 12592 i14 = i16 + -16 + i14 | 0; 12593 HEAP32[i8 >> 2] = i14; 12594 break; 12595 } else { 12596 i14 = i14 + i16 | 0; 12597 HEAP32[i8 >> 2] = i14; 12598 break; 12599 } 12600 } 12601 } 12602 } while (0); 12603 if (i4 >>> 0 < (HEAP32[i11 >> 2] | 0) >>> 0) { 12604 i14 = i4; 12605 } else { 12606 break; 12607 } 12608 } 12609 } 12610 i5 = i3 + 1026 | 0; 12611 i6 = HEAPU16[i5 >> 1] | 0; 12612 i4 = i1 + 5820 | 0; 12613 i3 = HEAPU16[i3 + 1024 >> 1] | 0; 12614 i7 = i1 + 5816 | 0; 12615 i8 = i17 & 65535 | i3 << i14; 12616 HEAP16[i7 >> 1] = i8; 12617 if ((i14 | 0) > (16 - i6 | 0)) { 12618 i17 = i1 + 20 | 0; 12619 i18 = HEAP32[i17 >> 2] | 0; 12620 HEAP32[i17 >> 2] = i18 + 1; 12621 i20 = i1 + 8 | 0; 12622 HEAP8[(HEAP32[i20 >> 2] | 0) + i18 | 0] = i8; 12623 i18 = (HEAPU16[i7 >> 1] | 0) >>> 8 & 255; 12624 i19 = HEAP32[i17 >> 2] | 0; 12625 HEAP32[i17 >> 2] = i19 + 1; 12626 HEAP8[(HEAP32[i20 >> 2] | 0) + i19 | 0] = i18; 12627 i19 = HEAP32[i4 >> 2] | 0; 12628 HEAP16[i7 >> 1] = i3 >>> (16 - i19 | 0); 12629 i19 = i6 + -16 + i19 | 0; 12630 HEAP32[i4 >> 2] = i19; 12631 i19 = HEAP16[i5 >> 1] | 0; 12632 i19 = i19 & 65535; 12633 i20 = i1 + 5812 | 0; 12634 HEAP32[i20 >> 2] = i19; 12635 STACKTOP = i2; 12636 return; 12637 } else { 12638 i19 = i14 + i6 | 0; 12639 HEAP32[i4 >> 2] = i19; 12640 i19 = HEAP16[i5 >> 1] | 0; 12641 i19 = i19 & 65535; 12642 i20 = i1 + 5812 | 0; 12643 HEAP32[i20 >> 2] = i19; 12644 STACKTOP = i2; 12645 return; 12646 } 12647} 12648function _deflate_stored(i2, i5) { 12649 i2 = i2 | 0; 12650 i5 = i5 | 0; 12651 var i1 = 0, i3 = 0, i4 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0; 12652 i1 = STACKTOP; 12653 i4 = (HEAP32[i2 + 12 >> 2] | 0) + -5 | 0; 12654 i11 = i4 >>> 0 < 65535 ? i4 : 65535; 12655 i12 = i2 + 116 | 0; 12656 i4 = i2 + 108 | 0; 12657 i6 = i2 + 92 | 0; 12658 i10 = i2 + 44 | 0; 12659 i7 = i2 + 56 | 0; 12660 while (1) { 12661 i13 = HEAP32[i12 >> 2] | 0; 12662 if (i13 >>> 0 < 2) { 12663 _fill_window(i2); 12664 i13 = HEAP32[i12 >> 2] | 0; 12665 if ((i13 | i5 | 0) == 0) { 12666 i2 = 0; 12667 i8 = 28; 12668 break; 12669 } 12670 if ((i13 | 0) == 0) { 12671 i8 = 20; 12672 break; 12673 } 12674 } 12675 i13 = (HEAP32[i4 >> 2] | 0) + i13 | 0; 12676 HEAP32[i4 >> 2] = i13; 12677 HEAP32[i12 >> 2] = 0; 12678 i14 = HEAP32[i6 >> 2] | 0; 12679 i15 = i14 + i11 | 0; 12680 if (!((i13 | 0) != 0 & i13 >>> 0 < i15 >>> 0)) { 12681 HEAP32[i12 >> 2] = i13 - i15; 12682 HEAP32[i4 >> 2] = i15; 12683 if ((i14 | 0) > -1) { 12684 i13 = (HEAP32[i7 >> 2] | 0) + i14 | 0; 12685 } else { 12686 i13 = 0; 12687 } 12688 __tr_flush_block(i2, i13, i11, 0); 12689 HEAP32[i6 >> 2] = HEAP32[i4 >> 2]; 12690 i16 = HEAP32[i2 >> 2] | 0; 12691 i14 = i16 + 28 | 0; 12692 i15 = HEAP32[i14 >> 2] | 0; 12693 i17 = HEAP32[i15 + 20 >> 2] | 0; 12694 i13 = i16 + 16 | 0; 12695 i18 = HEAP32[i13 >> 2] | 0; 12696 i17 = i17 >>> 0 > i18 >>> 0 ? i18 : i17; 12697 if ((i17 | 0) != 0 ? (i8 = i16 + 12 | 0, _memcpy(HEAP32[i8 >> 2] | 0, HEAP32[i15 + 16 >> 2] | 0, i17 | 0) | 0, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) + i17, i8 = (HEAP32[i14 >> 2] | 0) + 16 | 0, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) + i17, i8 = i16 + 20 | 0, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) + i17, HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) - i17, i8 = HEAP32[i14 >> 2] | 0, i16 = i8 + 20 | 0, i18 = HEAP32[i16 >> 2] | 0, HEAP32[i16 >> 2] = i18 - i17, (i18 | 0) == (i17 | 0)) : 0) { 12698 HEAP32[i8 + 16 >> 2] = HEAP32[i8 + 8 >> 2]; 12699 } 12700 if ((HEAP32[(HEAP32[i2 >> 2] | 0) + 16 >> 2] | 0) == 0) { 12701 i2 = 0; 12702 i8 = 28; 12703 break; 12704 } 12705 i14 = HEAP32[i6 >> 2] | 0; 12706 i13 = HEAP32[i4 >> 2] | 0; 12707 } 12708 i13 = i13 - i14 | 0; 12709 if (i13 >>> 0 < ((HEAP32[i10 >> 2] | 0) + -262 | 0) >>> 0) { 12710 continue; 12711 } 12712 if ((i14 | 0) > -1) { 12713 i14 = (HEAP32[i7 >> 2] | 0) + i14 | 0; 12714 } else { 12715 i14 = 0; 12716 } 12717 __tr_flush_block(i2, i14, i13, 0); 12718 HEAP32[i6 >> 2] = HEAP32[i4 >> 2]; 12719 i16 = HEAP32[i2 >> 2] | 0; 12720 i14 = i16 + 28 | 0; 12721 i15 = HEAP32[i14 >> 2] | 0; 12722 i17 = HEAP32[i15 + 20 >> 2] | 0; 12723 i13 = i16 + 16 | 0; 12724 i18 = HEAP32[i13 >> 2] | 0; 12725 i17 = i17 >>> 0 > i18 >>> 0 ? i18 : i17; 12726 if ((i17 | 0) != 0 ? (i9 = i16 + 12 | 0, _memcpy(HEAP32[i9 >> 2] | 0, HEAP32[i15 + 16 >> 2] | 0, i17 | 0) | 0, HEAP32[i9 >> 2] = (HEAP32[i9 >> 2] | 0) + i17, i9 = (HEAP32[i14 >> 2] | 0) + 16 | 0, HEAP32[i9 >> 2] = (HEAP32[i9 >> 2] | 0) + i17, i9 = i16 + 20 | 0, HEAP32[i9 >> 2] = (HEAP32[i9 >> 2] | 0) + i17, HEAP32[i13 >> 2] = (HEAP32[i13 >> 2] | 0) - i17, i9 = HEAP32[i14 >> 2] | 0, i16 = i9 + 20 | 0, i18 = HEAP32[i16 >> 2] | 0, HEAP32[i16 >> 2] = i18 - i17, (i18 | 0) == (i17 | 0)) : 0) { 12727 HEAP32[i9 + 16 >> 2] = HEAP32[i9 + 8 >> 2]; 12728 } 12729 if ((HEAP32[(HEAP32[i2 >> 2] | 0) + 16 >> 2] | 0) == 0) { 12730 i2 = 0; 12731 i8 = 28; 12732 break; 12733 } 12734 } 12735 if ((i8 | 0) == 20) { 12736 i8 = HEAP32[i6 >> 2] | 0; 12737 if ((i8 | 0) > -1) { 12738 i7 = (HEAP32[i7 >> 2] | 0) + i8 | 0; 12739 } else { 12740 i7 = 0; 12741 } 12742 i5 = (i5 | 0) == 4; 12743 __tr_flush_block(i2, i7, (HEAP32[i4 >> 2] | 0) - i8 | 0, i5 & 1); 12744 HEAP32[i6 >> 2] = HEAP32[i4 >> 2]; 12745 i4 = HEAP32[i2 >> 2] | 0; 12746 i7 = i4 + 28 | 0; 12747 i6 = HEAP32[i7 >> 2] | 0; 12748 i9 = HEAP32[i6 + 20 >> 2] | 0; 12749 i8 = i4 + 16 | 0; 12750 i10 = HEAP32[i8 >> 2] | 0; 12751 i9 = i9 >>> 0 > i10 >>> 0 ? i10 : i9; 12752 if ((i9 | 0) != 0 ? (i3 = i4 + 12 | 0, _memcpy(HEAP32[i3 >> 2] | 0, HEAP32[i6 + 16 >> 2] | 0, i9 | 0) | 0, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + i9, i3 = (HEAP32[i7 >> 2] | 0) + 16 | 0, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + i9, i3 = i4 + 20 | 0, HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + i9, HEAP32[i8 >> 2] = (HEAP32[i8 >> 2] | 0) - i9, i3 = HEAP32[i7 >> 2] | 0, i17 = i3 + 20 | 0, i18 = HEAP32[i17 >> 2] | 0, HEAP32[i17 >> 2] = i18 - i9, (i18 | 0) == (i9 | 0)) : 0) { 12753 HEAP32[i3 + 16 >> 2] = HEAP32[i3 + 8 >> 2]; 12754 } 12755 if ((HEAP32[(HEAP32[i2 >> 2] | 0) + 16 >> 2] | 0) == 0) { 12756 i18 = i5 ? 2 : 0; 12757 STACKTOP = i1; 12758 return i18 | 0; 12759 } else { 12760 i18 = i5 ? 3 : 1; 12761 STACKTOP = i1; 12762 return i18 | 0; 12763 } 12764 } else if ((i8 | 0) == 28) { 12765 STACKTOP = i1; 12766 return i2 | 0; 12767 } 12768 return 0; 12769} 12770function _fill_window(i15) { 12771 i15 = i15 | 0; 12772 var i1 = 0, i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0; 12773 i2 = STACKTOP; 12774 i16 = i15 + 44 | 0; 12775 i9 = HEAP32[i16 >> 2] | 0; 12776 i4 = i15 + 60 | 0; 12777 i8 = i15 + 116 | 0; 12778 i3 = i15 + 108 | 0; 12779 i5 = i9 + -262 | 0; 12780 i1 = i15 + 56 | 0; 12781 i17 = i15 + 72 | 0; 12782 i6 = i15 + 88 | 0; 12783 i7 = i15 + 84 | 0; 12784 i11 = i15 + 112 | 0; 12785 i12 = i15 + 92 | 0; 12786 i13 = i15 + 76 | 0; 12787 i14 = i15 + 68 | 0; 12788 i10 = i15 + 64 | 0; 12789 i19 = HEAP32[i8 >> 2] | 0; 12790 i21 = i9; 12791 while (1) { 12792 i20 = HEAP32[i3 >> 2] | 0; 12793 i19 = (HEAP32[i4 >> 2] | 0) - i19 - i20 | 0; 12794 if (!(i20 >>> 0 < (i5 + i21 | 0) >>> 0)) { 12795 i20 = HEAP32[i1 >> 2] | 0; 12796 _memcpy(i20 | 0, i20 + i9 | 0, i9 | 0) | 0; 12797 HEAP32[i11 >> 2] = (HEAP32[i11 >> 2] | 0) - i9; 12798 i20 = (HEAP32[i3 >> 2] | 0) - i9 | 0; 12799 HEAP32[i3 >> 2] = i20; 12800 HEAP32[i12 >> 2] = (HEAP32[i12 >> 2] | 0) - i9; 12801 i22 = HEAP32[i13 >> 2] | 0; 12802 i21 = i22; 12803 i22 = (HEAP32[i14 >> 2] | 0) + (i22 << 1) | 0; 12804 do { 12805 i22 = i22 + -2 | 0; 12806 i23 = HEAPU16[i22 >> 1] | 0; 12807 if (i23 >>> 0 < i9 >>> 0) { 12808 i23 = 0; 12809 } else { 12810 i23 = i23 - i9 & 65535; 12811 } 12812 HEAP16[i22 >> 1] = i23; 12813 i21 = i21 + -1 | 0; 12814 } while ((i21 | 0) != 0); 12815 i22 = i9; 12816 i21 = (HEAP32[i10 >> 2] | 0) + (i9 << 1) | 0; 12817 do { 12818 i21 = i21 + -2 | 0; 12819 i23 = HEAPU16[i21 >> 1] | 0; 12820 if (i23 >>> 0 < i9 >>> 0) { 12821 i23 = 0; 12822 } else { 12823 i23 = i23 - i9 & 65535; 12824 } 12825 HEAP16[i21 >> 1] = i23; 12826 i22 = i22 + -1 | 0; 12827 } while ((i22 | 0) != 0); 12828 i19 = i19 + i9 | 0; 12829 } 12830 i21 = HEAP32[i15 >> 2] | 0; 12831 i24 = i21 + 4 | 0; 12832 i23 = HEAP32[i24 >> 2] | 0; 12833 if ((i23 | 0) == 0) { 12834 i18 = 28; 12835 break; 12836 } 12837 i22 = HEAP32[i8 >> 2] | 0; 12838 i20 = (HEAP32[i1 >> 2] | 0) + (i22 + i20) | 0; 12839 i19 = i23 >>> 0 > i19 >>> 0 ? i19 : i23; 12840 if ((i19 | 0) == 0) { 12841 i19 = 0; 12842 } else { 12843 HEAP32[i24 >> 2] = i23 - i19; 12844 i22 = HEAP32[(HEAP32[i21 + 28 >> 2] | 0) + 24 >> 2] | 0; 12845 if ((i22 | 0) == 1) { 12846 i22 = i21 + 48 | 0; 12847 HEAP32[i22 >> 2] = _adler32(HEAP32[i22 >> 2] | 0, HEAP32[i21 >> 2] | 0, i19) | 0; 12848 i22 = i21; 12849 } else if ((i22 | 0) == 2) { 12850 i22 = i21 + 48 | 0; 12851 HEAP32[i22 >> 2] = _crc32(HEAP32[i22 >> 2] | 0, HEAP32[i21 >> 2] | 0, i19) | 0; 12852 i22 = i21; 12853 } else { 12854 i22 = i21; 12855 } 12856 _memcpy(i20 | 0, HEAP32[i22 >> 2] | 0, i19 | 0) | 0; 12857 HEAP32[i22 >> 2] = (HEAP32[i22 >> 2] | 0) + i19; 12858 i22 = i21 + 8 | 0; 12859 HEAP32[i22 >> 2] = (HEAP32[i22 >> 2] | 0) + i19; 12860 i22 = HEAP32[i8 >> 2] | 0; 12861 } 12862 i19 = i22 + i19 | 0; 12863 HEAP32[i8 >> 2] = i19; 12864 if (i19 >>> 0 > 2 ? (i23 = HEAP32[i3 >> 2] | 0, i22 = HEAP32[i1 >> 2] | 0, i24 = HEAPU8[i22 + i23 | 0] | 0, HEAP32[i17 >> 2] = i24, HEAP32[i17 >> 2] = ((HEAPU8[i22 + (i23 + 1) | 0] | 0) ^ i24 << HEAP32[i6 >> 2]) & HEAP32[i7 >> 2], !(i19 >>> 0 < 262)) : 0) { 12865 break; 12866 } 12867 if ((HEAP32[(HEAP32[i15 >> 2] | 0) + 4 >> 2] | 0) == 0) { 12868 break; 12869 } 12870 i21 = HEAP32[i16 >> 2] | 0; 12871 } 12872 if ((i18 | 0) == 28) { 12873 STACKTOP = i2; 12874 return; 12875 } 12876 i5 = i15 + 5824 | 0; 12877 i6 = HEAP32[i5 >> 2] | 0; 12878 i4 = HEAP32[i4 >> 2] | 0; 12879 if (!(i6 >>> 0 < i4 >>> 0)) { 12880 STACKTOP = i2; 12881 return; 12882 } 12883 i3 = i19 + (HEAP32[i3 >> 2] | 0) | 0; 12884 if (i6 >>> 0 < i3 >>> 0) { 12885 i4 = i4 - i3 | 0; 12886 i24 = i4 >>> 0 > 258 ? 258 : i4; 12887 _memset((HEAP32[i1 >> 2] | 0) + i3 | 0, 0, i24 | 0) | 0; 12888 HEAP32[i5 >> 2] = i24 + i3; 12889 STACKTOP = i2; 12890 return; 12891 } 12892 i3 = i3 + 258 | 0; 12893 if (!(i6 >>> 0 < i3 >>> 0)) { 12894 STACKTOP = i2; 12895 return; 12896 } 12897 i3 = i3 - i6 | 0; 12898 i4 = i4 - i6 | 0; 12899 i24 = i3 >>> 0 > i4 >>> 0 ? i4 : i3; 12900 _memset((HEAP32[i1 >> 2] | 0) + i6 | 0, 0, i24 | 0) | 0; 12901 HEAP32[i5 >> 2] = (HEAP32[i5 >> 2] | 0) + i24; 12902 STACKTOP = i2; 12903 return; 12904} 12905function __tr_align(i1) { 12906 i1 = i1 | 0; 12907 var i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0; 12908 i2 = STACKTOP; 12909 i3 = i1 + 5820 | 0; 12910 i6 = HEAP32[i3 >> 2] | 0; 12911 i4 = i1 + 5816 | 0; 12912 i7 = HEAPU16[i4 >> 1] | 0 | 2 << i6; 12913 i5 = i7 & 65535; 12914 HEAP16[i4 >> 1] = i5; 12915 if ((i6 | 0) > 13) { 12916 i8 = i1 + 20 | 0; 12917 i6 = HEAP32[i8 >> 2] | 0; 12918 HEAP32[i8 >> 2] = i6 + 1; 12919 i5 = i1 + 8 | 0; 12920 HEAP8[(HEAP32[i5 >> 2] | 0) + i6 | 0] = i7; 12921 i7 = (HEAPU16[i4 >> 1] | 0) >>> 8 & 255; 12922 i6 = HEAP32[i8 >> 2] | 0; 12923 HEAP32[i8 >> 2] = i6 + 1; 12924 HEAP8[(HEAP32[i5 >> 2] | 0) + i6 | 0] = i7; 12925 i6 = HEAP32[i3 >> 2] | 0; 12926 i5 = 2 >>> (16 - i6 | 0) & 65535; 12927 HEAP16[i4 >> 1] = i5; 12928 i6 = i6 + -13 | 0; 12929 } else { 12930 i6 = i6 + 3 | 0; 12931 } 12932 HEAP32[i3 >> 2] = i6; 12933 if ((i6 | 0) > 9) { 12934 i7 = i1 + 20 | 0; 12935 i6 = HEAP32[i7 >> 2] | 0; 12936 HEAP32[i7 >> 2] = i6 + 1; 12937 i8 = i1 + 8 | 0; 12938 HEAP8[(HEAP32[i8 >> 2] | 0) + i6 | 0] = i5; 12939 i5 = (HEAPU16[i4 >> 1] | 0) >>> 8 & 255; 12940 i6 = HEAP32[i7 >> 2] | 0; 12941 HEAP32[i7 >> 2] = i6 + 1; 12942 HEAP8[(HEAP32[i8 >> 2] | 0) + i6 | 0] = i5; 12943 HEAP16[i4 >> 1] = 0; 12944 i6 = (HEAP32[i3 >> 2] | 0) + -9 | 0; 12945 i5 = 0; 12946 } else { 12947 i6 = i6 + 7 | 0; 12948 } 12949 HEAP32[i3 >> 2] = i6; 12950 if ((i6 | 0) != 16) { 12951 if ((i6 | 0) > 7) { 12952 i6 = i1 + 20 | 0; 12953 i7 = HEAP32[i6 >> 2] | 0; 12954 HEAP32[i6 >> 2] = i7 + 1; 12955 HEAP8[(HEAP32[i1 + 8 >> 2] | 0) + i7 | 0] = i5; 12956 i7 = (HEAPU16[i4 >> 1] | 0) >>> 8; 12957 HEAP16[i4 >> 1] = i7; 12958 i6 = (HEAP32[i3 >> 2] | 0) + -8 | 0; 12959 HEAP32[i3 >> 2] = i6; 12960 } else { 12961 i7 = i5; 12962 } 12963 } else { 12964 i9 = i1 + 20 | 0; 12965 i8 = HEAP32[i9 >> 2] | 0; 12966 HEAP32[i9 >> 2] = i8 + 1; 12967 i7 = i1 + 8 | 0; 12968 HEAP8[(HEAP32[i7 >> 2] | 0) + i8 | 0] = i5; 12969 i8 = (HEAPU16[i4 >> 1] | 0) >>> 8 & 255; 12970 i6 = HEAP32[i9 >> 2] | 0; 12971 HEAP32[i9 >> 2] = i6 + 1; 12972 HEAP8[(HEAP32[i7 >> 2] | 0) + i6 | 0] = i8; 12973 HEAP16[i4 >> 1] = 0; 12974 HEAP32[i3 >> 2] = 0; 12975 i6 = 0; 12976 i7 = 0; 12977 } 12978 i5 = i1 + 5812 | 0; 12979 if ((11 - i6 + (HEAP32[i5 >> 2] | 0) | 0) >= 9) { 12980 HEAP32[i5 >> 2] = 7; 12981 STACKTOP = i2; 12982 return; 12983 } 12984 i7 = i7 & 65535 | 2 << i6; 12985 HEAP16[i4 >> 1] = i7; 12986 if ((i6 | 0) > 13) { 12987 i8 = i1 + 20 | 0; 12988 i6 = HEAP32[i8 >> 2] | 0; 12989 HEAP32[i8 >> 2] = i6 + 1; 12990 i9 = i1 + 8 | 0; 12991 HEAP8[(HEAP32[i9 >> 2] | 0) + i6 | 0] = i7; 12992 i7 = (HEAPU16[i4 >> 1] | 0) >>> 8 & 255; 12993 i6 = HEAP32[i8 >> 2] | 0; 12994 HEAP32[i8 >> 2] = i6 + 1; 12995 HEAP8[(HEAP32[i9 >> 2] | 0) + i6 | 0] = i7; 12996 i6 = HEAP32[i3 >> 2] | 0; 12997 i7 = 2 >>> (16 - i6 | 0); 12998 HEAP16[i4 >> 1] = i7; 12999 i6 = i6 + -13 | 0; 13000 } else { 13001 i6 = i6 + 3 | 0; 13002 } 13003 i7 = i7 & 255; 13004 HEAP32[i3 >> 2] = i6; 13005 if ((i6 | 0) > 9) { 13006 i8 = i1 + 20 | 0; 13007 i9 = HEAP32[i8 >> 2] | 0; 13008 HEAP32[i8 >> 2] = i9 + 1; 13009 i6 = i1 + 8 | 0; 13010 HEAP8[(HEAP32[i6 >> 2] | 0) + i9 | 0] = i7; 13011 i9 = (HEAPU16[i4 >> 1] | 0) >>> 8 & 255; 13012 i7 = HEAP32[i8 >> 2] | 0; 13013 HEAP32[i8 >> 2] = i7 + 1; 13014 HEAP8[(HEAP32[i6 >> 2] | 0) + i7 | 0] = i9; 13015 HEAP16[i4 >> 1] = 0; 13016 i7 = 0; 13017 i6 = (HEAP32[i3 >> 2] | 0) + -9 | 0; 13018 } else { 13019 i6 = i6 + 7 | 0; 13020 } 13021 HEAP32[i3 >> 2] = i6; 13022 if ((i6 | 0) == 16) { 13023 i6 = i1 + 20 | 0; 13024 i9 = HEAP32[i6 >> 2] | 0; 13025 HEAP32[i6 >> 2] = i9 + 1; 13026 i8 = i1 + 8 | 0; 13027 HEAP8[(HEAP32[i8 >> 2] | 0) + i9 | 0] = i7; 13028 i7 = (HEAPU16[i4 >> 1] | 0) >>> 8 & 255; 13029 i9 = HEAP32[i6 >> 2] | 0; 13030 HEAP32[i6 >> 2] = i9 + 1; 13031 HEAP8[(HEAP32[i8 >> 2] | 0) + i9 | 0] = i7; 13032 HEAP16[i4 >> 1] = 0; 13033 HEAP32[i3 >> 2] = 0; 13034 HEAP32[i5 >> 2] = 7; 13035 STACKTOP = i2; 13036 return; 13037 } 13038 if ((i6 | 0) <= 7) { 13039 HEAP32[i5 >> 2] = 7; 13040 STACKTOP = i2; 13041 return; 13042 } 13043 i8 = i1 + 20 | 0; 13044 i9 = HEAP32[i8 >> 2] | 0; 13045 HEAP32[i8 >> 2] = i9 + 1; 13046 HEAP8[(HEAP32[i1 + 8 >> 2] | 0) + i9 | 0] = i7; 13047 HEAP16[i4 >> 1] = (HEAPU16[i4 >> 1] | 0) >>> 8; 13048 HEAP32[i3 >> 2] = (HEAP32[i3 >> 2] | 0) + -8; 13049 HEAP32[i5 >> 2] = 7; 13050 STACKTOP = i2; 13051 return; 13052} 13053function _adler32(i6, i4, i5) { 13054 i6 = i6 | 0; 13055 i4 = i4 | 0; 13056 i5 = i5 | 0; 13057 var i1 = 0, i2 = 0, i3 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0; 13058 i1 = STACKTOP; 13059 i3 = i6 >>> 16; 13060 i6 = i6 & 65535; 13061 if ((i5 | 0) == 1) { 13062 i2 = (HEAPU8[i4] | 0) + i6 | 0; 13063 i2 = i2 >>> 0 > 65520 ? i2 + -65521 | 0 : i2; 13064 i3 = i2 + i3 | 0; 13065 i8 = (i3 >>> 0 > 65520 ? i3 + 15 | 0 : i3) << 16 | i2; 13066 STACKTOP = i1; 13067 return i8 | 0; 13068 } 13069 if ((i4 | 0) == 0) { 13070 i8 = 1; 13071 STACKTOP = i1; 13072 return i8 | 0; 13073 } 13074 if (i5 >>> 0 < 16) { 13075 if ((i5 | 0) != 0) { 13076 while (1) { 13077 i5 = i5 + -1 | 0; 13078 i6 = (HEAPU8[i4] | 0) + i6 | 0; 13079 i3 = i6 + i3 | 0; 13080 if ((i5 | 0) == 0) { 13081 break; 13082 } else { 13083 i4 = i4 + 1 | 0; 13084 } 13085 } 13086 } 13087 i8 = ((i3 >>> 0) % 65521 | 0) << 16 | (i6 >>> 0 > 65520 ? i6 + -65521 | 0 : i6); 13088 STACKTOP = i1; 13089 return i8 | 0; 13090 } 13091 if (i5 >>> 0 > 5551) { 13092 do { 13093 i5 = i5 + -5552 | 0; 13094 i7 = i4; 13095 i8 = 347; 13096 while (1) { 13097 i23 = (HEAPU8[i7] | 0) + i6 | 0; 13098 i22 = i23 + (HEAPU8[i7 + 1 | 0] | 0) | 0; 13099 i21 = i22 + (HEAPU8[i7 + 2 | 0] | 0) | 0; 13100 i20 = i21 + (HEAPU8[i7 + 3 | 0] | 0) | 0; 13101 i19 = i20 + (HEAPU8[i7 + 4 | 0] | 0) | 0; 13102 i18 = i19 + (HEAPU8[i7 + 5 | 0] | 0) | 0; 13103 i17 = i18 + (HEAPU8[i7 + 6 | 0] | 0) | 0; 13104 i16 = i17 + (HEAPU8[i7 + 7 | 0] | 0) | 0; 13105 i15 = i16 + (HEAPU8[i7 + 8 | 0] | 0) | 0; 13106 i14 = i15 + (HEAPU8[i7 + 9 | 0] | 0) | 0; 13107 i13 = i14 + (HEAPU8[i7 + 10 | 0] | 0) | 0; 13108 i12 = i13 + (HEAPU8[i7 + 11 | 0] | 0) | 0; 13109 i11 = i12 + (HEAPU8[i7 + 12 | 0] | 0) | 0; 13110 i10 = i11 + (HEAPU8[i7 + 13 | 0] | 0) | 0; 13111 i9 = i10 + (HEAPU8[i7 + 14 | 0] | 0) | 0; 13112 i6 = i9 + (HEAPU8[i7 + 15 | 0] | 0) | 0; 13113 i3 = i23 + i3 + i22 + i21 + i20 + i19 + i18 + i17 + i16 + i15 + i14 + i13 + i12 + i11 + i10 + i9 + i6 | 0; 13114 i8 = i8 + -1 | 0; 13115 if ((i8 | 0) == 0) { 13116 break; 13117 } else { 13118 i7 = i7 + 16 | 0; 13119 } 13120 } 13121 i4 = i4 + 5552 | 0; 13122 i6 = (i6 >>> 0) % 65521 | 0; 13123 i3 = (i3 >>> 0) % 65521 | 0; 13124 } while (i5 >>> 0 > 5551); 13125 if ((i5 | 0) != 0) { 13126 if (i5 >>> 0 > 15) { 13127 i2 = 15; 13128 } else { 13129 i2 = 16; 13130 } 13131 } 13132 } else { 13133 i2 = 15; 13134 } 13135 if ((i2 | 0) == 15) { 13136 while (1) { 13137 i5 = i5 + -16 | 0; 13138 i9 = (HEAPU8[i4] | 0) + i6 | 0; 13139 i10 = i9 + (HEAPU8[i4 + 1 | 0] | 0) | 0; 13140 i11 = i10 + (HEAPU8[i4 + 2 | 0] | 0) | 0; 13141 i12 = i11 + (HEAPU8[i4 + 3 | 0] | 0) | 0; 13142 i13 = i12 + (HEAPU8[i4 + 4 | 0] | 0) | 0; 13143 i14 = i13 + (HEAPU8[i4 + 5 | 0] | 0) | 0; 13144 i15 = i14 + (HEAPU8[i4 + 6 | 0] | 0) | 0; 13145 i16 = i15 + (HEAPU8[i4 + 7 | 0] | 0) | 0; 13146 i17 = i16 + (HEAPU8[i4 + 8 | 0] | 0) | 0; 13147 i18 = i17 + (HEAPU8[i4 + 9 | 0] | 0) | 0; 13148 i19 = i18 + (HEAPU8[i4 + 10 | 0] | 0) | 0; 13149 i20 = i19 + (HEAPU8[i4 + 11 | 0] | 0) | 0; 13150 i21 = i20 + (HEAPU8[i4 + 12 | 0] | 0) | 0; 13151 i22 = i21 + (HEAPU8[i4 + 13 | 0] | 0) | 0; 13152 i23 = i22 + (HEAPU8[i4 + 14 | 0] | 0) | 0; 13153 i6 = i23 + (HEAPU8[i4 + 15 | 0] | 0) | 0; 13154 i3 = i9 + i3 + i10 + i11 + i12 + i13 + i14 + i15 + i16 + i17 + i18 + i19 + i20 + i21 + i22 + i23 + i6 | 0; 13155 i4 = i4 + 16 | 0; 13156 if (!(i5 >>> 0 > 15)) { 13157 break; 13158 } else { 13159 i2 = 15; 13160 } 13161 } 13162 if ((i5 | 0) == 0) { 13163 i2 = 17; 13164 } else { 13165 i2 = 16; 13166 } 13167 } 13168 if ((i2 | 0) == 16) { 13169 while (1) { 13170 i5 = i5 + -1 | 0; 13171 i6 = (HEAPU8[i4] | 0) + i6 | 0; 13172 i3 = i6 + i3 | 0; 13173 if ((i5 | 0) == 0) { 13174 i2 = 17; 13175 break; 13176 } else { 13177 i4 = i4 + 1 | 0; 13178 i2 = 16; 13179 } 13180 } 13181 } 13182 if ((i2 | 0) == 17) { 13183 i6 = (i6 >>> 0) % 65521 | 0; 13184 i3 = (i3 >>> 0) % 65521 | 0; 13185 } 13186 i23 = i3 << 16 | i6; 13187 STACKTOP = i1; 13188 return i23 | 0; 13189} 13190function _crc32(i4, i2, i3) { 13191 i4 = i4 | 0; 13192 i2 = i2 | 0; 13193 i3 = i3 | 0; 13194 var i1 = 0, i5 = 0; 13195 i1 = STACKTOP; 13196 if ((i2 | 0) == 0) { 13197 i5 = 0; 13198 STACKTOP = i1; 13199 return i5 | 0; 13200 } 13201 i4 = ~i4; 13202 L4 : do { 13203 if ((i3 | 0) != 0) { 13204 while (1) { 13205 if ((i2 & 3 | 0) == 0) { 13206 break; 13207 } 13208 i4 = HEAP32[3192 + (((HEAPU8[i2] | 0) ^ i4 & 255) << 2) >> 2] ^ i4 >>> 8; 13209 i3 = i3 + -1 | 0; 13210 if ((i3 | 0) == 0) { 13211 break L4; 13212 } else { 13213 i2 = i2 + 1 | 0; 13214 } 13215 } 13216 if (i3 >>> 0 > 31) { 13217 while (1) { 13218 i4 = HEAP32[i2 >> 2] ^ i4; 13219 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 4 >> 2]; 13220 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 8 >> 2]; 13221 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 12 >> 2]; 13222 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 16 >> 2]; 13223 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 20 >> 2]; 13224 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 24 >> 2]; 13225 i5 = i2 + 32 | 0; 13226 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2] ^ HEAP32[i2 + 28 >> 2]; 13227 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2]; 13228 i3 = i3 + -32 | 0; 13229 if (i3 >>> 0 > 31) { 13230 i2 = i5; 13231 } else { 13232 i2 = i5; 13233 break; 13234 } 13235 } 13236 } 13237 if (i3 >>> 0 > 3) { 13238 while (1) { 13239 i5 = i2 + 4 | 0; 13240 i4 = HEAP32[i2 >> 2] ^ i4; 13241 i4 = HEAP32[5240 + ((i4 >>> 8 & 255) << 2) >> 2] ^ HEAP32[6264 + ((i4 & 255) << 2) >> 2] ^ HEAP32[4216 + ((i4 >>> 16 & 255) << 2) >> 2] ^ HEAP32[3192 + (i4 >>> 24 << 2) >> 2]; 13242 i3 = i3 + -4 | 0; 13243 if (i3 >>> 0 > 3) { 13244 i2 = i5; 13245 } else { 13246 i2 = i5; 13247 break; 13248 } 13249 } 13250 } 13251 if ((i3 | 0) != 0) { 13252 while (1) { 13253 i4 = HEAP32[3192 + (((HEAPU8[i2] | 0) ^ i4 & 255) << 2) >> 2] ^ i4 >>> 8; 13254 i3 = i3 + -1 | 0; 13255 if ((i3 | 0) == 0) { 13256 break; 13257 } else { 13258 i2 = i2 + 1 | 0; 13259 } 13260 } 13261 } 13262 } 13263 } while (0); 13264 i5 = ~i4; 13265 STACKTOP = i1; 13266 return i5 | 0; 13267} 13268function _deflateInit2_(i3, i7, i8, i10, i4, i1, i5, i6) { 13269 i3 = i3 | 0; 13270 i7 = i7 | 0; 13271 i8 = i8 | 0; 13272 i10 = i10 | 0; 13273 i4 = i4 | 0; 13274 i1 = i1 | 0; 13275 i5 = i5 | 0; 13276 i6 = i6 | 0; 13277 var i2 = 0, i9 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0; 13278 i2 = STACKTOP; 13279 if ((i5 | 0) == 0) { 13280 i12 = -6; 13281 STACKTOP = i2; 13282 return i12 | 0; 13283 } 13284 if (!((HEAP8[i5] | 0) == 49 & (i6 | 0) == 56)) { 13285 i12 = -6; 13286 STACKTOP = i2; 13287 return i12 | 0; 13288 } 13289 if ((i3 | 0) == 0) { 13290 i12 = -2; 13291 STACKTOP = i2; 13292 return i12 | 0; 13293 } 13294 i5 = i3 + 24 | 0; 13295 HEAP32[i5 >> 2] = 0; 13296 i6 = i3 + 32 | 0; 13297 i9 = HEAP32[i6 >> 2] | 0; 13298 if ((i9 | 0) == 0) { 13299 HEAP32[i6 >> 2] = 1; 13300 HEAP32[i3 + 40 >> 2] = 0; 13301 i9 = 1; 13302 } 13303 i11 = i3 + 36 | 0; 13304 if ((HEAP32[i11 >> 2] | 0) == 0) { 13305 HEAP32[i11 >> 2] = 1; 13306 } 13307 i7 = (i7 | 0) == -1 ? 6 : i7; 13308 if ((i10 | 0) < 0) { 13309 i10 = 0 - i10 | 0; 13310 i11 = 0; 13311 } else { 13312 i11 = (i10 | 0) > 15; 13313 i10 = i11 ? i10 + -16 | 0 : i10; 13314 i11 = i11 ? 2 : 1; 13315 } 13316 if (!((i4 + -1 | 0) >>> 0 < 9 & (i8 | 0) == 8)) { 13317 i12 = -2; 13318 STACKTOP = i2; 13319 return i12 | 0; 13320 } 13321 if ((i10 + -8 | 0) >>> 0 > 7 | i7 >>> 0 > 9 | i1 >>> 0 > 4) { 13322 i12 = -2; 13323 STACKTOP = i2; 13324 return i12 | 0; 13325 } 13326 i12 = (i10 | 0) == 8 ? 9 : i10; 13327 i10 = i3 + 40 | 0; 13328 i8 = FUNCTION_TABLE_iiii[i9 & 1](HEAP32[i10 >> 2] | 0, 1, 5828) | 0; 13329 if ((i8 | 0) == 0) { 13330 i12 = -4; 13331 STACKTOP = i2; 13332 return i12 | 0; 13333 } 13334 HEAP32[i3 + 28 >> 2] = i8; 13335 HEAP32[i8 >> 2] = i3; 13336 HEAP32[i8 + 24 >> 2] = i11; 13337 HEAP32[i8 + 28 >> 2] = 0; 13338 HEAP32[i8 + 48 >> 2] = i12; 13339 i14 = 1 << i12; 13340 i11 = i8 + 44 | 0; 13341 HEAP32[i11 >> 2] = i14; 13342 HEAP32[i8 + 52 >> 2] = i14 + -1; 13343 i12 = i4 + 7 | 0; 13344 HEAP32[i8 + 80 >> 2] = i12; 13345 i12 = 1 << i12; 13346 i13 = i8 + 76 | 0; 13347 HEAP32[i13 >> 2] = i12; 13348 HEAP32[i8 + 84 >> 2] = i12 + -1; 13349 HEAP32[i8 + 88 >> 2] = ((i4 + 9 | 0) >>> 0) / 3 | 0; 13350 i12 = i8 + 56 | 0; 13351 HEAP32[i12 >> 2] = FUNCTION_TABLE_iiii[HEAP32[i6 >> 2] & 1](HEAP32[i10 >> 2] | 0, i14, 2) | 0; 13352 i14 = FUNCTION_TABLE_iiii[HEAP32[i6 >> 2] & 1](HEAP32[i10 >> 2] | 0, HEAP32[i11 >> 2] | 0, 2) | 0; 13353 i9 = i8 + 64 | 0; 13354 HEAP32[i9 >> 2] = i14; 13355 _memset(i14 | 0, 0, HEAP32[i11 >> 2] << 1 | 0) | 0; 13356 i11 = i8 + 68 | 0; 13357 HEAP32[i11 >> 2] = FUNCTION_TABLE_iiii[HEAP32[i6 >> 2] & 1](HEAP32[i10 >> 2] | 0, HEAP32[i13 >> 2] | 0, 2) | 0; 13358 HEAP32[i8 + 5824 >> 2] = 0; 13359 i4 = 1 << i4 + 6; 13360 i13 = i8 + 5788 | 0; 13361 HEAP32[i13 >> 2] = i4; 13362 i4 = FUNCTION_TABLE_iiii[HEAP32[i6 >> 2] & 1](HEAP32[i10 >> 2] | 0, i4, 4) | 0; 13363 HEAP32[i8 + 8 >> 2] = i4; 13364 i6 = HEAP32[i13 >> 2] | 0; 13365 HEAP32[i8 + 12 >> 2] = i6 << 2; 13366 if (((HEAP32[i12 >> 2] | 0) != 0 ? (HEAP32[i9 >> 2] | 0) != 0 : 0) ? !((HEAP32[i11 >> 2] | 0) == 0 | (i4 | 0) == 0) : 0) { 13367 HEAP32[i8 + 5796 >> 2] = i4 + (i6 >>> 1 << 1); 13368 HEAP32[i8 + 5784 >> 2] = i4 + (i6 * 3 | 0); 13369 HEAP32[i8 + 132 >> 2] = i7; 13370 HEAP32[i8 + 136 >> 2] = i1; 13371 HEAP8[i8 + 36 | 0] = 8; 13372 i14 = _deflateReset(i3) | 0; 13373 STACKTOP = i2; 13374 return i14 | 0; 13375 } 13376 HEAP32[i8 + 4 >> 2] = 666; 13377 HEAP32[i5 >> 2] = HEAP32[3176 >> 2]; 13378 _deflateEnd(i3) | 0; 13379 i14 = -4; 13380 STACKTOP = i2; 13381 return i14 | 0; 13382} 13383function _longest_match(i19, i16) { 13384 i19 = i19 | 0; 13385 i16 = i16 | 0; 13386 var i1 = 0, i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i17 = 0, i18 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0; 13387 i1 = STACKTOP; 13388 i18 = HEAP32[i19 + 124 >> 2] | 0; 13389 i3 = HEAP32[i19 + 56 >> 2] | 0; 13390 i5 = HEAP32[i19 + 108 >> 2] | 0; 13391 i4 = i3 + i5 | 0; 13392 i20 = HEAP32[i19 + 120 >> 2] | 0; 13393 i10 = HEAP32[i19 + 144 >> 2] | 0; 13394 i2 = (HEAP32[i19 + 44 >> 2] | 0) + -262 | 0; 13395 i8 = i5 >>> 0 > i2 >>> 0 ? i5 - i2 | 0 : 0; 13396 i6 = HEAP32[i19 + 64 >> 2] | 0; 13397 i7 = HEAP32[i19 + 52 >> 2] | 0; 13398 i9 = i3 + (i5 + 258) | 0; 13399 i2 = HEAP32[i19 + 116 >> 2] | 0; 13400 i12 = i10 >>> 0 > i2 >>> 0 ? i2 : i10; 13401 i11 = i19 + 112 | 0; 13402 i15 = i3 + (i5 + 1) | 0; 13403 i14 = i3 + (i5 + 2) | 0; 13404 i13 = i9; 13405 i10 = i5 + 257 | 0; 13406 i17 = i20; 13407 i18 = i20 >>> 0 < (HEAP32[i19 + 140 >> 2] | 0) >>> 0 ? i18 : i18 >>> 2; 13408 i19 = HEAP8[i3 + (i20 + i5) | 0] | 0; 13409 i20 = HEAP8[i3 + (i5 + -1 + i20) | 0] | 0; 13410 while (1) { 13411 i21 = i3 + i16 | 0; 13412 if ((((HEAP8[i3 + (i16 + i17) | 0] | 0) == i19 << 24 >> 24 ? (HEAP8[i3 + (i17 + -1 + i16) | 0] | 0) == i20 << 24 >> 24 : 0) ? (HEAP8[i21] | 0) == (HEAP8[i4] | 0) : 0) ? (HEAP8[i3 + (i16 + 1) | 0] | 0) == (HEAP8[i15] | 0) : 0) { 13413 i21 = i3 + (i16 + 2) | 0; 13414 i22 = i14; 13415 do { 13416 i23 = i22 + 1 | 0; 13417 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 1 | 0] | 0)) { 13418 i22 = i23; 13419 break; 13420 } 13421 i23 = i22 + 2 | 0; 13422 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 2 | 0] | 0)) { 13423 i22 = i23; 13424 break; 13425 } 13426 i23 = i22 + 3 | 0; 13427 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 3 | 0] | 0)) { 13428 i22 = i23; 13429 break; 13430 } 13431 i23 = i22 + 4 | 0; 13432 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 4 | 0] | 0)) { 13433 i22 = i23; 13434 break; 13435 } 13436 i23 = i22 + 5 | 0; 13437 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 5 | 0] | 0)) { 13438 i22 = i23; 13439 break; 13440 } 13441 i23 = i22 + 6 | 0; 13442 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 6 | 0] | 0)) { 13443 i22 = i23; 13444 break; 13445 } 13446 i23 = i22 + 7 | 0; 13447 if ((HEAP8[i23] | 0) != (HEAP8[i21 + 7 | 0] | 0)) { 13448 i22 = i23; 13449 break; 13450 } 13451 i22 = i22 + 8 | 0; 13452 i21 = i21 + 8 | 0; 13453 } while ((HEAP8[i22] | 0) == (HEAP8[i21] | 0) & i22 >>> 0 < i9 >>> 0); 13454 i21 = i22 - i13 | 0; 13455 i22 = i21 + 258 | 0; 13456 if ((i22 | 0) > (i17 | 0)) { 13457 HEAP32[i11 >> 2] = i16; 13458 if ((i22 | 0) >= (i12 | 0)) { 13459 i17 = i22; 13460 i3 = 20; 13461 break; 13462 } 13463 i17 = i22; 13464 i19 = HEAP8[i3 + (i22 + i5) | 0] | 0; 13465 i20 = HEAP8[i3 + (i10 + i21) | 0] | 0; 13466 } 13467 } 13468 i16 = HEAPU16[i6 + ((i16 & i7) << 1) >> 1] | 0; 13469 if (!(i16 >>> 0 > i8 >>> 0)) { 13470 i3 = 20; 13471 break; 13472 } 13473 i18 = i18 + -1 | 0; 13474 if ((i18 | 0) == 0) { 13475 i3 = 20; 13476 break; 13477 } 13478 } 13479 if ((i3 | 0) == 20) { 13480 STACKTOP = i1; 13481 return (i17 >>> 0 > i2 >>> 0 ? i2 : i17) | 0; 13482 } 13483 return 0; 13484} 13485function __tr_stored_block(i3, i2, i5, i6) { 13486 i3 = i3 | 0; 13487 i2 = i2 | 0; 13488 i5 = i5 | 0; 13489 i6 = i6 | 0; 13490 var i1 = 0, i4 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0; 13491 i1 = STACKTOP; 13492 i4 = i3 + 5820 | 0; 13493 i7 = HEAP32[i4 >> 2] | 0; 13494 i9 = i6 & 65535; 13495 i6 = i3 + 5816 | 0; 13496 i8 = HEAPU16[i6 >> 1] | 0 | i9 << i7; 13497 HEAP16[i6 >> 1] = i8; 13498 if ((i7 | 0) > 13) { 13499 i11 = i3 + 20 | 0; 13500 i7 = HEAP32[i11 >> 2] | 0; 13501 HEAP32[i11 >> 2] = i7 + 1; 13502 i10 = i3 + 8 | 0; 13503 HEAP8[(HEAP32[i10 >> 2] | 0) + i7 | 0] = i8; 13504 i8 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 13505 i7 = HEAP32[i11 >> 2] | 0; 13506 HEAP32[i11 >> 2] = i7 + 1; 13507 HEAP8[(HEAP32[i10 >> 2] | 0) + i7 | 0] = i8; 13508 i7 = HEAP32[i4 >> 2] | 0; 13509 i8 = i9 >>> (16 - i7 | 0); 13510 HEAP16[i6 >> 1] = i8; 13511 i7 = i7 + -13 | 0; 13512 } else { 13513 i7 = i7 + 3 | 0; 13514 } 13515 i8 = i8 & 255; 13516 HEAP32[i4 >> 2] = i7; 13517 do { 13518 if ((i7 | 0) <= 8) { 13519 i9 = i3 + 20 | 0; 13520 if ((i7 | 0) > 0) { 13521 i7 = HEAP32[i9 >> 2] | 0; 13522 HEAP32[i9 >> 2] = i7 + 1; 13523 i11 = i3 + 8 | 0; 13524 HEAP8[(HEAP32[i11 >> 2] | 0) + i7 | 0] = i8; 13525 i7 = i9; 13526 i8 = i11; 13527 break; 13528 } else { 13529 i7 = i9; 13530 i8 = i3 + 8 | 0; 13531 break; 13532 } 13533 } else { 13534 i7 = i3 + 20 | 0; 13535 i10 = HEAP32[i7 >> 2] | 0; 13536 HEAP32[i7 >> 2] = i10 + 1; 13537 i11 = i3 + 8 | 0; 13538 HEAP8[(HEAP32[i11 >> 2] | 0) + i10 | 0] = i8; 13539 i10 = (HEAPU16[i6 >> 1] | 0) >>> 8 & 255; 13540 i8 = HEAP32[i7 >> 2] | 0; 13541 HEAP32[i7 >> 2] = i8 + 1; 13542 HEAP8[(HEAP32[i11 >> 2] | 0) + i8 | 0] = i10; 13543 i8 = i11; 13544 } 13545 } while (0); 13546 HEAP16[i6 >> 1] = 0; 13547 HEAP32[i4 >> 2] = 0; 13548 HEAP32[i3 + 5812 >> 2] = 8; 13549 i10 = HEAP32[i7 >> 2] | 0; 13550 HEAP32[i7 >> 2] = i10 + 1; 13551 HEAP8[(HEAP32[i8 >> 2] | 0) + i10 | 0] = i5; 13552 i10 = HEAP32[i7 >> 2] | 0; 13553 HEAP32[i7 >> 2] = i10 + 1; 13554 HEAP8[(HEAP32[i8 >> 2] | 0) + i10 | 0] = i5 >>> 8; 13555 i10 = i5 & 65535 ^ 65535; 13556 i11 = HEAP32[i7 >> 2] | 0; 13557 HEAP32[i7 >> 2] = i11 + 1; 13558 HEAP8[(HEAP32[i8 >> 2] | 0) + i11 | 0] = i10; 13559 i11 = HEAP32[i7 >> 2] | 0; 13560 HEAP32[i7 >> 2] = i11 + 1; 13561 HEAP8[(HEAP32[i8 >> 2] | 0) + i11 | 0] = i10 >>> 8; 13562 if ((i5 | 0) == 0) { 13563 STACKTOP = i1; 13564 return; 13565 } 13566 while (1) { 13567 i5 = i5 + -1 | 0; 13568 i10 = HEAP8[i2] | 0; 13569 i11 = HEAP32[i7 >> 2] | 0; 13570 HEAP32[i7 >> 2] = i11 + 1; 13571 HEAP8[(HEAP32[i8 >> 2] | 0) + i11 | 0] = i10; 13572 if ((i5 | 0) == 0) { 13573 break; 13574 } else { 13575 i2 = i2 + 1 | 0; 13576 } 13577 } 13578 STACKTOP = i1; 13579 return; 13580} 13581function _inflateInit_(i1, i3, i4) { 13582 i1 = i1 | 0; 13583 i3 = i3 | 0; 13584 i4 = i4 | 0; 13585 var i2 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0; 13586 i2 = STACKTOP; 13587 if ((i3 | 0) == 0) { 13588 i11 = -6; 13589 STACKTOP = i2; 13590 return i11 | 0; 13591 } 13592 if (!((HEAP8[i3] | 0) == 49 & (i4 | 0) == 56)) { 13593 i11 = -6; 13594 STACKTOP = i2; 13595 return i11 | 0; 13596 } 13597 if ((i1 | 0) == 0) { 13598 i11 = -2; 13599 STACKTOP = i2; 13600 return i11 | 0; 13601 } 13602 i3 = i1 + 24 | 0; 13603 HEAP32[i3 >> 2] = 0; 13604 i4 = i1 + 32 | 0; 13605 i6 = HEAP32[i4 >> 2] | 0; 13606 if ((i6 | 0) == 0) { 13607 HEAP32[i4 >> 2] = 1; 13608 HEAP32[i1 + 40 >> 2] = 0; 13609 i6 = 1; 13610 } 13611 i4 = i1 + 36 | 0; 13612 if ((HEAP32[i4 >> 2] | 0) == 0) { 13613 HEAP32[i4 >> 2] = 1; 13614 } 13615 i5 = i1 + 40 | 0; 13616 i8 = FUNCTION_TABLE_iiii[i6 & 1](HEAP32[i5 >> 2] | 0, 1, 7116) | 0; 13617 if ((i8 | 0) == 0) { 13618 i11 = -4; 13619 STACKTOP = i2; 13620 return i11 | 0; 13621 } 13622 i6 = i1 + 28 | 0; 13623 HEAP32[i6 >> 2] = i8; 13624 HEAP32[i8 + 52 >> 2] = 0; 13625 i9 = HEAP32[i6 >> 2] | 0; 13626 do { 13627 if ((i9 | 0) != 0) { 13628 i10 = i9 + 52 | 0; 13629 i11 = HEAP32[i10 >> 2] | 0; 13630 i7 = i9 + 36 | 0; 13631 if ((i11 | 0) != 0) { 13632 if ((HEAP32[i7 >> 2] | 0) == 15) { 13633 i10 = i9; 13634 } else { 13635 FUNCTION_TABLE_vii[HEAP32[i4 >> 2] & 1](HEAP32[i5 >> 2] | 0, i11); 13636 HEAP32[i10 >> 2] = 0; 13637 i10 = HEAP32[i6 >> 2] | 0; 13638 } 13639 HEAP32[i9 + 8 >> 2] = 1; 13640 HEAP32[i7 >> 2] = 15; 13641 if ((i10 | 0) == 0) { 13642 break; 13643 } else { 13644 i9 = i10; 13645 } 13646 } else { 13647 HEAP32[i9 + 8 >> 2] = 1; 13648 HEAP32[i7 >> 2] = 15; 13649 } 13650 HEAP32[i9 + 28 >> 2] = 0; 13651 HEAP32[i1 + 20 >> 2] = 0; 13652 HEAP32[i1 + 8 >> 2] = 0; 13653 HEAP32[i3 >> 2] = 0; 13654 HEAP32[i1 + 48 >> 2] = 1; 13655 HEAP32[i9 >> 2] = 0; 13656 HEAP32[i9 + 4 >> 2] = 0; 13657 HEAP32[i9 + 12 >> 2] = 0; 13658 HEAP32[i9 + 20 >> 2] = 32768; 13659 HEAP32[i9 + 32 >> 2] = 0; 13660 HEAP32[i9 + 40 >> 2] = 0; 13661 HEAP32[i9 + 44 >> 2] = 0; 13662 HEAP32[i9 + 48 >> 2] = 0; 13663 HEAP32[i9 + 56 >> 2] = 0; 13664 HEAP32[i9 + 60 >> 2] = 0; 13665 i11 = i9 + 1328 | 0; 13666 HEAP32[i9 + 108 >> 2] = i11; 13667 HEAP32[i9 + 80 >> 2] = i11; 13668 HEAP32[i9 + 76 >> 2] = i11; 13669 HEAP32[i9 + 7104 >> 2] = 1; 13670 HEAP32[i9 + 7108 >> 2] = -1; 13671 i11 = 0; 13672 STACKTOP = i2; 13673 return i11 | 0; 13674 } 13675 } while (0); 13676 FUNCTION_TABLE_vii[HEAP32[i4 >> 2] & 1](HEAP32[i5 >> 2] | 0, i8); 13677 HEAP32[i6 >> 2] = 0; 13678 i11 = -2; 13679 STACKTOP = i2; 13680 return i11 | 0; 13681} 13682function _init_block(i1) { 13683 i1 = i1 | 0; 13684 var i2 = 0, i3 = 0; 13685 i2 = STACKTOP; 13686 i3 = 0; 13687 do { 13688 HEAP16[i1 + (i3 << 2) + 148 >> 1] = 0; 13689 i3 = i3 + 1 | 0; 13690 } while ((i3 | 0) != 286); 13691 HEAP16[i1 + 2440 >> 1] = 0; 13692 HEAP16[i1 + 2444 >> 1] = 0; 13693 HEAP16[i1 + 2448 >> 1] = 0; 13694 HEAP16[i1 + 2452 >> 1] = 0; 13695 HEAP16[i1 + 2456 >> 1] = 0; 13696 HEAP16[i1 + 2460 >> 1] = 0; 13697 HEAP16[i1 + 2464 >> 1] = 0; 13698 HEAP16[i1 + 2468 >> 1] = 0; 13699 HEAP16[i1 + 2472 >> 1] = 0; 13700 HEAP16[i1 + 2476 >> 1] = 0; 13701 HEAP16[i1 + 2480 >> 1] = 0; 13702 HEAP16[i1 + 2484 >> 1] = 0; 13703 HEAP16[i1 + 2488 >> 1] = 0; 13704 HEAP16[i1 + 2492 >> 1] = 0; 13705 HEAP16[i1 + 2496 >> 1] = 0; 13706 HEAP16[i1 + 2500 >> 1] = 0; 13707 HEAP16[i1 + 2504 >> 1] = 0; 13708 HEAP16[i1 + 2508 >> 1] = 0; 13709 HEAP16[i1 + 2512 >> 1] = 0; 13710 HEAP16[i1 + 2516 >> 1] = 0; 13711 HEAP16[i1 + 2520 >> 1] = 0; 13712 HEAP16[i1 + 2524 >> 1] = 0; 13713 HEAP16[i1 + 2528 >> 1] = 0; 13714 HEAP16[i1 + 2532 >> 1] = 0; 13715 HEAP16[i1 + 2536 >> 1] = 0; 13716 HEAP16[i1 + 2540 >> 1] = 0; 13717 HEAP16[i1 + 2544 >> 1] = 0; 13718 HEAP16[i1 + 2548 >> 1] = 0; 13719 HEAP16[i1 + 2552 >> 1] = 0; 13720 HEAP16[i1 + 2556 >> 1] = 0; 13721 HEAP16[i1 + 2684 >> 1] = 0; 13722 HEAP16[i1 + 2688 >> 1] = 0; 13723 HEAP16[i1 + 2692 >> 1] = 0; 13724 HEAP16[i1 + 2696 >> 1] = 0; 13725 HEAP16[i1 + 2700 >> 1] = 0; 13726 HEAP16[i1 + 2704 >> 1] = 0; 13727 HEAP16[i1 + 2708 >> 1] = 0; 13728 HEAP16[i1 + 2712 >> 1] = 0; 13729 HEAP16[i1 + 2716 >> 1] = 0; 13730 HEAP16[i1 + 2720 >> 1] = 0; 13731 HEAP16[i1 + 2724 >> 1] = 0; 13732 HEAP16[i1 + 2728 >> 1] = 0; 13733 HEAP16[i1 + 2732 >> 1] = 0; 13734 HEAP16[i1 + 2736 >> 1] = 0; 13735 HEAP16[i1 + 2740 >> 1] = 0; 13736 HEAP16[i1 + 2744 >> 1] = 0; 13737 HEAP16[i1 + 2748 >> 1] = 0; 13738 HEAP16[i1 + 2752 >> 1] = 0; 13739 HEAP16[i1 + 2756 >> 1] = 0; 13740 HEAP16[i1 + 1172 >> 1] = 1; 13741 HEAP32[i1 + 5804 >> 2] = 0; 13742 HEAP32[i1 + 5800 >> 2] = 0; 13743 HEAP32[i1 + 5808 >> 2] = 0; 13744 HEAP32[i1 + 5792 >> 2] = 0; 13745 STACKTOP = i2; 13746 return; 13747} 13748function _deflateReset(i1) { 13749 i1 = i1 | 0; 13750 var i2 = 0, i3 = 0, i4 = 0, i5 = 0; 13751 i2 = STACKTOP; 13752 if ((i1 | 0) == 0) { 13753 i5 = -2; 13754 STACKTOP = i2; 13755 return i5 | 0; 13756 } 13757 i3 = HEAP32[i1 + 28 >> 2] | 0; 13758 if ((i3 | 0) == 0) { 13759 i5 = -2; 13760 STACKTOP = i2; 13761 return i5 | 0; 13762 } 13763 if ((HEAP32[i1 + 32 >> 2] | 0) == 0) { 13764 i5 = -2; 13765 STACKTOP = i2; 13766 return i5 | 0; 13767 } 13768 if ((HEAP32[i1 + 36 >> 2] | 0) == 0) { 13769 i5 = -2; 13770 STACKTOP = i2; 13771 return i5 | 0; 13772 } 13773 HEAP32[i1 + 20 >> 2] = 0; 13774 HEAP32[i1 + 8 >> 2] = 0; 13775 HEAP32[i1 + 24 >> 2] = 0; 13776 HEAP32[i1 + 44 >> 2] = 2; 13777 HEAP32[i3 + 20 >> 2] = 0; 13778 HEAP32[i3 + 16 >> 2] = HEAP32[i3 + 8 >> 2]; 13779 i4 = i3 + 24 | 0; 13780 i5 = HEAP32[i4 >> 2] | 0; 13781 if ((i5 | 0) < 0) { 13782 i5 = 0 - i5 | 0; 13783 HEAP32[i4 >> 2] = i5; 13784 } 13785 HEAP32[i3 + 4 >> 2] = (i5 | 0) != 0 ? 42 : 113; 13786 if ((i5 | 0) == 2) { 13787 i4 = _crc32(0, 0, 0) | 0; 13788 } else { 13789 i4 = _adler32(0, 0, 0) | 0; 13790 } 13791 HEAP32[i1 + 48 >> 2] = i4; 13792 HEAP32[i3 + 40 >> 2] = 0; 13793 __tr_init(i3); 13794 HEAP32[i3 + 60 >> 2] = HEAP32[i3 + 44 >> 2] << 1; 13795 i5 = HEAP32[i3 + 76 >> 2] | 0; 13796 i4 = HEAP32[i3 + 68 >> 2] | 0; 13797 HEAP16[i4 + (i5 + -1 << 1) >> 1] = 0; 13798 _memset(i4 | 0, 0, (i5 << 1) + -2 | 0) | 0; 13799 i5 = HEAP32[i3 + 132 >> 2] | 0; 13800 HEAP32[i3 + 128 >> 2] = HEAPU16[178 + (i5 * 12 | 0) >> 1] | 0; 13801 HEAP32[i3 + 140 >> 2] = HEAPU16[176 + (i5 * 12 | 0) >> 1] | 0; 13802 HEAP32[i3 + 144 >> 2] = HEAPU16[180 + (i5 * 12 | 0) >> 1] | 0; 13803 HEAP32[i3 + 124 >> 2] = HEAPU16[182 + (i5 * 12 | 0) >> 1] | 0; 13804 HEAP32[i3 + 108 >> 2] = 0; 13805 HEAP32[i3 + 92 >> 2] = 0; 13806 HEAP32[i3 + 116 >> 2] = 0; 13807 HEAP32[i3 + 120 >> 2] = 2; 13808 HEAP32[i3 + 96 >> 2] = 2; 13809 HEAP32[i3 + 112 >> 2] = 0; 13810 HEAP32[i3 + 104 >> 2] = 0; 13811 HEAP32[i3 + 72 >> 2] = 0; 13812 i5 = 0; 13813 STACKTOP = i2; 13814 return i5 | 0; 13815} 13816function _updatewindow(i6, i4) { 13817 i6 = i6 | 0; 13818 i4 = i4 | 0; 13819 var i1 = 0, i2 = 0, i3 = 0, i5 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0; 13820 i1 = STACKTOP; 13821 i2 = HEAP32[i6 + 28 >> 2] | 0; 13822 i3 = i2 + 52 | 0; 13823 i8 = HEAP32[i3 >> 2] | 0; 13824 if ((i8 | 0) == 0) { 13825 i8 = FUNCTION_TABLE_iiii[HEAP32[i6 + 32 >> 2] & 1](HEAP32[i6 + 40 >> 2] | 0, 1 << HEAP32[i2 + 36 >> 2], 1) | 0; 13826 HEAP32[i3 >> 2] = i8; 13827 if ((i8 | 0) == 0) { 13828 i10 = 1; 13829 STACKTOP = i1; 13830 return i10 | 0; 13831 } 13832 } 13833 i5 = i2 + 40 | 0; 13834 i10 = HEAP32[i5 >> 2] | 0; 13835 if ((i10 | 0) == 0) { 13836 i10 = 1 << HEAP32[i2 + 36 >> 2]; 13837 HEAP32[i5 >> 2] = i10; 13838 HEAP32[i2 + 48 >> 2] = 0; 13839 HEAP32[i2 + 44 >> 2] = 0; 13840 } 13841 i4 = i4 - (HEAP32[i6 + 16 >> 2] | 0) | 0; 13842 if (!(i4 >>> 0 < i10 >>> 0)) { 13843 _memcpy(i8 | 0, (HEAP32[i6 + 12 >> 2] | 0) + (0 - i10) | 0, i10 | 0) | 0; 13844 HEAP32[i2 + 48 >> 2] = 0; 13845 HEAP32[i2 + 44 >> 2] = HEAP32[i5 >> 2]; 13846 i10 = 0; 13847 STACKTOP = i1; 13848 return i10 | 0; 13849 } 13850 i7 = i2 + 48 | 0; 13851 i9 = HEAP32[i7 >> 2] | 0; 13852 i10 = i10 - i9 | 0; 13853 i10 = i10 >>> 0 > i4 >>> 0 ? i4 : i10; 13854 i6 = i6 + 12 | 0; 13855 _memcpy(i8 + i9 | 0, (HEAP32[i6 >> 2] | 0) + (0 - i4) | 0, i10 | 0) | 0; 13856 i8 = i4 - i10 | 0; 13857 if ((i4 | 0) != (i10 | 0)) { 13858 _memcpy(HEAP32[i3 >> 2] | 0, (HEAP32[i6 >> 2] | 0) + (0 - i8) | 0, i8 | 0) | 0; 13859 HEAP32[i7 >> 2] = i8; 13860 HEAP32[i2 + 44 >> 2] = HEAP32[i5 >> 2]; 13861 i10 = 0; 13862 STACKTOP = i1; 13863 return i10 | 0; 13864 } 13865 i6 = (HEAP32[i7 >> 2] | 0) + i4 | 0; 13866 i3 = HEAP32[i5 >> 2] | 0; 13867 HEAP32[i7 >> 2] = (i6 | 0) == (i3 | 0) ? 0 : i6; 13868 i5 = i2 + 44 | 0; 13869 i2 = HEAP32[i5 >> 2] | 0; 13870 if (!(i2 >>> 0 < i3 >>> 0)) { 13871 i10 = 0; 13872 STACKTOP = i1; 13873 return i10 | 0; 13874 } 13875 HEAP32[i5 >> 2] = i2 + i4; 13876 i10 = 0; 13877 STACKTOP = i1; 13878 return i10 | 0; 13879} 13880function _scan_tree(i1, i5, i6) { 13881 i1 = i1 | 0; 13882 i5 = i5 | 0; 13883 i6 = i6 | 0; 13884 var i2 = 0, i3 = 0, i4 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0; 13885 i8 = STACKTOP; 13886 i10 = HEAP16[i5 + 2 >> 1] | 0; 13887 i9 = i10 << 16 >> 16 == 0; 13888 HEAP16[i5 + (i6 + 1 << 2) + 2 >> 1] = -1; 13889 i2 = i1 + 2752 | 0; 13890 i3 = i1 + 2756 | 0; 13891 i4 = i1 + 2748 | 0; 13892 i7 = i9 ? 138 : 7; 13893 i9 = i9 ? 3 : 4; 13894 i13 = 0; 13895 i11 = i10 & 65535; 13896 i12 = -1; 13897 L1 : while (1) { 13898 i14 = 0; 13899 do { 13900 if ((i13 | 0) > (i6 | 0)) { 13901 break L1; 13902 } 13903 i13 = i13 + 1 | 0; 13904 i16 = HEAP16[i5 + (i13 << 2) + 2 >> 1] | 0; 13905 i10 = i16 & 65535; 13906 i14 = i14 + 1 | 0; 13907 i15 = (i11 | 0) == (i10 | 0); 13908 } while ((i14 | 0) < (i7 | 0) & i15); 13909 do { 13910 if ((i14 | 0) >= (i9 | 0)) { 13911 if ((i11 | 0) == 0) { 13912 if ((i14 | 0) < 11) { 13913 HEAP16[i2 >> 1] = (HEAP16[i2 >> 1] | 0) + 1 << 16 >> 16; 13914 break; 13915 } else { 13916 HEAP16[i3 >> 1] = (HEAP16[i3 >> 1] | 0) + 1 << 16 >> 16; 13917 break; 13918 } 13919 } else { 13920 if ((i11 | 0) != (i12 | 0)) { 13921 i14 = i1 + (i11 << 2) + 2684 | 0; 13922 HEAP16[i14 >> 1] = (HEAP16[i14 >> 1] | 0) + 1 << 16 >> 16; 13923 } 13924 HEAP16[i4 >> 1] = (HEAP16[i4 >> 1] | 0) + 1 << 16 >> 16; 13925 break; 13926 } 13927 } else { 13928 i12 = i1 + (i11 << 2) + 2684 | 0; 13929 HEAP16[i12 >> 1] = (HEAPU16[i12 >> 1] | 0) + i14; 13930 } 13931 } while (0); 13932 if (i16 << 16 >> 16 == 0) { 13933 i12 = i11; 13934 i7 = 138; 13935 i9 = 3; 13936 i11 = i10; 13937 continue; 13938 } 13939 i12 = i11; 13940 i7 = i15 ? 6 : 7; 13941 i9 = i15 ? 3 : 4; 13942 i11 = i10; 13943 } 13944 STACKTOP = i8; 13945 return; 13946} 13947function _deflateEnd(i4) { 13948 i4 = i4 | 0; 13949 var i1 = 0, i2 = 0, i3 = 0, i5 = 0, i6 = 0, i7 = 0; 13950 i3 = STACKTOP; 13951 if ((i4 | 0) == 0) { 13952 i7 = -2; 13953 STACKTOP = i3; 13954 return i7 | 0; 13955 } 13956 i1 = i4 + 28 | 0; 13957 i6 = HEAP32[i1 >> 2] | 0; 13958 if ((i6 | 0) == 0) { 13959 i7 = -2; 13960 STACKTOP = i3; 13961 return i7 | 0; 13962 } 13963 i2 = HEAP32[i6 + 4 >> 2] | 0; 13964 switch (i2 | 0) { 13965 case 42: 13966 case 69: 13967 case 73: 13968 case 91: 13969 case 103: 13970 case 113: 13971 case 666: 13972 { 13973 break; 13974 } 13975 default: 13976 { 13977 i7 = -2; 13978 STACKTOP = i3; 13979 return i7 | 0; 13980 } 13981 } 13982 i5 = HEAP32[i6 + 8 >> 2] | 0; 13983 if ((i5 | 0) != 0) { 13984 FUNCTION_TABLE_vii[HEAP32[i4 + 36 >> 2] & 1](HEAP32[i4 + 40 >> 2] | 0, i5); 13985 i6 = HEAP32[i1 >> 2] | 0; 13986 } 13987 i5 = HEAP32[i6 + 68 >> 2] | 0; 13988 if ((i5 | 0) != 0) { 13989 FUNCTION_TABLE_vii[HEAP32[i4 + 36 >> 2] & 1](HEAP32[i4 + 40 >> 2] | 0, i5); 13990 i6 = HEAP32[i1 >> 2] | 0; 13991 } 13992 i5 = HEAP32[i6 + 64 >> 2] | 0; 13993 if ((i5 | 0) != 0) { 13994 FUNCTION_TABLE_vii[HEAP32[i4 + 36 >> 2] & 1](HEAP32[i4 + 40 >> 2] | 0, i5); 13995 i6 = HEAP32[i1 >> 2] | 0; 13996 } 13997 i7 = HEAP32[i6 + 56 >> 2] | 0; 13998 i5 = i4 + 36 | 0; 13999 if ((i7 | 0) == 0) { 14000 i4 = i4 + 40 | 0; 14001 } else { 14002 i4 = i4 + 40 | 0; 14003 FUNCTION_TABLE_vii[HEAP32[i5 >> 2] & 1](HEAP32[i4 >> 2] | 0, i7); 14004 i6 = HEAP32[i1 >> 2] | 0; 14005 } 14006 FUNCTION_TABLE_vii[HEAP32[i5 >> 2] & 1](HEAP32[i4 >> 2] | 0, i6); 14007 HEAP32[i1 >> 2] = 0; 14008 i7 = (i2 | 0) == 113 ? -3 : 0; 14009 STACKTOP = i3; 14010 return i7 | 0; 14011} 14012function _main(i4, i5) { 14013 i4 = i4 | 0; 14014 i5 = i5 | 0; 14015 var i1 = 0, i2 = 0, i3 = 0, i6 = 0; 14016 i1 = STACKTOP; 14017 STACKTOP = STACKTOP + 16 | 0; 14018 i2 = i1; 14019 L1 : do { 14020 if ((i4 | 0) > 1) { 14021 i4 = HEAP8[HEAP32[i5 + 4 >> 2] | 0] | 0; 14022 switch (i4 | 0) { 14023 case 50: 14024 { 14025 i2 = 250; 14026 break L1; 14027 } 14028 case 51: 14029 { 14030 i3 = 4; 14031 break L1; 14032 } 14033 case 52: 14034 { 14035 i2 = 2500; 14036 break L1; 14037 } 14038 case 53: 14039 { 14040 i2 = 5e3; 14041 break L1; 14042 } 14043 case 48: 14044 { 14045 i6 = 0; 14046 STACKTOP = i1; 14047 return i6 | 0; 14048 } 14049 case 49: 14050 { 14051 i2 = 60; 14052 break L1; 14053 } 14054 default: 14055 { 14056 HEAP32[i2 >> 2] = i4 + -48; 14057 _printf(144, i2 | 0) | 0; 14058 i6 = -1; 14059 STACKTOP = i1; 14060 return i6 | 0; 14061 } 14062 } 14063 } else { 14064 i3 = 4; 14065 } 14066 } while (0); 14067 if ((i3 | 0) == 4) { 14068 i2 = 500; 14069 } 14070 i3 = _malloc(1e5) | 0; 14071 i4 = 0; 14072 i6 = 0; 14073 i5 = 17; 14074 while (1) { 14075 do { 14076 if ((i6 | 0) <= 0) { 14077 if ((i4 & 7 | 0) == 0) { 14078 i6 = i4 & 31; 14079 i5 = 0; 14080 break; 14081 } else { 14082 i5 = (((Math_imul(i4, i4) | 0) >>> 0) % 6714 | 0) & 255; 14083 break; 14084 } 14085 } else { 14086 i6 = i6 + -1 | 0; 14087 } 14088 } while (0); 14089 HEAP8[i3 + i4 | 0] = i5; 14090 i4 = i4 + 1 | 0; 14091 if ((i4 | 0) == 1e5) { 14092 i4 = 0; 14093 break; 14094 } 14095 } 14096 do { 14097 _doit(i3, 1e5, i4); 14098 i4 = i4 + 1 | 0; 14099 } while ((i4 | 0) < (i2 | 0)); 14100 _puts(160) | 0; 14101 i6 = 0; 14102 STACKTOP = i1; 14103 return i6 | 0; 14104} 14105function _doit(i6, i1, i7) { 14106 i6 = i6 | 0; 14107 i1 = i1 | 0; 14108 i7 = i7 | 0; 14109 var i2 = 0, i3 = 0, i4 = 0, i5 = 0, i8 = 0, i9 = 0; 14110 i5 = STACKTOP; 14111 STACKTOP = STACKTOP + 16 | 0; 14112 i4 = i5; 14113 i3 = i5 + 12 | 0; 14114 i2 = i5 + 8 | 0; 14115 i8 = _compressBound(i1) | 0; 14116 i9 = HEAP32[2] | 0; 14117 if ((i9 | 0) == 0) { 14118 i9 = _malloc(i8) | 0; 14119 HEAP32[2] = i9; 14120 } 14121 if ((HEAP32[4] | 0) == 0) { 14122 HEAP32[4] = _malloc(i1) | 0; 14123 } 14124 HEAP32[i3 >> 2] = i8; 14125 _compress(i9, i3, i6, i1) | 0; 14126 i7 = (i7 | 0) == 0; 14127 if (i7) { 14128 i9 = HEAP32[i3 >> 2] | 0; 14129 HEAP32[i4 >> 2] = i1; 14130 HEAP32[i4 + 4 >> 2] = i9; 14131 _printf(24, i4 | 0) | 0; 14132 } 14133 HEAP32[i2 >> 2] = i1; 14134 _uncompress(HEAP32[4] | 0, i2, HEAP32[2] | 0, HEAP32[i3 >> 2] | 0) | 0; 14135 if ((HEAP32[i2 >> 2] | 0) != (i1 | 0)) { 14136 ___assert_fail(40, 72, 24, 104); 14137 } 14138 if (!i7) { 14139 STACKTOP = i5; 14140 return; 14141 } 14142 if ((_strcmp(i6, HEAP32[4] | 0) | 0) == 0) { 14143 STACKTOP = i5; 14144 return; 14145 } else { 14146 ___assert_fail(112, 72, 25, 104); 14147 } 14148} 14149function _uncompress(i6, i1, i5, i7) { 14150 i6 = i6 | 0; 14151 i1 = i1 | 0; 14152 i5 = i5 | 0; 14153 i7 = i7 | 0; 14154 var i2 = 0, i3 = 0, i4 = 0; 14155 i2 = STACKTOP; 14156 STACKTOP = STACKTOP + 64 | 0; 14157 i3 = i2; 14158 HEAP32[i3 >> 2] = i5; 14159 i5 = i3 + 4 | 0; 14160 HEAP32[i5 >> 2] = i7; 14161 HEAP32[i3 + 12 >> 2] = i6; 14162 HEAP32[i3 + 16 >> 2] = HEAP32[i1 >> 2]; 14163 HEAP32[i3 + 32 >> 2] = 0; 14164 HEAP32[i3 + 36 >> 2] = 0; 14165 i6 = _inflateInit_(i3, 2992, 56) | 0; 14166 if ((i6 | 0) != 0) { 14167 i7 = i6; 14168 STACKTOP = i2; 14169 return i7 | 0; 14170 } 14171 i6 = _inflate(i3, 4) | 0; 14172 if ((i6 | 0) == 1) { 14173 HEAP32[i1 >> 2] = HEAP32[i3 + 20 >> 2]; 14174 i7 = _inflateEnd(i3) | 0; 14175 STACKTOP = i2; 14176 return i7 | 0; 14177 } 14178 _inflateEnd(i3) | 0; 14179 if ((i6 | 0) == 2) { 14180 i7 = -3; 14181 STACKTOP = i2; 14182 return i7 | 0; 14183 } else if ((i6 | 0) == -5) { 14184 i4 = 4; 14185 } 14186 if ((i4 | 0) == 4 ? (HEAP32[i5 >> 2] | 0) == 0 : 0) { 14187 i7 = -3; 14188 STACKTOP = i2; 14189 return i7 | 0; 14190 } 14191 i7 = i6; 14192 STACKTOP = i2; 14193 return i7 | 0; 14194} 14195function _compress(i4, i1, i6, i5) { 14196 i4 = i4 | 0; 14197 i1 = i1 | 0; 14198 i6 = i6 | 0; 14199 i5 = i5 | 0; 14200 var i2 = 0, i3 = 0; 14201 i2 = STACKTOP; 14202 STACKTOP = STACKTOP + 64 | 0; 14203 i3 = i2; 14204 HEAP32[i3 >> 2] = i6; 14205 HEAP32[i3 + 4 >> 2] = i5; 14206 HEAP32[i3 + 12 >> 2] = i4; 14207 HEAP32[i3 + 16 >> 2] = HEAP32[i1 >> 2]; 14208 HEAP32[i3 + 32 >> 2] = 0; 14209 HEAP32[i3 + 36 >> 2] = 0; 14210 HEAP32[i3 + 40 >> 2] = 0; 14211 i4 = _deflateInit_(i3, -1, 168, 56) | 0; 14212 if ((i4 | 0) != 0) { 14213 i6 = i4; 14214 STACKTOP = i2; 14215 return i6 | 0; 14216 } 14217 i4 = _deflate(i3, 4) | 0; 14218 if ((i4 | 0) == 1) { 14219 HEAP32[i1 >> 2] = HEAP32[i3 + 20 >> 2]; 14220 i6 = _deflateEnd(i3) | 0; 14221 STACKTOP = i2; 14222 return i6 | 0; 14223 } else { 14224 _deflateEnd(i3) | 0; 14225 i6 = (i4 | 0) == 0 ? -5 : i4; 14226 STACKTOP = i2; 14227 return i6 | 0; 14228 } 14229 return 0; 14230} 14231function _inflateEnd(i4) { 14232 i4 = i4 | 0; 14233 var i1 = 0, i2 = 0, i3 = 0, i5 = 0, i6 = 0, i7 = 0; 14234 i1 = STACKTOP; 14235 if ((i4 | 0) == 0) { 14236 i7 = -2; 14237 STACKTOP = i1; 14238 return i7 | 0; 14239 } 14240 i2 = i4 + 28 | 0; 14241 i3 = HEAP32[i2 >> 2] | 0; 14242 if ((i3 | 0) == 0) { 14243 i7 = -2; 14244 STACKTOP = i1; 14245 return i7 | 0; 14246 } 14247 i6 = i4 + 36 | 0; 14248 i5 = HEAP32[i6 >> 2] | 0; 14249 if ((i5 | 0) == 0) { 14250 i7 = -2; 14251 STACKTOP = i1; 14252 return i7 | 0; 14253 } 14254 i7 = HEAP32[i3 + 52 >> 2] | 0; 14255 i4 = i4 + 40 | 0; 14256 if ((i7 | 0) != 0) { 14257 FUNCTION_TABLE_vii[i5 & 1](HEAP32[i4 >> 2] | 0, i7); 14258 i5 = HEAP32[i6 >> 2] | 0; 14259 i3 = HEAP32[i2 >> 2] | 0; 14260 } 14261 FUNCTION_TABLE_vii[i5 & 1](HEAP32[i4 >> 2] | 0, i3); 14262 HEAP32[i2 >> 2] = 0; 14263 i7 = 0; 14264 STACKTOP = i1; 14265 return i7 | 0; 14266} 14267function _memcpy(i3, i2, i1) { 14268 i3 = i3 | 0; 14269 i2 = i2 | 0; 14270 i1 = i1 | 0; 14271 var i4 = 0; 14272 if ((i1 | 0) >= 4096) return _emscripten_memcpy_big(i3 | 0, i2 | 0, i1 | 0) | 0; 14273 i4 = i3 | 0; 14274 if ((i3 & 3) == (i2 & 3)) { 14275 while (i3 & 3) { 14276 if ((i1 | 0) == 0) return i4 | 0; 14277 HEAP8[i3] = HEAP8[i2] | 0; 14278 i3 = i3 + 1 | 0; 14279 i2 = i2 + 1 | 0; 14280 i1 = i1 - 1 | 0; 14281 } 14282 while ((i1 | 0) >= 4) { 14283 HEAP32[i3 >> 2] = HEAP32[i2 >> 2]; 14284 i3 = i3 + 4 | 0; 14285 i2 = i2 + 4 | 0; 14286 i1 = i1 - 4 | 0; 14287 } 14288 } 14289 while ((i1 | 0) > 0) { 14290 HEAP8[i3] = HEAP8[i2] | 0; 14291 i3 = i3 + 1 | 0; 14292 i2 = i2 + 1 | 0; 14293 i1 = i1 - 1 | 0; 14294 } 14295 return i4 | 0; 14296} 14297function _strcmp(i4, i2) { 14298 i4 = i4 | 0; 14299 i2 = i2 | 0; 14300 var i1 = 0, i3 = 0, i5 = 0; 14301 i1 = STACKTOP; 14302 i5 = HEAP8[i4] | 0; 14303 i3 = HEAP8[i2] | 0; 14304 if (i5 << 24 >> 24 != i3 << 24 >> 24 | i5 << 24 >> 24 == 0 | i3 << 24 >> 24 == 0) { 14305 i4 = i5; 14306 i5 = i3; 14307 i4 = i4 & 255; 14308 i5 = i5 & 255; 14309 i5 = i4 - i5 | 0; 14310 STACKTOP = i1; 14311 return i5 | 0; 14312 } 14313 do { 14314 i4 = i4 + 1 | 0; 14315 i2 = i2 + 1 | 0; 14316 i5 = HEAP8[i4] | 0; 14317 i3 = HEAP8[i2] | 0; 14318 } while (!(i5 << 24 >> 24 != i3 << 24 >> 24 | i5 << 24 >> 24 == 0 | i3 << 24 >> 24 == 0)); 14319 i4 = i5 & 255; 14320 i5 = i3 & 255; 14321 i5 = i4 - i5 | 0; 14322 STACKTOP = i1; 14323 return i5 | 0; 14324} 14325function _memset(i1, i4, i3) { 14326 i1 = i1 | 0; 14327 i4 = i4 | 0; 14328 i3 = i3 | 0; 14329 var i2 = 0, i5 = 0, i6 = 0, i7 = 0; 14330 i2 = i1 + i3 | 0; 14331 if ((i3 | 0) >= 20) { 14332 i4 = i4 & 255; 14333 i7 = i1 & 3; 14334 i6 = i4 | i4 << 8 | i4 << 16 | i4 << 24; 14335 i5 = i2 & ~3; 14336 if (i7) { 14337 i7 = i1 + 4 - i7 | 0; 14338 while ((i1 | 0) < (i7 | 0)) { 14339 HEAP8[i1] = i4; 14340 i1 = i1 + 1 | 0; 14341 } 14342 } 14343 while ((i1 | 0) < (i5 | 0)) { 14344 HEAP32[i1 >> 2] = i6; 14345 i1 = i1 + 4 | 0; 14346 } 14347 } 14348 while ((i1 | 0) < (i2 | 0)) { 14349 HEAP8[i1] = i4; 14350 i1 = i1 + 1 | 0; 14351 } 14352 return i1 - i3 | 0; 14353} 14354function copyTempDouble(i1) { 14355 i1 = i1 | 0; 14356 HEAP8[tempDoublePtr] = HEAP8[i1]; 14357 HEAP8[tempDoublePtr + 1 | 0] = HEAP8[i1 + 1 | 0]; 14358 HEAP8[tempDoublePtr + 2 | 0] = HEAP8[i1 + 2 | 0]; 14359 HEAP8[tempDoublePtr + 3 | 0] = HEAP8[i1 + 3 | 0]; 14360 HEAP8[tempDoublePtr + 4 | 0] = HEAP8[i1 + 4 | 0]; 14361 HEAP8[tempDoublePtr + 5 | 0] = HEAP8[i1 + 5 | 0]; 14362 HEAP8[tempDoublePtr + 6 | 0] = HEAP8[i1 + 6 | 0]; 14363 HEAP8[tempDoublePtr + 7 | 0] = HEAP8[i1 + 7 | 0]; 14364} 14365function __tr_init(i1) { 14366 i1 = i1 | 0; 14367 var i2 = 0; 14368 i2 = STACKTOP; 14369 HEAP32[i1 + 2840 >> 2] = i1 + 148; 14370 HEAP32[i1 + 2848 >> 2] = 1064; 14371 HEAP32[i1 + 2852 >> 2] = i1 + 2440; 14372 HEAP32[i1 + 2860 >> 2] = 1088; 14373 HEAP32[i1 + 2864 >> 2] = i1 + 2684; 14374 HEAP32[i1 + 2872 >> 2] = 1112; 14375 HEAP16[i1 + 5816 >> 1] = 0; 14376 HEAP32[i1 + 5820 >> 2] = 0; 14377 HEAP32[i1 + 5812 >> 2] = 8; 14378 _init_block(i1); 14379 STACKTOP = i2; 14380 return; 14381} 14382function copyTempFloat(i1) { 14383 i1 = i1 | 0; 14384 HEAP8[tempDoublePtr] = HEAP8[i1]; 14385 HEAP8[tempDoublePtr + 1 | 0] = HEAP8[i1 + 1 | 0]; 14386 HEAP8[tempDoublePtr + 2 | 0] = HEAP8[i1 + 2 | 0]; 14387 HEAP8[tempDoublePtr + 3 | 0] = HEAP8[i1 + 3 | 0]; 14388} 14389function _deflateInit_(i4, i3, i2, i1) { 14390 i4 = i4 | 0; 14391 i3 = i3 | 0; 14392 i2 = i2 | 0; 14393 i1 = i1 | 0; 14394 var i5 = 0; 14395 i5 = STACKTOP; 14396 i4 = _deflateInit2_(i4, i3, 8, 15, 8, 0, i2, i1) | 0; 14397 STACKTOP = i5; 14398 return i4 | 0; 14399} 14400function _zcalloc(i3, i1, i2) { 14401 i3 = i3 | 0; 14402 i1 = i1 | 0; 14403 i2 = i2 | 0; 14404 var i4 = 0; 14405 i4 = STACKTOP; 14406 i3 = _malloc(Math_imul(i2, i1) | 0) | 0; 14407 STACKTOP = i4; 14408 return i3 | 0; 14409} 14410function dynCall_iiii(i4, i3, i2, i1) { 14411 i4 = i4 | 0; 14412 i3 = i3 | 0; 14413 i2 = i2 | 0; 14414 i1 = i1 | 0; 14415 return FUNCTION_TABLE_iiii[i4 & 1](i3 | 0, i2 | 0, i1 | 0) | 0; 14416} 14417function runPostSets() {} 14418function _strlen(i1) { 14419 i1 = i1 | 0; 14420 var i2 = 0; 14421 i2 = i1; 14422 while (HEAP8[i2] | 0) { 14423 i2 = i2 + 1 | 0; 14424 } 14425 return i2 - i1 | 0; 14426} 14427function stackAlloc(i1) { 14428 i1 = i1 | 0; 14429 var i2 = 0; 14430 i2 = STACKTOP; 14431 STACKTOP = STACKTOP + i1 | 0; 14432 STACKTOP = STACKTOP + 7 & -8; 14433 return i2 | 0; 14434} 14435function dynCall_iii(i3, i2, i1) { 14436 i3 = i3 | 0; 14437 i2 = i2 | 0; 14438 i1 = i1 | 0; 14439 return FUNCTION_TABLE_iii[i3 & 3](i2 | 0, i1 | 0) | 0; 14440} 14441function setThrew(i1, i2) { 14442 i1 = i1 | 0; 14443 i2 = i2 | 0; 14444 if ((__THREW__ | 0) == 0) { 14445 __THREW__ = i1; 14446 threwValue = i2; 14447 } 14448} 14449function dynCall_vii(i3, i2, i1) { 14450 i3 = i3 | 0; 14451 i2 = i2 | 0; 14452 i1 = i1 | 0; 14453 FUNCTION_TABLE_vii[i3 & 1](i2 | 0, i1 | 0); 14454} 14455function _zcfree(i2, i1) { 14456 i2 = i2 | 0; 14457 i1 = i1 | 0; 14458 i2 = STACKTOP; 14459 _free(i1); 14460 STACKTOP = i2; 14461 return; 14462} 14463function _compressBound(i1) { 14464 i1 = i1 | 0; 14465 return i1 + 13 + (i1 >>> 12) + (i1 >>> 14) + (i1 >>> 25) | 0; 14466} 14467function b0(i1, i2, i3) { 14468 i1 = i1 | 0; 14469 i2 = i2 | 0; 14470 i3 = i3 | 0; 14471 abort(0); 14472 return 0; 14473} 14474function b2(i1, i2) { 14475 i1 = i1 | 0; 14476 i2 = i2 | 0; 14477 abort(2); 14478 return 0; 14479} 14480function b1(i1, i2) { 14481 i1 = i1 | 0; 14482 i2 = i2 | 0; 14483 abort(1); 14484} 14485function stackRestore(i1) { 14486 i1 = i1 | 0; 14487 STACKTOP = i1; 14488} 14489function setTempRet9(i1) { 14490 i1 = i1 | 0; 14491 tempRet9 = i1; 14492} 14493function setTempRet8(i1) { 14494 i1 = i1 | 0; 14495 tempRet8 = i1; 14496} 14497function setTempRet7(i1) { 14498 i1 = i1 | 0; 14499 tempRet7 = i1; 14500} 14501function setTempRet6(i1) { 14502 i1 = i1 | 0; 14503 tempRet6 = i1; 14504} 14505function setTempRet5(i1) { 14506 i1 = i1 | 0; 14507 tempRet5 = i1; 14508} 14509function setTempRet4(i1) { 14510 i1 = i1 | 0; 14511 tempRet4 = i1; 14512} 14513function setTempRet3(i1) { 14514 i1 = i1 | 0; 14515 tempRet3 = i1; 14516} 14517function setTempRet2(i1) { 14518 i1 = i1 | 0; 14519 tempRet2 = i1; 14520} 14521function setTempRet1(i1) { 14522 i1 = i1 | 0; 14523 tempRet1 = i1; 14524} 14525function setTempRet0(i1) { 14526 i1 = i1 | 0; 14527 tempRet0 = i1; 14528} 14529function stackSave() { 14530 return STACKTOP | 0; 14531} 14532 14533// EMSCRIPTEN_END_FUNCS 14534 var FUNCTION_TABLE_iiii = [b0,_zcalloc]; 14535 var FUNCTION_TABLE_vii = [b1,_zcfree]; 14536 var FUNCTION_TABLE_iii = [b2,_deflate_stored,_deflate_fast,_deflate_slow]; 14537 14538 return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9, dynCall_iiii: dynCall_iiii, dynCall_vii: dynCall_vii, dynCall_iii: dynCall_iii }; 14539}) 14540// EMSCRIPTEN_END_ASM 14541({ "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_iiii": invoke_iiii, "invoke_vii": invoke_vii, "invoke_iii": invoke_iii, "_send": _send, "___setErrNo": ___setErrNo, "___assert_fail": ___assert_fail, "_fflush": _fflush, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "___errno_location": ___errno_location, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "_llvm_bswap_i32": _llvm_bswap_i32, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer); 14542var _strlen = Module["_strlen"] = asm["_strlen"]; 14543var _free = Module["_free"] = asm["_free"]; 14544var _main = Module["_main"] = asm["_main"]; 14545var _memset = Module["_memset"] = asm["_memset"]; 14546var _malloc = Module["_malloc"] = asm["_malloc"]; 14547var _memcpy = Module["_memcpy"] = asm["_memcpy"]; 14548var runPostSets = Module["runPostSets"] = asm["runPostSets"]; 14549var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"]; 14550var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"]; 14551var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"]; 14552 14553Runtime.stackAlloc = function(size) { return asm['stackAlloc'](size) }; 14554Runtime.stackSave = function() { return asm['stackSave']() }; 14555Runtime.stackRestore = function(top) { asm['stackRestore'](top) }; 14556 14557 14558// Warning: printing of i64 values may be slightly rounded! No deep i64 math used, so precise i64 code not included 14559var i64Math = null; 14560 14561// === Auto-generated postamble setup entry stuff === 14562 14563if (memoryInitializer) { 14564 if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) { 14565 var data = Module['readBinary'](memoryInitializer); 14566 HEAPU8.set(data, STATIC_BASE); 14567 } else { 14568 addRunDependency('memory initializer'); 14569 Browser.asyncLoad(memoryInitializer, function(data) { 14570 HEAPU8.set(data, STATIC_BASE); 14571 removeRunDependency('memory initializer'); 14572 }, function(data) { 14573 throw 'could not load memory initializer ' + memoryInitializer; 14574 }); 14575 } 14576} 14577 14578function ExitStatus(status) { 14579 this.name = "ExitStatus"; 14580 this.message = "Program terminated with exit(" + status + ")"; 14581 this.status = status; 14582}; 14583ExitStatus.prototype = new Error(); 14584ExitStatus.prototype.constructor = ExitStatus; 14585 14586var initialStackTop; 14587var preloadStartTime = null; 14588var calledMain = false; 14589 14590dependenciesFulfilled = function runCaller() { 14591 // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) 14592 if (!Module['calledRun'] && shouldRunNow) run([].concat(Module["arguments"])); 14593 if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled 14594} 14595 14596Module['callMain'] = Module.callMain = function callMain(args) { 14597 assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)'); 14598 assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called'); 14599 14600 args = args || []; 14601 14602 ensureInitRuntime(); 14603 14604 var argc = args.length+1; 14605 function pad() { 14606 for (var i = 0; i < 4-1; i++) { 14607 argv.push(0); 14608 } 14609 } 14610 var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_NORMAL) ]; 14611 pad(); 14612 for (var i = 0; i < argc-1; i = i + 1) { 14613 argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL)); 14614 pad(); 14615 } 14616 argv.push(0); 14617 argv = allocate(argv, 'i32', ALLOC_NORMAL); 14618 14619 initialStackTop = STACKTOP; 14620 14621 try { 14622 14623 var ret = Module['_main'](argc, argv, 0); 14624 14625 14626 // if we're not running an evented main loop, it's time to exit 14627 if (!Module['noExitRuntime']) { 14628 exit(ret); 14629 } 14630 } 14631 catch(e) { 14632 if (e instanceof ExitStatus) { 14633 // exit() throws this once it's done to make sure execution 14634 // has been stopped completely 14635 return; 14636 } else if (e == 'SimulateInfiniteLoop') { 14637 // running an evented main loop, don't immediately exit 14638 Module['noExitRuntime'] = true; 14639 return; 14640 } else { 14641 if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]); 14642 throw e; 14643 } 14644 } finally { 14645 calledMain = true; 14646 } 14647} 14648 14649 14650 14651 14652function run(args) { 14653 args = args || Module['arguments']; 14654 14655 if (preloadStartTime === null) preloadStartTime = Date.now(); 14656 14657 if (runDependencies > 0) { 14658 Module.printErr('run() called, but dependencies remain, so not running'); 14659 return; 14660 } 14661 14662 preRun(); 14663 14664 if (runDependencies > 0) return; // a preRun added a dependency, run will be called later 14665 if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame 14666 14667 function doRun() { 14668 if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening 14669 Module['calledRun'] = true; 14670 14671 ensureInitRuntime(); 14672 14673 preMain(); 14674 14675 if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { 14676 Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); 14677 } 14678 14679 if (Module['_main'] && shouldRunNow) { 14680 Module['callMain'](args); 14681 } 14682 14683 postRun(); 14684 } 14685 14686 if (Module['setStatus']) { 14687 Module['setStatus']('Running...'); 14688 setTimeout(function() { 14689 setTimeout(function() { 14690 Module['setStatus'](''); 14691 }, 1); 14692 if (!ABORT) doRun(); 14693 }, 1); 14694 } else { 14695 doRun(); 14696 } 14697} 14698Module['run'] = Module.run = run; 14699 14700function exit(status) { 14701 ABORT = true; 14702 EXITSTATUS = status; 14703 STACKTOP = initialStackTop; 14704 14705 // exit the runtime 14706 exitRuntime(); 14707 14708 // TODO We should handle this differently based on environment. 14709 // In the browser, the best we can do is throw an exception 14710 // to halt execution, but in node we could process.exit and 14711 // I'd imagine SM shell would have something equivalent. 14712 // This would let us set a proper exit status (which 14713 // would be great for checking test exit statuses). 14714 // https://github.com/kripken/emscripten/issues/1371 14715 14716 // throw an exception to halt the current execution 14717 throw new ExitStatus(status); 14718} 14719Module['exit'] = Module.exit = exit; 14720 14721function abort(text) { 14722 if (text) { 14723 Module.print(text); 14724 Module.printErr(text); 14725 } 14726 14727 ABORT = true; 14728 EXITSTATUS = 1; 14729 14730 var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; 14731 14732 throw 'abort() at ' + stackTrace() + extra; 14733} 14734Module['abort'] = Module.abort = abort; 14735 14736// {{PRE_RUN_ADDITIONS}} 14737 14738if (Module['preInit']) { 14739 if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; 14740 while (Module['preInit'].length > 0) { 14741 Module['preInit'].pop()(); 14742 } 14743} 14744 14745// shouldRunNow refers to calling main(), not run(). 14746var shouldRunNow = true; 14747if (Module['noInitialRun']) { 14748 shouldRunNow = false; 14749} 14750 14751 14752run([].concat(Module["arguments"])); 14753